make usage limit table nicer, change some disk-related text

This commit is contained in:
Jordan Rodgers 2017-12-11 19:23:58 -05:00
parent 2b155903fd
commit e6fd8b1c0c
4 changed files with 21 additions and 7 deletions

View file

@ -90,7 +90,21 @@ table, th, td {
line-height: 1;
}
.proxstar-limitbtn {
padding-top: 0px;
padding-bottom: 0px;
width: 70px;
height: 25px;
margin-top: 3px;
margin-bottom: 3px;
}
.resource-usage {
width: 50%;
margin: 0 auto;
margin: 0px auto;
}
.usage-limit {
width: 80%;
margin: 0px auto;
}

View file

@ -599,7 +599,7 @@ $(".edit-limit").click(function(){
disk.defaultValue = cur_disk;
options.append(disk)
swal({
title: `Enter the new limits for ${user}:`,
title: `Enter the new usage limits for ${user}:`,
content: options,
buttons: {
cancel: {

View file

@ -33,7 +33,7 @@
</select>
</div>
<div class="form-group">
<label for="disk">Disk</label>
<label for="disk">Disk (GB)</label>
<input type="number" name="disk" id="disk" class="form-control" min="1" max="{{ limits['disk'] - usage['disk'] }}">
</div>
<div class="form-group">

View file

@ -9,7 +9,7 @@
<h3 class="panel-title">Usage Limits</h3>
</div>
<div class="panel-body">
<table class="table table-bordered table-striped">
<table class="table table-bordered table-striped usage-limit">
<thead>
<tr role="row">
<th>Username</th>
@ -27,8 +27,8 @@
<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>
<button class="btn btn-info proxstar-limitbtn 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 proxstar-limitbtn reset-limit" data-user="{{ user_limit[0] }}">RESET</button>
</td>
</tr>
{% endfor %}