From 44638176067df5231bf0be30801e36863391cd1f Mon Sep 17 00:00:00 2001 From: Tim Laszlo Date: Mon, 8 Oct 2012 10:38:02 -0500 Subject: Reporting: Merge new reporting data Move reporting data to a new schema Use south for django migrations Add bcfg2-report-collector daemon Conflicts: doc/development/index.txt doc/server/plugins/connectors/properties.txt doc/server/plugins/generators/packages.txt setup.py src/lib/Bcfg2/Client/Tools/SELinux.py src/lib/Bcfg2/Compat.py src/lib/Bcfg2/Encryption.py src/lib/Bcfg2/Options.py src/lib/Bcfg2/Server/Admin/Init.py src/lib/Bcfg2/Server/Admin/Reports.py src/lib/Bcfg2/Server/BuiltinCore.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/FileMonitor/Inotify.py src/lib/Bcfg2/Server/Plugin/base.py src/lib/Bcfg2/Server/Plugin/interfaces.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py src/lib/Bcfg2/Server/Plugins/FileProbes.py src/lib/Bcfg2/Server/Plugins/Ohai.py src/lib/Bcfg2/Server/Plugins/Packages/Collection.py src/lib/Bcfg2/Server/Plugins/Packages/Source.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/Packages/__init__.py src/lib/Bcfg2/Server/Plugins/Probes.py src/lib/Bcfg2/Server/Plugins/Properties.py src/lib/Bcfg2/Server/Reports/backends.py src/lib/Bcfg2/Server/Reports/manage.py src/lib/Bcfg2/Server/Reports/nisauth.py src/lib/Bcfg2/settings.py src/sbin/bcfg2-crypt src/sbin/bcfg2-yum-helper testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestSEModules.py --- src/lib/Bcfg2/Reporting/templates/404.html | 8 ++ .../Bcfg2/Reporting/templates/base-timeview.html | 28 ++++ src/lib/Bcfg2/Reporting/templates/base.html | 96 +++++++++++++ .../Bcfg2/Reporting/templates/clients/detail.html | 149 +++++++++++++++++++++ .../Reporting/templates/clients/detailed-list.html | 46 +++++++ .../Bcfg2/Reporting/templates/clients/history.html | 20 +++ .../Bcfg2/Reporting/templates/clients/index.html | 35 +++++ .../Bcfg2/Reporting/templates/clients/manage.html | 45 +++++++ .../Reporting/templates/config_items/common.html | 42 ++++++ .../templates/config_items/entry_status.html | 32 +++++ .../templates/config_items/item-failure.html | 13 ++ .../Reporting/templates/config_items/item.html | 136 +++++++++++++++++++ .../Reporting/templates/config_items/listing.html | 35 +++++ .../Reporting/templates/displays/summary.html | 42 ++++++ .../Bcfg2/Reporting/templates/displays/timing.html | 38 ++++++ .../Reporting/templates/widgets/filter_bar.html | 25 ++++ .../templates/widgets/interaction_list.inc | 38 ++++++ .../Reporting/templates/widgets/page_bar.html | 23 ++++ 18 files changed, 851 insertions(+) create mode 100644 src/lib/Bcfg2/Reporting/templates/404.html create mode 100644 src/lib/Bcfg2/Reporting/templates/base-timeview.html create mode 100644 src/lib/Bcfg2/Reporting/templates/base.html create mode 100644 src/lib/Bcfg2/Reporting/templates/clients/detail.html create mode 100644 src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html create mode 100644 src/lib/Bcfg2/Reporting/templates/clients/history.html create mode 100644 src/lib/Bcfg2/Reporting/templates/clients/index.html create mode 100644 src/lib/Bcfg2/Reporting/templates/clients/manage.html create mode 100644 src/lib/Bcfg2/Reporting/templates/config_items/common.html create mode 100644 src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html create mode 100644 src/lib/Bcfg2/Reporting/templates/config_items/item-failure.html create mode 100644 src/lib/Bcfg2/Reporting/templates/config_items/item.html create mode 100644 src/lib/Bcfg2/Reporting/templates/config_items/listing.html create mode 100644 src/lib/Bcfg2/Reporting/templates/displays/summary.html create mode 100644 src/lib/Bcfg2/Reporting/templates/displays/timing.html create mode 100644 src/lib/Bcfg2/Reporting/templates/widgets/filter_bar.html create mode 100644 src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc create mode 100644 src/lib/Bcfg2/Reporting/templates/widgets/page_bar.html (limited to 'src/lib/Bcfg2/Reporting/templates') diff --git a/src/lib/Bcfg2/Reporting/templates/404.html b/src/lib/Bcfg2/Reporting/templates/404.html new file mode 100644 index 000000000..168bd9fec --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/404.html @@ -0,0 +1,8 @@ +{% extends 'base.html' %} +{% block title %}Bcfg2 - Page not found{% endblock %} +{% block fullcontent %} +

