mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'tweak/clone-confirmation' into 'dev'
Add clone server confirmation. See merge request crafty-controller/crafty-4!384
This commit is contained in:
commit
a6bed55218
@ -7,6 +7,7 @@ None
|
||||
- Fix cannot delete backup on page 2 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/382))
|
||||
### Tweaks
|
||||
- Rework server list on status page display for use on small screens ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/383))
|
||||
- Add clone server confirmation ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/384))
|
||||
<br><br>
|
||||
|
||||
## --- [4.0.4-hotfix2] - 2022/06/21
|
||||
|
@ -849,19 +849,41 @@
|
||||
|
||||
$(".clone_button").click(function () {
|
||||
server_id = $(this).attr("data-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,
|
||||
bootbox.confirm({
|
||||
message: "{{ translate('dashboard', 'cloneConfirm' , data['lang']) }}",
|
||||
buttons: {
|
||||
confirm: {
|
||||
label: "{{ translate('dashboard', 'clone' , data['lang']) }}",
|
||||
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 src="/static/assets/vendors/js/jquery-ui.js"></script>
|
||||
<link rel="stylesheet" href="/static/assets/vendors/css/jquery-ui.css">
|
||||
|
@ -66,6 +66,7 @@
|
||||
"cannotSeeOnMobile": "Not seeing everything on mobile?",
|
||||
"cannotSeeOnMobile2": "Try scrolling the table sideways.",
|
||||
"clone": "Clone",
|
||||
"cloneConfirm": "Are you sure you would like to clone this server? This process may take a while.",
|
||||
"cpuCores": "CPU Cores",
|
||||
"cpuCurFreq": "CPU Current Clock",
|
||||
"cpuMaxFreq": "CPU Maximum Clock",
|
||||
|
Loading…
Reference in New Issue
Block a user