* Added a simple box to display the current resource usage (see #105)

* Cleanup (see #204)
* Fixed javascript issues
This commit is contained in:
Antoine Nguyen
2012-04-11 15:07:04 +02:00
parent 303c84eb64
commit 13c699e855
27 changed files with 106 additions and 323 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ events = [
"GetAnnouncement",
"TopNotifications",
"AdminFooterDisplay",
"ExtraAdminContent",
]
callbacks = {}
+9
View File
@@ -142,3 +142,12 @@ class="{{ mdclass }}{% if link.class %} {{ link.class }}{% endif %}"
{% if link.img %}<i class="{{ link.img }}"></i>{% endif %}
{{ link.label }}</a>""")
return t.render(Context(dict(link=linkdef, mdclass=mdclass)))
@register.simple_tag
def progress_color(value):
value = int(value)
if value < 50:
return "progress-success"
if value < 80:
return "progress-warning"
return "progress-danger"