Page not found

+

+The page or object requested could not be found. +

+{% endblock %} diff --git a/src/lib/Bcfg2/Reporting/templates/base-timeview.html b/src/lib/Bcfg2/Reporting/templates/base-timeview.html new file mode 100644 index 000000000..9a5ef651c --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/base-timeview.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} + +{% block timepiece %} + +{% if not timestamp %}Rendered at {% now "Y-m-d H:i" %} | {% else %}View as of {{ timestamp|date:"Y-m-d H:i" }} | {% endif %}{% spaceless %} + [change] +
+ + +
+{% endspaceless %} +{% endblock %} diff --git a/src/lib/Bcfg2/Reporting/templates/base.html b/src/lib/Bcfg2/Reporting/templates/base.html new file mode 100644 index 000000000..6d20f86d9 --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/base.html @@ -0,0 +1,96 @@ +{% load bcfg2_tags %} + + + + + +{% block title %}Bcfg2 Reporting System{% endblock %} + + + + + + + + + + + + + +{% block extra_header_info %}{% endblock %} + + + + + + +
+
+ {% block fullcontent %} +
+

{% block pagebanner %}Page Banner{% endblock %}

+
{% block timepiece %}Rendered at {% now "Y-m-d H:i" %}{% endblock %}
+
+
+ {% block content %}{% endblock %} +
+ {% endblock %} +
+
+ {% block sidemenu %} + + + + + + +{% comment %} + TODO + + +{% endcomment %} + + {% endblock %} +
+
+
+ + + + + diff --git a/src/lib/Bcfg2/Reporting/templates/clients/detail.html b/src/lib/Bcfg2/Reporting/templates/clients/detail.html new file mode 100644 index 000000000..b2244bfa1 --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/clients/detail.html @@ -0,0 +1,149 @@ +{% extends "base.html" %} +{% load bcfg2_tags %} + +{% 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.name}}

+ [manage] + View History | Jump to  + +
+ + {% 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}}
Profile{{interaction.profile}}
Revision{{interaction.repo_rev_code}}
State{{interaction.state|capfirst}}
Managed entries{{interaction.total_count}}
Deviation{{interaction.percentbad|floatformat:"3"}}%
+ + {% for group in interaction.groups.all %} + {% if forloop.first %} +
+
+

Group membership

+
[+]
+
+ + {% endif %} + + + + {% if forloop.last %} + +
+ {% endif %} + {% endfor %} + + {% for bundle in interaction.bundles.all %} + {% if forloop.first %} +
+
+

Bundle membership

+
[+]
+
+ + {% endif %} + + + + {% if forloop.last %} + +
+ {% endif %} + {% endfor %} + + {% for entry_type, entry_list in entry_types.items %} + {% if entry_list %} +
+
+

{{ entry_type|capfirst }} Entries — {{ entry_list|length }}

+
[+]
+
+ + {% for entry in entry_list %} + + + + + {% endfor %} +
{{entry.entry_type}} + {{entry.name}}
+
+ {% endif %} + {% endfor %} + + {% if interaction.failures.all %} +
+
+

Failed entries

+
[+]
+
+ + {% for failure in interaction.failures.all %} + + + + + {% endfor %} + +
+ {% endif %} + + {% if entry_list %} +
+
+

Recent Interactions

