Skip to content

Commit

Permalink
Dash, add a column with the number of opened issues per app (#2422)
Browse files Browse the repository at this point in the history
* Dash, add a column with the number of opened issues per app

* Dash, issues number is a link to issues'page in Github

* Dash, filter apps with issues

* Dash, sort by issues number

* Update store/templates/dash.html

Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com>

* Store, Babel extract

* Store, Babel, update

* Store, Babel, compile

---------

Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com>
  • Loading branch information
nathanael-h and alexAubin committed Jun 21, 2024
1 parent c3133fc commit 206acfc
Show file tree
Hide file tree
Showing 84 changed files with 7,636 additions and 6,094 deletions.
228 changes: 127 additions & 101 deletions store/messages.pot

Large diffs are not rendered by default.

32 changes: 31 additions & 1 deletion store/templates/dash.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ <h1 class="text-2xl font-bold">
<option {% if request.args.get("filter") == "regressions_bookworm" %}selected{% endif %} value="regressions_bookworm">{{ _("Major regressions on Bookworm CI") }}</option>
<option {% if request.args.get("filter") == "testings" %}selected{% endif %} value="testings">{{ _("Apps with testings PRs") }}</option>
<option {% if request.args.get("filter") == "autoupdate" %}selected{% endif %} value="autoupdate">{{ _("Apps with autoupdate PRs") }}</option>
<option {% if request.args.get("filter") == "nb_issues" %}selected{% endif %} value="nb_issues">{{ _("Apps with issues") }}</option>
<option {% if request.args.get("filter") == "packagingv1" %}selected{% endif %} value="packagingv1">{{ _("Packaging v1 apps") }}</option>
</select>
</div>
Expand All @@ -43,6 +44,8 @@ <h1 class="text-2xl font-bold">
<option {% if request.args.get("sort") in [None, "stars"] %}selected{% endif %} value="stars">{{ _("Popularity stars") }}</option>
<option {% if request.args.get("sort") == "main_branch_update" %}selected{% endif %} value="main_branch_update">{{ _("Last update on main/master branch") }}</option>
<option {% if request.args.get("sort") == "testing_branch_update" %}selected{% endif %} value="testing_branch_update">{{ _("Last update on testing branch") }}</option>
<option {% if request.args.get("sort") == "nb_issues" %}selected{% endif %} value="nb_issues">{{ _("Number of opened issues") }}</option>

</select>
</div>
<div class="w-fit mx-auto flex items-center px-2 pt-2">
Expand Down Expand Up @@ -82,6 +85,7 @@ <h1 class="text-2xl font-bold">
<th class="-rotate-90 md:-rotate-45 max-w-10 md:max-w-16 text-left text-nowrap">{{ _("Bookworm CI") }}</th>
<th class="-rotate-90 md:-rotate-45 max-w-10 md:max-w-16 text-left text-nowrap">{{ _("Testing PR") }}</th>
<th class="-rotate-90 md:-rotate-45 max-w-10 md:max-w-16 text-left text-nowrap">{{ _("Autoupdate PR") }}</th>
<th class="-rotate-90 md:-rotate-45 max-w-10 md:max-w-16 text-left text-nowrap">{{ _("Issues") }}</th>
<th></th>
</tr>
{% for app, infos in data.items() %}
Expand Down Expand Up @@ -110,6 +114,8 @@ <h1 class="text-2xl font-bold">
data-last-update-autoupdate="{% if infos["ci-auto-update"] %}{{ infos["ci-auto-update"]["timestamp_updated"] }}{% else %}-1{% endif %}"
data-packaging-format="{{ infos["packaging_format"] }}"
data-deprecated="{% if "deprecated-software" in infos["antifeatures"] or "replaced-by-another-app" in infos["antifeatures"] or "package-not-maintained" in infos["antifeatures"] %}True{% else %}False{% endif %}"
data-nb-issues="{{ infos["nb_issues"] }}"

>
<td class="truncate max-w-24 md:max-w-64 text-center text-blue-600 font-medium">
<a href="{{ infos["url"] }}">{{ app }}</a>
Expand Down Expand Up @@ -180,7 +186,7 @@ <h1 class="text-2xl font-bold">
</a>
{% endif %}
</td>
<td class="border-r-2 border-gray-100 text-center"
<td class="border-r-2 border-gray-100 text-center">
{% if "ci-auto-update" in infos %}
<a href="{{ infos["ci-auto-update"]["url"] }}">
<i class="fa fa-arrow-up"></i>
Expand All @@ -195,6 +201,13 @@ <h1 class="text-2xl font-bold">
</a>
{% endif %}
</td>
<td class="border-r-2 border-gray-100 text-center">
{% if infos["nb_issues"] != 0 %}
<a href="{{ infos["url"] }}/issues">
{{ infos["nb_issues"] }}
</a>
{% endif %}
</td>
<td class="px-3 truncate text-sm max-w-16 sm:max-w-full">
{% if this_app_stars > 0 %}
<span class="text-xs border-purple-400 text-purple-600 px-1 py-0 border rounded">{{ this_app_stars }}
Expand Down Expand Up @@ -337,6 +350,18 @@ <h1 class="text-2xl font-bold">
entries[i].classList.add("hidden");
}
}
else if (filterName == "nb_issues")
{
if (entries[i].dataset.nbIssues > 0)
{
entries[i].classList.remove("hidden");
nb_found++
}
else
{
entries[i].classList.add("hidden");
}
}
}

document.getElementById('nbEntriesFound').innerHTML = "(" + nb_found + " apps)";
Expand Down Expand Up @@ -377,6 +402,11 @@ <h1 class="text-2xl font-bold">
return a.dataset.app > b.dataset.app ? 1 : -1;
});
}
else if (sortBy === "nb_issues") {
toSort.sort(function(a, b) {
return b.dataset.nbIssues - a.dataset.nbIssues;
});
}
for(var i = 0, l = toSort.length; i < l; i++) {
toSort[i].remove()
table.appendChild(toSort[i]);
Expand Down
Binary file modified store/translations/ar/LC_MESSAGES/messages.mo
Binary file not shown.
Loading

0 comments on commit 206acfc

Please sign in to comment.