diff options
author | Tim Laszlo <tim.laszlo@gmail.com> | 2012-06-06 22:21:55 -0500 |
---|---|---|
committer | Tim Laszlo <tim.laszlo@gmail.com> | 2012-06-06 22:21:55 -0500 |
commit | b85e47f2aab6d4412a4dda2de1f9471f979f18b8 (patch) | |
tree | 529e72c17e4ff504b30cab1a350ee26e99511c77 /src/lib/Bcfg2/Server/Reports/reports/templates/config_items/listing.html | |
parent | 3ffd9bccb20f199ffc48263d019dfc3c44d0119b (diff) | |
download | bcfg2-b85e47f2aab6d4412a4dda2de1f9471f979f18b8.tar.gz bcfg2-b85e47f2aab6d4412a4dda2de1f9471f979f18b8.tar.bz2 bcfg2-b85e47f2aab6d4412a4dda2de1f9471f979f18b8.zip |
web_reports: Improve element lists
Faster page loads.
More details in the listings.
Diffstat (limited to 'src/lib/Bcfg2/Server/Reports/reports/templates/config_items/listing.html')
-rw-r--r-- | src/lib/Bcfg2/Server/Reports/reports/templates/config_items/listing.html | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/lib/Bcfg2/Server/Reports/reports/templates/config_items/listing.html b/src/lib/Bcfg2/Server/Reports/reports/templates/config_items/listing.html index 9b1026a08..a43eedb89 100644 --- a/src/lib/Bcfg2/Server/Reports/reports/templates/config_items/listing.html +++ b/src/lib/Bcfg2/Server/Reports/reports/templates/config_items/listing.html @@ -9,19 +9,20 @@ {% block pagebanner %}{{mod_or_bad|capfirst}} Element Listing{% endblock %} {% block content %} -{% if item_list_dict %} - {% for kind, entries in item_list_dict.items %} - +{% if item_list %} + {% for type_name, type_data in item_list %} <div class='entry_list'> - <div class='entry_list_head element_list_head' onclick='javascript:toggleMe("table_{{ kind }}");'> - <h3>{{ kind }} — {{ entries|length }}</h3> - <div class='entry_expand_tab' id='plusminus_table_{{ kind }}'>[–]</div> + <div class='entry_list_head element_list_head' onclick='javascript:toggleMe("table_{{ type_name }}");'> + <h3>{{ type_name }} — {{ type_data|length }}</h3> + <div class='entry_expand_tab' id='plusminus_table_{{ type_name }}'>[–]</div> </div> - - <table id='table_{{ kind }}' class='entry_list'> - {% for e in entries %} + <table id='table_{{ type_name }}' class='entry_list'> + <tr style='text-align: left' ><th>Name</th><th>Count</th><th>Reason</th></tr> + {% for entry, reason, eis in type_data %} <tr class='{% cycle listview,listview_alt %}'> - <td><a href="{% url reports_item type=mod_or_bad,pk=e.id %}">{{e.entry.name}}</a></td> + <td><a href="{% url reports_item type=mod_or_bad,pk=eis.0 %}">{{entry.name}}</a></td> + <td>{{ eis|length }}</td> + <td>{{ reason.short_list|join:"," }}</td> </tr> {% endfor %} </table> |