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/clients/client-nodebox.html | 63 ---------- .../Reports/reports/templates/clients/detail.html | 130 +++++++++++++++++++-- .../reports/templates/clients/detailed-list.html | 79 +++---------- .../Reports/reports/templates/clients/history.html | 20 ++++ .../Reports/reports/templates/clients/index.html | 61 +++------- .../Reports/reports/templates/clients/manage.html | 62 ++++++---- 6 files changed, 211 insertions(+), 204 deletions(-) delete mode 100644 src/lib/Server/Reports/reports/templates/clients/client-nodebox.html create mode 100644 src/lib/Server/Reports/reports/templates/clients/history.html (limited to 'src/lib/Server/Reports/reports/templates/clients') diff --git a/src/lib/Server/Reports/reports/templates/clients/client-nodebox.html b/src/lib/Server/Reports/reports/templates/clients/client-nodebox.html deleted file mode 100644 index 8dbd01d9a..000000000 --- a/src/lib/Server/Reports/reports/templates/clients/client-nodebox.html +++ /dev/null @@ -1,63 +0,0 @@ -{% load django_templating_sigh %} -{% if client %} - -
- Time Ran: {{interaction.timestamp}} - - - - - - -

Node: - {{client.name}}

- {% if interaction.repo_rev_code %}Revision: {{interaction.repo_rev_code}}{% endif %} -
-
 
-
 
-
-
- {% if interaction.isclean %} -
- Node is clean; Everything has been satisfactorily configured. -
- {% endif %} - {% if interaction.isstale %} -
- This node did not run within the last 24 hours-- it may be out of date. -
- {% endif %} - {% if interaction.bad %} -
- {{interaction.bad.count}} items did not verify and are considered Dirty.
-
    - {% for bad in interaction.bad|sortwell %} -
  • {{bad.entry.kind}}: {{bad.entry.name}}
  • - {% endfor %} -
-
- {% endif %} - {% if interaction.modified %} -
- {{interaction.modified.count}} items were modified in the last run.
-
    - {% for modified in interaction.modified|sortwell %} -
  • {{modified.entry.kind}}: {{modified.entry.name}}
  • - {% endfor %} -
-
- {% endif %} - {% if interaction.extra %} -
- {{interaction.extra.count}} extra configuration elements on the node.
-
    - {% for extra in interaction.extra|sortwell %} -
  • {{extra.entry.kind}}: {{extra.entry.name}}
  • - {% endfor %} -
-
- {% endif %} -
-{% else %} -

No record could be found for this client.

-{% endif %} diff --git a/src/lib/Server/Reports/reports/templates/clients/detail.html b/src/lib/Server/Reports/reports/templates/clients/detail.html index 77f505804..efd5f9e00 100644 --- a/src/lib/Server/Reports/reports/templates/clients/detail.html +++ b/src/lib/Server/Reports/reports/templates/clients/detail.html @@ -1,17 +1,127 @@ {% extends "base.html" %} +{% load bcfg2_tags %} -{% block title %}Info for: {{client.name}}{% endblock %} +{% block title %}Bcfg2 - Client {{client.name}}{% endblock %} + +{% block extra_header_info %} + +{% endblock %} + +{% block body_onload %}javascript:clientdetailload(){% endblock %} + +{% block pagebanner %}Client Details{% endblock %} {% block content %} -

Client Status Detail page for {{client.name}}


-Select time: - + + {% for i in client.interactions.all|slice:":25" %} + + {% endfor %} + + + + {% if interaction.isstale %} +
+ This node did not run within the last 24 hours — it may be out of date. +
+ {% endif %} + + + {% if interaction.server %} + + {% endif %} + {% if interaction.repo_rev_code %} + + {% endif %} + + + {% if not interaction.isclean %} + + {% endif %} +
Timestamp{{interaction.timestamp}}
Served by{{interaction.server}}
Revision{{interaction.repo_rev_code}}
State{{interaction.state|capfirst}}
Managed entries{{interaction.totalcount}}
Deviation{{interaction.percentbad|floatformat:"3"}}%
+ + {% if interaction.bad_entry_count %} +
+
+
[+]
+

Bad Entries — {{ interaction.bad_entry_count }}

+
+ + {% for e in interaction.bad|sortwell %} + + + + + {% endfor %} +
{{e.entry.kind}}: + {{e.entry.name}}
+
+ {% endif %} + + {% if interaction.modified_entry_count %} +
+
+
[+]
+

Modified Entries — {{ interaction.modified_entry_count }}

+
+ + {% for e in interaction.modified|sortwell %} + + + + + {% endfor %} +
{{e.entry.kind}}: + {{e.entry.name}}
+
+ {% endif %} + + {% if interaction.extra_entry_count %} +
+
+
[+]
+

Extra Entries — {{ interaction.extra_entry_count }}

+
+ + {% for e in interaction.extra|sortwell %} + + + + {% endfor %} - -         -Manage {{client.name}} options.
+
{{e.entry.kind}}:{{e.entry.name}}
+
+ {% endif %} -{% include "clients/client-nodebox.html" %} + {% if entry_list %} +
+
+

Recent Interactions

