summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Reporting/templatetags/bcfg2_tags.py
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2014-05-18 16:16:08 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2014-06-18 15:00:50 +0200
commit223244b503743a0351d6746079d261b38fef7fb8 (patch)
tree576e6987df58367d5384e283ce5fa31d98216b97 /src/lib/Bcfg2/Reporting/templatetags/bcfg2_tags.py
parent6edabcee69bcc04c37a28be41a8ecc2e83dbe2a1 (diff)
downloadbcfg2-223244b503743a0351d6746079d261b38fef7fb8.tar.gz
bcfg2-223244b503743a0351d6746079d261b38fef7fb8.tar.bz2
bcfg2-223244b503743a0351d6746079d261b38fef7fb8.zip
Reports/templatetags: mark special hosts in grid view
Highligh additional special hosts in the grid view. Stale hosts get a grey background and clean hosts with extra packages get a blue background.
Diffstat (limited to 'src/lib/Bcfg2/Reporting/templatetags/bcfg2_tags.py')
-rw-r--r--src/lib/Bcfg2/Reporting/templatetags/bcfg2_tags.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Reporting/templatetags/bcfg2_tags.py b/src/lib/Bcfg2/Reporting/templatetags/bcfg2_tags.py
index 489682f30..ceb9f5d91 100644
--- a/src/lib/Bcfg2/Reporting/templatetags/bcfg2_tags.py
+++ b/src/lib/Bcfg2/Reporting/templatetags/bcfg2_tags.py
@@ -318,7 +318,11 @@ def determine_client_state(entry):
dirty. If the client is reporting dirty, this will figure out just
_how_ dirty and adjust the color accordingly.
"""
+ if isstale(entry.timestamp):
+ return "stale-lineitem"
if entry.state == 'clean':
+ if entry.extra_count > 0:
+ return "extra-lineitem"
return "clean-lineitem"
bad_percentage = 100 * (float(entry.bad_count) / entry.total_count)