mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add clone server confirmation.
This commit is contained in:
parent
81bc228e40
commit
b359685392
@ -849,19 +849,41 @@
|
|||||||
|
|
||||||
$(".clone_button").click(function () {
|
$(".clone_button").click(function () {
|
||||||
server_id = $(this).attr("data-id");
|
server_id = $(this).attr("data-id");
|
||||||
send_command(server_id, 'clone_server');
|
bootbox.confirm({
|
||||||
bootbox.dialog({
|
message: "{{ translate('dashboard', 'cloneConfirm' , data['lang']) }}",
|
||||||
backdrop: true,
|
buttons: {
|
||||||
title: '{% raw translate("dashboard", "sendingCommand", data["lang"]) %}',
|
confirm: {
|
||||||
message: '<div align="center"><i class="fas fa-spin fa-spinner"></i> {% raw translate("dashboard", "bePatientClone", data["lang"]) %} </div>',
|
label: "{{ translate('dashboard', 'clone' , data['lang']) }}",
|
||||||
closeButton: false,
|
className: 'btn-outline-warning'
|
||||||
|
},
|
||||||
|
cancel: {
|
||||||
|
label: '{% raw translate("panelConfig", "cancel", data["lang"]) %}',
|
||||||
|
className: 'btn-secondary'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
callback: function (result) {
|
||||||
|
if (result) {
|
||||||
|
cloneServer(server_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
setTimeout(function () {
|
|
||||||
location.reload();
|
|
||||||
}, 5000)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function cloneServer(server_id) {
|
||||||
|
send_command(server_id, 'clone_server');
|
||||||
|
bootbox.dialog({
|
||||||
|
backdrop: true,
|
||||||
|
title: '{% raw translate("dashboard", "sendingCommand", data["lang"]) %}',
|
||||||
|
message: '<div align="center"><i class="fas fa-spin fa-spinner"></i> {% raw translate("dashboard", "bePatientClone", data["lang"]) %} </div>',
|
||||||
|
closeButton: false,
|
||||||
|
});
|
||||||
|
setTimeout(function () {
|
||||||
|
location.reload();
|
||||||
|
}, 5000)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<script src="/static/assets/vendors/js/jquery-ui.js"></script>
|
<script src="/static/assets/vendors/js/jquery-ui.js"></script>
|
||||||
<link rel="stylesheet" href="/static/assets/vendors/css/jquery-ui.css">
|
<link rel="stylesheet" href="/static/assets/vendors/css/jquery-ui.css">
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
"cannotSeeOnMobile": "Not seeing everything on mobile?",
|
"cannotSeeOnMobile": "Not seeing everything on mobile?",
|
||||||
"cannotSeeOnMobile2": "Try scrolling the table sideways.",
|
"cannotSeeOnMobile2": "Try scrolling the table sideways.",
|
||||||
"clone": "Clone",
|
"clone": "Clone",
|
||||||
|
"cloneConfirm": "Are you sure you would like to clone this server? This process may take a while.",
|
||||||
"cpuCores": "CPU Cores",
|
"cpuCores": "CPU Cores",
|
||||||
"cpuCurFreq": "CPU Current Clock",
|
"cpuCurFreq": "CPU Current Clock",
|
||||||
"cpuMaxFreq": "CPU Maximum Clock",
|
"cpuMaxFreq": "CPU Maximum Clock",
|
||||||
|
Loading…
Reference in New Issue
Block a user