diff --git a/data/web/css/mailcow.css b/data/web/css/mailcow.css index 1c6a856e..14d875fa 100644 --- a/data/web/css/mailcow.css +++ b/data/web/css/mailcow.css @@ -135,4 +135,7 @@ nav .glyphicon { } #top { padding-top: 70px; +} +.bootstrap-select.btn-group .no-results { + display: none; } \ No newline at end of file diff --git a/data/web/edit.php b/data/web/edit.php index 8eaae6af..9cd1994c 100644 --- a/data/web/edit.php +++ b/data/web/edit.php @@ -80,7 +80,7 @@ if (isset($_SESSION['mailcow_cc_role'])) {
- @@ -186,7 +186,7 @@ if (isset($_SESSION['mailcow_cc_role'])) {
- @@ -408,7 +408,7 @@ if (isset($_SESSION['mailcow_cc_role'])) {
- '); - $('#statusTriggerRestartContainer').text('Restarting container, this may take a while... '); - $('#statusTriggerRestartContainer2').text('Reloading webpage... '); + $('#statusTriggerRestartContainer').html(''); $.ajax({ method: 'get', url: '/inc/ajax/container_ctrl.php', - timeout: 10000, + timeout: , data: { - 'service': container, - 'action': 'restart' - }, - error: function() { - window.location = window.location.href.split("#")[0]; - }, - success: function(data) { - $('#statusTriggerRestartContainer').append(data); - $('#triggerRestartContainer').html(' '); - $('#statusTriggerRestartContainer2').append(data); - $('#triggerRestartContainer').html(' '); - window.location = window.location.href.split("#")[0]; + 'service': container, + 'action': 'restart' } - }); + }) + .always( function (data, status) { + $('#statusTriggerRestartContainer').append(data); + var htmlResponse = $.parseHTML(data) + if ($(htmlResponse).find('span').hasClass('text-success')) { + $('#triggerRestartContainer').html(' '); + setTimeout(function(){ + $('#RestartContainer').modal('toggle'); + window.location = window.location.href.split("#")[0]; + }, 1200); + } else { + $('#triggerRestartContainer').html(' '); + } + }) }); }) diff --git a/data/web/inc/functions.docker.inc.php b/data/web/inc/functions.docker.inc.php index a0705cff..183bbc58 100644 --- a/data/web/inc/functions.docker.inc.php +++ b/data/web/inc/functions.docker.inc.php @@ -1,5 +1,6 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/web/inc/vars.inc.php b/data/web/inc/vars.inc.php index 9f5e2993..fdd22f14 100644 --- a/data/web/inc/vars.inc.php +++ b/data/web/inc/vars.inc.php @@ -116,3 +116,6 @@ $OTP_LABEL = "mailcow UI"; // Default "to" address in relay test tool $RELAY_TO = "null@hosted.mailcow.de"; + +// How long to wait (in s) for cURL Docker requests +$DOCKER_TIMEOUT = 60; \ No newline at end of file diff --git a/data/web/lang/lang.de.php b/data/web/lang/lang.de.php index c918c378..3de887b1 100644 --- a/data/web/lang/lang.de.php +++ b/data/web/lang/lang.de.php @@ -8,7 +8,8 @@ $lang['header']['restart_sogo'] = 'SOGo neustarten'; $lang['header']['restart_netfilter'] = 'Netfilter neustarten'; $lang['footer']['restart_container'] = 'Container neustarten'; $lang['footer']['restart_now'] = 'Jetzt neustarten'; -$lang['footer']['restart_container_info'] = 'Wichtig: Ein korrekter Neustart eines Containers kann eine Weile in Anspruch nehmen, bitte warten Sie, bis der Prozess vollständig beendet wurde.'; +$lang['footer']['restarting_container'] = 'Container wird neugestartet, bitte warten...'; +$lang['footer']['restart_container_info'] = 'Wichtig: Der Neustart eines Containers kann eine Weile in Anspruch nehmen, bitte warten Sie, bis der Prozess vollständig beendet wurde.
Die Website wird neugeladen, wenn der Vorgang erfolgreich ist.'; $lang['footer']['confirm_delete'] = 'Löschen bestätigen'; $lang['footer']['delete_these_items'] = 'Sind Sie sicher, dass die Änderungen an Elementen mit folgender ID durchgeführt werden sollen?'; diff --git a/data/web/lang/lang.en.php b/data/web/lang/lang.en.php index aa8c2a97..2f9eda73 100644 --- a/data/web/lang/lang.en.php +++ b/data/web/lang/lang.en.php @@ -8,7 +8,8 @@ $lang['header']['restart_sogo'] = 'Restart SOGo'; $lang['header']['restart_netfilter'] = 'Restart netfilter'; $lang['footer']['restart_container'] = 'Restart container'; $lang['footer']['restart_now'] = 'Restart now'; -$lang['footer']['restart_container_info'] = 'Important: A graceful restart may take a while to complete, please wait for it to finish.'; +$lang['footer']['restarting_container'] = 'Restarting container, this may take a while...'; +$lang['footer']['restart_container_info'] = 'Important: A graceful restart may take a while to complete, please wait for it to finish.
This website will reload if the process succeeded.'; $lang['footer']['confirm_delete'] = 'Confirm deletion'; $lang['footer']['delete_these_items'] = 'Please confirm your changes to the following object id:'; diff --git a/data/web/modals/footer.php b/data/web/modals/footer.php index 05ae74b3..e861ab4e 100644 --- a/data/web/modals/footer.php +++ b/data/web/modals/footer.php @@ -196,7 +196,6 @@ if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'admi

-
diff --git a/data/web/modals/mailbox.php b/data/web/modals/mailbox.php index 57ca822a..1e0a7aae 100644 --- a/data/web/modals/mailbox.php +++ b/data/web/modals/mailbox.php @@ -23,7 +23,7 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
- ".htmlspecialchars($domain).""; @@ -172,7 +172,7 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
- ".htmlspecialchars($domain).""; @@ -289,7 +289,7 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
- ".htmlspecialchars($domain).""; @@ -329,7 +329,7 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
-
-
-