mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
somewhat fix button colors and remove unused reset limits function
This commit is contained in:
parent
df8e1cf62c
commit
bea806e964
2 changed files with 14 additions and 51 deletions
|
@ -137,3 +137,11 @@ table, th, td {
|
|||
border-radius: 3px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.swal-button--confirm {
|
||||
background-color: #4caf50;
|
||||
}
|
||||
|
||||
.swal-button--ok {
|
||||
background-color: #4caf50;
|
||||
}
|
||||
|
|
|
@ -316,13 +316,12 @@ $("#change-iso").click(function(){
|
|||
closeModal: true,
|
||||
className: "",
|
||||
},
|
||||
select: {
|
||||
confirm: {
|
||||
text: "Select",
|
||||
closeModal: false,
|
||||
className: "",
|
||||
}
|
||||
},
|
||||
dangerMode: true,
|
||||
})
|
||||
.then((willChange) => {
|
||||
if (willChange) {
|
||||
|
@ -431,10 +430,9 @@ $("#create-vm").click(function(){
|
|||
icon: "info",
|
||||
buttons: {
|
||||
cancel: true,
|
||||
create: {
|
||||
confirm: {
|
||||
text: "Create",
|
||||
closeModal: false,
|
||||
className: "swal-button",
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -520,10 +518,9 @@ $("#change-cores").click(function(){
|
|||
closeModal: true,
|
||||
className: "",
|
||||
},
|
||||
select: {
|
||||
confirm: {
|
||||
text: "Select",
|
||||
closeModal: false,
|
||||
className: "swal-button",
|
||||
}
|
||||
},
|
||||
})
|
||||
|
@ -577,10 +574,9 @@ $("#change-mem").click(function(){
|
|||
closeModal: true,
|
||||
className: "",
|
||||
},
|
||||
select: {
|
||||
confirm: {
|
||||
text: "Select",
|
||||
closeModal: false,
|
||||
className: "swal-button",
|
||||
}
|
||||
},
|
||||
})
|
||||
|
@ -652,10 +648,9 @@ $(".edit-limit").click(function(){
|
|||
closeModal: true,
|
||||
className: "",
|
||||
},
|
||||
select: {
|
||||
confirm: {
|
||||
text: "Submit",
|
||||
closeModal: false,
|
||||
className: "swal-button",
|
||||
}
|
||||
},
|
||||
})
|
||||
|
@ -694,44 +689,6 @@ $(".edit-limit").click(function(){
|
|||
});
|
||||
});
|
||||
|
||||
$(".reset-limit").click(function(){
|
||||
const user = $(this).data('user');
|
||||
swal({
|
||||
title: `Are you sure you want to reset the usage limits for ${user} to the defaults?`,
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: true,
|
||||
reset: {
|
||||
text: "reset",
|
||||
closeModal: false,
|
||||
className: "swal-button--danger",
|
||||
}
|
||||
},
|
||||
dangerMode: true,
|
||||
})
|
||||
.then((willReset) => {
|
||||
if (willReset) {
|
||||
fetch(`/limits/${user}/reset`, {
|
||||
credentials: 'same-origin',
|
||||
method: 'post'
|
||||
}).then((response) => {
|
||||
return swal(`Usage limits for ${user} are now reset to defaults!`, {
|
||||
icon: "success",
|
||||
});
|
||||
}).then(() => {
|
||||
window.location = "/";
|
||||
}).catch(err => {
|
||||
if (err) {
|
||||
swal("Uh oh...", `Unable to reset the usage limits for ${user}. Please try again later.`, "error");
|
||||
} else {
|
||||
swal.stopLoading();
|
||||
swal.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".delete-user").click(function(){
|
||||
const user = $(this).data('user');
|
||||
swal({
|
||||
|
@ -866,7 +823,6 @@ $(".resize-disk").click(function(){
|
|||
confirm: {
|
||||
text: "Select",
|
||||
closeModal: false,
|
||||
className: "swal-button",
|
||||
}
|
||||
},
|
||||
})
|
||||
|
@ -945,10 +901,9 @@ $(".edit-template").click(function(){
|
|||
closeModal: true,
|
||||
className: "",
|
||||
},
|
||||
select: {
|
||||
confirm: {
|
||||
text: "Submit",
|
||||
closeModal: false,
|
||||
className: "swal-button",
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue