index.html 7.42 KB
Newer Older
eliott's avatar
eliott committed
1
{% extends "base.html" %}
2
{% load static %}
3
{% load cache %}
4
{% load package_extras %}
5
{% load todolists %}
6

7
{% block title %}Arch Linux - Developer Dashboard{% endblock %}
eliott's avatar
eliott committed
8
9

{% block content %}
Thayer Williams's avatar
Thayer Williams committed
10
11
12
13
14
15
<div id="dev-dashboard" class="box">

    <h2>Developer Dashboard</h2>

    <h3>My Flagged Packages</h3>

Dan McGee's avatar
Dan McGee committed
16
    <table id="dash-myflagged" class="results">
Thayer Williams's avatar
Thayer Williams committed
17
18
        <thead>
            <tr>
19
                <th>Name</th>
Thayer Williams's avatar
Thayer Williams committed
20
                <th>Version</th>
21
                <th>Testing Version</th>
22
                <th>Repo</th>
Thayer Williams's avatar
Thayer Williams committed
23
                <th>Arch</th>
24
25
                <th>Flagged</th>
                <th>Last Updated</th>
Thayer Williams's avatar
Thayer Williams committed
26
27
28
29
            </tr>
        </thead>
        <tbody>
            {% for pkg in flagged %}
30
                <tr>
31
                    <td>{% pkg_details_link pkg %}</td>
Dan McGee's avatar
Dan McGee committed
32
                    <td>{{ pkg.full_version }}</td>
33
34
35
36
                    <td>{% with pkg.in_testing as tp %}{% if tp %}
                        <a href="{{ tp.get_absolute_url }}"
                            title="Testing package details for {{ tp.pkgname }}">{{ tp.full_version }}</a>
                        {% endif %}{% endwith %}</td>
37
                    <td>{{ pkg.repo.name }}</td>
38
                    <td>{{ pkg.arch.name }}</td>
39
40
                    <td>{{ pkg.flag_date|date }}</td>
                    <td>{{ pkg.last_update|date }}</td>
41
                </tr>
Thayer Williams's avatar
Thayer Williams committed
42
            {% empty %}
43
                <tr class="empty"><td colspan="7"><em>No flagged packages to display</em></td></tr>
Thayer Williams's avatar
Thayer Williams committed
44
45
46
47
            {% endfor %}
        </tbody>
    </table>

48
49
50
51
52
53
54
55
56
57
58
59
60
    <h3>Signoff Status</h3>

    <table id="dash-signoffs" class="results">
        <thead>
            <tr>
                <th>Name</th>
                <th>Version</th>
                <th>Arch</th>
                <th>Target Repo</th>
                <th>Last Updated</th>
                <th>Approved</th>
                <th>Signoffs</th>
                <th>Packager</th>
61
                <th>Maintainer(s)</th>
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
            </tr>
        </thead>
        <tbody>
            {% for group in signoffs %}
            <tr>
                <td>{% pkg_details_link group.package %}</td>
                <td>{{ group.version }}</td>
                <td>{{ group.arch.name }}</td>
                <td>{{ group.target_repo }}</td>
                <td>{{ group.last_update|date }}</td>
                {% if group.specification.known_bad %}
                <td class="approval signoff-bad">Bad</td>
                {% else %}
                {% if not group.specification.enabled %}
                <td class="approval signoff-disabled">Disabled</td>
                {% else %}
                <td class="approval signoff-{{ group.approved|yesno }}">{{ group.approved|yesno|capfirst }}</td>
                {% endif %}
                {% endif %}
                <td><ul class="signoff-list">
                    {% for signoff in group.signoffs %}
                    <li class="signed-username" title="Signed off by {{ signoff.user }}">{{ signoff.user }}{% if signoff.revoked %} (revoked){% endif %}</li>
                    {% endfor %}
                </ul></td>
                <td>{{ group.packager }}</td>
87
                <td>{{ group.maintainers|join:', ' }}</td>
88
89
90
91
92
93
94
            </tr>
            {% empty %}
            <tr class="empty"><td colspan="9"><em>No packages you maintain or have packaged need signoffs</em></td></tr>
            {% endfor %}
        </tbody>
    </table>

95
96
    <h3>My Incomplete Todo List Packages</h3>

Dan McGee's avatar
Dan McGee committed
97
    <table id="dash-mytodolist" class="results">
98
99
100
        <thead>
            <tr>
                <th>Todo List</th>
101
                <th>Name</th>
102
103
104
105
106
107
108
                <th>Repo</th>
                <th>Arch</th>
                <th>Maintainer(s)</th>
            </tr>
        </thead>
        <tbody>
            {% for todopkg in todopkgs %}
109
                <tr>
110
111
                    <td><a href="{{ todopkg.todolist.get_absolute_url }}"
                            title="View todo list: {{ todopkg.todolist.name }}">{{ todopkg.todolist.name }}</a></td>
