aboutsummaryrefslogtreecommitdiff
path: root/pyenc/templates
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-08-17 02:19:27 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-08-17 02:19:27 +0200
commit5ae80ca783823bcd25f216be922dce16a13ad5e2 (patch)
tree9b49cffabab8b795c6986a02b72780c2bceb50d7 /pyenc/templates
parentAdd sample icon. (diff)
downloadpuppet-classifier-master.tar.gz
puppet-classifier-master.tar.xz
Diffstat (limited to '')
-rw-r--r--pyenc/templates/base.html1
-rw-r--r--pyenc/templates/class.html9
-rw-r--r--pyenc/templates/file.html2
-rw-r--r--pyenc/templates/host.html18
-rw-r--r--pyenc/templates/list.html2
5 files changed, 23 insertions, 9 deletions
diff --git a/pyenc/templates/base.html b/pyenc/templates/base.html
index b927b3d..a1c8874 100644
--- a/pyenc/templates/base.html
+++ b/pyenc/templates/base.html
@@ -7,6 +7,7 @@
<link rel="icon" href="{{ url_for('static', filename='icon.svg') }}"/>
<link href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet"/>
<!-- <script type="module" src="{{ url_for('static', filename='js/script.js') }}"></script> -->
+ <script src="{{ url_for('static', filename='js/script2.js') }}"></script>
<title>Puppet Classifier</title>
</head>
<body>
diff --git a/pyenc/templates/class.html b/pyenc/templates/class.html
index bfae1b2..3c8b809 100644
--- a/pyenc/templates/class.html
+++ b/pyenc/templates/class.html
@@ -29,7 +29,7 @@
{% endfor %}
</tbody>
</table>
- <dt>Hosts</dt>
+ <dt>Direct Hosts</dt>
<dd>
<ul>
{% for host in cls.hosts %}
@@ -37,6 +37,13 @@
{% endfor %}
</ul>
</dd>
+ <dt>All Hosts</dt>
+ <dd id="class-hosts">
+ </dd>
</dl>
+<script>
+ let node = document.getElementById('class-hosts')
+ populate_class_hosts(node, "{{ title }}")
+</script>
{% endblock %}
{# ft:jinja #}
diff --git a/pyenc/templates/file.html b/pyenc/templates/file.html
index 19bc811..84b9e86 100644
--- a/pyenc/templates/file.html
+++ b/pyenc/templates/file.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
{% block content %}
<h1>File ‘{{ title }}’</h1>
-<pre>{{ content }}</pre>
+<pre class="highlight">{{ content|safe }}</pre>
{% endblock %}
{# ft:jinja #}
diff --git a/pyenc/templates/host.html b/pyenc/templates/host.html
index 84e76e3..917d535 100644
--- a/pyenc/templates/host.html
+++ b/pyenc/templates/host.html
@@ -1,24 +1,30 @@
{% extends "base.html" %}
{% block content %}
-<h1>Host ‘{{ title }}’</h1>
+<h1>Host ‘{{ host.fqdn }}’</h1>
+<p class="summary">{{ host.summary }}</p>
<dl>
<dt>Environment</dt>
- <dd><a href="/environment/{{ env }}">{{ env }}</a></dd>
+ <dd><a href="/environment/{{ host.environment.name }}"
+ >{{ host.environment.name }}</a></dd>
<dt>Direct Classes</dt>
<dd>
<ul>
- {% for cls in classes %}
- <li>{{ cls|safe }}</li>
+ {% for cls in host.classes %}
+ <li><a href="/class/{{ cls.name }}">{{ cls.name }}</a></li>
{% endfor %}
</ul>
</dd>
+ <dt>All Classes</dt>
+ <dd id="all-classes"></dd>
<!--
- - indirect classes
- - basic description
- basic system info
- link to further documentation
- notes
-->
</dl>
+<script>
+ let node = document.getElementById('all-classes')
+ populate_host_classes(node, "{{ host.fqdn }}")
+</script>
{% endblock %}
{# ft:jinja #}
diff --git a/pyenc/templates/list.html b/pyenc/templates/list.html
index dd267c5..e7e1f4c 100644
--- a/pyenc/templates/list.html
+++ b/pyenc/templates/list.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block content %}
<h1>{{ title }}</h1>
-<ul>
+<ul class='generic-list'>
{% for item in items %}
<li>{{ item|safe }}</li>
{% endfor %}