mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
make usage limit table nicer, change some disk-related text
This commit is contained in:
parent
2b155903fd
commit
e6fd8b1c0c
4 changed files with 21 additions and 7 deletions
|
@ -90,7 +90,21 @@ table, th, td {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.proxstar-limitbtn {
|
||||||
|
padding-top: 0px;
|
||||||
|
padding-bottom: 0px;
|
||||||
|
width: 70px;
|
||||||
|
height: 25px;
|
||||||
|
margin-top: 3px;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
.resource-usage {
|
.resource-usage {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
margin: 0 auto;
|
margin: 0px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.usage-limit {
|
||||||
|
width: 80%;
|
||||||
|
margin: 0px auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -391,7 +391,7 @@ $("#create-vm").click(function(){
|
||||||
const max_disk = $(this).data('max_disk')
|
const max_disk = $(this).data('max_disk')
|
||||||
if (name && disk) {
|
if (name && disk) {
|
||||||
if (disk > max_disk) {
|
if (disk > max_disk) {
|
||||||
swal("Uh oh...", `You do not have enough disk resources available! Please lower the VM disk size to ${max_disk} GB or lower.`, "error");
|
swal("Uh oh...", `You do not have enough disk resources available! Please lower the VM disk size to ${max_disk}GB or lower.`, "error");
|
||||||
} else {
|
} else {
|
||||||
fetch(`/proxstar/hostname/${name}`, {
|
fetch(`/proxstar/hostname/${name}`, {
|
||||||
credentials: 'same-origin',
|
credentials: 'same-origin',
|
||||||
|
@ -599,7 +599,7 @@ $(".edit-limit").click(function(){
|
||||||
disk.defaultValue = cur_disk;
|
disk.defaultValue = cur_disk;
|
||||||
options.append(disk)
|
options.append(disk)
|
||||||
swal({
|
swal({
|
||||||
title: `Enter the new limits for ${user}:`,
|
title: `Enter the new usage limits for ${user}:`,
|
||||||
content: options,
|
content: options,
|
||||||
buttons: {
|
buttons: {
|
||||||
cancel: {
|
cancel: {
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<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'] }}">
|
<input type="number" name="disk" id="disk" class="form-control" min="1" max="{{ limits['disk'] - usage['disk'] }}">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<h3 class="panel-title">Usage Limits</h3>
|
<h3 class="panel-title">Usage Limits</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped usage-limit">
|
||||||
<thead>
|
<thead>
|
||||||
<tr role="row">
|
<tr role="row">
|
||||||
<th>Username</th>
|
<th>Username</th>
|
||||||
|
@ -27,8 +27,8 @@
|
||||||
<td>{{ user_limit[2] }}</td>
|
<td>{{ user_limit[2] }}</td>
|
||||||
<td>{{ user_limit[3] }}</td>
|
<td>{{ user_limit[3] }}</td>
|
||||||
<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-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 reset-limit" data-user="{{ user_limit[0] }}">RESET</button>
|
<button class="btn btn-danger proxstar-limitbtn reset-limit" data-user="{{ user_limit[0] }}">RESET</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue