mirror of
https://gitlab.com/JKANetwork/powerfulcomputermanager.git
synced 2026-02-17 18:51:31 +01:00
New changes
This commit is contained in:
@@ -1,7 +1,64 @@
|
||||
{# -*- coding: utf-8 -*- #} {# NOT DID ALREADY!!! #}
|
||||
{% extends 'baseadmin.tmpl' %}
|
||||
{% block content %}
|
||||
<h2>Computer {{computername}}</h2>
|
||||
|
||||
|
||||
<!-- Modal Delete Group of Computer -->
|
||||
<div class="modal fade" id="delGroup" tabindex="-1" role="dialog" aria-labelledby="delGroupLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form method="get" action="/admin/computer/delgroup">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="delGroupLabel">Delete group from computer {{computername}}</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<input type="text" readonly="readonly" class="form-control" hidden="hidden" name="computeriddel" id="computeriddel" value="{{computerid}}"/>
|
||||
<p>Are you sure?<br>
|
||||
<label for="computername" class="col-form-label">Group:</label>
|
||||
</div>
|
||||
<input type="text" readonly="readonly" class="form-control" name="groupnamedel" id="groupnamedel">
|
||||
</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>
|
||||
|
||||
<!-- Modal Add Group to Computer To Group -->
|
||||
<div class="modal fade" id="addGroup" tabindex="-1" role="dialog" aria-labelledby="addGroupLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form method="get" action="/admin/computer/addgroup">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="addGroupLabel">Add group to computer {{computername}}</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<p>Add group to computer {{computername}}<br>
|
||||
<input type="text" readonly="readonly" class="form-control" hidden="hidden" name="computeridadd" value="{{computerid}}"/>
|
||||
<label for="computername2" class="col-form-label">Group:</label>
|
||||
<select class="form-control" name="groupidadd" id="groupidadd">
|
||||
{% for item in allgroups %}
|
||||
<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-primary">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Computer {{computername}}</h2>
|
||||
<br>
|
||||
<h2>Groups of {{computername}}</h2>
|
||||
<div class="table-responsive">
|
||||
@@ -24,10 +81,24 @@
|
||||
{{x.0}},
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td><a class="btn btn-outline-danger btn-sm" data-wgroup="{{item.1}}" data-toggle="modal" data-target="#delGroup">Delete {{computername}} from group {{item.1}}</a></td>
|
||||
<td><a class="btn btn-outline-danger btn-sm" data-wgroup="{{item.1}}" data-toggle="modal" data-target="#delGroup">Delete group {{item.1}} from {{computername}}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td>#</td>
|
||||
<td colspan="3"> <a class="btn btn-outline-success btn-sm" data-wcomp="{{computername}}" data-toggle="modal" data-target="#addGroup">Add Group to {{computername}}</a></td>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
|
||||
<script>
|
||||
$('#delGroup').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget) // Button that triggered the modal
|
||||
var recipient = button.data('wgroup') // Extract info from data-* attributes
|
||||
var modal = $(this)
|
||||
//modal.find('.modal-title').text('New message to ' + recipient)
|
||||
modal.find('#groupnamedel').val(recipient)
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -87,7 +87,7 @@
|
||||
<td>{{item.2|int - item.8|int}}/{{item.2}}</td>
|
||||
<td>
|
||||
{% for x in item.6 %}
|
||||
{{x.Volume}}({{x.FreeSpace}}/{{x.Capacity}} GB)<br>
|
||||
{{x.Volume}}({{x.UsedSpace}}/{{x.Capacity}} GB)<br>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>{{item.7}}</td>
|
||||
|
||||
Reference in New Issue
Block a user