mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'develop' of https://192.168.50.5:8081/artica/pandorafms into develop
This commit is contained in:
commit
99e4acc568
@ -2,11 +2,21 @@
|
||||
|
||||
$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) {
|
||||
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;
|
||||
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)");
|
||||
@ -21,19 +31,28 @@ switch ($tipo) {
|
||||
break;
|
||||
}
|
||||
|
||||
echo "</span></div>";
|
||||
echo "
|
||||
</div>
|
||||
<div class='modalokbutton cerrar'>
|
||||
<span class='modalokbuttontext'>OK</span>
|
||||
</div>
|
||||
|
||||
|
||||
echo "<button id='cerrar' onclick='ocultar();'>OK</button>";
|
||||
<div class='modalgobutton gopandora'>
|
||||
<span class='modalokbuttontext'>Go to Enterprise version</span>
|
||||
</div>
|
||||
";
|
||||
|
||||
?>
|
||||
|
||||
<script>
|
||||
|
||||
function ocultar(){
|
||||
$("#alert_messages" ).dialog('close');
|
||||
$(".cerrar").click(function(){
|
||||
$("#alert_messages").hide();
|
||||
$( "#opacidad" ).remove();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
$(".gopandora").click(function(){
|
||||
window.open('https://pandorafms.com/es/software-de-monitorizacion-pandorafms/','_blank');
|
||||
});
|
||||
|
||||
</script>
|
||||
|
BIN
pandora_console/images/icono_cerrar.png
Normal file
BIN
pandora_console/images/icono_cerrar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 284 B |
BIN
pandora_console/images/icono_popup.png
Normal file
BIN
pandora_console/images/icono_popup.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
BIN
pandora_console/images/logo_citrix.png
Normal file
BIN
pandora_console/images/logo_citrix.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
pandora_console/images/logo_exchange.png
Normal file
BIN
pandora_console/images/logo_exchange.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
BIN
pandora_console/images/logo_oracle.png
Normal file
BIN
pandora_console/images/logo_oracle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
BIN
pandora_console/images/logo_sap.png
Normal file
BIN
pandora_console/images/logo_sap.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
@ -2601,19 +2601,14 @@ function reporting_alert_report_group($report, $content) {
|
||||
$data_row['template'] = db_get_value_filter('name', 'talert_templates',
|
||||
array('id' => $alert['id_alert_template']));
|
||||
|
||||
|
||||
$actions = db_get_all_rows_sql('SELECT name
|
||||
FROM talert_actions
|
||||
WHERE id IN (SELECT id_alert_action
|
||||
FROM talert_template_module_actions
|
||||
WHERE id_alert_template_module = ' . $alert['id_alert_template'] . ')');
|
||||
$actions = alerts_get_alert_agent_module_actions ($alert['id']);
|
||||
|
||||
if (!empty($actions)) {
|
||||
$row = db_get_row_sql('SELECT id_alert_action
|
||||
FROM talert_templates
|
||||
WHERE id IN (SELECT id_alert_template
|
||||
FROM talert_template_modules
|
||||
WHERE id = ' . $alert['id_alert_template'] . ')');
|
||||
WHERE id = ' . $alert['id'] . ')');
|
||||
|
||||
$id_action = 0;
|
||||
if (!empty($row))
|
||||
@ -2622,14 +2617,11 @@ function reporting_alert_report_group($report, $content) {
|
||||
// Prevent from void action
|
||||
if (empty($id_action))
|
||||
$id_action = 0;
|
||||
|
||||
}
|
||||
else {
|
||||
$actions = db_get_all_rows_sql('SELECT name
|
||||
FROM talert_actions
|
||||
WHERE id = ' . $id_action);
|
||||
|
||||
if (empty($actions)) {
|
||||
$actions = array();
|
||||
}
|
||||
}
|
||||
|
||||
$data_row['action'] = array();
|
||||
@ -2643,9 +2635,12 @@ function reporting_alert_report_group($report, $content) {
|
||||
$alert['id_alert_template'],
|
||||
(int) $content['period'],
|
||||
(int) $report["datetime"]);
|
||||
|
||||
if (empty($firedTimes)) {
|
||||
$firedTimes = array();
|
||||
$firedTimes[0]['timestamp'] = '----------------------------';
|
||||
}
|
||||
|
||||
foreach ($firedTimes as $fireTime) {
|
||||
$data_row['fired'][] = $fireTime['timestamp'];
|
||||
}
|
||||
@ -2675,8 +2670,6 @@ function reporting_alert_report_agent($report, $content) {
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
@ -2700,85 +2693,67 @@ function reporting_alert_report_agent($report, $content) {
|
||||
|
||||
$data = array();
|
||||
|
||||
foreach ($alerts as $alert) {
|
||||
$data_row = array();
|
||||
if (is_array($alerts) || is_object($alerts)) {
|
||||
foreach ($alerts as $alert) {
|
||||
$data_row = array();
|
||||
|
||||
$data_row['disabled'] = $alert['disabled'];
|
||||
$data_row['disabled'] = $alert['disabled'];
|
||||
|
||||
$data_row['module'] = db_get_value_filter('nombre', 'tagente_modulo',
|
||||
array('id_agente_modulo' => $alert['id_agent_module']));
|
||||
$data_row['template'] = db_get_value_filter('name', 'talert_templates',
|
||||
array('id' => $alert['id_alert_template']));
|
||||
$data_row['module'] = db_get_value_filter('nombre', 'tagente_modulo',
|
||||
array('id_agente_modulo' => $alert['id_agent_module']));
|
||||
$data_row['template'] = db_get_value_filter('name', 'talert_templates',
|
||||
array('id' => $alert['id_alert_template']));
|
||||
|
||||
$actions = alerts_get_alert_agent_module_actions ($alert['id']);
|
||||
|
||||
if (!empty($actions)) {
|
||||
$row = db_get_row_sql('SELECT id_alert_action
|
||||
FROM talert_templates
|
||||
WHERE id IN (SELECT id_alert_template
|
||||
FROM talert_template_modules
|
||||
WHERE id = ' . $alert['id_alert_template'] . ')');
|
||||
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
case "postgresql":
|
||||
$actions = db_get_all_rows_sql('SELECT name
|
||||
FROM talert_actions
|
||||
WHERE id IN (SELECT id_alert_action
|
||||
FROM talert_template_module_actions
|
||||
WHERE id_alert_template_module = ' . $alert['id_alert_template'] . ');');
|
||||
break;
|
||||
case "oracle":
|
||||
$actions = db_get_all_rows_sql('SELECT name
|
||||
FROM talert_actions
|
||||
WHERE id IN (SELECT id_alert_action
|
||||
FROM talert_template_module_actions
|
||||
WHERE id_alert_template_module = ' . $alert['id_alert_template'] . ')');
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (!empty($actions)) {
|
||||
$row = db_get_row_sql('SELECT id_alert_action
|
||||
FROM talert_templates
|
||||
WHERE id IN (SELECT id_alert_template
|
||||
FROM talert_template_modules
|
||||
WHERE id = ' . $alert['id_alert_template'] . ')');
|
||||
|
||||
$id_action = 0;
|
||||
if (!empty($row))
|
||||
$id_action = $row['id_alert_action'];
|
||||
|
||||
// Prevent from void action
|
||||
if (empty($id_action))
|
||||
$id_action = 0;
|
||||
if (!empty($row))
|
||||
$id_action = $row['id_alert_action'];
|
||||
|
||||
$actions = db_get_all_rows_sql('SELECT name
|
||||
FROM talert_actions
|
||||
WHERE id = ' . $id_action);
|
||||
// Prevent from void action
|
||||
if (empty($id_action))
|
||||
$id_action = 0;
|
||||
}
|
||||
else {
|
||||
$actions = db_get_all_rows_sql('SELECT name
|
||||
FROM talert_actions
|
||||
WHERE id = ' . $id_action);
|
||||
}
|
||||
|
||||
if (empty($actions)) {
|
||||
$actions = array();
|
||||
}
|
||||
|
||||
$data_row['action'] = array();
|
||||
foreach ($actions as $action) {
|
||||
$data_row['action'][] = $action['name'];
|
||||
}
|
||||
|
||||
$data_row['fired'] = array();
|
||||
$firedTimes = get_module_alert_fired(
|
||||
$alert['id_agent_module'],
|
||||
$alert['id_alert_template'],
|
||||
(int) $content['period'],
|
||||
(int) $report["datetime"]);
|
||||
|
||||
if (empty($firedTimes)) {
|
||||
$firedTimes = array();
|
||||
$firedTimes[0]['timestamp'] = '----------------------------';
|
||||
}
|
||||
|
||||
foreach ($firedTimes as $fireTime) {
|
||||
$data_row['fired'][] = $fireTime['timestamp'];
|
||||
}
|
||||
|
||||
$data[] = $data_row;
|
||||
}
|
||||
|
||||
$data_row['action'] = array();
|
||||
foreach ($actions as $action) {
|
||||
$data_row['action'][] = $action['name'];
|
||||
}
|
||||
|
||||
$data_row['fired'] = array();
|
||||
$firedTimes = get_module_alert_fired(
|
||||
$alert['id_agent_module'],
|
||||
$alert['id_alert_template'],
|
||||
(int) $content['period'],
|
||||
(int) $report["datetime"]);
|
||||
|
||||
|
||||
|
||||
if (empty($firedTimes)) {
|
||||
$firedTimes = array();
|
||||
}
|
||||
foreach ($firedTimes as $fireTime) {
|
||||
$data_row['fired'][] = $fireTime['timestamp'];
|
||||
}
|
||||
|
||||
$data[] = $data_row;
|
||||
}
|
||||
|
||||
$return['data'] = $data;
|
||||
@ -2845,7 +2820,9 @@ function reporting_alert_report_module($report, $content) {
|
||||
}
|
||||
|
||||
$data = array();
|
||||
|
||||
foreach ($alerts as $alert) {
|
||||
|
||||
$data_row = array();
|
||||
|
||||
$data_row['disabled'] = $alert['disabled'];
|
||||
@ -2853,25 +2830,7 @@ function reporting_alert_report_module($report, $content) {
|
||||
$data_row['template'] = db_get_value_filter('name',
|
||||
'talert_templates', array('id' => $alert['id_alert_template']));
|
||||
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
case "postgresql":
|
||||
$actions = db_get_all_rows_sql('SELECT name
|
||||
FROM talert_actions
|
||||
WHERE id IN (SELECT id_alert_action
|
||||
FROM talert_template_module_actions
|
||||
WHERE id_alert_template_module = ' . $alert['id_alert_template_module'] . ');');
|
||||
break;
|
||||
case "oracle":
|
||||
$actions = db_get_all_rows_sql('SELECT name
|
||||
FROM talert_actions
|
||||
WHERE id IN (SELECT id_alert_action
|
||||
FROM talert_template_module_actions
|
||||
WHERE id_alert_template_module = ' . $alert['id_alert_template_module'] . ')');
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$actions = alerts_get_alert_agent_module_actions ($alert['id_alert_template_module']);
|
||||
|
||||
if (!empty($actions)) {
|
||||
$row = db_get_row_sql('SELECT id_alert_action
|
||||
@ -2881,20 +2840,18 @@ function reporting_alert_report_module($report, $content) {
|
||||
WHERE id = ' . $alert['id_alert_template_module'] . ')');
|
||||
|
||||
$id_action = 0;
|
||||
|
||||
if (!empty($row))
|
||||
$id_action = $row['id_alert_action'];
|
||||
|
||||
// Prevent from void action
|
||||
if (empty($id_action))
|
||||
$id_action = 0;
|
||||
|
||||
}
|
||||
else {
|
||||
$actions = db_get_all_rows_sql('SELECT name
|
||||
FROM talert_actions
|
||||
WHERE id = ' . $id_action);
|
||||
|
||||
if (empty($actions)) {
|
||||
$actions = array();
|
||||
}
|
||||
}
|
||||
|
||||
$data_row['action'] = array();
|
||||
@ -2909,11 +2866,11 @@ function reporting_alert_report_module($report, $content) {
|
||||
(int) $content['period'],
|
||||
(int) $report["datetime"]);
|
||||
|
||||
|
||||
|
||||
if (empty($firedTimes)) {
|
||||
$firedTimes = array();
|
||||
$firedTimes[0]['timestamp'] = '----------------------------';
|
||||
}
|
||||
|
||||
foreach ($firedTimes as $fireTime) {
|
||||
$data_row['fired'][] = $fireTime['timestamp'];
|
||||
}
|
||||
|
@ -59,33 +59,24 @@ $(document).ready (function () {
|
||||
});
|
||||
|
||||
$("a.show_systemalert_dialog").click (function () {
|
||||
jQuery.get ("ajax.php",
|
||||
$('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)
|
||||
.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"
|
||||
);
|
||||
function (data, status) {
|
||||
$("#alert_messages").hide ()
|
||||
.empty ()
|
||||
.append (data)
|
||||
.show ();
|
||||
},
|
||||
"html"
|
||||
);
|
||||
return false;
|
||||
});
|
||||
|
||||
// Creacion de ventana modal y botones
|
||||
|
||||
$("#publienterprise").click (function () {
|
||||
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
|
||||
jQuery.get ("ajax.php",
|
||||
{
|
||||
"page": "general/alert_enterprise",
|
||||
@ -94,24 +85,18 @@ $(document).ready (function () {
|
||||
$("#alert_messages").hide ()
|
||||
.empty ()
|
||||
.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 ();
|
||||
},
|
||||
"html"
|
||||
);
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
@ -3450,3 +3450,61 @@ div.simple_value > a > span.text > p {
|
||||
.unicode{
|
||||
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;
|
||||
}
|
||||
|
@ -2,6 +2,23 @@
|
||||
|
||||
// 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>
|
||||
|
@ -201,8 +201,9 @@ if (defined('METACONSOLE')) {
|
||||
$table->head_colspan[0] = 5;
|
||||
$table->headstyle[0] = 'text-align: center';
|
||||
}
|
||||
$table->style[0] = 'width: 500px;';
|
||||
$table->style[2] = 'width: 200px;';
|
||||
$table->style[0] = 'min-width: 500px;width: 500px;';
|
||||
$table->style[1] = 'min-width: 500px;width: 500px;';
|
||||
$table->style[2] = 'min-width: 200px;width: 200px;';
|
||||
|
||||
$data = array();
|
||||
$data[0] = '<b>' . __('User ID') . '</b>';
|
||||
@ -443,7 +444,7 @@ $select_out = html_print_select ($autorefresh_list_out, 'autorefresh_list_out[]'
|
||||
$arrows = " ";
|
||||
$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>
|
||||
<td>' . __('Full list of pages') . '</td>
|
||||
<td></td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user