+
+
+ {% include "widgets/interaction_list.inc" %} +
more...
+
+
+ {% endif %} +{% endblock %} diff --git a/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html b/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html new file mode 100644 index 000000000..06c99d899 --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html @@ -0,0 +1,46 @@ +{% extends "base-timeview.html" %} +{% load bcfg2_tags %} + +{% block title %}Bcfg2 - Detailed Client Listing{% endblock %} +{% block pagebanner %}Clients - Detailed View{% endblock %} + +{% block content %} +
+ {% filter_navigator %} +{% if entry_list %} + + + + + + + + + + + + {% for entry in entry_list %} + + + + + + + + + + + {% endfor %} +
{% sort_link 'client' 'Node' %}{% sort_link 'state' 'State' %}{% sort_link '-good' 'Good' %}{% sort_link '-bad' 'Bad' %}{% sort_link '-modified' 'Modified' %}{% sort_link '-extra' 'Extra' %}{% sort_link 'timestamp' 'Last Run' %}{% sort_link 'server' 'Server' %}
{{ entry.client.name }}{{ entry.state }}{{ entry.good_count }}{{ entry.bad_count }}{{ entry.modified_count }}{{ entry.extra_count }}{{ entry.timestamp|date:"Y-m-d\&\n\b\s\p\;H:i"|safe }} + {% if entry.server %} + {{ entry.server }} + {% else %} +   + {% endif %} +
+{% else %} +

No client records are available.

+{% endif %} +
+{% endblock %} diff --git a/src/lib/Bcfg2/Reporting/templates/clients/history.html b/src/lib/Bcfg2/Reporting/templates/clients/history.html new file mode 100644 index 000000000..01d4ec2f4 --- /dev/null +++ b/src/lib/Bcfg2/Reporting/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/Bcfg2/Reporting/templates/clients/index.html b/src/lib/Bcfg2/Reporting/templates/clients/index.html new file mode 100644 index 000000000..45ba20b86 --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/clients/index.html @@ -0,0 +1,35 @@ +{% extends "base-timeview.html" %} +{% load bcfg2_tags %} + +{% block extra_header_info %} +{% endblock%} + +{% block title %}Bcfg2 - Client Grid View{% endblock %} + +{% block pagebanner %}Clients - Grid View{% endblock %} + +{% block content %} +{% filter_navigator %} +{% if inter_list %} + + {% for inter in inter_list %} + {% if forloop.first %}{% endif %} + + {% if forloop.last %} + + {% else %} + {% if forloop.counter|divisibleby:"4" %}{% endif %} + {% endif %} + {% endfor %} +
+ {{ inter.client.name }} +
+{% else %}

No client records are available.

+{% endif %} +{% endblock %} diff --git a/src/lib/Bcfg2/Reporting/templates/clients/manage.html b/src/lib/Bcfg2/Reporting/templates/clients/manage.html new file mode 100644 index 000000000..443ec8ccb --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/clients/manage.html @@ -0,0 +1,45 @@ +{% extends "base.html" %} + +{% block extra_header_info %} +{% endblock%} + +{% 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 %} diff --git a/src/lib/Bcfg2/Reporting/templates/config_items/common.html b/src/lib/Bcfg2/Reporting/templates/config_items/common.html new file mode 100644 index 000000000..b39957a2e --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/config_items/common.html @@ -0,0 +1,42 @@ +{% extends "base-timeview.html" %} +{% load bcfg2_tags %} + +{% block title %}Bcfg2 - Common Problems{% endblock %} + +{% block extra_header_info %} +{% endblock%} + +{% block pagebanner %}Common configuration problems{% endblock %} + +{% block content %} +
+
+ Showing items with more then {{ threshold }} entries + + +
+
+ {% for type_name, type_list in lists %} +
+
+

{{ type_name|capfirst }} entries

+
[–]
+
+ {% if type_list %} + + + {% for item in type_list %} + + + + + + + {% endfor %} +
TypeNameCountReason
{{ item.ENTRY_TYPE }}{{ item.name }}{{ item.num_entries }}{{ item.short_list|join:"," }}
+ {% else %} +

There are currently no inconsistent {{ type_name }} configuration entries.

+ {% endif %} +
+ {% endfor %} +{% endblock %} diff --git a/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html b/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html new file mode 100644 index 000000000..e940889ab --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html @@ -0,0 +1,32 @@ +{% extends "base-timeview.html" %} +{% load bcfg2_tags %} + +{% block title %}Bcfg2 - Entry Status{% endblock %} + +{% block extra_header_info %} +{% endblock%} + +{% block pagebanner %}{{ entry.entry_type }} entry {{ entry.name }} status{% endblock %} + +{% block content %} +{% filter_navigator %} +{% if items %} +
+ + + {% for item, inters in items %} + {% for inter in inters %} + + + + + + + {% endfor %} + {% endfor %} +
NameTimestampStateReason
{{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:","}}
+
+{% else %} +

