mirror of
https://gitlab.com/JKANetwork/powerfulcomputermanager.git
synced 2026-03-03 09:06:46 +01:00
First version with web gui
This commit is contained in:
102
admin/templates/adminindex.tmpl
Normal file
102
admin/templates/adminindex.tmpl
Normal file
@@ -0,0 +1,102 @@
|
||||
{# -*- coding: utf-8 -*- #}
|
||||
{% extends 'baseadmin.tmpl' %}
|
||||
{% block content %}
|
||||
|
||||
<!-- Modal Add Computer To Database -->
|
||||
<div class="modal fade" id="modalAdd" tabindex="-1" role="dialog" aria-labelledby="modalAddLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form method="get" action="/admin/addcomputer">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalAddLabel">Add computer to Database</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<p>Add computer to database<br>
|
||||
<label for="computeradd" class="col-form-label">Computer:</label>
|
||||
<input name="computeradd" id="computeradd" type="text"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Delete Computer To 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>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<p>Delete computer from database. NOT REVERSIBLE<br>
|
||||
<label for="computerdel" class="col-form-label">Computer:</label>
|
||||
<select class="form-control" name="computerdel" id="computerdel">
|
||||
{% for item in tablecomputers %} {#['ID_C','Name',.....]#}
|
||||
<option value="{{item.0}}">{{item.1}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-danger">DELETE</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Computers</h2>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Computer</th>
|
||||
<th>Operating System</th>
|
||||
<th>Groups</th>
|
||||
<th>CPU</th>
|
||||
<th>RAM (RAMUsed/RAM) Mb</th>
|
||||
<th>HDD</th>
|
||||
<th>Last ping</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="8"><a class="btn btn-outline-success btn-sm" data-toggle="modal" data-target="#modalAdd">Add computer to database</a></td>
|
||||
</tr>
|
||||
{% 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>{{item.5}} {{item.4}}</td>
|
||||
<td width='200px'>
|
||||
{% for x in item.9 %}
|
||||
{{x.0}},
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>{{item.3}}</td>
|
||||
<td>{{item.2|int - item.8|int}}/{{item.2}}</td>
|
||||
<td>
|
||||
{% for x in item.6 %}
|
||||
{{x.Volume}}({{x.FreeSpace}}/{{x.Capacity}} GB)<br>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>{{item.7}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td colspan="8"><a class="btn btn-outline-danger btn-sm" data-toggle="modal" data-target="#modalDel">Delete computer to database</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user