mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-10 08:33:53 +01:00
* Added a simple box to display the current resource usage (see #105)
* Cleanup (see #204) * Fixed javascript issues
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ events = [
|
||||
"GetAnnouncement",
|
||||
|
||||
"TopNotifications",
|
||||
"AdminFooterDisplay",
|
||||
"ExtraAdminContent",
|
||||
]
|
||||
|
||||
callbacks = {}
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user