]> git.ipfire.org Git - pbs.git/commitdiff
Update statistics page a little bit.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 9 Dec 2012 11:41:21 +0000 (12:41 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 9 Dec 2012 11:41:21 +0000 (12:41 +0100)
data/templates/index.html
data/templates/statistics/index.html [moved from data/templates/statistics-main.html with 52% similarity]
web/handlers.py

index 9bc3ee95e8a4bd3f5f50b735121e7fd18d5e26cc..93dc37777a2b398f598803518be54ff012205d0c 100644 (file)
@@ -71,5 +71,9 @@
                {% module JobsList(jobs) %}
        {% end %}
 
-       <a href="/jobs">{{ _("Show more build jobs") }}</a>
+       <ul class="nav nav-pills">
+               <li>
+                       <a href="/jobs">{{ _("Show more build jobs") }}</a>
+               </li>
+       </ul>
 {% end %}
similarity index 52%
rename from data/templates/statistics-main.html
rename to data/templates/statistics/index.html
index f9d5c9e312d353e45bdd5afbb9f73ae4abcb5c12..312a87eed98dd57cffce67897d8c4c90a9385935 100644 (file)
@@ -1,28 +1,24 @@
-{% extends "base.html" %}
+{% extends "../base.html" %}
 
 {% block title %}{{ _("Statistics") }}{% end block %}
 
 {% block body %}
-       <h1>{{ _("Statistics") }}</h1>
+       <div class="page-header">
+               <h2>{{ _("Statistics") }}</h2>
+       </div>
+
        <p>
                {{ _("On this page, you will find a lot of information bundled in graphs and figures.") }}
                {{ _("They give a very quick overview about what is going on in the build service.") }}
        </p>
 
-       <h2>{{ _("Builds") }}</h2>
+       <h3>{{ _("Builds") }}</h3>
        <ul>
                <li>
                        {{ _("The average build time is %.1f minutes.") % (jobs_avg_build_time / 60) }}
                </li>
                <li>
-                       {{ _("There %(builds_count)s builds containing %(jobs_count_all)s jobs.") % globals() }}
+                       {{ _("There are %(builds_count)s builds containing %(jobs_count_all)s jobs.") % { "builds_count" : builds_count, "jobs_count_all" : jobs_count_all } }}
                </li>
        </ul>
-
-       <h2>{{ _("Users") }}</h2>
-       <p>
-               {{ _("There is currently one user account.", "There are currently %s user accounts.", users_count) % users_count }}
-       </p>
-
-       <div style="clear: both;">&nbsp;</div>
 {% end block %}
index d10fe2e95d3d0170404ab583f754b29af7a8f698..06ae96da33b4e7af5c778139141c8de1f566e086 100644 (file)
@@ -52,12 +52,7 @@ class StatisticsMainHandler(BaseHandler):
                        "jobs_avg_build_time" : self.pakfire.jobs.get_average_build_time(),
                })
 
-               # User statistics.
-               args.update({
-                       "users_count" : self.pakfire.users.count(),
-               })
-
-               self.render("statistics-main.html", **args)
+               self.render("statistics/index.html", **args)
 
 
 class UploadsHandler(BaseHandler):