There are currently no hosts with this configuration entry.

+{% endif %} +{% endblock %} diff --git a/src/lib/Bcfg2/Reporting/templates/config_items/item-failure.html b/src/lib/Bcfg2/Reporting/templates/config_items/item-failure.html new file mode 100644 index 000000000..0b87fbdbd --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/config_items/item-failure.html @@ -0,0 +1,13 @@ +{% extends "config_items/item.html" %} +{% load syntax_coloring %} + +{% block item_details %} +
+
+

This item failed to bind on the server

+
+
+ {{ item.message|syntaxhilight:"py" }} +
+
+{% endblock %} diff --git a/src/lib/Bcfg2/Reporting/templates/config_items/item.html b/src/lib/Bcfg2/Reporting/templates/config_items/item.html new file mode 100644 index 000000000..4c2e9c2ae --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/config_items/item.html @@ -0,0 +1,136 @@ +{% extends "base.html" %} +{% load split %} +{% load syntax_coloring %} + + +{% block title %}Bcfg2 - Element Details{% endblock %} + + +{% block extra_header_info %} + +{% endblock%} + +{% block pagebanner %}Element Details{% endblock %} + +{% block content %} +
+

{{item.get_state_display}} {{item.entry_type}}: {{item.name}}

+
+ +
+{% block item_details %} + {% if item.is_extra %} +

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

