summaryrefslogtreecommitdiff
path: root/templates/devel/index.html
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-04-21 20:37:44 -0500
committerDan McGee <dan@archlinux.org>2013-04-21 20:37:44 -0500
commita8203a0a17fbd8680f96c9357c7fba5923960e34 (patch)
treee9f25214cde553a613c24644c1ec99ccf08e80f0 /templates/devel/index.html
parent66412aa1037befef0b579c7df73656dc3b8b9804 (diff)
Load developer dashboard stats via $.load() call
This completes the separation started in an earlier commit. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/devel/index.html')
-rw-r--r--templates/devel/index.html22
1 files changed, 14 insertions, 8 deletions
diff --git a/templates/devel/index.html b/templates/devel/index.html
index 232a9034..03e5d73a 100644
--- a/templates/devel/index.html
+++ b/templates/devel/index.html
@@ -175,6 +175,7 @@
package in any repository</li>
</ul>
</div>{# #dev-dashboard #}
+
<div id='stats-area'>
<p>Enable Javascript to get more useful info here.</p>
</div>
@@ -185,6 +186,19 @@
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
+ $("#stats-area").html('<p>Loading stats…</p>');
+ $("#stats-area").load('stats/', function() {
+ 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(
@@ -196,14 +210,6 @@ $(document).ready(function() {
sortList: [[0,0]],
headers: { 6: {sorter: false } }
});
- 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);
});
</script>
{% endblock %}