From 8170fac20bedde567bf9cf482bca894ef97f8a07 Mon Sep 17 00:00:00 2001 From: Tim Laszlo Date: Thu, 3 Jun 2010 14:59:34 +0000 Subject: Performance updates to dynamic reports Added bad_entries, modified_entries, extra_entries database fields to reduce the number of calls. Created (bad|modified|extra)_entry_count methods to return the sbove fields and populate any missing values. Consolidate interaction_per_client query. Added unique constraint on client_id and timestamp in Interaction. Greatly improved the performance of interaction_per_client. Modified detailed-list.html to add modified field and reduce the database calls to two... unless the bad_entries, modified_entries, extra_entries fields need updating. Modified client index to use only two database queries. Adding automatic update Updating load_stats to update counters in reports_interaction git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5885 ce84e21b-d406-0410-9b95-82705330c041 --- .../reports/templates/clients/detailed-list.html | 12 ++++++----- .../Reports/reports/templates/clients/index.html | 24 +++++++++++----------- 2 files changed, 19 insertions(+), 17 deletions(-) (limited to 'src/lib/Server/Reports/reports/templates') diff --git a/src/lib/Server/Reports/reports/templates/clients/detailed-list.html b/src/lib/Server/Reports/reports/templates/clients/detailed-list.html index 37bfb006b..5a1352cff 100644 --- a/src/lib/Server/Reports/reports/templates/clients/detailed-list.html +++ b/src/lib/Server/Reports/reports/templates/clients/detailed-list.html @@ -56,13 +56,14 @@ State Good Bad + Modified Extra Last Run Server - {% for entry in entry_list %} + {% for client,entry,stale in entry_list %} - {{ entry.client.name }} + {{ client }} {{ entry.state }} {{ entry.goodcount }} - {{ entry.badcount }} - {{ entry.extra|length }} - {{ entry.timestamp|date:"Y-m-d H:i" }} + {{ entry.bad_entry_count }} + {{ entry.modified_entry_count }} + {{ entry.extra_entry_count }} + {{ entry.timestamp|date:"Y-m-d H:i" }} {% if entry.server %}


-{% if client_list_b %} +{% if inter_list %}
    - {% for client in client_list_b %} -
  • - {{ client.name }} + {% for client,inter in inter_list %} +
  • - {% endfor %} + {% ifequal half_list forloop.counter0 %}
    - {% if client_list_a %} - {% for client in client_list_a %} -
  • - {% endfor %} - {% endif %} + {% endifequal %} + {% endfor %}
{% else %} -- cgit v1.2.3-1-g7c22