aboutsummaryrefslogtreecommitdiff
path: root/pyenc/templates
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-02-27 17:31:50 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-02-27 17:31:50 +0100
commitbbd692427632bf525f0fa46eeab0de0f8a563661 (patch)
tree6c13fdc978e3b5e97498bc16322d5ee56c8c1617 /pyenc/templates
parentInitial commit. (diff)
downloadpuppet-classifier-bbd692427632bf525f0fa46eeab0de0f8a563661.tar.gz
puppet-classifier-bbd692427632bf525f0fa46eeab0de0f8a563661.tar.xz
Initial code add.
Diffstat (limited to 'pyenc/templates')
-rw-r--r--pyenc/templates/base.html28
-rw-r--r--pyenc/templates/start_page.html33
2 files changed, 61 insertions, 0 deletions
diff --git a/pyenc/templates/base.html b/pyenc/templates/base.html
new file mode 100644
index 0000000..9256734
--- /dev/null
+++ b/pyenc/templates/base.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8"/>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+ <meta name="viewport" content="width=device-width, intial-scale=1"/>
+ <link href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet"/>
+ <script type="module" src="{{ url_for('static', filename='js/script.js') }}"></script>
+ <title>Puppet Node Classifier</title>
+ </head>
+ <body>
+ <div id="flash">
+ {% with messages = get_flashed_messages() %}
+ {% if messages %}
+ <ul class="flashes">
+ {% for message in messages %}
+ <li>{{ message }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ {% endwith %}
+ </div>
+ <main>
+ {% block content %}
+ {% endblock %}
+ </main>
+ </body>
+</html>
diff --git a/pyenc/templates/start_page.html b/pyenc/templates/start_page.html
new file mode 100644
index 0000000..dccb1c6
--- /dev/null
+++ b/pyenc/templates/start_page.html
@@ -0,0 +1,33 @@
+{% extends "base.html" %}
+{% block content %}
+ <h1>This certainly is a page</h1>
+ <div class="hosts">
+ {% for host in hosts %}
+ <div class="host">
+ <h2>{{ host.fqdn }}</h2>
+ <form method="POST" action="/remove">
+ <input type="hidden" name="fqdn" value="{{ host.fqdn }}"/>
+ <dl>
+ <dt>Environment</dt>
+ <dd>{{ host.environment }}</dd>
+ <dt>Classes</dt>
+ <dd>
+ <ul>
+ {% for cls in host.classes %}
+ {% with id = 'r' + str(random.getrandbits(64)) %}
+ <li>
+ <input id="{{ id }}" type="checkbox" name="cls" value="{{ cls.class_name }}"/>
+ <label for="{{ id }}">{{ cls.class_name }}</label>
+ </li>
+ {% endwith %}
+ {% endfor %}
+ </ul>
+ </dd>
+ </dl>
+ <input type="submit" value="Remove Selected"/>
+ </form>
+ <div class="class-search"></div>
+ </div>
+ {% endfor %}
+ </div>
+{% endblock %}