mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
add ability to set and reset user usage limits
This commit is contained in:
parent
79fff2e762
commit
05e08fb92d
7 changed files with 248 additions and 13 deletions
|
|
@ -38,6 +38,12 @@
|
|||
Create VM
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/proxstar/limits">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
Usage Limits
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown navbar-user">
|
||||
|
|
|
|||
43
templates/limits.html
Normal file
43
templates/limits.html
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{% extends "base.html" %}
|
||||
{% block body %}
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Usage Limits</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th>Username</th>
|
||||
<th>CPU</th>
|
||||
<th>Memory</th>
|
||||
<th>Disk</th>
|
||||
<th>Edit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user_limit in user_limits %}
|
||||
<tr role="row">
|
||||
<td>{{ user_limit[0] }}</td>
|
||||
<td>{{ user_limit[1] }}</td>
|
||||
<td>{{ user_limit[2] }}</td>
|
||||
<td>{{ user_limit[3] }}</td>
|
||||
<td>
|
||||
<button class="btn btn-info edit-limit" data-user="{{ user_limit[0] }}" data-cpu="{{ user_limit[1] }}" data-mem="{{ user_limit[2] }}" data-disk="{{ user_limit[3] }}">EDIT</button>
|
||||
<button class="btn btn-danger reset-limit" data-user="{{ user_limit[0] }}">RESET</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue