summaryrefslogtreecommitdiffstats
path: root/templates/packages/stale_relations.html
blob: 975ef1b6a37f486592cd60c2b459f1e28a6d2e3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{% extends "base.html" %}
{% block title %}Arch Linux - Stale Package Relations{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}

{% block content %}
<div class="box">
    <h2>Stale Package Relations</h2>

    <h3>Inactive User Relations ({{ inactive_user|length }})</h3>

    <table class="results" id="inactive-user">
        <thead>
            <tr>
                <th>Package Base</th>
                <th>Packages</th>
                <th>User</th>
                <th>Type</th>
            </tr>
        </thead>
        <tbody>
            {% for relation in inactive_user %}
            <tr class="{% cycle 'odd' 'even' %}">
                <td>{{ relation.pkgbase }}</td>
                <td class="wrap">{% for pkg in relation.get_associated_packages %}
                    <a href="{{ pkg.get_absolute_url }}"
                        title="View package details for {{ pkg.pkgname }}">{{ pkg.repo|lower }}/{{ pkg.pkgname }} ({{ pkg.arch }})</a>{% if not forloop.last %}, {% endif %}
                {% endfor %}</td>
                <td>{{ relation.user.get_full_name }}</td>
                <td>{{ relation.get_type_display }}</td>
            </tr>
            {% empty %}
                <tr class="empty"><td colspan="3"><em>No inactive user relations.</em></td></tr>
            {% endfor %}
        </tbody>
    </table>

    <h3>Relations with Non-existent <tt>pkgbase</tt> ({{ missing_pkgbase|length }})</h3>

    <table class="results" id="missing-pkgbase">
        <thead>
            <tr>
                <th>Package Base</th>
                <th>User</th>
                <th>Type</th>
            </tr>
        </thead>
        <tbody>
            {% for relation in missing_pkgbase %}
            <tr class="{% cycle 'odd' 'even' %}">
                <td>{{ relation.pkgbase }}</td>
                <td>{{ relation.user.get_full_name }}</td>
                <td>{{ relation.get_type_display }}</td>
            </tr>
            {% empty %}
                <tr class="empty"><td colspan="3"><em>No non-existent pkgbase relations.</em></td></tr>
            {% endfor %}
        </tbody>
    </table>

    <h3>Maintainers with Wrong Permissions ({{ wrong_permissions|length }})</h3>

    <table class="results" id="wrong-permissions">
        <thead>
            <tr>
                <th>Package Base</th>
                <th>Packages</th>
                <th>User</th>
                <th>Allowed Repos</th>
                <th>Currently in Repos</th>
            </tr>
        </thead>
        <tbody>
            {% for relation in wrong_permissions %}
            <tr class="{% cycle 'odd' 'even' %}">
                <td>{{ relation.pkgbase }}</td>
                <td class="wrap">{% for pkg in relation.get_associated_packages %}
                    <a href="{{ pkg.get_absolute_url }}"
                        title="View package details for {{ pkg.pkgname }}">{{ pkg.repo|lower }}/{{ pkg.pkgname }} ({{ pkg.arch }})</a>{% if not forloop.last %}, {% endif %}
                {% endfor %}</td>
                <td>{{ relation.user.get_full_name }}</td>
                <td class="wrap">{{ relation.user.userprofile.allowed_repos.all|join:", " }}</td>
                <td class="wrap">{{ relation.repositories|join:", " }}</td>
            </tr>
            {% empty %}
                <tr class="empty"><td colspan="3"><em>No relations with wrong permissions.</em></td></tr>
            {% endfor %}
        </tbody>
    </table>

</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="/media/archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('#inactive-user:not(:has(tbody tr.empty))').tablesorter({widgets: ['zebra'], sortList: [[2,0]]});
    $('#missing-pkgbase:not(:has(tbody tr.empty))').tablesorter({widgets: ['zebra'], sortList: [[0,0]]});
});
    $('#wrong-permissions:not(:has(tbody tr.empty))').tablesorter({widgets: ['zebra'], sortList: [[2,0]]});
</script>
{% endblock %}