+ {% endif %} + + {% if not item.exists %} +
This item does not currently exist on the host but is specified to exist in the configuration.
+ {% endif %} + +{# Really need a better test here #} +{% if item.perms_problem or item.status_problem or item.linkentry.link_problem or item.version_problem %} + + + + {% if item.perms_problem %} + {% if item.current_perms.owner %} + + + {% endif %} + {% if item.current_perms.group %} + + + {% endif %} + {% if item.current_perms.perms %} + + + {% endif %} + {% endif %} + {% if item.status_problem %} + + + {% endif %} + {% if item.linkentry.link_problem %} + + + {% endif %} + {% if item.version_problem %} + + + {% endif %} +
Problem TypeExpectedFound
Owner{{item.target_perms.owner}}{{item.current_perms.owner}}
Group{{item.target_perms.group}}{{item.current_perms.group}}
Perms{{item.target_perms.perms}}{{item.current_perms.perms}}
Status{{item.target_status}}{{item.current_status}}
{{item.get_path_type_display}}{{item.linkentry.target_path}}{{item.linkentry.current_path}}
Package Version{{item.target_version|cut:"("|cut:")"}}{{item.current_version|cut:"("|cut:")"}}
+{% endif %} + + {% if item.has_detail %} +
+
+ {% if item.is_sensitive %} +

File contents unavailable, as they might contain sensitive data.

+ {% else %} +

Incorrect file contents ({{item.get_detail_type_display}})

+ {% endif %} +
+ {% if item.is_diff %} +
+ {{ item.details|syntaxhilight }} +
+ {% else %} + {{ item.details }} + {% endif %} +
+ {% endif %} + + + {% if item.reason.unpruned %} +
+
+

Extra entries found

+
+ + {% for unpruned_item in item.reason.unpruned|split %} + + {% endfor %} +
{{ unpruned_item }}
+
+ {% endif %} +{% endblock %} + + +
+
+

Occurences 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/Bcfg2/Reporting/templates/config_items/listing.html b/src/lib/Bcfg2/Reporting/templates/config_items/listing.html new file mode 100644 index 000000000..864392754 --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/config_items/listing.html @@ -0,0 +1,35 @@ +{% extends "base-timeview.html" %} +{% load bcfg2_tags %} + +{% block title %}Bcfg2 - Element Listing{% endblock %} + +{% block extra_header_info %} +{% endblock%} + +{% block pagebanner %}{{item_state|capfirst}} Element Listing{% endblock %} + +{% block content %} +{% filter_navigator %} +{% if item_list %} + {% for type_name, type_data in item_list %} +
+
+

{{ type_name }} — {{ type_data|length }}

+
[–]
+
+ + + {% for entry in type_data %} + + + + + + {% endfor %} +
NameCountReason
{{entry.name}}{{entry.num_entries}}{{entry.short_list|join:","}}
+
+ {% endfor %} +{% else %} +

There are currently no inconsistent configuration entries.

+{% endif %} +{% endblock %} diff --git a/src/lib/Bcfg2/Reporting/templates/displays/summary.html b/src/lib/Bcfg2/Reporting/templates/displays/summary.html new file mode 100644 index 000000000..b9847cf96 --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/displays/summary.html @@ -0,0 +1,42 @@ +{% 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 %} + +{% endblock%} + +{% block content %} +
+

{{ node_count }} nodes reporting in

+
+{% if summary_data %} + {% for summary in summary_data %} +
+
+

{{ summary.nodes|length }} {{ summary.label }}

+
[+]
+
+ + + {% for node in summary.nodes|sort_interactions_by_name %} + + + + {% endfor %} +
{{ node.client.name }}
+
+ {% endfor %} +{% else %} +

No data to report on

+{% endif %} +{% endblock %} diff --git a/src/lib/Bcfg2/Reporting/templates/displays/timing.html b/src/lib/Bcfg2/Reporting/templates/displays/timing.html new file mode 100644 index 000000000..ff775ded5 --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/displays/timing.html @@ -0,0 +1,38 @@ +{% extends "base-timeview.html" %} +{% load bcfg2_tags %} + +{% block title %}Bcfg2 - Performance Metrics{% endblock %} +{% block pagebanner %}Performance Metrics{% endblock %} + + +{% block extra_header_info %} +{% endblock%} + +{% block content %} +
+ {% if metrics %} + + + + + + + + + + + {% for metric in metrics|dictsort:"name" %} + + + {% for mitem in metric|build_metric_list %} + + {% endfor %} + + {% endfor %} +
NameParseProbeInventoryInstallConfigTotal
{{ metric.name }}{{ mitem }}
+ {% else %} +

No metric data available

+ {% endif %} +
+{% endblock %} diff --git a/src/lib/Bcfg2/Reporting/templates/widgets/filter_bar.html b/src/lib/Bcfg2/Reporting/templates/widgets/filter_bar.html new file mode 100644 index 000000000..759415507 --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/widgets/filter_bar.html @@ -0,0 +1,25 @@ +{% spaceless %} +
+
+{% if filters %} +{% for filter, filter_url in filters %} + {% if forloop.first %} + Active filters (click to remove): + {% endif %} + {{ filter|capfirst }}{% if not forloop.last %}, {% endif %} + {% if forloop.last %} + {% if groups %}|{% endif %} + {% endif %} +{% endfor %} +{% endif %} +{% if groups %} + + +{% endif %} +
+
+{% endspaceless %} diff --git a/src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc b/src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc new file mode 100644 index 000000000..30ed2fd3e --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc @@ -0,0 +1,38 @@ +{% load bcfg2_tags %} +
+ + + + {% if not client %} + + {% endif %} + + + + + + + + {% for entry in entry_list %} + + + {% if not client %} + + {% endif %} + + + + + + + + {% endfor %} +
TimestampClientStateGoodBadModifiedExtraServer
{{ entry.timestamp|date:"Y-m-d\&\n\b\s\p\;H:i"|safe }}{{ entry.client.name }}{{ entry.state }}{{ entry.good_count }}{{ entry.bad_count }}{{ entry.modified_count }}{{ entry.extra_count }} + {% if entry.server %} + {{ entry.server }} + {% else %} +   + {% endif %} +
+
diff --git a/src/lib/Bcfg2/Reporting/templates/widgets/page_bar.html b/src/lib/Bcfg2/Reporting/templates/widgets/page_bar.html new file mode 100644 index 000000000..aa0def83e --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/widgets/page_bar.html @@ -0,0 +1,23 @@ +{% spaceless %} +{% for page, page_url in pager %} + {% if forloop.first %} +
+ {% if prev_page %}< Prev {% endif %} + {% if first_page %}1 ... {% endif %} + {% endif %} + {% ifequal page current_page %} + {{ page }} + {% else %} + {{ page }} + {% endifequal %} + {% if forloop.last %} + {% if last_page %} ... {{ total_pages }} {% endif %} + {% if next_page %}Next > {% endif %} + |{% for limit, limit_url in page_limits %} {{ limit }}{% endfor %} +
+ {% else %} +   + {% endif %} +{% endfor %} +{% endspaceless %} + -- cgit v1.2.3-1-g7c22