Some corrections before releasing.

This commit is contained in:
tonio
2009-11-04 15:57:16 +01:00
parent b9f9b88ad8
commit be0c80b572
6 changed files with 20 additions and 16 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ class Grapher(object):
*params)
def make_defaults(self, target, tpl=traffic_avg_template):
end = "now"
end = "%d" % int(time.mktime(time.localtime()))
self.process(target, "day", "-1day", end, tpl)
self.process(target, "week", "-1week", end, tpl)
self.process(target, "month", "-1month", end, tpl)
+1
View File
@@ -103,6 +103,7 @@ class LogParser(object):
'--start', str(m),
'--step', str(rrdstep),
*params)
sys.exit(1)
return m
def update_rrd(self, dom, t):
+6 -6
View File
@@ -91,9 +91,9 @@ def adminindex(request):
domains = Domain.objects.all()
return _render(request, 'stats/adminindex.html', {
"domains" : domains, "domain" : domain,
"graphs" : {"traffic" : _("Average normal traffic"),
"badtraffic" : _("Average bad traffic"),
"size" : _("Average normal traffic size")},
"graphs" : [{"name" : "traffic", "label" : _("Average normal traffic")},
{"name" : "badtraffic", "label" : _("Average bad traffic")},
{"name" : "size", "label" : _("Average normal traffic size")}],
"periods" : ["day", "week", "month", "year"],
"period" : period
})
@@ -109,9 +109,9 @@ def index(request, dom_id=None):
return _render(request, 'stats/index.html', {
"domain" : domain,
"graphs" : {"traffic" : _("Average normal traffic"),
"badtraffic" : _("Average bad traffic"),
"size" : _("Average normal traffic size")},
"graphs" : [{"name" : "traffic", "label" : _("Average normal traffic")},
{"name" : "badtraffic", "label" : _("Average bad traffic")},
{"name" : "size", "label" : _("Average normal traffic size")}],
"periods" : ["day", "week", "month", "year"],
"period" : period
})
+3 -3
View File
@@ -1,6 +1,6 @@
{% load i18n %}
{% for g, title in graphs.items %}
<h3>{{ title }}</h3>
<p><img src="/static/graphs/{{ g }}_{{ domain }}_AVERAGE_{{ period }}.png"
{% for elems in graphs %}
<h3>{{ elems.label }}</h3>
<p><img src="/static/graphs/{{ elems.name }}_{{ domain }}_AVERAGE_{{ period }}.png"
alt="{% trans 'No statistics available' %}" /></p>
{% endfor %}