modificacion de estilos de ventana modal y editor de usuarios

This commit is contained in:
enriquecd 2016-09-22 11:12:19 +02:00
parent d2617df147
commit 6f33c0eaf8
11 changed files with 175 additions and 95 deletions

View File

@ -2,11 +2,21 @@
$tipo = $_GET['message']; $tipo = $_GET['message'];
echo "<div class='info_box' style='padding-top:20px;padding-bottom:20px;'><span style='padding:20px;'>"; echo "
<div class='modalheader'>
<span class='modalheadertext'>
Community version</span>
<img class='modalclosex cerrar' src='".$config['homeurl']."images/icono_cerrar.png'>
</div>
<div class='modalcontent'>
<img class='modalcontentimg' src='".$config['homeurl']."images/icono_popup.png'>
<div class='modalcontenttext'>";
switch ($tipo) { switch ($tipo) {
case "module": case "module":
echo __("The community version have not the ability to define your own library of local modules, or distribute it to remote agents. You need to do that changes individually on each agent, but it's possible by using external tools and space time and effort. Nor can distribute local plugins, and nor does it have access to the library of plugins enterprise to monitor applications such as Informix, Oracle, DB2, SQL Server, Exchange, WebSphere, Oracle Exadata, F5, JBoss, HyperV, VMWare, RHEV, to name a few. With the Enterprise version will have all this, and the ability to distribute and manage their own local modules to your systems, individually or through policies."); echo __("The community version have not the ability to define your own library of local modules, or distribute it to remote agents. You need to do that changes individually on each agent, but it's possible by using external tools and space time and effort. Nor can distribute local plugins, and nor does it have access to the library of plugins enterprise to monitor applications such as Informix, Oracle, DB2, SQL Server, Exchange, WebSphere, Oracle Exadata, F5, JBoss, HyperV, VMWare, RHEV, to name a few. With the Enterprise version will have all this, and the ability to distribute and manage their own local modules to your systems, individually or through policies.
<br><br><img style='width:105px' src='".$config['homeurl']."images/logo_oracle.png'><img style='width:105px' src='".$config['homeurl']."images/logo_citrix.png'><img style='width:105px' src='".$config['homeurl']."images/logo_sap.png'><img style='width:105px' src='".$config['homeurl']."images/logo_exchange.png'>");
break; break;
case "massive": case "massive":
echo __("You want to manage your monitoring homogeneously? Do you have many systems and is difficult to manage in a comprehensive manner? Would you like to deploy monitoring, alerts and even local plugins with a single click? Pandora FMS Enterprise Policies are exactly what you need, you'll save time, effort and dislikes. More information (link to pandorafms.com)"); echo __("You want to manage your monitoring homogeneously? Do you have many systems and is difficult to manage in a comprehensive manner? Would you like to deploy monitoring, alerts and even local plugins with a single click? Pandora FMS Enterprise Policies are exactly what you need, you'll save time, effort and dislikes. More information (link to pandorafms.com)");
@ -21,19 +31,28 @@ switch ($tipo) {
break; break;
} }
echo "</span></div>"; echo "
</div>
<div class='modalokbutton cerrar'>
<span class='modalokbuttontext'>OK</span>
</div>
<div class='modalgobutton gopandora'>
echo "<button id='cerrar' onclick='ocultar();'>OK</button>"; <span class='modalokbuttontext'>Go to Enterprise version</span>
</div>
";
?> ?>
<script> <script>
function ocultar(){ $(".cerrar").click(function(){
$("#alert_messages" ).dialog('close'); $("#alert_messages").hide();
$( "#opacidad" ).remove();
});
$(".gopandora").click(function(){
} window.open('https://pandorafms.com/es/software-de-monitorizacion-pandorafms/','_blank');
});
</script> </script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -3,27 +3,27 @@
return this.each (function () { return this.each (function () {
this.checked = true; this.checked = true;
});}; });};
$.fn.uncheck = function () { $.fn.uncheck = function () {
return this.each (function () { return this.each (function () {
this.checked = false; this.checked = false;
});}; });};
$.fn.enable = function () { $.fn.enable = function () {
return $(this).removeAttr ("disabled"); return $(this).removeAttr ("disabled");
}; };
$.fn.disable = function () { $.fn.disable = function () {
return $(this).attr ("disabled", "disabled"); return $(this).attr ("disabled", "disabled");
}; };
$.fn.pulsate = function () { $.fn.pulsate = function () {
var i = 0; var i = 0;
for (i = 0; i <= 2; i++) { for (i = 0; i <= 2; i++) {
$(this).fadeOut ("slow").fadeIn ("slow"); $(this).fadeOut ("slow").fadeIn ("slow");
} }
}; };
$.fn.showMessage = function (msg) { $.fn.showMessage = function (msg) {
return $(this).hide ().empty () return $(this).hide ().empty ()
.text (msg) .text (msg)
@ -54,38 +54,29 @@ $(document).ready (function () {
}, },
"html" "html"
); );
return false;
});
$("a.show_systemalert_dialog").click (function () {
jQuery.get ("ajax.php",
{"page": "operation/system_alert"},
function (data, status) {
$("#alert_messages").hide ()
.empty ()
.append (data)
.dialog ({
title: $("a#show_systemalert_dialog").attr ("title"),
resizable: true,
draggable: true,
modal: true,
overlay: {
opacity: 0.5,
background: "black"
},
width: 700,
height: 300
})
.show ();
},
"html"
);
return false; return false;
}); });
$("a.show_systemalert_dialog").click (function () {
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
jQuery.get ("ajax.php",
{"page": "operation/system_alert"},
function (data, status) {
$("#alert_messages").hide ()
.empty ()
.append (data)
.show ();
},
"html"
);
return false;
});
// Creacion de ventana modal y botones
$("#publienterprise").click (function () { $("#publienterprise").click (function () {
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
jQuery.get ("ajax.php", jQuery.get ("ajax.php",
{ {
"page": "general/alert_enterprise", "page": "general/alert_enterprise",
@ -94,24 +85,18 @@ $(document).ready (function () {
$("#alert_messages").hide () $("#alert_messages").hide ()
.empty () .empty ()
.append (data) .append (data)
.dialog ({
title: $("#publienterprise").attr ("title"),
resizable: true,
draggable: true,
modal: true,
open: function (event, ui) {
$(this).css({'overflow': 'hidden','text-align': 'center','padding-right':'25px','padding-bottom':'25px'}); //this line does the actual hiding
},
overlay: {
opacity: 0.5,
background: "black"
},
width: 600
})
.show (); .show ();
}, },
"html" "html"
); );
return false;
});
return false; return false;
}); });
@ -120,12 +105,12 @@ $(document).ready (function () {
if ($('#license_error_msg_dialog').length) { if ($('#license_error_msg_dialog').length) {
if (typeof(process_login_ok) == "undefined") if (typeof(process_login_ok) == "undefined")
process_login_ok = 0; process_login_ok = 0;
if (typeof(show_error_license) == "undefined") if (typeof(show_error_license) == "undefined")
show_error_license = 0; show_error_license = 0;
if (process_login_ok || show_error_license) { if (process_login_ok || show_error_license) {
$( "#license_error_msg_dialog" ).dialog({ $( "#license_error_msg_dialog" ).dialog({
dialogClass: "no-close", dialogClass: "no-close",
closeOnEscape: false, closeOnEscape: false,
@ -147,17 +132,17 @@ $(document).ready (function () {
); );
} }
}); });
$("#submit-hide-license-error-msg").click (function () { $("#submit-hide-license-error-msg").click (function () {
$("#license_error_msg_dialog" ).dialog('close') $("#license_error_msg_dialog" ).dialog('close')
}); });
} }
} }
if ($('#msg_change_password').length) { if ($('#msg_change_password').length) {
$( "#msg_change_password" ).dialog({ $( "#msg_change_password" ).dialog({
resizable: true, resizable: true,
draggable: true, draggable: true,
@ -169,11 +154,11 @@ $(document).ready (function () {
background: "black" background: "black"
} }
}); });
} }
if ($('#login_blocked').length) { if ($('#login_blocked').length) {
$( "#login_blocked" ).dialog({ $( "#login_blocked" ).dialog({
resizable: true, resizable: true,
draggable: true, draggable: true,
@ -185,9 +170,9 @@ $(document).ready (function () {
background: "black" background: "black"
} }
}); });
} }
forced_title_callback(); forced_title_callback();
}); });
@ -199,21 +184,21 @@ function forced_title_callback() {
/////////////////////////////////////////// ///////////////////////////////////////////
$('#forced_title_layer').css('left', 0); $('#forced_title_layer').css('left', 0);
$('#forced_title_layer').css('top', 0); $('#forced_title_layer').css('top', 0);
/////////////////////////////////////////// ///////////////////////////////////////////
// Get info of the image // Get info of the image
/////////////////////////////////////////// ///////////////////////////////////////////
var img_top = $(this).offset().top; var img_top = $(this).offset().top;
var img_width = $(this).width(); var img_width = $(this).width();
var img_height = $(this).height(); var img_height = $(this).height();
var img_id = $(this).attr('id'); var img_id = $(this).attr('id');
var img_left_mid = $(this).offset().left + (img_width / 2); var img_left_mid = $(this).offset().left + (img_width / 2);
/////////////////////////////////////////// ///////////////////////////////////////////
// Put title in the layer // Put title in the layer
/////////////////////////////////////////// ///////////////////////////////////////////
// If the '.forced_title' element has 'use_title_for_force_title' = 1 // If the '.forced_title' element has 'use_title_for_force_title' = 1
// into their 'data' prop, the element title will be used for the // into their 'data' prop, the element title will be used for the
// content. // content.
@ -223,46 +208,46 @@ function forced_title_callback() {
else { else {
var title = $('#forced_title_'+img_id).html(); var title = $('#forced_title_'+img_id).html();
} }
$('#forced_title_layer').html(title); $('#forced_title_layer').html(title);
/////////////////////////////////////////// ///////////////////////////////////////////
// Get info of the layer // Get info of the layer
/////////////////////////////////////////// ///////////////////////////////////////////
var layer_width = $('#forced_title_layer').width(); var layer_width = $('#forced_title_layer').width();
var layer_height = $('#forced_title_layer').height(); var layer_height = $('#forced_title_layer').height();
/////////////////////////////////////////// ///////////////////////////////////////////
// Obtain the new position of the layer // Obtain the new position of the layer
/////////////////////////////////////////// ///////////////////////////////////////////
// Jquery doesnt know the padding of the layer // Jquery doesnt know the padding of the layer
var layer_padding = 4; var layer_padding = 4;
// Deduct padding of both sides // Deduct padding of both sides
var layer_top = img_top - layer_height - (layer_padding * 2) - 5; var layer_top = img_top - layer_height - (layer_padding * 2) - 5;
if (layer_top < 0) { if (layer_top < 0) {
layer_top = img_top + img_height + (layer_padding * 2); layer_top = img_top + img_height + (layer_padding * 2);
} }
// Deduct padding of one side // Deduct padding of one side
var layer_left = img_left_mid - (layer_width / 2) - layer_padding; var layer_left = img_left_mid - (layer_width / 2) - layer_padding;
if (layer_left < 0) { if (layer_left < 0) {
layer_left = 0; layer_left = 0;
} }
var real_layer_width = layer_width + (layer_padding * 2) + 5; var real_layer_width = layer_width + (layer_padding * 2) + 5;
var layer_right = layer_left + real_layer_width; var layer_right = layer_left + real_layer_width;
var screen_width = $(window).width(); var screen_width = $(window).width();
if (screen_width < layer_right) { if (screen_width < layer_right) {
layer_left = screen_width - real_layer_width; layer_left = screen_width - real_layer_width;
} }
/////////////////////////////////////////// ///////////////////////////////////////////
// Set the layer position and show // Set the layer position and show
/////////////////////////////////////////// ///////////////////////////////////////////
$('#forced_title_layer').css('left', layer_left); $('#forced_title_layer').css('left', layer_left);
$('#forced_title_layer').css('top', layer_top); $('#forced_title_layer').css('top', layer_top);
$('#forced_title_layer').show(); $('#forced_title_layer').show();

View File

@ -465,7 +465,7 @@ div#login_in, #login_f {
-moz-transform: rotate(36deg); /* FF */ -moz-transform: rotate(36deg); /* FF */
-o-transform: rotate(36deg); /* Opera */ -o-transform: rotate(36deg); /* Opera */
-webkit-transform: rotate(36deg); /* Safari and Chrome */ -webkit-transform: rotate(36deg); /* Safari and Chrome */
float: right; float: right;
margin-top: 18px; margin-top: 18px;
width: 80px; width: 80px;
@ -3031,13 +3031,13 @@ table#policy_modules td * {
margin: 0px; margin: 0px;
} }
.databox.filters td>img, .databox.filters td>div>a>img, .databox.filters td>img, .databox.filters td>div>a>img,
.databox.filters td>span>img, .databox.filters td>span>a>img, .databox.filters td>span>img, .databox.filters td>span>a>img,
.databox.filters td>a>img{ .databox.filters td>a>img{
vertical-align: middle; vertical-align: middle;
margin-left: 5px; margin-left: 5px;
} }
.databox.data td>img,.databox.data th>img, .databox.data td>div>a>img, .databox.data td>img,.databox.data th>img, .databox.data td>div>a>img,
.databox.data td>span>img, .databox.data td>span>a>img, .databox.data td>span>img, .databox.data td>span>a>img,
.databox.data td>a>img, .databox.data td>form>a>img { .databox.data td>a>img, .databox.data td>form>a>img {
vertical-align: middle; vertical-align: middle;
@ -3164,7 +3164,7 @@ table#policy_modules td * {
height: 210px; height: 210px;
background: blue; background: blue;
border-radius: 15px; border-radius: 15px;
top: 50px; top: 50px;
left: 10px; left: 10px;
position: absolute; position: absolute;
@ -3192,7 +3192,7 @@ table#policy_modules td * {
@media screen and (-webkit-min-device-pixel-ratio:0) @media screen and (-webkit-min-device-pixel-ratio:0)
{ {
/* Only for chrome */ /* Only for chrome */
.vertical_range { .vertical_range {
left: -87px; left: -87px;
top: 93px; top: 93px;
@ -3202,7 +3202,7 @@ table#policy_modules td * {
.home_zoom { .home_zoom {
top: 310px; top: 310px;
left: 10px; left: 10px;
display: table-cell; display: table-cell;
position: absolute; position: absolute;
font-weight: bolder; font-weight: bolder;
@ -3220,7 +3220,7 @@ table#policy_modules td * {
.zoom_in { .zoom_in {
top: 10px; top: 10px;
left: 10px; left: 10px;
display: table-cell; display: table-cell;
position: absolute; position: absolute;
font-weight: bolder; font-weight: bolder;
@ -3238,7 +3238,7 @@ table#policy_modules td * {
.zoom_out { .zoom_out {
top: 270px; top: 270px;
left: 10px; left: 10px;
display: table-cell; display: table-cell;
position: absolute; position: absolute;
font-weight: bolder; font-weight: bolder;
@ -3449,4 +3449,62 @@ div.simple_value > a > span.text > p {
.unicode{ .unicode{
font-family: unicodeFont; font-family: unicodeFont;
} }
#alert_messages{
-moz-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
z-index:2;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
position:absolute;
width:650px;
background:white;
}
.modalheader{
text-align:center;width:100%;height:37px;left:0px;background-color:#82b92e;
}
.modalheadertext{
color:white;position:relative;font-family:Nunito;font-size:13pt;top:8px;
}
.modalclosex{
cursor:pointer;display:inline;float:right;margin-right:10px;margin-top:10px;
}
.modalcontent{
color:black;background:white;
}
.modalcontentimg{
float:left;margin-left:30px;margin-top:30px;
}
.modalcontenttext{
float:left;text-align:justify;color:black;font-size: 9.5pt;line-height:13pt;margin-top:30px;width:430px;margin-left:30px;
}
.modalokbutton{
cursor:pointer;text-align:center;margin-right:45px;margin-top:30px;margin-bottom:30px;float:right;-moz-border-radius: 3px;
-webkit-border-radius: 3px;border-radius: 3px;bottom:0px;width:90px;height:30px;background-color:white;border: 1px solid #82b92e;
}
.modalokbuttontext{
color:#82b92e;font-family:Nunito;font-size:10pt;position:relative;top:6px;
}
.modalgobutton{
cursor:pointer;text-align:center;margin-right:15px;margin-top:30px;margin-bottom:30px;float:right;-moz-border-radius: 3px;
-webkit-border-radius: 3px;border-radius: 3px;bottom:0px;width:240px;height:30px;background-color:white;border: 1px solid #82b92e;
}
.modalgobuttontext{
color:#82b92e;font-family:Nunito;font-size:10pt;position:relative;top:6px;
}
#opacidad{
opacity:0.5;
z-index:1;
width:100%;
height:100%;
position:absolute;
left:0px;
top:0px;
}

View File

@ -2,6 +2,23 @@
// TODO: Poner esto resizable y dragable: http://jqueryui.com/demos/dialog // TODO: Poner esto resizable y dragable: http://jqueryui.com/demos/dialog
echo get_pandora_error_for_header(); echo "
<div class='modalheader'>
<span class='modalheadertext'>Community version</span>
<img class='modalclosex cerrar' src='".$config['homeurl']."/images/icono_cerrar.png'>
</div>".get_pandora_error_for_header()."
<div class='modalokbutton cerrar'>
<span class='modalokbuttontext close'>OK</span>
</div>";
?> ?>
<script>
$(".cerrar").click(function(){
$("#alert_messages").hide();
$( "#opacidad" ).remove();
});
</script>

View File

@ -201,8 +201,9 @@ if (defined('METACONSOLE')) {
$table->head_colspan[0] = 5; $table->head_colspan[0] = 5;
$table->headstyle[0] = 'text-align: center'; $table->headstyle[0] = 'text-align: center';
} }
$table->style[0] = 'width: 500px;'; $table->style[0] = 'min-width: 500px;width: 500px;';
$table->style[2] = 'width: 200px;'; $table->style[1] = 'min-width: 500px;width: 500px;';
$table->style[2] = 'min-width: 200px;width: 200px;';
$data = array(); $data = array();
$data[0] = '<b>' . __('User ID') . '</b>'; $data[0] = '<b>' . __('User ID') . '</b>';
@ -443,7 +444,7 @@ $select_out = html_print_select ($autorefresh_list_out, 'autorefresh_list_out[]'
$arrows = " "; $arrows = " ";
$select_in = html_print_select ($autorefresh_list, 'autorefresh_list[]', '', '', '', '', true, true, true, '', false, 'width:200px'); $select_in = html_print_select ($autorefresh_list, 'autorefresh_list[]', '', '', '', '', true, true, true, '', false, 'width:200px');
$table_ichanges = '<table> $table_ichanges = '<table style="position:relative;left:160px;">
<tr> <tr>
<td>' . __('Full list of pages') . '</td> <td>' . __('Full list of pages') . '</td>
<td></td> <td></td>