summaryrefslogtreecommitdiff
path: root/templates/devel/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/devel/index.html')
-rw-r--r--templates/devel/index.html249
1 files changed, 117 insertions, 132 deletions
diff --git a/templates/devel/index.html b/templates/devel/index.html
index f285f7f6..3a0fb9a9 100644
--- a/templates/devel/index.html
+++ b/templates/devel/index.html
@@ -1,5 +1,11 @@
{% extends "base.html" %}
-{% block title %}Arch Linux - Developer Dashboard{% endblock %}
+{% load cycle from future %}
+{% load static from staticfiles %}
+{% load cache %}
+{% load package_extras %}
+{% load todolists %}
+
+{% block title %}{{ BRANDING_DISTRONAME }} - Hacker Dashboard{% endblock %}
{% block content %}
<div id="dev-dashboard" class="box">
@@ -8,37 +14,45 @@
<h3>My Flagged Packages</h3>
- <table id="dash-myflagged" class="results dash-stats">
+ <table id="dash-myflagged" class="results">
<thead>
<tr>
- <th class="key">Name</th>
- <th>Repo</th>
+ <th>Name</th>
<th>Version</th>
+ <th>Testing Version</th>
+ <th>Repo</th>
<th>Arch</th>
+ <th>Flagged</th>
+ <th>Last Updated</th>
</tr>
</thead>
<tbody>
{% for pkg in flagged %}
<tr class="{% cycle 'odd' 'even' %}">
- <td><a href="{{ pkg.get_absolute_url }}"
- title="View package details for {{ pkg.pkgname }}">{{ pkg.pkgname }}</a></td>
+ <td>{% pkg_details_link pkg %}</td>
+ <td>{{ pkg.full_version }}</td>
+ <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>
<td>{{ pkg.repo.name }}</td>
- <td>{{ pkg.pkgver }}</td>
<td>{{ pkg.arch.name }}</td>
+ <td>{{ pkg.flag_date|date }}</td>
+ <td>{{ pkg.last_update|date }}</td>
</tr>
{% empty %}
- <tr class="empty"><td colspan="4"><em>No flagged packages to display</em></td></tr>
+ <tr class="empty"><td colspan="7"><em>No flagged packages to display</em></td></tr>
{% endfor %}
</tbody>
</table>
<h3>My Incomplete Todo List Packages</h3>
- <table id="dash-mytodolist" class="results dash-stats">
+ <table id="dash-mytodolist" class="results">
<thead>
<tr>
<th>Todo List</th>
- <th class="key">Name</th>
+ <th>Name</th>
<th>Repo</th>
<th>Arch</th>
<th>Maintainer(s)</th>
@@ -47,12 +61,11 @@
<tbody>
{% for todopkg in todopkgs %}
<tr class="{% cycle 'odd' 'even' %}">
- <td><a href="{{ todopkg.list.get_absolute_url }}"
- title="View todo list: {{ todopkg.list.name }}">{{ todopkg.list.name }}</a></td>
- <td><a href="{{ todopkg.pkg.get_absolute_url }}"
- title="View package details for {{ todopkg.pkg.pkgname }}">{{ todopkg.pkg.pkgname }}</a></td>
- <td>{{ todopkg.pkg.repo.name }}</td>
- <td>{{ todopkg.pkg.arch.name }}</td>
+ <td><a href="{{ todopkg.todolist.get_absolute_url }}"
+ title="View todo list: {{ todopkg.todolist.name }}">{{ todopkg.todolist.name }}</a></td>
+ <td>{% todopkg_details_link todopkg %}</td>
+ <td>{{ todopkg.repo.name }}</td>
+ <td>{{ todopkg.arch.name }}</td>
<td>{{ todopkg.pkg.maintainers|join:', ' }}</td>
</tr>
{% empty %}
@@ -63,156 +76,128 @@
<h3>Package Todo Lists</h3>
- <table id="dash-todo" class="results dash-stats">
+ <table id="dash-todo" class="results">
<thead>
<tr>
<th>Name</th>
<th>Creation Date</th>
+ <th>Creator</th>
<th>Description</th>
+ <th>Package Count</th>
+ <th>Incomplete Count</th>
</tr>
</thead>
<tbody>
{% for todo in todos %}
- <tr class="{% cycle 'odd' 'even' %}">
- <td class="key"><a href="{{ todo.get_absolute_url }}"
- title="View todo list: {{ todo.name }}">{{ todo.name }}</a></td>
- <td>{{ todo.date_added }}</td>
- <td>{{ todo.description|safe }}</td>
- </tr>
+ <tr class="{% cycle 'odd' 'even' %}">
+ <td><a href="{{ todo.get_absolute_url }}"
+ title="View todo list: {{ todo.name }}">{{ todo.name }}</a></td>
+ <td>{{ todo.created|date }}</td>
+ <td>{{ todo.creator.get_full_name }}</td>
+ <td class="wrap">{{ todo.description|urlize }}</td>
+ <td>{{ todo.pkg_count }}</td>
+ <td>{{ todo.incomplete_count }}</td>
+ </tr>
{% empty %}
- <tr class="empty"><td colspan="3"><em>No package todo lists to display</em></td></tr>
+ <tr class="empty"><td colspan="6"><em>No package todo lists to display</em></td></tr>
{% endfor %}
</tbody>
</table>
- <form id="dash-pkg-notify" method="post" action="/devel/notify/">{% csrf_token %}
- <fieldset>
- <p><input id="notify" name="notify" type="checkbox" value="yes"
- {% if user.get_profile.notify %} checked="checked"{% endif %} />
- <label for="notify">Notify me when packages are flagged out-of-date</label>
- <input title="Update notification status" type="submit" value="Update" /></p>
- </fieldset>
- </form>
-
-</div><!-- #dev-dashboard -->
+ <h3>Signoff Status</h3>
-<div id="dash-by-arch" class="dash-stats box">
-
- <h3 class="dash-stats" style="cursor: pointer"
- title="Click to toggle stats by architecture">
- Stats by Architecture <span class="dash-click">(click to toggle)</span></h3>
-
- <table id="stats-by-arch" class="results dash-stats">
+ <table id="dash-signoffs" class="results">
<thead>
<tr>
- <th class="key">Arch</th>
- <th># Packages</th>
- <th># Flagged</th>
+ <th>Name</th>
+ <th>Version</th>
+ <th>Arch</th>
+ <th>Target Repo</th>
+ <th>Last Updated</th>
+ <th>Approved</th>
+ <th>Signoffs</th>
</tr>
</thead>
<tbody>
- {% for arch in arches %}
- <tr class="{% cycle 'odd' 'even' %}">
- <td>{{ arch.name }}</td>
- <td><a href="/packages/?arch={{ arch.name }}"
- title="View all packages for the {{ arch.name }} architecture">
- <strong>{{ arch.packages.count }}</strong> packages</a></td>
- <td><a href="/packages/?arch={{ arch.name }}&amp;flagged=Flagged"
- title="View all flagged packages for the {{ arch.name }} architecture">
- <strong>{{ arch.packages.flagged.count }}</strong> packages</a></td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
-
-</div><!-- #dash-by-arch -->
-
-<div id="dash-by-repo" class="dash-stats box">
-
- <h3 class="dashboard dash-stats" style="cursor: pointer"
- title="Click to toggle stats by repository">
- Stats by Repository <span class="dash-click">(click to toggle)</span></h3>
-
- <table id="stats-by-repo" class="results dash-stats">
- <thead>
- <tr>
- <th class="key">Repository</th>
- <th># Packages</th>
- <th># Flagged</th>
+ {% for group in signoffs %}
+ <tr class="{% cycle 'odd' 'even' %}">
+ <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>
</tr>
- </thead>
- <tbody>
- {% for repo in repos %}
- <tr class="{% cycle 'odd' 'even' %}">
- <td>{{ repo.name }}</td>
- <td><a href="/packages/?repo={{ repo.name }}"
- title="View all packages in the {{ repo.name }} repository">
- <strong>{{ repo.packages.count }}</strong> packages</a></td>
- <td><a href="/packages/?repo={{ repo.name }}&amp;flagged=Flagged"
- title="View all flagged packages in the {{ repo.name }} repository">
- <strong>{{ repo.packages.flagged.count }}</strong> packages</a></td>
- </tr>
+ {% empty %}
+ <tr class="empty"><td colspan="7"><em>No packages you maintain or have packaged need signoffs</em></td></tr>
{% endfor %}
</tbody>
</table>
-</div><!-- dash-by-arch -->
-
-<div id="dash-by-maintainer" class="dash-stats box">
-
- <h3 class="dashboard dash-stats" style="cursor: pointer"
- title="Click to toggle stats by maintainer">
- Stats by Maintainer <span class="dash-click">(click to toggle)</span></h3>
-
- <table id="stats-by-maintainer" class="results dash-stats">
- <thead>
- <tr>
- <th class="key">Maintainer</th>
- <th># Packages</th>
- <th># Flagged</th>
- </tr>
- </thead>
- <tbody>
- {% for maint in maintainers %}
- <tr class="{% cycle 'odd' 'even' %}">
- <td>{{ maint.get_full_name }}</td>
- <td><a href="/packages/?maintainer={{ maint.username }}"
- title="View all packages maintained by {{ maint.get_full_name }}">
- <strong>{{ maint.package_count }}</strong> packages</a></td>
- <td><a href="/packages/?maintainer={{ maint.username }}&amp;flagged=Flagged"
- title="View all flagged packages maintained by {{ maint.get_full_name }}">
- <strong>{{ maint.flagged_count }}</strong> packages</a></td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
+ <h3>Developer Reports</h3>
+ <ul>
+ {% 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 %}
+ </ul>
+</div>{# #dev-dashboard #}
+
+<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>
+</div>
+{% endblock %}
-</div><!-- #dash-by-maintainer -->
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+{% block script_block %}
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
+<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
-$.tablesorter.addParser({
- id: 'pkgcount',
- is: function(s) { return false; },
- format: function(s) {
- var m = s.match(/\d+/);
- return m ? parseInt(m[0]) : 0;
- },
- type: 'numeric'
-});
$(document).ready(function() {
+ $("#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;
+ }
+ 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);
+ });
+
$("#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]]});
- $("#stats-by-arch").add("#stats-by-repo").add("#stats-by-maintainer").tablesorter(
- {widgets: ['zebra'], sortList: [[0,0]],
- headers: { 1: { sorter: 'pkgcount' }, 2: { sorter: 'pkgcount' } } });
- $("h3.dash-stats").click(
- function(e) { $(this).next().toggle(); }
- );
+ $("#dash-signoffs:not(:has(tbody tr.empty))").tablesorter({
+ widgets: ['zebra'],
+ sortList: [[0,0]],
+ headers: { 6: {sorter: false } }
+ });
});
</script>
{% endblock %}