diff --git a/pandora_console/images/icono_error_mr.png b/pandora_console/images/icono_error_mr.png new file mode 100644 index 0000000000..f3ef21f5c4 Binary files /dev/null and b/pandora_console/images/icono_error_mr.png differ diff --git a/pandora_console/images/icono_exito_mr.png b/pandora_console/images/icono_exito_mr.png new file mode 100644 index 0000000000..140f20627d Binary files /dev/null and b/pandora_console/images/icono_exito_mr.png differ diff --git a/pandora_console/include/ajax/rolling_release.ajax.php b/pandora_console/include/ajax/rolling_release.ajax.php index 0cf1ead3b7..bb2de94a9d 100644 --- a/pandora_console/include/ajax/rolling_release.ajax.php +++ b/pandora_console/include/ajax/rolling_release.ajax.php @@ -38,7 +38,13 @@ if (is_ajax ()) { if ($dangerous_query) { $error_file = fopen($config["homedir"] . "/extras/mr/error.txt", "w"); - $message = "The sql file contains a dangerous query"; + + $message = "
"; + $message .= "
"; + $message .= "

ERROR

"; + $message .= "

The sql file contains a dangerous query

"; + $message .= "
"; + fwrite($error_file, $message); fclose($error_file); } @@ -76,7 +82,13 @@ if (is_ajax ()) { } else { $error_file = fopen($config["homedir"] . "/extras/mr/error.txt", "w"); - $message = "An error occurred while updating the database schema to the minor release " . $number; + + $message = "
"; + $message .= "
"; + $message .= "

ERROR

"; + $message .= "

An error occurred while updating the database schema to the minor release " . $number . "

"; + $message .= "
"; + fwrite($error_file, $message); fclose($error_file); } @@ -84,14 +96,26 @@ if (is_ajax ()) { } else { $error_file = fopen($config["homedir"] . "/extras/mr/error.txt", "w"); - $message = "The directory ' . $dir . ' should have read permissions in order to update the database schema"; + + $message = "
"; + $message .= "
"; + $message .= "

ERROR

"; + $message .= "

The directory " . $dir . " should have read permissions in order to update the database schema

"; + $message .= "
"; + fwrite($error_file, $message); fclose($error_file); } } else { $error_file = fopen($config["homedir"] . "/extras/mr/error.txt", "w"); - $message = "The directory ' . $dir . ' does not exist"; + + $message = "
"; + $message .= "
"; + $message .= "

ERROR

"; + $message .= "

The directory " . $dir . " does not exist

"; + $message .= "
"; + fwrite($error_file, $message); fclose($error_file); } diff --git a/pandora_console/include/javascript/update_manager.js b/pandora_console/include/javascript/update_manager.js index 5d841bb318..ab17c108f0 100644 --- a/pandora_console/include/javascript/update_manager.js +++ b/pandora_console/include/javascript/update_manager.js @@ -202,7 +202,7 @@ function install_package (package, homeurl) { background: 'black' }, width: 600, - height: 350, + height: 250, buttons: { "Apply package": function () { $("#pkg_apply_dialog").dialog("close"); @@ -227,7 +227,7 @@ function install_package (package, homeurl) { background: 'black' }, width: 600, - height: 350, + height: 270, buttons: { "Apply minor releases": function () { var no_error = apply_minor_release(data['mr']); @@ -278,6 +278,36 @@ function install_package (package, homeurl) { }, "Cancel": function () { $("#mr_dialog2").dialog("close"); + + $("
").dialog ({ + resizable: true, + draggable: true, + modal: true, + overlay: { + opacity: 0.5, + background: 'black' + }, + width: 600, + height: 220, + buttons: { + "Ok": function () { + $(this).dialog("close"); + } + } + }); + + var dialog_cancel_mr_text = "
"; + dialog_cancel_mr_text = dialog_cancel_mr_text + "
"; + dialog_cancel_mr_text = dialog_cancel_mr_text + "

INFO

"; + dialog_cancel_mr_text = dialog_cancel_mr_text + "

These database changes will not apply.

"; + dialog_cancel_mr_text = dialog_cancel_mr_text + "
"; + + $('#cancel_mr').html(dialog_cancel_mr_text); + $('#cancel_mr').dialog('open'); + + $("#box_online .loading").hide(); + $("#box_online .downloading_package").hide(); + $("#box_online .content").html("MR not accepted"); $('#form-offline_update ul').find('li').addClass('error'); $('#form-offline_update ul').find('li').find('p').html(error_in_mr_accept) .append(""+data.message+""); @@ -285,14 +315,17 @@ function install_package (package, homeurl) { } }); - $('button:contains(Apply minor releases)').attr("id","apply_rr_button"); + $('button:contains(Apply MR)').attr("id","apply_rr_button"); $('button:contains(Cancel)').attr("id","cancel_rr_button"); - var dialog_text = "

Do you want to apply minor releases?


"; - dialog_text = dialog_text + "

We recommend launch a planned downtime to this process


"; - dialog_text = dialog_text + "index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.list\">Planned downtimes
" - - $('#mr_dialog2').html(dialog_text); + var dialog_have_mr_mr_text = "
"; + dialog_have_mr_mr_text = dialog_have_mr_mr_text + "
"; + dialog_have_mr_mr_text = dialog_have_mr_mr_text + "

There are a DB changes

"; + dialog_have_mr_mr_text = dialog_have_mr_mr_text + "

There are a new database changes available to apply. Do you want to start the DB update process?

"; + dialog_have_mr_mr_text = dialog_have_mr_mr_text + "

We recommend launch a Planned downtime to this process

"; + dialog_have_mr_mr_text = dialog_have_mr_mr_text + "
"; + + $('#mr_dialog2').html(dialog_have_mr_mr_text); $('#mr_dialog2').dialog('open'); } else { @@ -340,6 +373,29 @@ function install_package (package, homeurl) { "Cancel": function () { $(this).dialog("close"); + $("
").dialog ({ + resizable: true, + draggable: true, + modal: true, + overlay: { + opacity: 0.5, + background: 'black' + }, + width: 600, + height: 220, + buttons: { + "Ok": function () { + $(this).dialog("close"); + } + } + }); + + var dialog_cancel_pkg_text = "
"; + dialog_cancel_pkg_text = dialog_cancel_pkg_text + "
"; + dialog_cancel_pkg_text = dialog_cancel_pkg_text + "

INFO

"; + dialog_cancel_pkg_text = dialog_cancel_pkg_text + "

These changes will not apply.

"; + dialog_cancel_pkg_text = dialog_cancel_pkg_text + "
"; + var parameters = {}; parameters['page'] = 'include/ajax/update_manager.ajax'; parameters['install_package'] = 1; @@ -379,7 +435,11 @@ function install_package (package, homeurl) { } }); - var dialog_text = "

Do you want to apply the package?


"; + var dialog_text = "
"; + dialog_text = dialog_text + "
"; + dialog_text = dialog_text + "

There are a new update available

"; + dialog_text = dialog_text + "

There are a new update available to apply. Do you want to start the update process?

"; + dialog_text = dialog_text + "
"; $('#pkg_apply_dialog').html(dialog_text); $('#pkg_apply_dialog').dialog('open'); @@ -460,9 +520,9 @@ function update_last_package(package, version, homeurl) { background: 'black' }, width: 600, - height: 350, + height: 250, buttons: { - "Apply package": function () { + "OK": function () { $(this).dialog("close"); var parameters = {}; @@ -486,9 +546,9 @@ function update_last_package(package, version, homeurl) { background: 'black' }, width: 600, - height: 350, + height: 270, buttons: { - "Apply minor releases": function () { + "Apply MR": function () { var no_error = apply_minor_release(data['mr']); if (no_error) { @@ -527,6 +587,33 @@ function update_last_package(package, version, homeurl) { }, "Cancel": function () { $(this).dialog("close"); + + $("
").dialog ({ + resizable: true, + draggable: true, + modal: true, + overlay: { + opacity: 0.5, + background: 'black' + }, + width: 600, + height: 220, + buttons: { + "Ok": function () { + $(this).dialog("close"); + } + } + }); + + var dialog_cancel_mr_text = "
"; + dialog_cancel_mr_text = dialog_cancel_mr_text + "
"; + dialog_cancel_mr_text = dialog_cancel_mr_text + "

INFO

"; + dialog_cancel_mr_text = dialog_cancel_mr_text + "

These database changes will not apply.

"; + dialog_cancel_mr_text = dialog_cancel_mr_text + "
"; + + $('#cancel_mr').html(dialog_cancel_mr_text); + $('#cancel_mr').dialog('open'); + $("#box_online .loading").hide(); $("#box_online .downloading_package").hide(); $("#box_online .content").html("MR not accepted"); @@ -534,14 +621,17 @@ function update_last_package(package, version, homeurl) { } }); - $('button:contains(Apply minor releases)').attr("id","apply_rr_button"); + $('button:contains(Apply MR)').attr("id","apply_rr_button"); $('button:contains(Cancel)').attr("id","cancel_rr_button"); - var dialog_text = "

Do you want to apply minor releases?


"; - dialog_text = dialog_text + "

We recommend launch a planned downtime to this process


"; - dialog_text = dialog_text + "index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.list\">Planned downtimes
" - - $('#mr_dialog2').html(dialog_text); + var dialog_have_mr_mr_text = "
"; + dialog_have_mr_mr_text = dialog_have_mr_mr_text + "
"; + dialog_have_mr_mr_text = dialog_have_mr_mr_text + "

There are a DB changes

"; + dialog_have_mr_mr_text = dialog_have_mr_mr_text + "

There are a new database changes available to apply. Do you want to start the DB update process?

"; + dialog_have_mr_mr_text = dialog_have_mr_mr_text + "

We recommend launch a Planned downtime to this process

"; + dialog_have_mr_mr_text = dialog_have_mr_mr_text + "
"; + + $('#mr_dialog2').html(dialog_have_mr_mr_text); $('#mr_dialog2').dialog('open'); } else { @@ -580,6 +670,32 @@ function update_last_package(package, version, homeurl) { "Cancel": function () { $(this).dialog("close"); + $("
").dialog ({ + resizable: true, + draggable: true, + modal: true, + overlay: { + opacity: 0.5, + background: 'black' + }, + width: 600, + height: 220, + buttons: { + "Ok": function () { + $(this).dialog("close"); + } + } + }); + + var dialog_cancel_pkg_text = "
"; + dialog_cancel_pkg_text = dialog_cancel_pkg_text + "
"; + dialog_cancel_pkg_text = dialog_cancel_pkg_text + "

INFO

"; + dialog_cancel_pkg_text = dialog_cancel_pkg_text + "

These changes will not apply.

"; + dialog_cancel_pkg_text = dialog_cancel_pkg_text + "
"; + + $('#cancel_pkg').html(dialog_cancel_pkg_text); + $('#cancel_pkg').dialog('open'); + var parameters = {}; parameters['page'] = 'include/ajax/update_manager.ajax'; parameters['update_last_free_package'] = 1; @@ -612,7 +728,11 @@ function update_last_package(package, version, homeurl) { } }); - var dialog_text = "

Do you want to apply the package?


"; + var dialog_text = "
"; + dialog_text = dialog_text + "
"; + dialog_text = dialog_text + "

There are a new update available

"; + dialog_text = dialog_text + "

There are a new update available to apply. Do you want to start the update process?

"; + dialog_text = dialog_text + "
"; $('#pkg_apply_dialog').html(dialog_text); $('#pkg_apply_dialog').dialog('open'); @@ -722,13 +842,14 @@ function apply_minor_release (n_mr) { type: "POST", url: "ajax.php", success: function (data) { + $('#mr_dialog2').append("
"); if (data != "") { $('#mr_dialog2').empty(); - $('#mr_dialog2').html("

" + data + "

"); + $('#mr_dialog2').html(data); error = true; } else { - $('#mr_dialog2').append("

- Applying DB MR #" + mr + "

"); + $('#mr_dialog2').append("

- Applying DB MR #" + mr + "

"); } } }); @@ -737,12 +858,21 @@ function apply_minor_release (n_mr) { return false; } }); + $('#mr_dialog2').append("
"); + $(".ui-dialog-buttonset").empty(); if (error) { return false; } else{ - $('#mr_dialog2').append("

Updated finished successfully

"); + $('#mr_dialog2').empty(); + var dialog_ok_mr_text = "
"; + dialog_ok_mr_text = dialog_ok_mr_text + "
"; + dialog_ok_mr_text = dialog_ok_mr_text + "

SUCCESS

"; + dialog_ok_mr_text = dialog_ok_mr_text + "

Updated finished successfully.

"; + dialog_ok_mr_text = dialog_ok_mr_text + "
"; + $('#mr_dialog2').html(dialog_ok_mr_text); + return true; } } \ No newline at end of file diff --git a/pandora_console/include/styles/jquery-ui-1.10.0.custom.css b/pandora_console/include/styles/jquery-ui-1.10.0.custom.css index 728e0dbb9b..4d189b5493 100644 --- a/pandora_console/include/styles/jquery-ui-1.10.0.custom.css +++ b/pandora_console/include/styles/jquery-ui-1.10.0.custom.css @@ -159,6 +159,9 @@ button.ui-button-icons-only { } .ui-button-text-only .ui-button-text { padding: .4em 1em; + font-family: nunito; + font-size: 9pt; + color: #82B92E } .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { @@ -409,8 +412,8 @@ button.ui-button::-moz-focus-inner { text-align: center; padding: .4em 1em; padding-top: 8px; - padding-bottom: 12px; - height: 37px; + padding-bottom: 14px; + height: 30px; /*margin: 3px;*/ position: relative; } @@ -452,6 +455,7 @@ button.ui-button::-moz-focus-inner { .ui-dialog .ui-dialog-buttonpane button { margin: .5em 1em .5em 0; cursor: pointer; + background: white; background-color: white; border: 1px solid #82b92e; height:30px;