Skip to content

Commit

Permalink
feat: update tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip-Larsen-Donnelly committed Jun 28, 2024
1 parent 9c0e2e0 commit 071a4ff
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
3 changes: 3 additions & 0 deletions website/content/appsRecent.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
</head>
<body>
<h1>ReAR View (Recent App Releases)</h1>
<p class="description">This tool allows you to view recent releases of core apps on GitHub.</p>
<p class="description">The period selection defaults to the last month. Click "Show releases" to display the changes for the period.<br>
The default view shows all commits linked to a Jira issue. Toggle "Show all commits" if you want to see those without a Jira ticket too.<br>Alternatively you can view the GitHub release text for all of the releases in the period, by toggling that option.</p>
<label for="start-date">Start Date:</label>
<input type="date" id="start-date">
<label for="end-date">End Date:</label>
Expand Down
13 changes: 11 additions & 2 deletions website/content/resources/css/apprn.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
body {
font-family: 'Arial', sans-serif;
background-color: #f4f4f4;
_background-color: #f4f4f4;
margin: 0;
padding: 10px;
}
Expand Down Expand Up @@ -86,8 +86,12 @@ a:hover {
padding:20px;
}

div.results > div {
border-top: 1px solid #d3d8dc;
}

div.results > div:nth-of-type(odd) {
background: white;
_background: white;
}

.toggle-container {
Expand Down Expand Up @@ -158,3 +162,8 @@ div.results > div:nth-of-type(odd) {
#tf, #tv {
display:flex;
}

.description {
color: #555;
line-height:1.3em;
}
9 changes: 9 additions & 0 deletions website/content/resources/js/apprn.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ function displayCommits() {
for (let i = toIndex; i < fromIndex; i++) {
const version = Object.keys(appData)[i];
const categories = appData[version];


// remove "GitHub" and "Maintenance" categories if they exists
const keysToRemove = ['GitHub', "Maintenance"];
keysToRemove.forEach(key => {
if (categories[key]) {
delete categories[key];
}
});

// Display a heading for the current version
messagesDiv.innerHTML += `<h2><a href="https://github.com/dhis2/${app}/releases/tag/${version}">${version}</a></h2>`;
Expand Down
4 changes: 2 additions & 2 deletions website/content/resources/js/rear.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function printReleaseNotes(releaseNotes, container) {
const remainingKeys = allKeys.filter(key => !orderedKeys.includes(key));
const sortedKeys = [...orderedKeys, ...remainingKeys];

// remove "GitHub" key if it exists
// remove "GitHub" and "Maintenance" keys if they exists
keysToRemove = ['GitHub', "Maintenance"];

keysToRemove.forEach(key => {
Expand Down Expand Up @@ -73,7 +73,7 @@ function printReleaseNotes(releaseNotes, container) {
}

const listItem = document.createElement('li');
listItem.textContent = note;
listItem.innerHTML = note.replace(/(DHIS2-[0-9]+|LIBS-[0-9]+|TECH-[0-9]+|ANDROID-[0-9]+)/g, '<a href="https://dhis2.atlassian.net/browse/$1" target="_blank">$1</a>');
list.appendChild(listItem);
});
// if the list is empty, don't include it
Expand Down

0 comments on commit 071a4ff

Please sign in to comment.