From 7c0a9b20203e13a4da06fd79081215f712cceb38 Mon Sep 17 00:00:00 2001 From: Tim Laszlo Date: Thu, 14 Oct 2010 15:28:58 -0500 Subject: web reports: new skin --- .../reports/templates/config_items/index.html | 100 ------------------- .../reports/templates/config_items/item.html | 109 +++++++++++++++++++++ .../reports/templates/config_items/listing.html | 62 +++++------- 3 files changed, 131 insertions(+), 140 deletions(-) delete mode 100644 src/lib/Server/Reports/reports/templates/config_items/index.html create mode 100644 src/lib/Server/Reports/reports/templates/config_items/item.html (limited to 'src/lib/Server/Reports/reports/templates/config_items') diff --git a/src/lib/Server/Reports/reports/templates/config_items/index.html b/src/lib/Server/Reports/reports/templates/config_items/index.html deleted file mode 100644 index 04083344c..000000000 --- a/src/lib/Server/Reports/reports/templates/config_items/index.html +++ /dev/null @@ -1,100 +0,0 @@ -{% extends "base.html" %} - -{% load syntax_coloring %} - -{% block extra_header_info %} - - - -{% endblock%} -{% block title %}Configuration Element Details{% endblock %} - -{% block pagebanner %} -
-

Configuration Element Details

-
-
-{% endblock %} - -{% block content %} - -{% ifequal mod_or_bad "bad" %} -
-

Bad {{item.entry.kind}}: {{item.entry.name}}

-
-{% else %} -
-

Modified {{item.entry.kind}}: {{item.entry.name}}

-
-{% endifequal %} -
- - -{% if item.reason.current_owner %} - -{% endif %}{% if item.reason.current_group %} - -{% endif %}{% if item.reason.current_perms %} - -{% endif %}{% if item.reason.current_status %} - -{% endif %}{% if item.reason.current_to %} - -{% endif %}{% if item.reason.current_version %} - -{% endif %}{% if not item.reason.current_exists %} - -{% endif %}{% if item.reason.current_diff %} - -{% endif %} -
ReasonCurrent StatusSpecified in bcfg2
Owner: {{item.reason.current_owner}}{{item.reason.owner}}
Group: {{item.reason.current_group}}{{item.reason.group}}
Permissions: {{item.reason.current_perms}}{{item.reason.perms}}
Status: {{item.reason.current_status}}{{item.reason.status}}
Link Destination: {{item.reason.current_to}}{{item.reason.to}}
Version: {{item.reason.current_version}}{{item.reason.version}}
Existence: This item does not currently exist on the host but is specified to exist in the configuration.
NDiff:
{{item.reason.current_diff|syntaxhilight:"diff"}}
-
-
- -Enter date or use calendar popup: - -
- -@ - -Calendar -{% ifequal mod_or_bad "modified" %} - - | -{% else %} - - | -{% endifequal %} -
-


-{% if associated_client_list %} -

The following clients had this problem as of {{timestamp_date}}@{{timestamp_time}}:

- {% for client in associated_client_list %} - {{client.name}}
- {% endfor %} -
-
-{% else %} -

No Clients had this problem at {{timestamp}}

-{% endif %} - - - - - - - -{% endblock %} diff --git a/src/lib/Server/Reports/reports/templates/config_items/item.html b/src/lib/Server/Reports/reports/templates/config_items/item.html new file mode 100644 index 000000000..41474922b --- /dev/null +++ b/src/lib/Server/Reports/reports/templates/config_items/item.html @@ -0,0 +1,109 @@ +{% extends "base.html" %} +{% load syntax_coloring %} + + +{% block title %}Bcfg2 - Element Details{% endblock %} + + +{% block extra_header_info %} + +{% endblock%} + +{% block pagebanner %}Element Details{% endblock %} + +{% block content %} +
+

{{mod_or_bad|capfirst}} {{item.entry.kind}}: {{item.entry.name}}

+
+ +
+ + {% if isextra %} +

This item exists on the host but is not defined in the configuration.

+ {% endif %} + + {% if not item.reason.current_exists %} +
This item does not currently exist on the host but is specified to exist in the configuration.
+ {% endif %} + + {% if item.reason.current_owner or item.reason.current_group or item.reason.current_perms or item.reason.current_status or item.reason.current_status or item.reason.current_to or item.reason.current_version %} + + + + {% if item.reason.current_owner %} + + + {% endif %} + {% if item.reason.current_group %} + + + {% endif %} + {% if item.reason.current_perms %} + + + {% endif %} + {% if item.reason.current_status %} + + + {% endif %} + {% if item.reason.current_to %} + + + {% endif %} + {% if item.reason.current_version %} + + + {% endif %} +
Problem TypeExpectedFound
Owner{{item.reason.owner}}{{item.reason.current_owner}}
Group{{item.reason.group}}{{item.reason.current_group}}
Permissions{{item.reason.perms}}{{item.reason.current_perms}}
Status{{item.reason.status}}{{item.reason.current_status}}
Symlink Target{{item.reason.to}}{{item.reason.current_to}}
Package Version{{item.reason.version|cut:"("|cut:")"}}{{item.reason.current_version|cut:"("|cut:")"}}
+ {% endif %} + + {% if item.reason.current_diff %} +
+
+

Incorrect file contents

+
+
+ {{ item.reason.current_diff|syntaxhilight }} +
+
+ {% endif %} + + +
+
+

Occurances on {{ timestamp|date:"Y-m-d" }}

+
+ {% if associated_list %} + + {% for inter in associated_list %} + + + + {% endfor %} +
{{inter.client.name}}{{inter.timestamp}}
+ {% else %} +

Missing client list

+ {% endif %} +
+ +
+{% endblock %} diff --git a/src/lib/Server/Reports/reports/templates/config_items/listing.html b/src/lib/Server/Reports/reports/templates/config_items/listing.html index 64a60e506..572249470 100644 --- a/src/lib/Server/Reports/reports/templates/config_items/listing.html +++ b/src/lib/Server/Reports/reports/templates/config_items/listing.html @@ -1,50 +1,32 @@ -{% extends "base.html" %} -{% load django_templating_sigh %} +{% extends "base-timeview.html" %} +{% load bcfg2_tags %} -{% block extra_header_info %} - - - - - - - - - -{% endblock %} +{% block pagebanner %}{{mod_or_bad|capfirst}} Element Listing{% endblock %} -{% block title %}{{mod_or_bad|capfirst}} Item Listing{% endblock %} +{% block content %} +{% if item_list_dict %} + {% for kind, entries in item_list_dict.items %} -{% block pagebanner %} -
-

{{mod_or_bad|capfirst}} Configuration Elements

+
+
+
[+]
+

{{ kind }} — {{ entries|length }}

-
-{% endblock %} -{% block content %} -{% if item_list_pseudodict %} -
+ + {% for e in entries %} + + + + {% endfor %} +
{{e.entry.name}}
+
+ {% endfor %} {% else %}

There are currently no inconsistent configuration entries.

{% endif %} -- cgit v1.2.3-1-g7c22