Added products sub-page

This commit is contained in:
simonmicro 2022-12-11 20:22:16 +01:00
parent 28e07ac7e1
commit 0cb3ee538f
No known key found for this signature in database
GPG key ID: 033A4D4CE4E063D6
5 changed files with 143 additions and 19 deletions

View file

@ -3,18 +3,36 @@
<head>
<meta charset="UTF-8">
<title>py-kms {% block title %}{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename= 'css/bulma.min.css') }}">
<style>
#content {
margin: 1em;
overflow-x: auto;
}
pre {
overflow-x: auto;
padding: 0.5em;
}
{% if path != '/' %}
div.backtohome {
display: flex;
justify-content: center;
}
{% endif %}
{% block style %}{% endblock %}
</style>
<link rel="stylesheet" href="{{ url_for('static', filename= 'css/bulma.min.css') }}">
</head>
<body>
<div id="content">
{% block content %}{% endblock %}
{% if path != '/' %}
<div class="block backtohome">
<a class="button is-normal is-responsive" href="/">
Back to home
</a>
</div>
{% endif %}
</div>
<footer class="footer">

View file

@ -3,13 +3,9 @@
{% block title %}clients{% endblock %}
{% block style %}
pre.clientMachineId {
overflow-x: auto;
padding: 0.5em;
}
th {
white-space: nowrap;
}
th {
white-space: nowrap;
}
{% endblock %}
{% block content %}
@ -43,6 +39,12 @@
<p class="title">{{ count_clients_office }}</p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Products</p>
<p class="title"><a href="/products">{{ count_projects }}</a></p>
</div>
</div>
</nav>
<hr>

View file

@ -2,10 +2,8 @@
{% block title %}license{% endblock %}
{% block style %}
{% endblock %}
{% block content %}
<pre>{{ license }}</pre>
<div class="block">
<pre>{{ license }}</pre>
</div>
{% endblock %}

View file

@ -0,0 +1,53 @@
{% extends 'base.html' %}
{% block title %}clients{% endblock %}
{% block content %}
<nav class="level">
<div class="level-item has-text-centered">
<div>
<p class="heading">Products</p>
<p class="title">{{ count_products + filtered }}</p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Windows</p>
<p class="title">{{ count_products_windows }}</p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Office</p>
<p class="title">{{ count_products_office }}</p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading"><abbr title="Empty GLVK or not recognized">Other</abbr></p>
<p class="title">{{ filtered }}</p>
</div>
</div>
</nav>
<hr>
<table class="table is-bordered is-striped is-hoverable is-fullwidth">
<thead>
<tr>
<th>Name</th>
<th><abbr title="Group Volume License Key">GVLK</abbr></th>
</tr>
</thead>
<tbody>
{% for name, gvlk in products | dictsort %}
{% if gvlk %}
<tr>
<td>{{ name }}</td>
<td><pre>{{ gvlk }}</pre></td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% endblock %}