From 84a83cab07853b83e91c40c440f65b911e3296a5 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Mon, 29 Apr 2013 07:37:38 -0500 Subject: Reports: Add support for Django 1.5 Signed-off-by: Sol Jerome --- src/lib/Bcfg2/Reporting/templates/base.html | 29 +++++++++++++--------- .../Bcfg2/Reporting/templates/clients/detail.html | 28 ++++++++++----------- .../Reporting/templates/clients/detailed-list.html | 2 +- .../Bcfg2/Reporting/templates/clients/index.html | 4 +-- .../Bcfg2/Reporting/templates/clients/manage.html | 4 +-- .../Reporting/templates/config_items/common.html | 4 +-- .../templates/config_items/entry_status.html | 10 +++++--- .../Reporting/templates/config_items/item.html | 16 ++++++------ .../Reporting/templates/config_items/listing.html | 4 +-- .../Reporting/templates/displays/summary.html | 2 +- .../Bcfg2/Reporting/templates/displays/timing.html | 10 ++++---- 11 files changed, 61 insertions(+), 52 deletions(-) (limited to 'src/lib/Bcfg2/Reporting/templates') diff --git a/src/lib/Bcfg2/Reporting/templates/base.html b/src/lib/Bcfg2/Reporting/templates/base.html index c73339911..7f1fcba3b 100644 --- a/src/lib/Bcfg2/Reporting/templates/base.html +++ b/src/lib/Bcfg2/Reporting/templates/base.html @@ -1,4 +1,8 @@ {% load bcfg2_tags %} +{% comment %} +This is needed for Django versions less than 1.5 +{% endcomment %} +{% load url from future %} @@ -25,8 +29,9 @@ + height='115' width='300' alt='Bcfg2' + style='float:left; height: 115px' /> +
@@ -46,26 +51,26 @@
  • Overview
  • {% comment %} TODO diff --git a/src/lib/Bcfg2/Reporting/templates/clients/detail.html b/src/lib/Bcfg2/Reporting/templates/clients/detail.html index 4608ce6f1..9c0299121 100644 --- a/src/lib/Bcfg2/Reporting/templates/clients/detail.html +++ b/src/lib/Bcfg2/Reporting/templates/clients/detail.html @@ -6,19 +6,19 @@ {% block extra_header_info %} {% endblock %} @@ -30,12 +30,12 @@ span.history_links a { {% block content %}

    {{client.name}}

    - [manage] - View History | Jump to  + [manage] + View History | Jump to 
    @@ -110,7 +110,7 @@ span.history_links a { {% for entry in entry_list %} {{entry.entry_type}} - + {{entry.name}} {% endfor %} @@ -129,7 +129,7 @@ span.history_links a { {% for failure in interaction.failures.all %} {{failure.entry_type}} - + {{failure.name}} {% endfor %} @@ -140,11 +140,11 @@ span.history_links a { {% if entry_list %}
    -

    Recent Interactions

    +

    Recent Interactions

    {% include "widgets/interaction_list.inc" %} - +
    {% endif %} diff --git a/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html b/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html index fd9a545ce..2a03eede1 100644 --- a/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html +++ b/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html @@ -21,7 +21,7 @@ {% for entry in entry_list %} - {{ entry.client.name }} + {{ entry.client.name }} {{ entry.state }} {{ entry.good_count }} diff --git a/src/lib/Bcfg2/Reporting/templates/clients/index.html b/src/lib/Bcfg2/Reporting/templates/clients/index.html index d9c415c20..957cbffd2 100644 --- a/src/lib/Bcfg2/Reporting/templates/clients/index.html +++ b/src/lib/Bcfg2/Reporting/templates/clients/index.html @@ -17,9 +17,9 @@ {{ inter.client.name }} diff --git a/src/lib/Bcfg2/Reporting/templates/clients/manage.html b/src/lib/Bcfg2/Reporting/templates/clients/manage.html index 443ec8ccb..5ba3393b2 100644 --- a/src/lib/Bcfg2/Reporting/templates/clients/manage.html +++ b/src/lib/Bcfg2/Reporting/templates/clients/manage.html @@ -24,10 +24,10 @@ - {{ client.name }} + {{ client.name }} {% firstof client.expiration 'Active' %} -
    +
    {# here for no reason other then to validate #} diff --git a/src/lib/Bcfg2/Reporting/templates/config_items/common.html b/src/lib/Bcfg2/Reporting/templates/config_items/common.html index 57191ec39..0dbd52156 100644 --- a/src/lib/Bcfg2/Reporting/templates/config_items/common.html +++ b/src/lib/Bcfg2/Reporting/templates/config_items/common.html @@ -29,9 +29,9 @@ {% for item in type_list %} {{ item.ENTRY_TYPE }} - {{ item.name }} + {{ item.name }} {{ item.num_entries }} - {{ item.short_list|join:"," }} + {{ item.short_list|join:"," }} {% endfor %} diff --git a/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html b/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html index e940889ab..e3befb0eb 100644 --- a/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html +++ b/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html @@ -1,5 +1,9 @@ {% extends "base-timeview.html" %} {% load bcfg2_tags %} +{% comment %} +This is needed for Django versions less than 1.5 +{% endcomment %} +{% load url from future %} {% block title %}Bcfg2 - Entry Status{% endblock %} @@ -17,10 +21,10 @@ {% for item, inters in items %} {% for inter in inters %} - {{inter.client.name}} - {{inter.timestamp|date:"Y-m-d\&\n\b\s\p\;H:i"|safe}} + {{inter.client.name}} + {{inter.timestamp|date:"Y-m-d\&\n\b\s\p\;H:i"|safe}} {{ item.get_state_display }} - ({{item.pk}}) {{item.short_list|join:","}} + ({{item.pk}}) {{item.short_list|join:","}} {% endfor %} {% endfor %} diff --git a/src/lib/Bcfg2/Reporting/templates/config_items/item.html b/src/lib/Bcfg2/Reporting/templates/config_items/item.html index 259414399..c15a85e0a 100644 --- a/src/lib/Bcfg2/Reporting/templates/config_items/item.html +++ b/src/lib/Bcfg2/Reporting/templates/config_items/item.html @@ -9,20 +9,20 @@ {% block extra_header_info %} {% endblock%} @@ -131,9 +131,9 @@ div.entry_list h3 { {% if associated_list %} {% for inter in associated_list %} - - {% endfor %} diff --git a/src/lib/Bcfg2/Reporting/templates/config_items/listing.html b/src/lib/Bcfg2/Reporting/templates/config_items/listing.html index 864392754..fb10bb020 100644 --- a/src/lib/Bcfg2/Reporting/templates/config_items/listing.html +++ b/src/lib/Bcfg2/Reporting/templates/config_items/listing.html @@ -21,9 +21,9 @@ {% for entry in type_data %} - + - + {% endfor %}
    {{inter.client.name}}{{inter.timestamp}}
    NameCountReason
    {{entry.name}}{{entry.name}} {{entry.num_entries}}{{entry.short_list|join:","}}{{entry.short_list|join:","}}
    diff --git a/src/lib/Bcfg2/Reporting/templates/displays/summary.html b/src/lib/Bcfg2/Reporting/templates/displays/summary.html index b9847cf96..c432da95d 100644 --- a/src/lib/Bcfg2/Reporting/templates/displays/summary.html +++ b/src/lib/Bcfg2/Reporting/templates/displays/summary.html @@ -30,7 +30,7 @@ hide_tables[{{ forloop.counter0 }}] = "table_{{ summary.name }}"; {% for node in summary.nodes|sort_interactions_by_name %} - + {% endfor %}
    {{ node.client.name }}{{ node.client.name }}
    diff --git a/src/lib/Bcfg2/Reporting/templates/displays/timing.html b/src/lib/Bcfg2/Reporting/templates/displays/timing.html index ff775ded5..57806b63a 100644 --- a/src/lib/Bcfg2/Reporting/templates/displays/timing.html +++ b/src/lib/Bcfg2/Reporting/templates/displays/timing.html @@ -12,7 +12,7 @@
    {% if metrics %} - + @@ -21,15 +21,15 @@ - {% for metric in metrics|dictsort:"name" %} + {% for metric in metrics|dictsort:"name" %} + href='{% url "reports_client_detail" hostname=metric.name %}'>{{ metric.name }} {% for mitem in metric|build_metric_list %} {% endfor %} - - {% endfor %} + + {% endfor %}
    Name Parse ProbeConfig Total
    {{ metric.name }}{{ mitem }}
    {% else %}

    No metric data available

    -- cgit v1.2.3-1-g7c22