diff options
author | Tim Laszlo <tim.laszlo@gmail.com> | 2012-10-08 10:38:02 -0500 |
---|---|---|
committer | Tim Laszlo <tim.laszlo@gmail.com> | 2012-10-08 10:38:02 -0500 |
commit | 44638176067df5231bf0be30801e36863391cd1f (patch) | |
tree | 6aaba73d03f9a5532047518b9a3e8ef3e63d3f9f /src/lib/Bcfg2/Reporting/templates/config_items | |
parent | 1a3ced3f45423d79e08ca7d861e8118e8618d3b2 (diff) | |
download | bcfg2-44638176067df5231bf0be30801e36863391cd1f.tar.gz bcfg2-44638176067df5231bf0be30801e36863391cd1f.tar.bz2 bcfg2-44638176067df5231bf0be30801e36863391cd1f.zip |
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
Diffstat (limited to 'src/lib/Bcfg2/Reporting/templates/config_items')
5 files changed, 258 insertions, 0 deletions
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 %} + <div id='threshold_box'> + <form method='post' action='{{ request.path }}'> + <span>Showing items with more then {{ threshold }} entries</span> + <input type='text' name='threshold' value='{{ threshold }}' maxlength='5' size='5' /> + <input type='submit' value='Change' /> + </form> + </div> + {% for type_name, type_list in lists %} + <div class='entry_list'> + <div class='entry_list_head element_list_head' onclick='javascript:toggleMe("table_{{ type_name }}");'> + <h3>{{ type_name|capfirst }} entries</h3> + <div class='entry_expand_tab' id='plusminus_table_{{ type_name }}'>[–]</div> + </div> + {% if type_list %} + <table id='table_{{ type_name }}' class='entry_list'> + <tr style='text-align: left'><th>Type</th><th>Name</th><th>Count</th><th>Reason</th></tr> + {% for item in type_list %} + <tr class='{% cycle listview,listview_alt %}'> + <td>{{ item.ENTRY_TYPE }}</td> + <td><a href="{% url reports_entry item.class_name, item.pk %}">{{ item.name }}</a></td> + <td>{{ item.num_entries }}</td> + <td><a href="{% url reports_item item.ENTRY_TYPE, item.pk %}">{{ item.short_list|join:"," }}</a></td> + </tr> + {% endfor %} + </table> + {% else %} + <p>There are currently no inconsistent {{ type_name }} configuration entries.</p> + {% endif %} + </div> + {% 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 %} + <div class='entry_list'> + <table class='entry_list'> + <tr style='text-align: left' ><th>Name</th><th>Timestamp</th><th>State</th><th>Reason</th></tr> + {% for item, inters in items %} + {% for inter in inters %} + <tr class='{% cycle listview,listview_alt %}'> + <td><a href='{% url reports_client_detail hostname=inter.client.name %}'>{{inter.client.name}}</a></td> + <td><a href='{% url reports_client_detail_pk hostname=inter.client.name, pk=inter.pk %}'>{{inter.timestamp|date:"Y-m-d\&\n\b\s\p\;H:i"|safe}}</a></td> + <td>{{ item.get_state_display }}</td> + <td style='white-space: nowrap'><a href="{% url reports_item entry_type=item.class_name pk=item.pk %}">({{item.pk}}) {{item.short_list|join:","}}</a></td> + </tr> + {% endfor %} + {% endfor %} + </table> + </div> +{% else %} + <p>There are currently no hosts with this configuration entry.</p> +{% 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 %} +<div class='entry_list'> + <div class='entry_list_head'> + <h3>This item failed to bind on the server</h3> + </div> + <div class='diff_wrapper'> + {{ item.message|syntaxhilight:"py" }} + </div> +</div> +{% 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 %} +<style type="text/css"> +#table_list_header { + font-size: 100%; +} +table.entry_list { + width: auto; +} +div.information_wrapper { + margin: 15px; +} +div.diff_wrapper { + overflow: auto; +} +div.entry_list h3 { + font-size: 90%; + padding: 5px; +} +</style> +{% endblock%} + +{% block pagebanner %}Element Details{% endblock %} + +{% block content %} + <div class='detail_header'> + <h3>{{item.get_state_display}} {{item.entry_type}}: {{item.name}}</h3> + </div> + + <div class="information_wrapper"> +{% block item_details %} + {% if item.is_extra %} + <p>This item exists on the host but is not defined in the configuration.</p> + {% endif %} + + {% if not item.exists %} + <div class="warning">This item does not currently exist on the host but is specified to exist in the configuration.</div> + {% endif %} + +{# Really need a better test here #} +{% if item.perms_problem or item.status_problem or item.linkentry.link_problem or item.version_problem %} + <table class='entry_list'> + <tr id='table_list_header'> + <td style='text-align: right;'>Problem Type</td><td>Expected</td><td style='border-bottom: 1px solid #98DBCC;'>Found</td></tr> + {% if item.perms_problem %} + {% if item.current_perms.owner %} + <tr><td style='text-align: right'><b>Owner</b></td><td>{{item.target_perms.owner}}</td> + <td>{{item.current_perms.owner}}</td></tr> + {% endif %} + {% if item.current_perms.group %} + <tr><td style='text-align: right'><b>Group</b></td><td>{{item.target_perms.group}}</td> + <td>{{item.current_perms.group}}</td></tr> + {% endif %} + {% if item.current_perms.perms %} + <tr><td style='text-align: right'><b>Perms</b></td><td>{{item.target_perms.perms}}</td> + <td>{{item.current_perms.perms}}</td></tr> + {% endif %} + {% endif %} + {% if item.status_problem %} + <tr><td style='text-align: right'><b>Status</b></td><td>{{item.target_status}}</td> + <td>{{item.current_status}}</td></tr> + {% endif %} + {% if item.linkentry.link_problem %} + <tr><td style='text-align: right'><b>{{item.get_path_type_display}}</b></td><td>{{item.linkentry.target_path}}</td> + <td>{{item.linkentry.current_path}}</td></tr> + {% endif %} + {% if item.version_problem %} + <tr><td style='text-align: right'><b>Package Version</b></td><td>{{item.target_version|cut:"("|cut:")"}}</td> + <td>{{item.current_version|cut:"("|cut:")"}}</td></tr> + {% endif %} + </table> +{% endif %} + + {% if item.has_detail %} + <div class='entry_list'> + <div class='entry_list_head'> + {% if item.is_sensitive %} + <h3>File contents unavailable, as they might contain sensitive data.</h3> + {% else %} + <h3>Incorrect file contents ({{item.get_detail_type_display}})</h3> + {% endif %} + </div> + {% if item.is_diff %} + <div class='diff_wrapper'> + {{ item.details|syntaxhilight }} + </div> + {% else %} + {{ item.details }} + {% endif %} + </div> + {% endif %} + + <!-- display extra directory entries --> + {% if item.reason.unpruned %} + <div class='entry_list'> + <div class='entry_list_head'> + <h3>Extra entries found</h3> + </div> + <table class='entry_list' cellpadding='3'> + {% for unpruned_item in item.reason.unpruned|split %} + <tr><td>{{ unpruned_item }}</td></tr> + {% endfor %} + </table> + </div> + {% endif %} +{% endblock %} + + + <div class='entry_list'> + <div class='entry_list_head'> + <h3>Occurences on {{ timestamp|date:"Y-m-d" }}</h3> + </div> + {% if associated_list %} + <table class="entry_list" cellpadding="3"> + {% for inter in associated_list %} + <tr><td><a href="{% url reports_client_detail inter.client.name %}" + >{{inter.client.name}}</a></td> + <td><a href="{% url reports_client_detail_pk hostname=inter.client.name,pk=inter.id %}" + >{{inter.timestamp}}</a></td> + </tr> + {% endfor %} + </table> + {% else %} + <p>Missing client list</p> + {% endif %} + </div> + + </div><!-- information_wrapper --> +{% 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 %} + <div class='entry_list'> + <div class='entry_list_head element_list_head' onclick='javascript:toggleMe("table_{{ type_name }}");'> + <h3>{{ type_name }} — {{ type_data|length }}</h3> + <div class='entry_expand_tab' id='plusminus_table_{{ type_name }}'>[–]</div> + </div> + <table id='table_{{ type_name }}' class='entry_list'> + <tr style='text-align: left' ><th>Name</th><th>Count</th><th>Reason</th></tr> + {% for entry in type_data %} + <tr class='{% cycle listview,listview_alt %}'> + <td><a href="{% url reports_entry entry.class_name entry.pk %}">{{entry.name}}</a></td> + <td>{{entry.num_entries}}</td> + <td><a href="{% url reports_item entry.class_name entry.pk %}">{{entry.short_list|join:","}}</a></td> + </tr> + {% endfor %} + </table> + </div> + {% endfor %} +{% else %} + <p>There are currently no inconsistent configuration entries.</p> +{% endif %} +{% endblock %} |