summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Reporting/templates
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2014-08-01 16:43:00 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2014-08-01 16:48:49 +0200
commitf0edc94f59ba82bef04d0576174035fd0f67a649 (patch)
treea1ac032ba389d1c91b7237283f88a58a34eea251 /src/lib/Bcfg2/Reporting/templates
parentea634773e876cc054bdc4920567557462baa61a3 (diff)
downloadbcfg2-f0edc94f59ba82bef04d0576174035fd0f67a649.tar.gz
bcfg2-f0edc94f59ba82bef04d0576174035fd0f67a649.tar.bz2
bcfg2-f0edc94f59ba82bef04d0576174035fd0f67a649.zip
Reporting: do not duplicate isstale functionality
The interaction entries have a isstale() method, we do not need a template tag, that tries to figure out this on its own. The isstale() method works even better: It knows, if the interaction is the current interaction and compares the timestamp to the current time or (if it is not the current one) it compares the timestamp to the timestamp of the next interaction. So using the method of the model, you can browse the interaction history and see, if the host was stale some time in the past. Previously all interactions more than 24h ago were marked stale.
Diffstat (limited to 'src/lib/Bcfg2/Reporting/templates')
-rw-r--r--src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html b/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html
index 33c78a5f0..6a314bd88 100644
--- a/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html
+++ b/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html
@@ -32,7 +32,7 @@ This is needed for Django versions less than 1.5
<td class='right_column_narrow'>{{ entry.bad_count }}</td>
<td class='right_column_narrow'>{{ entry.modified_count }}</td>
<td class='right_column_narrow'>{{ entry.extra_count }}</td>
- <td class='right_column'><span {% if entry.timestamp|isstale:entry_max %}class='dirty-lineitem'{% endif %}>{{ entry.timestamp|date:"Y-m-d\&\n\b\s\p\;H:i"|safe }}</span></td>
+ <td class='right_column'><span {% if entry.isstale %}class='dirty-lineitem'{% endif %}>{{ entry.timestamp|date:"Y-m-d\&\n\b\s\p\;H:i"|safe }}</span></td>
<td class='right_column_wide'>
{% if entry.server %}
<a href='{% add_url_filter server=entry.server %}'>{{ entry.server }}</a>