Changes to web gui and fixes

This commit is contained in:
2020-07-03 18:37:34 +02:00
parent 609d821501
commit 3deb367e89
9 changed files with 94 additions and 25 deletions

View File

@@ -15,8 +15,9 @@
</tr>
</thead>
<tbody>
{% for item in tablegroups %} {#['ID_G','Name','Cooks[CookName]']#}
{% for item in groups %} {#['ID_G','Name','Cooks[CookName]']#}
<tr>
<td><a href="/admin/group?ID_G={{item.0}}">{{item.0}}</a></td>
<td><a href="/admin/group?ID_G={{item.0}}">{{item.1}}</a></td>
<td style='width:50%;'>
{% for x in item.2 %}

View File

@@ -130,7 +130,7 @@
<td>{{item.1}}</td>
<td>
{% for subitem in item.2|sort(attribute='Revision')|sort(attribute='Name') %} {# item.2 = AppliedTo #}
{{subitem.Name}}{% if subitem.Revision|int < item.1|int %}<span style="color:red">({{subitem.Revision}})</span>{% elif subitem.Error != 0 %}<span style="color:orange;font-weigth:bold;font-style:italic" title="{{subitem.ErrorDesc}}">(Error r.{{subitem.Revision}})</span>{% endif %},
{{subitem.Name}}{% if subitem.Revision|int < item.1|int %}<span style="color:red">({{subitem.Revision}})</span>{% elif subitem.Error > 0 %}<span style="color:orange;font-weigth:bold;font-style:italic" title="{{subitem.ErrorDesc}}">(Error r.{{subitem.Revision}})</span>{% endif %},
{% endfor %}
</tr>
{% endfor %}

View File

@@ -26,13 +26,13 @@
</div>
</div>
<!-- Modal Delete Computer To Database -->
<!-- Modal Delete Computer From Database -->
<div class="modal fade" id="modalDel" tabindex="-1" role="dialog" aria-labelledby="modalDelLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<form method="get" action="/admin/delcomputer">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modalDelLabel">Delete computer to Database. NOT REVERSIBLE</h5>
<h5 class="modal-title" id="modalDelLabel">Delete computer from Database. NOT REVERSIBLE</h5>
</div>
<div class="modal-body">
<div class="form-group">
@@ -76,11 +76,11 @@
{% for item in tablecomputers %} {#['ID_C','Name','RAM','CPUName','SOVersion','SOCaption','HDD','LastConnection','RamFree','GroupsNames']#}
<tr>
<td>{{item.0}}</td>
<td>{{item.1}}</td>
<td><a href="/admin/computer?ID_C={{item.0}}">{{item.1}}</a></td>
<td>{{item.5}} {{item.4}}</td>
<td width='200px'>
{% for x in item.9 %}
{{x.0}},
<a href="/admin/group?ID_G={{x.0}}">{{x.1}}</a>,
{% endfor %}
</td>
<td>{{item.3}}</td>

View File

@@ -0,0 +1,17 @@
{# -*- coding: utf-8 -*- #}
{% extends 'baseadmin.tmpl' %}
{% block content %}
<h2>Login</h2>
<form action="/firsttime" method="POST">
<div class="table-responsive">
<table class="table table-striped table-sm">
<tr>
<td>Please put password for program. Do not forget it!<input type="password" name="password" id="password" /></td>
</tr>
<tr>
<td><button type="submit">Set password</button></td>
</tr>
</table>
</div>
</form>
{% endblock %}