diff options
author | Tim Laszlo <tim.laszlo@gmail.com> | 2012-06-06 16:55:57 -0500 |
---|---|---|
committer | Tim Laszlo <tim.laszlo@gmail.com> | 2012-06-06 16:56:13 -0500 |
commit | 3ffd9bccb20f199ffc48263d019dfc3c44d0119b (patch) | |
tree | ede122212055e51eda68ab67e8346fe58c4860aa /src/lib/Bcfg2/Server/Reports/reports/templates | |
parent | 01d68bf3237529f5cb6a9160b4328e797d01b0fe (diff) | |
download | bcfg2-3ffd9bccb20f199ffc48263d019dfc3c44d0119b.tar.gz bcfg2-3ffd9bccb20f199ffc48263d019dfc3c44d0119b.tar.bz2 bcfg2-3ffd9bccb20f199ffc48263d019dfc3c44d0119b.zip |
web_reports: speed up client detail view
Diffstat (limited to 'src/lib/Bcfg2/Server/Reports/reports/templates')
-rw-r--r-- | src/lib/Bcfg2/Server/Reports/reports/templates/clients/detail.html | 55 |
1 files changed, 11 insertions, 44 deletions
diff --git a/src/lib/Bcfg2/Server/Reports/reports/templates/clients/detail.html b/src/lib/Bcfg2/Server/Reports/reports/templates/clients/detail.html index f4cdf7c2a..c02709545 100644 --- a/src/lib/Bcfg2/Server/Reports/reports/templates/clients/detail.html +++ b/src/lib/Bcfg2/Server/Reports/reports/templates/clients/detail.html @@ -95,58 +95,25 @@ span.history_links a { </div> {% endif %} - {% if interaction.bad_entry_count %} + {% for type, ei_list in ei_lists %} + {% if ei_list %} <div class='entry_list'> - <div class='entry_list_head dirty-lineitem' onclick='javascript:toggleMe("bad_table");'> - <h3>Bad Entries — {{ interaction.bad_entry_count }}</h3> - <div class='entry_expand_tab' id='plusminus_bad_table'>[+]</div> + <div class='entry_list_head {{type}}-lineitem' onclick='javascript:toggleMe("{{type}}_table");'> + <h3>{{ type|capfirst }} Entries — {{ ei_list|length }}</h3> + <div class='entry_expand_tab' id='plusminus_{{type}}_table'>[+]</div> </div> - <table id='bad_table' class='entry_list'> - {% for e in interaction.bad|sortwell %} + <table id='{{type}}_table' class='entry_list'> + {% for ei in ei_list %} <tr class='{% cycle listview,listview_alt %}'> - <td class='entry_list_type'>{{e.entry.kind}}:</td> - <td><a href="{% url reports_item "bad",e.id %}"> - {{e.entry.name}}</a></td> + <td class='entry_list_type'>{{ei.entry.kind}}:</td> + <td><a href="{% url reports_item type ei.id %}"> + {{ei.entry.name}}</a></td> </tr> {% endfor %} </table> </div> {% endif %} - - {% if interaction.modified_entry_count %} - <div class='entry_list'> - <div class='entry_list_head modified-lineitem' onclick='javascript:toggleMe("modified_table");'> - <h3>Modified Entries — {{ interaction.modified_entry_count }}</h3> - <div class='entry_expand_tab' id='plusminus_modified_table'>[+]</div> - </div> - <table id='modified_table' class='entry_list'> - {% for e in interaction.modified|sortwell %} - <tr class='{% cycle listview,listview_alt %}'> - <td class='entry_list_type'>{{e.entry.kind}}:</td> - <td><a href="{% url reports_item "modified",e.id %}"> - {{e.entry.name}}</a></td> - </tr> - {% endfor %} - </table> - </div> - {% endif %} - - {% if interaction.extra_entry_count %} - <div class='entry_list'> - <div class='entry_list_head extra-lineitem' onclick='javascript:toggleMe("extra_table");'> - <h3>Extra Entries — {{ interaction.extra_entry_count }}</h3> - <div class='entry_expand_tab' id='plusminus_extra_table'>[+]</div> - </div> - <table id='extra_table' class='entry_list'> - {% for e in interaction.extra|sortwell %} - <tr class='{% cycle listview,listview_alt %}'> - <td class='entry_list_type'>{{e.entry.kind}}:</td> - <td><a href="{% url reports_item "extra",e.id %}">{{e.entry.name}}</a></td> - </tr> - {% endfor %} - </table> - </div> - {% endif %} + {% endfor %} {% if entry_list %} <div class="entry_list recent_history_wrapper"> |