2018-11-07 20:12:36 +01:00
{% extends "base.html" %}
{% block content %}
< div class = "row" >
< div class = "mx-auto" >
2018-12-10 23:08:17 +01:00
Active maintainers :
2018-11-07 20:12:36 +01:00
< select id = "maintainer-select" >
< option value = "all" > All< / option >
< option value = "nobody" > Nobody / Unmaintained< / option >
{% for maintainer in maintainers %}
< option value = "{{ maintainer.lower()|replace(" " , " " ) } } " > {{ maintainer }}< / option >
{% endfor %}
< / select >
< / div >
< / div >
< div class = "row" >
< div class = "mx-auto" >
< div >
< table class = "table table-responsive ci-app-table" >
< thead >
< tr >
< th class = "ci-app-row-title" > App< / th >
< th class = "ci-app-test-title" > < div > Declared state< / div > < / th >
< th class = "ci-app-test-title" > < div > Maintained< / div > < / th >
< th class = "ci-app-test-title" > < div > Public level< / div > < / th >
< th class = "ci-app-test-title" > < div > CI level< / div > < / th >
< th class = "ci-app-test-title" > < div > # opened issues< / div > < / th >
< th class = "ci-app-test-title" > < div > # opened PR< / div > < / th >
< th class = "ci-app-test-title" > < div > Last commit< / div > < / th >
< th > < / th >
< / tr >
< / thead >
< tbody >
{% for app in apps %}
< tr class = "appline" app = "{{ app.name }}" maintainers = "{% for m in app.maintainers %}{{ m.lower()|replace(" " , " " ) } } | { % endfor % } " maintained = "{{ app.maintained }}" >
< td class = "ci-app-row-title" >
< a href = "{{ url_for('main.appci_app', app=app.name) }}" >
< span class = "font-weight-bold" title = "More tests / info for this app" >
{{ app.name }}< / span >
< / a >
< / td >
< td >
2020-09-03 19:33:59 +02:00
{% if app.state == "working" %}
2018-11-07 20:12:36 +01:00
< span class = "text-success oi oi-circle-check" title = "Working" aria-hidden = "true" > < / span >
{% elif app.state == "inprogress" %}
< span class = "text-warning oi oi-wrench" title = "In progress" aria-hidden = "true" > < / span >
{% else %}
< span class = "text-danger oi oi-fire" title = "Not working" aria-hidden = "true" > < / span >
{% endif %}
< / td >
{% if app.maintained %}
< td class = "text-success" >
< span class = "oi oi-circle-check" aria-hidden = "true" > < / span >
{% else %}
< td class = "text-warning" >
< span class = "oi oi-warning" aria-hidden = "true" > < / span >
{% endif %}
< / td >
{% if app.state == "inprogress" or app.state == "notworking" %}
< td class = "ci-app-level" > < div title = "Public Level" > < / div > < / td >
< td class = "ci-app-level" > < div title = "CI Level" > < / div > < / td >
{% else %}
< td class = "ci-app-level
{% if app.public_level == None or app.public_level == -1 or app.public_level == "?" %}
table-active
{% elif app.public_level < = 0 %}
table-danger
2020-09-03 19:33:59 +02:00
{% elif app.public_level < = 4 %}
2018-11-07 20:12:36 +01:00
table-warning
{% else %}
table-success
{% endif %}
" value="{{ app.public_level }}">
2018-11-08 14:16:07 +01:00
< div title = "Public Level" > < strong > {{ app.public_level if app.public_level != None and app.public_level >= 0 else "?" }}< / strong > < / div >
2018-11-07 20:12:36 +01:00
< / td >
< td class = "ci-app-level
{% if app.ci_level == None or app.ci_level == -1 or app.ci_level == "?" %}
table-active
{% elif app.ci_level < = 0 %}
table-danger
2020-09-03 19:33:59 +02:00
{% elif app.ci_level < = 4 %}
2018-11-07 20:12:36 +01:00
table-warning
{% else %}
table-success
{% endif %}
" value="{{ app.ci_level }}">
2018-11-08 14:16:07 +01:00
< div title = "CI Level" > < strong > {{ app.ci_level if app.ci_level != None and app.ci_level >= 0 else "?" }}< / strong > < / div >
2018-11-07 20:12:36 +01:00
< / td >
{% endif %}
< td class = "font-weight-bold
{% if app.opened_issues >= 10 %}
text-danger
{% elif app.opened_issues >= 5 %}
text-warning
{% elif app.opened_issues > 0 %}
text-active
{% else %}
text-success
{% endif %}
">{{ app.opened_issues }}< / a > < / td >
< td class = "font-weight-bold
{% if app.opened_prs > 0 %}
text-info
{% endif %}
">{{ app.opened_prs }}< / td >
< td class = "ci-app-test-info" >
2018-11-08 14:16:07 +01:00
{% if app.master_commit_date %}
< span class = "daysAgo" timestamp = {{ app . master_commit_date . timestamp ( ) } } > < / span > < / td >
2018-11-07 20:12:36 +01:00
{% else %}
< span class = "daysAgo" > ???< / span > < / td >
{% endif %}
< / td >
< td class = "px-0" >
< a href = "{{ app.repo }}" >
< span class = "oi oi-external-link text-info"
aria-hidden="true"
title="To the Git repo!">< / span >
< / a >
< / td >
< / tr >
{% endfor %}
< / tbody >
< / table >
< / div >
< / div >
< / div >
< script >
window.onload = function () {
$('#maintainer-select').on('change', function() {
var maintainer = this.value;
2018-12-10 23:08:17 +01:00
window.history.pushState("?", "YunoHost dashboard", "{{ url_for('main.app_maintainer_dash') }}/"+maintainer);
2018-11-07 20:12:36 +01:00
if (maintainer == "all")
{
$(".appline").show();
return;
}
else if (maintainer == "nobody")
{
$(".appline").each(function (i) {
if ((this.attributes["maintainers"].value == "") || (this.attributes["maintained"].value == "False"))
{
$(this).show();
}
else {
$(this).hide();
}
});
}
else
{
$(".appline").each(function (i) {
var maintainers = this.attributes["maintainers"].value.split("|");
if (maintainers.includes(maintainer)) {
$(this).show();
}
else {
$(this).hide();
}
});
}
});
2018-12-10 23:08:17 +01:00
{% if maintainer %}
$('#maintainer-select').val('{{ maintainer }}');
$('#maintainer-select').change();
{% endif %}
};
2018-11-07 20:12:36 +01:00
< / script >
{% endblock %}