From ee2e7a86dda2b93223716d81f78f0885f9cfe032 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Wed, 23 Feb 2022 11:10:02 +0100 Subject: Improve software inventory command Extend commands.html template to keep scope tree, and action buttons state. When in the software inventory view, there exists two options: 'update' or 'view'. Do not print raw json response from ogserver about the software inventory/profile. When vieweing the software list, print a html table using the new template: software_list.html. Do not print blank pages with plain text html error codes when something goes wrong. Instead, print an error message after redirecting to the commands view. --- ogcp/templates/actions/software.html | 4 +++- ogcp/templates/actions/software_list.html | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 ogcp/templates/actions/software_list.html (limited to 'ogcp/templates/actions') diff --git a/ogcp/templates/actions/software.html b/ogcp/templates/actions/software.html index 71dc0ae..9393537 100644 --- a/ogcp/templates/actions/software.html +++ b/ogcp/templates/actions/software.html @@ -1,6 +1,8 @@ -{% extends 'base.html' %} +{% extends 'commands.html' %} {% import "bootstrap/wtf.html" as wtf %} +{% block nav_inventory %} active{% endblock %} +{% block nav_inventory_software %} active{% endblock %} {% block content %}

{{_('Software Inventory')}}

diff --git a/ogcp/templates/actions/software_list.html b/ogcp/templates/actions/software_list.html new file mode 100644 index 0000000..8c50edb --- /dev/null +++ b/ogcp/templates/actions/software_list.html @@ -0,0 +1,29 @@ +{% extends 'commands.html' %} +{% import "bootstrap/wtf.html" as wtf %} + +{% block nav_inventory %} active{% endblock %} +{% block nav_inventory_software %} active{% endblock %} +{% block content %} + +

{{_('Software inventory')}}

+ +

{{ _('Selected client:') }} {{ form.ips.data }}

+ + + + + + + + + {% for item in software %} + + + + {% endfor %} + +
{{ _('Item') }}
{{ item }}
+ + +{% endblock %} + -- cgit v1.2.3-18-g5258