diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2014-05-18 16:16:08 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2014-06-18 15:00:50 +0200 |
commit | 223244b503743a0351d6746079d261b38fef7fb8 (patch) | |
tree | 576e6987df58367d5384e283ce5fa31d98216b97 /src/lib | |
parent | 6edabcee69bcc04c37a28be41a8ecc2e83dbe2a1 (diff) | |
download | bcfg2-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')
-rw-r--r-- | src/lib/Bcfg2/Reporting/templatetags/bcfg2_tags.py | 4 |
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) |