diff options
Diffstat (limited to 'src/lib/Server/Reports/reports/templates/displays')
6 files changed, 65 insertions, 205 deletions
diff --git a/src/lib/Server/Reports/reports/templates/displays/index.html b/src/lib/Server/Reports/reports/templates/displays/index.html deleted file mode 100644 index c078539b6..000000000 --- a/src/lib/Server/Reports/reports/templates/displays/index.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Display Index Listing{% endblock %} -{% block pagebanner %} - <div class="header"> - <h1>BCFG Display Index</h1> - {% comment %} <span class="notebox">Report Run @ {% now "F j, Y P"%}</span>{% endcomment %} - </div> - <br/> -{% endblock %} - -{% block content %} -<ul> -<li><a href="{% url Bcfg2.Server.Reports.reports.views.display_sys_view %}">System View</a></li> -<li><a href="{% url Bcfg2.Server.Reports.reports.views.display_summary %}">Summary Only</a></li> -<li><a href="{% url Bcfg2.Server.Reports.reports.views.display_timing %}">Timing</a></li> -</ul> -{% endblock %} diff --git a/src/lib/Server/Reports/reports/templates/displays/summary-block-direct-links.html b/src/lib/Server/Reports/reports/templates/displays/summary-block-direct-links.html deleted file mode 100644 index 60f97eadc..000000000 --- a/src/lib/Server/Reports/reports/templates/displays/summary-block-direct-links.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "displays/summary-block.html" %} -{% block linkprefix1 %}{% url Bcfg2.Server.Reports.reports.views.client_index %}{% endblock %} -{% block linkprefix2 %}{% url Bcfg2.Server.Reports.reports.views.client_index %}{% endblock %} -{% block linkprefix3 %}{% url Bcfg2.Server.Reports.reports.views.client_index %}{% endblock %} -{% block linkprefix4 %}{% url Bcfg2.Server.Reports.reports.views.client_index %}{% endblock %} -{% block linkprefix5 %}{% url Bcfg2.Server.Reports.reports.views.client_index %}{% endblock %} -{% block linkprefix6 %}{% url Bcfg2.Server.Reports.reports.views.client_index %}{% endblock %}
\ No newline at end of file diff --git a/src/lib/Server/Reports/reports/templates/displays/summary-block.html b/src/lib/Server/Reports/reports/templates/displays/summary-block.html deleted file mode 100644 index 060ff0fa1..000000000 --- a/src/lib/Server/Reports/reports/templates/displays/summary-block.html +++ /dev/null @@ -1,90 +0,0 @@ -{% load django_templating_sigh %} - - <div class="nodebox"> - <h2>Summary:</h2> - <p class="indented">{{client_list|length }} Nodes were included in your report.</p> - {% if clean_client_list %} - <div class="clean"> - <span class="nodelisttitle"><a href="javascript:toggleLayer('goodsummary');" title="Click to Expand" class="commentLink">{{clean_client_list|length}}</a> nodes are clean.<br /></span> - <div class="items" id="goodsummary"><ul class="plain"> - {% for client in clean_client_list|sortname %} - {% set_interaction "foo" %} - <li><b>Node: </b> - <tt><a href="{% block linkprefix1 %}#{% endblock %}{{client.name}}">{{client.name}}</a></tt><span class="mini-date">{{interaction.timestamp}}</span></li> - {% endfor %} - </ul></div> - </div> - {% endif %} - {% if bad_client_list %} - <div class="bad"> - <span class="nodelisttitle"><a href="javascript:toggleLayer('badsummary');" title="Click to Expand" class="commentLink">{{bad_client_list|length}}</a> nodes are bad.<br /></span> - <div class="items" id="badsummary"><ul class="plain"> - {% for client in bad_client_list|sortname %} - {% set_interaction "foo" %} - <li><b>Node: </b> - <tt><a href="{% block linkprefix2 %}#{% endblock %}{{client.name}}">{{client.name}}</a></tt><span class="mini-date">{{interaction.timestamp}}</span></li> - {% endfor %} - </ul></div> - </div> - {% endif %} - {% if modified_client_list %} - <div class="modified"> - <span class="nodelisttitle"><a href="javascript:toggleLayer('modifiedsummary');" title="Click to Expand" class="commentLink">{{modified_client_list|length}}</a> nodes were modified in the previous run.<br /></span> - <div class="items" id="modifiedsummary"><ul class="plain"> - {% for client in modified_client_list|sortname %} - {% set_interaction "foo" %} - <li><b>Node: </b> - <tt><a href="{% block linkprefix3 %}#{% endblock %}{{client.name}}">{{client.name}}</a></tt><span class="mini-date">{{interaction.timestamp}}</span></li> - {% endfor %} - </ul></div> - </div> - {% endif %} - {% if extra_client_list %} - <div class="extra"> - <span class="nodelisttitle"><a href="javascript:toggleLayer('extrasummary');" title="Click to Expand" class="commentLink">{{extra_client_list|length}}</a> nodes have extra configuration. (includes both good and bad nodes)<br /></span> - <div class="items" id="extrasummary"><ul class="plain"> - {% for client in extra_client_list|sortname %} - {% set_interaction "foo" %} - <li><b>Node: </b> - <tt><a href="{% block linkprefix4 %}#{% endblock %}{{client.name}}">{{client.name}}</a></tt><span class="mini-date">{{interaction.timestamp}}</span></li> - {% endfor %} - </ul></div> - </div> - {% endif %} - {% if stale_up_client_list %} - <div class="warning"> - <span class="nodelisttitle"><a href="javascript:toggleLayer('vstalesummary');" title="Click to Expand" class="commentLink">{{stale_up_client_list|length}}</a> nodes did not run within the last 24 hours but were pingable.<br /></span> - <div class="items" id="vstalesummary"><ul class="plain"> - {% for client in stale_up_client_list|sortname %} - {% set_interaction "foo" %} - <li><b>Node: </b> - <tt><a href="{% block linkprefix5 %}#{% endblock %}{{client.name}}">{{client.name}}</a></tt><span class="mini-date">{{interaction.timestamp}}</span></li> - {% endfor %} - </ul></div> - </div> - {% endif %} - {% if stale_all_client_list %} - <div class="all-warning"> - <span class="nodelisttitle"><a href="javascript:toggleLayer('stalesummary');" title="Click to Expand" class="commentLink">{{stale_all_client_list|length}}</a> nodes did not run within the last 24 hours. (includes nodes up and down)<br /></span> - <div class="items" id="stalesummary"><ul class="plain"> - {% for client in stale_all_client_list|sortname %} - {% set_interaction "foo" %} - <li><b>Node: </b> - <tt><a href="{% block linkprefix6 %}#{% endblock %}{{client.name}}">{{client.name}}</a></tt><span class="mini-date">{{interaction.timestamp}}</span></li> - {% endfor %} - </ul></div> - </div> - {% endif %} - {% if down_client_list %} - <div class="down"> - <span class="nodelisttitle"><a href="javascript:toggleLayer('unpingablesummary');" title="Click to Expand" class="commentLink">{{down_client_list|length}}</a> nodes were down.<br /></span> - <div class="items" id="unpingablesummary"><ul class="plain"> - {% for client in down_client_list|sortname %} - {% set_interaction "foo" %} - <li><b>Node: </b> - <tt><a href="#{{client.name}}">{{client.name}}</a></tt><span class="mini-date">{{interaction.timestamp}}</span></li> - {% endfor %} - </ul></div> - </div> - {% endif %} - </div> diff --git a/src/lib/Server/Reports/reports/templates/displays/summary.html b/src/lib/Server/Reports/reports/templates/displays/summary.html index 29cbb22d7..0124f635d 100644 --- a/src/lib/Server/Reports/reports/templates/displays/summary.html +++ b/src/lib/Server/Reports/reports/templates/displays/summary.html @@ -1,31 +1,42 @@ -{% extends "base.html" %} +{% extends "base-timeview.html" %} +{% load bcfg2_tags %} + +{% block title %}Bcfg2 - Client Summary{% endblock %} +{% block pagebanner %}Clients - Summary{% endblock %} + +{% block body_onload %}javascript:hide_table_array(hide_tables){% endblock %} + {% block extra_header_info %} -<script type="text/javascript" src="{% url Bcfg2.Server.Reports.reports.views.client_index %}../site_media/CalendarPopup.js"></script> -<script language="JavaScript" type="text/javascript">var cal = new CalendarPopup();</script> +<script type="text/javascript"> +var hide_tables = new Array({{ summary_data|length }}); +{% for summary in summary_data %} +hide_tables[{{ forloop.counter0 }}] = "table_{{ summary.name }}"; +{% endfor %} +</script> {% endblock%} -{% block title %}Display Index Listing{% endblock %} -{% block pagebanner %} - <div class="header"> - <h1>BCFG Clients Summary</h1> - <span class="notebox">Report Run @ {% now "F j, Y P"%}</span> - </div> - <br/> -{% endblock %} {% block content %} -<div> -<span class="mini-date"> -<b>Enter date or use calendar popup: </b> -</span> -<form name="timestamp-select" action="{{path}" method="get"> -<span class="mini-date"> -<input type="text" name="date1" value="{{timestamp_date}}" size="10" />@ -<input type="text" name="time" value="{{timestamp_time}}" size="8" /> -<a href="#" onClick="cal.select(document.forms['timestamp-select'].date1,'anchor1','yyyy-MM-dd'); return false;" - name="anchor1" ID="anchor1">Calendar</A> -<input type="button" name="go" value="Go" onClick="location.href='{% url Bcfg2.Server.Reports.reports.views.display_summary %}'+document.forms['timestamp-select'].date1.value+'@'+document.forms['timestamp-select'].time.value;" /> - | <input type="button" name="now" value="Now" onClick="location.href='{% url Bcfg2.Server.Reports.reports.views.display_summary %}';"/> -</span></form> -<br/><br/><br/></div> - {% include "displays/summary-block-direct-links.html" %} + <div class='detail_header'> + <h2>{{ node_count }} nodes reporting in</h2> + </div> +{% if summary_data %} + {% for summary in summary_data %} + <div class='entry_list'> + <div class='entry_list_head element_list_head'> + <div class='entry_expand_tab' onclick='javascript:toggleMe("table_{{ summary.name }}");'>[+]</div> + <h3>{{ summary.nodes|length }} {{ summary.label }}</h3> + </div> + + <table id='table_{{ summary.name }}' class='entry_list'> + {% for node in summary.nodes|sort_interactions_by_name %} + <tr class='{% cycle listview,listview_alt %}'> + <td><a href="{% url reports_client_detail_pk hostname=node.client.name,pk=node.id %}">{{ node.client.name }}</a></td> + </tr> + {% endfor %} + </table> + </div> + {% endfor %} +{% else %} + <p>No data to report on</p> +{% endif %} {% endblock %} diff --git a/src/lib/Server/Reports/reports/templates/displays/sys_view.html b/src/lib/Server/Reports/reports/templates/displays/sys_view.html deleted file mode 100644 index 1298059bf..000000000 --- a/src/lib/Server/Reports/reports/templates/displays/sys_view.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends "base.html" %} -{% load django_templating_sigh %} - -{% block title %}System-View Display{% endblock %} -{% block pagebanner %} - <div class="header"> - <h1>Grand System View</h1> - <span class="notebox">Report Run @ {% now "F j, Y P"%}</span> - </div> - <br/> -{% endblock %} -{% block content %} -<center><h2>This view is deprecated and will be removed soon.</h2><br/>Please use the "Summary" view and drill down instead.</center> - - {% include "displays/summary-block.html" %} - {% for client in client_list %} - {% set_interaction "foo" %} - {% include "clients/client-nodebox.html" %} - {% endfor %} -{% endblock %} diff --git a/src/lib/Server/Reports/reports/templates/displays/timing.html b/src/lib/Server/Reports/reports/templates/displays/timing.html index 32ddab464..47accb2cb 100644 --- a/src/lib/Server/Reports/reports/templates/displays/timing.html +++ b/src/lib/Server/Reports/reports/templates/displays/timing.html @@ -1,54 +1,38 @@ -{% extends "base.html" %} +{% extends "base-timeview.html" %} +{% load bcfg2_tags %} + +{% block title %}Bcfg2 - Performance Metrics{% endblock %} +{% block pagebanner %}Performance Metrics{% endblock %} + {% block extra_header_info %} -<script type="text/javascript" src="{% url Bcfg2.Server.Reports.reports.views.client_index %}../site_media/sorttable.js"></script> -<script type="text/javascript" src="{% url Bcfg2.Server.Reports.reports.views.client_index %}../site_media/CalendarPopup.js"></script> -<script language="JavaScript" type="text/javascript">var cal = new CalendarPopup();</script> {% endblock%} -{% block title %}Display Index Listing{% endblock %} {% block content %} - <div class="header"> - <h1>BCFG Performance Timings</h1> - <span class="notebox">Report Run @ {% now "F j, Y P"%}</span> - </div> - <br/> -<div> -<span class="mini-date"> -<b>Enter date or use calendar popup: </b> -</span> -<form name="timestamp-select" action="{{path}}" method="get"> -<span class="mini-date"> -<input type="text" name="date1" value="{{timestamp_date}}" size="10" />@ -<input type="text" name="time" value="{{timestamp_time}}" size="8" /> -<a href="#" onClick="cal.select(document.forms['timestamp-select'].date1,'anchor1','yyyy-MM-dd'); return false;" - name="anchor1" ID="anchor1">Calendar</A> -<input type="button" name="go" value="Go" onClick="location.href='{% url Bcfg2.Server.Reports.reports.views.display_timing %}'+document.forms['timestamp-select'].date1.value+'@'+document.forms['timestamp-select'].time.value;" /> - | <input type="button" name="now" value="Now" onClick="location.href='{% url Bcfg2.Server.Reports.reports.views.display_timing %}';"/> -</span></form> -<br/><br/><br/></div> - <center> - <table id="t1" class="sortable"> - <tr> - <th class="sortable">Hostname</th> - <th class="sortable">Parse</th> - <th class="sortable">Probe</th> - <th class="sortable">Inventory</th> - <th class="sortable">Install</th> - <th class="sortable">Config</th> - <th class="sortable">Total</th> +<div class='client_list_box'> + {% if metrics %} + <table cellpadding="3"> + <tr id='table_list_header' class='listview'> + <td>Name</td> + <td>Parse</td> + <td>Probe</td> + <td>Inventory</td> + <td>Install</td> + <td>Config</td> + <td>Total</td> </tr> - {% for dict_unit in stats_list %} - <tr> - <td class="sortable"><a href="{% url Bcfg2.Server.Reports.reports.views.client_detail dict_unit.name%}/">{{dict_unit.name}}</a></td> - <td class="sortable">{{dict_unit.parse}}</td> - <td class="sortable">{{dict_unit.probe}}</td> - <td class="sortable">{{dict_unit.inventory}}</td> - <td class="sortable">{{dict_unit.install}}</td> - <td class="sortable">{{dict_unit.config}}</td> - <td class="sortable">{{dict_unit.total}}</td> + {% for metric in metrics|dictsort:"name" %} + <tr class='{% cycle listview,listview_alt %}'> + <td><a style='font-size: 100%' + href="{% url reports_client_detail hostname=metric.name %}">{{ metric.name }}</a></td> + {% for mitem in metric|build_metric_list %} + <td>{{ mitem }}</td> + {% endfor %} </tr> {% endfor %} </table> - </center> + {% else %} + <p>No metric data available</p> + {% endif %} +</div> {% endblock %} |