From 73c31012d99f166025482b8835523a08e9420dee Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Tue, 14 Mar 2017 10:36:10 +0100 Subject: [PATCH] Added new visual styles to um and rr systems. Ticket #486 --- pandora_console/images/icono_error_mr.png | Bin 0 -> 2027 bytes pandora_console/images/icono_exito_mr.png | Bin 0 -> 2114 bytes .../include/ajax/rolling_release.ajax.php | 32 +++- .../include/javascript/update_manager.js | 176 +++++++++++++++--- .../styles/jquery-ui-1.10.0.custom.css | 8 +- 5 files changed, 187 insertions(+), 29 deletions(-) create mode 100644 pandora_console/images/icono_error_mr.png create mode 100644 pandora_console/images/icono_exito_mr.png diff --git a/pandora_console/images/icono_error_mr.png b/pandora_console/images/icono_error_mr.png new file mode 100644 index 0000000000000000000000000000000000000000..f3ef21f5c4bb6cb5d74064e161e1631f8d49b5a2 GIT binary patch literal 2027 zcmVkk)feBrZdG~HO%~V>7B8Q>)ud6Fq;s0H`82)v4<5vt*$mr&V;S>zT zFcU#G;0!vVLxb3GCJ6up5b043v|a&7-A9xE0Ca*Na?HI4QUb)pngAiInUH`rts zg;5g4#$t%!G7vo}Ct`Ia(3>Eaf?Nj51K@lBP39QEf+M0pVX8olh+-r%T@nI@Km#uj zmG}u*kO(wr0X7MM0HR&tiNlrifm8x11py-&-ob9SVu<0%h6D=?a8U*|6rVv*S2hqX*030Yt@T2*3(+;> zGmIz$(OrlhrX(4NY#7{SNMVWvTwuZ%8R&)~8;T<<8ZzQ7XrT=gQVLrpC_@pe3K9$h zfK!<_Kga8@^lq1l=2PkPm{HJ5AqEz(6G)rh1awIhuso4&tHrN1k zXdqRZPvBk;fqIcpPY4GHfR=w4-2}XaB8uaBdKeh>^)V_Xq~0{%diZZl3Bj>Fdl#8>q&QX?&5bu49$Bdz~R48YdMMGjeV9SC#5s)ECD=+TOj49IhAB1Sn$Qo2NPD4{fm>{vp51A>DJKu3Z?^8H|F`QUAx z4uV<-qs7aF#}^9*z=4A34kW6n2I}Pksd_p%?gLdCy`)r~#Pru-T`a1%%yEQtJOl3G zK~RHsAti%s00G!H7n_D*APlFOASB1!OdJ}-izfCA0!tT@{3*964!i*$fL zetPYzrqGPW%HYHm?5a_q0f4-%8hhBSn|St=C=SW)le##~A^Q}75kQAI`vAgDHDg9=X}?!6jEb0WrR<}k#N zLCGlu>hx-^OeTt}t8S}20JT-4uW$~98E?3{yHqy42lE@PtB}(dTFdo@MdPa0*dCGN zL^*3Uv(oxRfY55lOJWie6~x+GB)9>+78e3(!5)=OzaQc5R6;Dk4rz^dv!s#WR|0#j zssCrMfLwFJ4KR?k zmyG0C*2>mOa-28hz)Z#@ANtu{z18){k%IdlaUR~|>w#DX*h{ZZTxzpHfW+$Oiztt) zd_=5}e7uX&^_KS*Brc#U9BDBqN3d@kU`LMOz2fdO74d6}!A%|oNSv}z15bLqS6Cmv zI|J#!X&$4r-fWI&7uLR1T(+!%+T=DkdU`7-0J!fwo_sCxVf9q02mRJ(5EUmj>v~3t;3-kv@G~tR33n^u_I*@$bh=vi_CJr4aB~0IkyHuHNTM z0@@0o6Oa?s0l(1J^lBX)@``{fOj)K z?)*=pEYow0T3F+tHF@i^CndUDoh5%wBI@05nUrY^HMYH6{Q>3L$6g$J?gRh;002ov JPDHLkV1kbBftdgR literal 0 HcmV?d00001 diff --git a/pandora_console/images/icono_exito_mr.png b/pandora_console/images/icono_exito_mr.png new file mode 100644 index 0000000000000000000000000000000000000000..140f20627db27b9e6f20e95c31a5a7bddb10af45 GIT binary patch literal 2114 zcmV-I2)*}-P)2`NO@z=Tghz3WXBJ`+BLjl0#6{o}xbtiV7jkilQO1I$KN2zAB*6q7GJ zThH+0&nFCpD9%6*p3eQI*whsg70y852yy}gsQ@5=s2|m^n41rz5{QYl1iaC^ORa$k zNc7`Uz`?=?k3djt72t}0kQe1}a6=ISx$%Zph%RppCILM|Sj^*3Iv zz)-`2OLM%*Vg?04Gk6k3F0ycyA5aGx;PrmG#RdimUQL1q;Y*~T>^YyR5k+ByT>u(r zNL1n{U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q`cH<>jYECwY>l2Bw^WL{NZ4IZqI(RH)$ zB5X|dCRaJ;kpaR{`zf8#em`bA1Z}#m1dHuvBG(=Sh8k7~^mykb2$V0byRHPotdk8} zEtxm%FD%r)$HDF7tTNYCsUfAeKb*}hmDmZ=K%VY$EX!CD2xVQPu`UDxksvf#(m!8t*hSZsLD+W46XhcY#GFrsjO{y#xfYqQ%uQ&&=AqaC zw}4D8O{@354|>vaI6R5JI&HG(u#`Ax-%dLy?$zod+1{#d9Zb$`mY~y!@ sF8LZ+a75OdS7JTPKEwL|Fg2{>4@-4%41LB{d;kCd07*qoM6N<$f>g4mH2?qr literal 0 HcmV?d00001 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;