diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-26 09:59:34 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-26 09:59:34 -0400 |
commit | 5bfa5b7eee551c14ecee616f1830dc4603497311 (patch) | |
tree | 53917036e3a7b515c6c794aa7d1c127d61c15508 /templates/devel | |
parent | 9d3cb6e783603d4991f7e610912ba5665fd43260 (diff) | |
parent | 55b776d58999412cd6bf0787a41d6ab00bf80fb6 (diff) |
Merge branch 'archweb-generic2'
Conflicts:
main/fixtures/arches.json
settings.py
templates/public/index.html
templates/public/svn.html
Diffstat (limited to 'templates/devel')
-rw-r--r-- | templates/devel/index.html | 148 | ||||
-rw-r--r-- | templates/devel/packages.html | 2 | ||||
-rw-r--r-- | templates/devel/stats.html | 120 |
3 files changed, 140 insertions, 130 deletions
diff --git a/templates/devel/index.html b/templates/devel/index.html index 036f81fe..919314c8 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -161,7 +161,8 @@ Self-explanatory (<a href="reports/uncompressed-info/{{ user.username }}/">yours only</a>)</li> <li><a href="reports/mismatched-signature/">Mismatched Signatures</a>: - Packages where 1) signing key is unknown, 2) signer != packager, or 3) signature timestamp more than 24 hours after build timestamp + Packages where 1) signing key is unknown, 2) signer != packager, + or 3) signature timestamp more than 24 hours after build timestamp (<a href="reports/mismatched-signature/{{ user.username }}/">yours only</a>)</li> <li><a href="reports/big/">Big</a>: All packages with compressed size > 50 MiB @@ -173,127 +174,11 @@ Packages that have no maintainer and are not required by any other package in any repository</li> </ul> +</div>{# #dev-dashboard #} -</div><!-- #dev-dashboard --> - -{% cache 60 dev-dash-by-arch %} -<div id="dash-by-arch" class="box"> - - <h2>Stats by Architecture</h2> - - <table id="stats-by-arch" class="results dash-stats"> - <thead> - <tr> - <th class="key">Arch</th> - <th># Packages</th> - <th># Flagged</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.total_ct }}</strong> packages</a></td> - <td><a href="/packages/?arch={{ arch.name }}&flagged=Flagged" - title="View all flagged packages for the {{ arch.name }} architecture"> - <strong>{{ arch.flagged_ct }}</strong> packages</a></td> - </tr> - {% endfor %} - </tbody> - </table> -</div>{# #dash-by-arch #} -{% endcache %} - -{% cache 60 dev-dash-by-repo %} -<div id="dash-by-repo" class="box"> - - <h2>Stats by Repository</h2> - - <table id="stats-by-repo" class="results dash-stats"> - <thead> - <tr> - <th class="key">Repository</th> - <th># Packages</th> - <th># Flagged</th> - <th># Maintainers</th> - </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.total_ct }}</strong> packages</a></td> - <td><a href="/packages/?repo={{ repo.name }}&flagged=Flagged" - title="View all flagged packages in the {{ repo.name }} repository"> - <strong>{{ repo.flagged_ct }}</strong> packages</a></td> - <td><strong>{{ repo.maintainer_ct }}</strong> maintainers</td> - </tr> - </tr> - {% endfor %} - </tbody> - </table> -</div>{# dash-by-arch #} -{% endcache %} - -{% cache 60 dev-dash-by-developer %} -<div id="dash-by-developer" class="box"> - - <h2>Stats by Developer</h2> - - {% if perms.main.change_package %} - <p><a href="/packages/stale_relations/">Look for stale relations</a></p> - {% endif %} - - <table id="stats-by-maintainer" class="results dash-stats"> - <thead> - <tr> - <th class="key">Maintainer</th> - <th># Maintained</th> - <th># Flagged</th> - <th># Last Packager</th> - </tr> - <tr class="even"> - <td><em>Orphan/Unknown</em></td> - <td><a href="/packages/?maintainer=orphan" - title="View all orphan packages"> - <strong>{{ orphan.package_count }}</strong> packages</a> - </td> - <td><a href="/packages/?maintainer=orphan&flagged=Flagged" - title="View all flagged orphan packages"> - <strong>{{ orphan.flagged_count }}</strong> packages</a> - </td> - <td><a href="/packages/?packager=unknown" - title="View all packages last updated by unknown"> - <strong>{{ orphan.updated_count }}</strong> packages</a> - </td> - </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 }}&flagged=Flagged" - title="View all flagged packages maintained by {{ maint.get_full_name }}"> - <strong>{{ maint.flagged_count }}</strong> packages</a> - </td> - <td><a href="/packages/?packager={{ maint.username }}" - title="View all packages last updated by {{ maint.get_full_name }}"> - <strong>{{ maint.updated_count }}</strong> packages</a> - </td> - </tr> - {% endfor %} - </tbody> - </table> -</div>{# #dash-by-developer #} -{% endcache %} +<div id='stats-area'> + <p>Enable Javascript to get more useful info here.</p> +</div> {% endblock %} {% block script_block %} @@ -301,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( @@ -312,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 %} diff --git a/templates/devel/packages.html b/templates/devel/packages.html index ed96ad5a..51e98579 100644 --- a/templates/devel/packages.html +++ b/templates/devel/packages.html @@ -86,7 +86,7 @@ $(document).ready(function() { var filter_func = function() { filter_pkgs_list('#report_filter', '#dev-report-results tbody'); }; $('#report_filter input').change(filter_func); $('#criteria_reset').click(function() { filter_pkgs_reset(filter_func); }); - // fire function on page load to ensure the current form selections take effect + // run on page load to ensure current form selections take effect filter_func(); }); </script> diff --git a/templates/devel/stats.html b/templates/devel/stats.html new file mode 100644 index 00000000..2dbe4755 --- /dev/null +++ b/templates/devel/stats.html @@ -0,0 +1,120 @@ +{% load cache %} + +{% cache 60 dev-dash-by-arch %} +<div id="dash-by-arch" class="box"> + + <h2>Stats by Architecture</h2> + + <table id="stats-by-arch" class="results dash-stats"> + <thead> + <tr> + <th class="key">Arch</th> + <th># Packages</th> + <th># Flagged</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.total_ct }}</strong> packages</a></td> + <td><a href="/packages/?arch={{ arch.name }}&flagged=Flagged" + title="View all flagged packages for the {{ arch.name }} architecture"> + <strong>{{ arch.flagged_ct }}</strong> packages</a></td> + </tr> + {% endfor %} + </tbody> + </table> +</div>{# #dash-by-arch #} +{% endcache %} + +{% cache 60 dev-dash-by-repo %} +<div id="dash-by-repo" class="box"> + + <h2>Stats by Repository</h2> + + <table id="stats-by-repo" class="results dash-stats"> + <thead> + <tr> + <th class="key">Repository</th> + <th># Packages</th> + <th># Flagged</th> + <th># Maintainers</th> + </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.total_ct }}</strong> packages</a></td> + <td><a href="/packages/?repo={{ repo.name }}&flagged=Flagged" + title="View all flagged packages in the {{ repo.name }} repository"> + <strong>{{ repo.flagged_ct }}</strong> packages</a></td> + <td><strong>{{ repo.maintainer_ct }}</strong> maintainers</td> + </tr> + </tr> + {% endfor %} + </tbody> + </table> +</div>{# dash-by-arch #} +{% endcache %} + +{% cache 60 dev-dash-by-developer %} +<div id="dash-by-developer" class="box"> + + <h2>Stats by Developer</h2> + + {% if perms.main.change_package %} + <p><a href="/packages/stale_relations/">Look for stale relations</a></p> + {% endif %} + + <table id="stats-by-maintainer" class="results dash-stats"> + <thead> + <tr> + <th class="key">Maintainer</th> + <th># Maintained</th> + <th># Flagged</th> + <th># Last Packager</th> + </tr> + <tr class="even"> + <td><em>Orphan/Unknown</em></td> + <td><a href="/packages/?maintainer=orphan" + title="View all orphan packages"> + <strong>{{ orphan.package_count }}</strong> packages</a> + </td> + <td><a href="/packages/?maintainer=orphan&flagged=Flagged" + title="View all flagged orphan packages"> + <strong>{{ orphan.flagged_count }}</strong> packages</a> + </td> + <td><a href="/packages/?packager=unknown" + title="View all packages last updated by unknown"> + <strong>{{ orphan.updated_count }}</strong> packages</a> + </td> + </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 }}&flagged=Flagged" + title="View all flagged packages maintained by {{ maint.get_full_name }}"> + <strong>{{ maint.flagged_count }}</strong> packages</a> + </td> + <td><a href="/packages/?packager={{ maint.username }}" + title="View all packages last updated by {{ maint.get_full_name }}"> + <strong>{{ maint.updated_count }}</strong> packages</a> + </td> + </tr> + {% endfor %} + </tbody> + </table> +</div>{# #dash-by-developer #} +{% endcache %} |