+
+
+ {% include "widgets/interaction_list.inc" %} +
more...
+
+
+ {% endif %} {% endblock %} 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 5a1352cff..0c1fae8d5 100644 --- a/src/lib/Server/Reports/reports/templates/clients/detailed-list.html +++ b/src/lib/Server/Reports/reports/templates/clients/detailed-list.html @@ -1,57 +1,15 @@ -{% extends "base.html" %} +{% extends "base-timeview.html" %} +{% load bcfg2_tags %} -{% block title %}Detailed Client Listing{% endblock %} - -{% block extra_header_info %} - - - -{% endblock%} - -{% block pagebanner %} -
-

Detailed Client List

-
-
-{% endblock %} +{% block title %}Bcfg2 - Detailed Client Listing{% endblock %} +{% block pagebanner %}Clients - Detailed View{% endblock %} {% block content %} -
-
- -Enter date or use calendar popup: -@ - -Calendar - - | -

-
-
- -
+
{% if entry_list %} + {% filter_navigator %} - + @@ -61,30 +19,19 @@ - {% for client,entry,stale in entry_list %} + {% for entry in entry_list %} - - + + - +
Node State GoodLast Run Server
{{ client }}{{ entry.state }}{{ entry.client.name }}{{ entry.state }} {{ entry.goodcount }} {{ entry.bad_entry_count }} {{ entry.modified_entry_count }} {{ entry.extra_entry_count }}{{ entry.timestamp|date:"Y-m-d H:i" }}{{ entry.timestamp|date:"Y-m-d\&\n\b\s\p\;H:i"|safe }} {% if entry.server %} - {{ entry.server }} + {{ entry.server }} {% else %}   {% endif %} diff --git a/src/lib/Server/Reports/reports/templates/clients/history.html b/src/lib/Server/Reports/reports/templates/clients/history.html new file mode 100644 index 000000000..01d4ec2f4 --- /dev/null +++ b/src/lib/Server/Reports/reports/templates/clients/history.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} +{% load bcfg2_tags %} + +{% block title %}Bcfg2 - Interaction History{% endblock %} +{% block pagebanner %}Interaction history{% if client %} for {{ client.name }}{% endif %}{% endblock %} + +{% block extra_header_info %} +{% endblock %} + +{% block content %} +
+{% if entry_list %} + {% filter_navigator %} + {% include "widgets/interaction_list.inc" %} +{% else %} +

No client records are available.

+{% endif %} +
+{% page_navigator %} +{% endblock %} diff --git a/src/lib/Server/Reports/reports/templates/clients/index.html b/src/lib/Server/Reports/reports/templates/clients/index.html index cfb8a6c83..e0c0d2d7a 100644 --- a/src/lib/Server/Reports/reports/templates/clients/index.html +++ b/src/lib/Server/Reports/reports/templates/clients/index.html @@ -1,56 +1,33 @@ -{% extends "base.html" %} +{% extends "base-timeview.html" %} {% block extra_header_info %} - - - {% endblock%} -{% block title %}Client Index Listing{% endblock %} +{% block title %}Bcfg2 - Client Grid View{% endblock %} -{% block pagebanner %} -
-

Clients List

-
-
-{% endblock %} +{% block pagebanner %}Clients - Grid View{% endblock %} {% block content %} -
- -Enter date or use calendar popup: - -
- -@ - -Calendar - - | -
-


{% if inter_list %} - + {% if forloop.last %} + {% else %} - {% url Bcfg2.Server.Reports.reports.views.client_detail client,inter.id %} - {% endifequal %} - {% endspaceless %}">{{ client }} - - {% ifequal half_list forloop.counter0 %} - -{% endif %} + {% endif %} {% endfor %} - -
-
-
    - {% endifequal %} + {% if forloop.counter|divisibleby:"4" %}
+
{% else %}

No client records are available.

{% endif %} diff --git a/src/lib/Server/Reports/reports/templates/clients/manage.html b/src/lib/Server/Reports/reports/templates/clients/manage.html index 61f0fe017..5725ae577 100644 --- a/src/lib/Server/Reports/reports/templates/clients/manage.html +++ b/src/lib/Server/Reports/reports/templates/clients/manage.html @@ -1,29 +1,45 @@ {% extends "base.html" %} + {% block extra_header_info %} - - {% endblock%} -{% block title %}{{client.name}}{% endblock %} -{% block content %} -

Client Options Management page for {{client.name}}


-

Client status detail page: {{client.name}}.

-

Hosts may be prevented from showing up in the reporting system if they have been retired, are no longer managed by bcfg2 :(, etc.

-Select deactivation date: -
- -Enter date or use calendar popup: - -
- -@ - -Calendar - -
-


-

-

{{message}}

+{% block title %}Bcfg2 - Manage Clients{% endblock %} +{% block pagebanner %}Clients - Manage{% endblock %} + +{% block content %} +
+ {% if message %} +
{{ message }}
+ {% endif %} +{% if clients %} + + + + + + + {% for client in clients %} + + + + + + {% endfor %} +
NodeExpirationManage
+ + + {{ client.name }}{% firstof client.expiration 'Active' %} +
+
{# here for no reason other then to validate #} + + + +
+
+
+
+{% else %} +

No client records are available.

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