112
                    <td>{% todopkg_details_link todopkg %}</td>
113
114
                    <td>{{ todopkg.repo.name }}</td>
                    <td>{{ todopkg.arch.name }}</td>
115
116
117
                    <td>{{ todopkg.pkg.maintainers|join:', ' }}</td>
                </tr>
            {% empty %}
Dan McGee's avatar
Dan McGee committed
118
119
120
121
122
123
124
                <tr class="empty"><td colspan="5"><em>No incomplete todo list packages to display</em></td></tr>
            {% endfor %}
        </tbody>
    </table>

    <h3>Package Todo Lists</h3>

Dan McGee's avatar
Dan McGee committed
125
    <table id="dash-todo" class="results">
Dan McGee's avatar
Dan McGee committed
126
127
128
129
        <thead>
            <tr>
                <th>Name</th>
                <th>Creation Date</th>
130
                <th>Creator</th>
Dan McGee's avatar
Dan McGee committed
131
                <th>Description</th>
132
133
134
                <th>Package Count</th>
                <th>Incomplete Count</th>
            </tr>
Dan McGee's avatar
Dan McGee committed
135
136
137
        </thead>
        <tbody>
            {% for todo in todos %}
138
            <tr>
139
140
                <td><a href="{{ todo.get_absolute_url }}"
                        title="View todo list: {{ todo.name }}">{{ todo.name }}</a></td>
141
                <td>{{ todo.created|date }}</td>
142
                <td>{{ todo.creator.get_full_name }}</td>
143
                <td class="wrap">{{ todo.description|urlize|truncatewords:"50" }}</td>
144
145
146
                <td>{{ todo.pkg_count }}</td>
                <td>{{ todo.incomplete_count }}</td>
            </tr>
Dan McGee's avatar
Dan McGee committed
147
            {% empty %}
148
            <tr class="empty"><td colspan="6"><em>No package todo lists to display</em></td></tr>
149
150
151
152
            {% endfor %}
        </tbody>
    </table>

Dan McGee's avatar
Dan McGee committed
153
154
    <h3>Developer Reports</h3>
    <ul>
155
156
157
158
159
        {% for report in reports %}
        <li><a href="reports/{{ report.slug }}/">{{ report.name }}</a>:
        {{ report.description }}
        {% if report.personal %}(<a href="reports/{{ report.slug }}/{{ user.username }}/">yours only</a>){% endif %}</li>
        {% endfor %}
Dan McGee's avatar
Dan McGee committed
160
    </ul>
161
</div>{# #dev-dashboard #}
162

163
164
165
166
167
<div id="stats-area">
    <div class="box">
        <h2>Developer Stats</h2>
        <p id="stats-message">Enable JavaScript to get more useful info here.</p>
    </div>
168
</div>
169
{% endblock %}
Thayer Williams's avatar
Thayer Williams committed
170

171
{% block script_block %}
172
{% load cdn %}{% jquery %}{% jquery_tablesorter %}
173
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
Jelle van der Waa's avatar
Jelle van der Waa committed
174
<script type="text/javascript" nonce={{ CSP_NONCE }}>
175
$(document).ready(function() {
176
177
178
179
180
181
    $("#stats-message").html('Loading developer stats…');
    $("#stats-area").load('stats/', function(response, status, xhr) {
        if (status === 'error' || status === 'timeout') {
            $("#stats-message").html('Developer stats loading encountered an error. Sorry.');
            return;
        }
182
183
184
185
186
187
188
189
190
191
192
        var settings = {
            widgets: ['zebra'],
            sortList: [[0,0]],
            headers: { 1: { sorter: 'pkgcount' }, 2: { sorter: 'pkgcount' }, 3: { sorter: 'pkgcount' } }
        };

        $(".dash-stats").not($("#stats-by-maintainer")).tablesorter(settings);
        settings['sortLocaleCompare'] = true;
        $("#stats-by-maintainer").tablesorter(settings);
    });

Dan McGee's avatar
Dan McGee committed
193
194
195
196
197
198
    $("#dash-myflagged:not(:has(tbody tr.empty))").tablesorter(
        {widgets: ['zebra'], sortList: [[0,0]]});
    $("#dash-mytodolist:not(:has(tbody tr.empty))").tablesorter(
        {widgets: ['zebra'], sortList: [[0,0], [1,0]]});
    $("#dash-todo:not(:has(tbody tr.empty))").tablesorter(
            {widgets: ['zebra'], sortList: [[1,1]]});
199
200
201
202
203
    $("#dash-signoffs:not(:has(tbody tr.empty))").tablesorter({
            widgets: ['zebra'],
            sortList: [[0,0]],
            headers: { 6: {sorter: false } }
    });
204
});
205
</script>
eliott's avatar
eliott committed
206
{% endblock %}