mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
moved limits to main page, remove restriction for rtp creation, allow rtp to create vm for another user
This commit is contained in:
parent
2b69443930
commit
125fd58b27
8 changed files with 51 additions and 113 deletions
|
|
@ -1,3 +1,7 @@
|
|||
$(document).ready(function(){
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
|
||||
$("#delete-vm").click(function(){
|
||||
const vmname = $(this).data('vmname')
|
||||
swal({
|
||||
|
|
@ -388,6 +392,10 @@ $("#create-vm").click(function(){
|
|||
const mem = document.getElementById('mem').value
|
||||
const disk = document.getElementById('disk').value
|
||||
const iso = document.getElementById('iso').value
|
||||
const user = document.getElementById('user')
|
||||
if (user) {
|
||||
const user_value = user.value
|
||||
}
|
||||
const max_disk = $(this).data('max_disk')
|
||||
if (name && disk) {
|
||||
if (disk > max_disk) {
|
||||
|
|
@ -424,6 +432,9 @@ $("#create-vm").click(function(){
|
|||
data.append('mem', mem);
|
||||
data.append('disk', disk);
|
||||
data.append('iso', iso);
|
||||
if (user) {
|
||||
data.append('user', user_value);
|
||||
}
|
||||
fetch('/vm/create', {
|
||||
credentials: 'same-origin',
|
||||
method: 'post',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue