2014-03-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php, godmode/alerts/alert_list.list.php, godmode/agentes/agent_manager.php, godmode/agentes/configurar_agente.php, godmode/agentes/modificar_agente.php, include/functions_reporting.php, operation/agentes/estado_agente.php, images/remote_configuration.png: added a tab for enterprise remote configuration. Incident: #311 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9619 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
5fe4fbf696
commit
0b7a657d56
|
@ -1,3 +1,17 @@
|
||||||
|
2014-03-20 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* godmode/snmpconsole/snmp_alert.php,
|
||||||
|
godmode/alerts/alert_list.list.php,
|
||||||
|
godmode/agentes/agent_manager.php,
|
||||||
|
godmode/agentes/configurar_agente.php,
|
||||||
|
godmode/agentes/modificar_agente.php,
|
||||||
|
include/functions_reporting.php,
|
||||||
|
operation/agentes/estado_agente.php,
|
||||||
|
images/remote_configuration.png: added a tab for enterprise remote
|
||||||
|
configuration.
|
||||||
|
|
||||||
|
Incident: #311
|
||||||
|
|
||||||
2014-03-19 Alejandro Gallardo <alejandro.gallardo@artica.es>
|
2014-03-19 Alejandro Gallardo <alejandro.gallardo@artica.es>
|
||||||
|
|
||||||
* pandoradb_data.sql,
|
* pandoradb_data.sql,
|
||||||
|
|
|
@ -128,13 +128,6 @@ if (!$new_agent) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$disk_conf = (bool) get_parameter ('disk_conf');
|
|
||||||
|
|
||||||
if ($disk_conf) {
|
|
||||||
require ("agent_disk_conf_editor.php");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$disk_conf_delete = (bool) get_parameter ('disk_conf_delete');
|
$disk_conf_delete = (bool) get_parameter ('disk_conf_delete');
|
||||||
// Agent remote configuration DELETE
|
// Agent remote configuration DELETE
|
||||||
if ($disk_conf_delete) {
|
if ($disk_conf_delete) {
|
||||||
|
@ -174,11 +167,18 @@ if (!$new_agent) {
|
||||||
$agent_name = io_safe_output($agent_name);
|
$agent_name = io_safe_output($agent_name);
|
||||||
$agent_md5 = md5 ($agent_name, false);
|
$agent_md5 = md5 ($agent_name, false);
|
||||||
|
|
||||||
$table->data[0][1] .= ' <a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente='.$id_agente.'&disk_conf='.$agent_md5.'">';
|
$table->data[0][1] .= ' ' .
|
||||||
|
'<a href="index.php?' .
|
||||||
|
'sec=gagente&' .
|
||||||
|
'sec2=godmode/agentes/configurar_agente&' .
|
||||||
|
'tab=remote_configuration&' .
|
||||||
|
'id_agente=' . $id_agente . '&' .
|
||||||
|
'disk_conf=' . $agent_md5 . '">';
|
||||||
$table->data[0][1] .= html_print_image(
|
$table->data[0][1] .= html_print_image(
|
||||||
"images/application_edit.png",
|
"images/application_edit.png",
|
||||||
true,
|
true,
|
||||||
array ("border" => 0, "title" => __('This agent can be remotely configured')));
|
array("border" => 0,
|
||||||
|
"title" => __('This agent can be remotely configured')));
|
||||||
$table->data[0][1] .= '</a>' .
|
$table->data[0][1] .= '</a>' .
|
||||||
ui_print_help_tip (
|
ui_print_help_tip (
|
||||||
__('You can remotely edit this agent configuration'), true);
|
__('You can remotely edit this agent configuration'), true);
|
||||||
|
@ -286,7 +286,12 @@ if (!$new_agent) {
|
||||||
if (file_exists ($filename['md5'])) {
|
if (file_exists ($filename['md5'])) {
|
||||||
$table->data[3][1] = date ("F d Y H:i:s", fileatime ($filename['md5']));
|
$table->data[3][1] = date ("F d Y H:i:s", fileatime ($filename['md5']));
|
||||||
// Delete remote configuration
|
// Delete remote configuration
|
||||||
$table->data[3][1] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&disk_conf_delete=1&id_agente='.$id_agente.'">';
|
$table->data[3][1] .= '<a href="index.php?' .
|
||||||
|
'sec=gagente&' .
|
||||||
|
'sec2=godmode/agentes/configurar_agente&' .
|
||||||
|
'tab=main&' .
|
||||||
|
'disk_conf_delete=1&' .
|
||||||
|
'id_agente=' . $id_agente . '">';
|
||||||
$table->data[3][1] .= html_print_image(
|
$table->data[3][1] .= html_print_image(
|
||||||
"images/cross.png", true,
|
"images/cross.png", true,
|
||||||
array ('title' => __('Delete remote configuration file'), 'style' => 'vertical-align: middle;')).'</a>';
|
array ('title' => __('Delete remote configuration file'), 'style' => 'vertical-align: middle;')).'</a>';
|
||||||
|
|
|
@ -212,11 +212,16 @@ if ($create_agent) {
|
||||||
|
|
||||||
$agent_created_ok = true;
|
$agent_created_ok = true;
|
||||||
|
|
||||||
$info = 'Name: ' . $nombre_agente . ' IP: ' . $direccion_agente .
|
$info = 'Name: ' . $nombre_agente .
|
||||||
' Group: ' . $grupo . ' Interval: ' . $intervalo .
|
' IP: ' . $direccion_agente .
|
||||||
' Comments: ' . $comentarios . ' Mode: ' . $modo .
|
' Group: ' . $grupo .
|
||||||
' ID_parent: ' . $id_parent . ' Server: ' . $server_name .
|
' Interval: ' . $intervalo .
|
||||||
' ID os: ' . $id_os . ' Disabled: ' . $disabled .
|
' Comments: ' . $comentarios .
|
||||||
|
' Mode: ' . $modo .
|
||||||
|
' ID_parent: ' . $id_parent .
|
||||||
|
' Server: ' . $server_name .
|
||||||
|
' ID os: ' . $id_os .
|
||||||
|
' Disabled: ' . $disabled .
|
||||||
' Custom ID: ' . $custom_id .
|
' Custom ID: ' . $custom_id .
|
||||||
' Cascade protection: ' . $cascade_protection .
|
' Cascade protection: ' . $cascade_protection .
|
||||||
' Icon path: ' . $icon_path .
|
' Icon path: ' . $icon_path .
|
||||||
|
@ -237,7 +242,6 @@ if ($create_agent) {
|
||||||
// Show tabs
|
// Show tabs
|
||||||
$img_style = array ("class" => "top", "width" => 16);
|
$img_style = array ("class" => "top", "width" => 16);
|
||||||
|
|
||||||
// TODO: Change to use ui_print_page_header
|
|
||||||
if ($id_agente) {
|
if ($id_agente) {
|
||||||
|
|
||||||
/* View tab */
|
/* View tab */
|
||||||
|
@ -299,7 +303,8 @@ if ($id_agente) {
|
||||||
$inventorytab = "";
|
$inventorytab = "";
|
||||||
|
|
||||||
|
|
||||||
$has_remote_conf = enterprise_hook('config_agents_has_remote_configuration',array($id_agente));
|
$has_remote_conf = enterprise_hook('config_agents_has_remote_configuration',
|
||||||
|
array($id_agente));
|
||||||
|
|
||||||
if ($has_remote_conf === true) {
|
if ($has_remote_conf === true) {
|
||||||
/* Plugins */
|
/* Plugins */
|
||||||
|
@ -365,7 +370,44 @@ if ($id_agente) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_acl ($config["id_user"], $group, "AW", $id_agente)) {
|
if (check_acl ($config["id_user"], $group, "AW", $id_agente)) {
|
||||||
|
if ($has_remote_conf) {
|
||||||
|
$agent_name = agents_get_name($id_agente);
|
||||||
|
$agent_name = io_safe_output($agent_name);
|
||||||
|
$agent_md5 = md5 ($agent_name, false);
|
||||||
|
|
||||||
|
$remote_configuration_tab['text'] =
|
||||||
|
'<a href="index.php?' .
|
||||||
|
'sec=gagente&' .
|
||||||
|
'sec2=godmode/agentes/configurar_agente&' .
|
||||||
|
'tab=remote_configuration&' .
|
||||||
|
'id_agente=' . $id_agente . '&' .
|
||||||
|
'disk_conf=' . $agent_md5 . '">'
|
||||||
|
. html_print_image ("images/book_edit.png", true,
|
||||||
|
array("title" =>__('Remote configuration')))
|
||||||
|
. '</a>';
|
||||||
|
if ($tab == 'remote_configuration')
|
||||||
|
$remote_configuration_tab['active'] = true;
|
||||||
|
else
|
||||||
|
$remote_configuration_tab['active'] = false;
|
||||||
|
|
||||||
|
|
||||||
$onheader = array('view' => $viewtab,
|
$onheader = array('view' => $viewtab,
|
||||||
|
'separator' => "",
|
||||||
|
'main' => $maintab,
|
||||||
|
'remote_configuration' => $remote_configuration_tab,
|
||||||
|
'module' => $moduletab,
|
||||||
|
'alert' => $alerttab,
|
||||||
|
'template' => $templatetab,
|
||||||
|
'inventory' => $inventorytab,
|
||||||
|
'pluginstab' => $pluginstab,
|
||||||
|
'collection'=> $collectiontab,
|
||||||
|
'group' => $grouptab,
|
||||||
|
'gis' => $gistab,
|
||||||
|
'agent_wizard' => $agent_wizard);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$onheader = array('view' => $viewtab,
|
||||||
|
'separator' => "",
|
||||||
'main' => $maintab,
|
'main' => $maintab,
|
||||||
'module' => $moduletab,
|
'module' => $moduletab,
|
||||||
'alert' => $alerttab,
|
'alert' => $alerttab,
|
||||||
|
@ -376,6 +418,7 @@ if ($id_agente) {
|
||||||
'group' => $grouptab,
|
'group' => $grouptab,
|
||||||
'gis' => $gistab,
|
'gis' => $gistab,
|
||||||
'agent_wizard' => $agent_wizard);
|
'agent_wizard' => $agent_wizard);
|
||||||
|
}
|
||||||
|
|
||||||
// Only if the agent has incidents associated show incidents tab
|
// Only if the agent has incidents associated show incidents tab
|
||||||
if ($total_incidents) {
|
if ($total_incidents) {
|
||||||
|
@ -449,6 +492,9 @@ if ($id_agente) {
|
||||||
case "incident":
|
case "incident":
|
||||||
$tab_description = '- ' . __('Incidents');
|
$tab_description = '- ' . __('Incidents');
|
||||||
break;
|
break;
|
||||||
|
case "remote_configuration":
|
||||||
|
$tab_description = '- ' . __('Remote configuration');
|
||||||
|
break;
|
||||||
case "agent_wizard":
|
case "agent_wizard":
|
||||||
switch(get_parameter('wizard_section')) {
|
switch(get_parameter('wizard_section')) {
|
||||||
case 'snmp_explorer':
|
case 'snmp_explorer':
|
||||||
|
@ -475,12 +521,14 @@ if ($id_agente) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_print_page_header (agents_get_name ($id_agente) .
|
ui_print_page_header (
|
||||||
' ' . $tab_description, "images/setup.png", false, $help_header , true, $onheader);
|
agents_get_name ($id_agente) . ' ' . $tab_description,
|
||||||
|
"images/setup.png", false, $help_header , true, $onheader);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Create agent
|
// Create agent
|
||||||
ui_print_page_header (__('Agent manager'), "images/bricks.png", false, "create_agent", true);
|
ui_print_page_header (__('Agent manager'), "images/bricks.png",
|
||||||
|
false, "create_agent", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$delete_conf_file = (bool) get_parameter('delete_conf_file');
|
$delete_conf_file = (bool) get_parameter('delete_conf_file');
|
||||||
|
@ -594,7 +642,8 @@ if ($update_agent) { // if modified some agent paramenter
|
||||||
|
|
||||||
|
|
||||||
foreach ($field_values as $key => $value) {
|
foreach ($field_values as $key => $value) {
|
||||||
$old_value = db_get_all_rows_filter('tagent_custom_data', array('id_agent' => $id_agente, 'id_field' => $key));
|
$old_value = db_get_all_rows_filter('tagent_custom_data',
|
||||||
|
array('id_agent' => $id_agente, 'id_field' => $key));
|
||||||
|
|
||||||
if ($old_value === false) {
|
if ($old_value === false) {
|
||||||
// Create custom field if not exist
|
// Create custom field if not exist
|
||||||
|
@ -741,7 +790,7 @@ if ($update_module || $create_module) {
|
||||||
// where are very big and PHP uses scientific notation, p.e:
|
// where are very big and PHP uses scientific notation, p.e:
|
||||||
// 1.23E-10 is 0.000000000123
|
// 1.23E-10 is 0.000000000123
|
||||||
|
|
||||||
$post_process = get_parameter ('post_process', 0);
|
$post_process = (string) get_parameter ('post_process', 0.0);
|
||||||
$prediction_module = 0;
|
$prediction_module = 0;
|
||||||
$max_timeout = (int) get_parameter ('max_timeout');
|
$max_timeout = (int) get_parameter ('max_timeout');
|
||||||
$max_retries = (int) get_parameter ('max_retries');
|
$max_retries = (int) get_parameter ('max_retries');
|
||||||
|
@ -790,15 +839,15 @@ if ($update_module || $create_module) {
|
||||||
if (!empty($macros)) {
|
if (!empty($macros)) {
|
||||||
$macros = json_decode(base64_decode($macros), true);
|
$macros = json_decode(base64_decode($macros), true);
|
||||||
|
|
||||||
foreach ($macros as $k => $m) {
|
foreach($macros as $k => $m) {
|
||||||
$macros[$k]['value'] = get_parameter($m['macro'], '');
|
$macros[$k]['value'] = get_parameter($m['macro'], '');
|
||||||
}
|
}
|
||||||
|
|
||||||
$macros = json_encode($macros);
|
$macros = json_encode($macros);
|
||||||
|
|
||||||
$conf_array = explode("\n", $configuration_data);
|
$conf_array = explode("\n",$configuration_data);
|
||||||
foreach ($conf_array as $line) {
|
foreach($conf_array as $line) {
|
||||||
if (preg_match("/^module_name\s*(.*)/", $line, $match)) {
|
if(preg_match("/^module_name\s*(.*)/", $line, $match)) {
|
||||||
$new_configuration_data .= "module_name $name\n";
|
$new_configuration_data .= "module_name $name\n";
|
||||||
}
|
}
|
||||||
// We delete from conf all the module macros starting with _field
|
// We delete from conf all the module macros starting with _field
|
||||||
|
@ -822,7 +871,8 @@ if ($update_module || $create_module) {
|
||||||
|
|
||||||
enterprise_hook ('get_service_synthetic_parameters');
|
enterprise_hook ('get_service_synthetic_parameters');
|
||||||
|
|
||||||
$agent_name = (string) get_parameter('agent_name',agents_get_name ($id_agente));
|
$agent_name = (string) get_parameter('agent_name',
|
||||||
|
agents_get_name($id_agente));
|
||||||
|
|
||||||
$snmp_community = (string) get_parameter ('snmp_community');
|
$snmp_community = (string) get_parameter ('snmp_community');
|
||||||
$snmp_oid = (string) get_parameter ('snmp_oid');
|
$snmp_oid = (string) get_parameter ('snmp_oid');
|
||||||
|
@ -1413,6 +1463,9 @@ switch ($tab) {
|
||||||
case "incident":
|
case "incident":
|
||||||
require("agent_incidents.php");
|
require("agent_incidents.php");
|
||||||
break;
|
break;
|
||||||
|
case "remote_configuration":
|
||||||
|
enterprise_include("godmode/agentes/agent_disk_conf_editor.php");
|
||||||
|
break;
|
||||||
case "extension":
|
case "extension":
|
||||||
$found = false;
|
$found = false;
|
||||||
foreach($config['extensions'] as $extension) {
|
foreach($config['extensions'] as $extension) {
|
||||||
|
@ -1470,34 +1523,34 @@ echo '</ul>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var wizard_tab_showed = 0;
|
/* <![CDATA[ */
|
||||||
|
var wizard_tab_showed = 0;
|
||||||
|
|
||||||
/* <![CDATA[ */
|
$(document).ready (function () {
|
||||||
$(document).ready (function () {
|
|
||||||
// Control the tab and subtab hover. When mouse leave one,
|
// Control the tab and subtab hover. When mouse leave one,
|
||||||
// check if is hover the other before hide the subtab
|
// check if is hover the other before hide the subtab
|
||||||
$('.agent_wizard_tab').hover(agent_wizard_tab_show, agent_wizard_tab_hide);
|
$('.agent_wizard_tab').hover(agent_wizard_tab_show, agent_wizard_tab_hide);
|
||||||
|
|
||||||
$('#agent_wizard_subtabs').hover(agent_wizard_tab_show, agent_wizard_tab_hide);
|
$('#agent_wizard_subtabs').hover(agent_wizard_tab_show, agent_wizard_tab_hide);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set the position and width of the subtab
|
// Set the position and width of the subtab
|
||||||
function agent_wizard_tab_setup() {
|
function agent_wizard_tab_setup() {
|
||||||
$('#agent_wizard_subtabs').css('left', $('.agent_wizard_tab').offset().left)
|
$('#agent_wizard_subtabs').css('left', $('.agent_wizard_tab').offset().left)
|
||||||
$('#agent_wizard_subtabs').css('top', $('.agent_wizard_tab').offset().top + $('.agent_wizard_tab').height() + 4)
|
$('#agent_wizard_subtabs').css('top', $('.agent_wizard_tab').offset().top + $('.agent_wizard_tab').height() + 4)
|
||||||
$('#agent_wizard_subtabs').css('width', $('.agent_wizard_tab').width() + 6)
|
$('#agent_wizard_subtabs').css('width', $('.agent_wizard_tab').width() + 6)
|
||||||
}
|
}
|
||||||
|
|
||||||
function agent_wizard_tab_show() {
|
function agent_wizard_tab_show() {
|
||||||
agent_wizard_tab_setup();
|
agent_wizard_tab_setup();
|
||||||
wizard_tab_showed = wizard_tab_showed + 1;
|
wizard_tab_showed = wizard_tab_showed + 1;
|
||||||
|
|
||||||
if(wizard_tab_showed == 1) {
|
if(wizard_tab_showed == 1) {
|
||||||
$('#agent_wizard_subtabs').show("fast");
|
$('#agent_wizard_subtabs').show("fast");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function agent_wizard_tab_hide() {
|
function agent_wizard_tab_hide() {
|
||||||
wizard_tab_showed = wizard_tab_showed - 1;
|
wizard_tab_showed = wizard_tab_showed - 1;
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
@ -1505,11 +1558,11 @@ function agent_wizard_tab_hide() {
|
||||||
$('#agent_wizard_subtabs').hide("fast");
|
$('#agent_wizard_subtabs').hide("fast");
|
||||||
}
|
}
|
||||||
},500);
|
},500);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(window).resize(function() {
|
$(window).resize(function() {
|
||||||
agent_wizard_tab_setup();
|
agent_wizard_tab_setup();
|
||||||
});
|
});
|
||||||
|
|
||||||
/* ]]> */
|
/* ]]> */
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -483,7 +483,11 @@ if ($agents !== false) {
|
||||||
if (enterprise_installed()) {
|
if (enterprise_installed()) {
|
||||||
enterprise_include_once('include/functions_config_agents.php');
|
enterprise_include_once('include/functions_config_agents.php');
|
||||||
if (config_agents_has_remote_configuration($agent["id_agente"])) {
|
if (config_agents_has_remote_configuration($agent["id_agente"])) {
|
||||||
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente=".$agent["id_agente"]."&disk_conf=1'>";
|
echo "<a href='index.php?" .
|
||||||
|
"sec=gagente&" .
|
||||||
|
"sec2=godmode/agentes/configurar_agente&" .
|
||||||
|
"tab=remote_configuration&" .
|
||||||
|
"id_agente=" . $agent["id_agente"] . "&disk_conf=1'>";
|
||||||
echo html_print_image("images/application_edit.png", true, array("align" => 'middle', "title" => __('Edit remote config')));
|
echo html_print_image("images/application_edit.png", true, array("align" => 'middle', "title" => __('Edit remote config')));
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,18 +41,18 @@ else {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Table for filter controls
|
// Table for filter controls
|
||||||
$form_filter = '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_list&refr=' . ((int)get_parameter('refr', 0)) . '&pure='.$config["pure"].'">';
|
$form_filter = '<form method="post" action="index.php?sec=' . $sec . '&sec2=godmode/alerts/alert_list&refr=' . ((int)get_parameter('refr', 0)) . '&pure='.$config["pure"].'">';
|
||||||
$form_filter .= "<input type='hidden' name='search' value='1' />\n";
|
$form_filter .= "<input type='hidden' name='search' value='1' />\n";
|
||||||
$form_filter .= '<table style="width: 98%;" cellpadding="4" cellspacing="4" class="databox">'."\n";
|
$form_filter .= '<table style="width: 98%;" cellpadding="4" cellspacing="4" class="databox">'."\n";
|
||||||
$form_filter .= "<tr>\n";
|
$form_filter .= "<tr>\n";
|
||||||
$form_filter .= "<td>".__('Template name')."</td><td>";
|
$form_filter .= "<td>" . __('Template name') . "</td><td>";
|
||||||
$form_filter .= html_print_input_text ('template_name', $templateName, '', 12, 255, true);
|
$form_filter .= html_print_input_text ('template_name', $templateName, '', 12, 255, true);
|
||||||
$form_filter .= "</td>\n";
|
$form_filter .= "</td>\n";
|
||||||
$temp = agents_get_agents();
|
$temp = agents_get_agents();
|
||||||
$arrayAgents = array();
|
$arrayAgents = array();
|
||||||
|
|
||||||
# Avoid empty arrays, warning messages are UGLY !
|
# Avoid empty arrays, warning messages are UGLY !
|
||||||
if ($temp){
|
if ($temp) {
|
||||||
foreach ($temp as $agentElement) {
|
foreach ($temp as $agentElement) {
|
||||||
$arrayAgents[$agentElement['id_agente']] = $agentElement['nombre'];
|
$arrayAgents[$agentElement['id_agente']] = $agentElement['nombre'];
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ $form_filter .= "</table>\n";
|
||||||
$form_filter .= "</form>\n";
|
$form_filter .= "</form>\n";
|
||||||
|
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
ui_toggle($form_filter,__('Alert control filter'), __('Toggle filter(s)'));
|
ui_toggle($form_filter, __('Alert control filter'), __('Toggle filter(s)'));
|
||||||
|
|
||||||
$simple_alerts = array();
|
$simple_alerts = array();
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ foreach ($simple_alerts as $alert) {
|
||||||
|
|
||||||
$data[0] = '';
|
$data[0] = '';
|
||||||
|
|
||||||
if(check_acl ($config['id_user'], $agent_group, "AW")) {
|
if (check_acl ($config['id_user'], $agent_group, "AW")) {
|
||||||
$main_tab = 'main';
|
$main_tab = 'main';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -658,11 +658,11 @@ foreach ($simple_alerts as $alert) {
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($data)){
|
if (isset($data)) {
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "<div class='nf'>".__('No alerts defined')."</div>";
|
echo "<div class='nf'>" . __('No alerts defined') . "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create alert button
|
// Create alert button
|
||||||
|
@ -673,7 +673,7 @@ if (isset($dont_display_alert_create_bttn))
|
||||||
$display_create = false;
|
$display_create = false;
|
||||||
|
|
||||||
if ($display_create && check_acl ($config['id_user'], 0, "LW")){
|
if ($display_create && check_acl ($config['id_user'], 0, "LW")){
|
||||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
echo '<div class="action-buttons" style="width: ' . $table->width . '">';
|
||||||
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">';
|
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">';
|
||||||
html_print_submit_button (__('Create'), 'crtbtn', false, 'class="sub next"');
|
html_print_submit_button (__('Create'), 'crtbtn', false, 'class="sub next"');
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -1423,11 +1423,12 @@ function reporting_get_group_stats ($id_group = 0, $access = 'AR') {
|
||||||
$id_group[0] = $my_group;
|
$id_group[0] = $my_group;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($id_group as $group){
|
foreach ($id_group as $group) {
|
||||||
$group_stat = db_get_all_rows_sql ("SELECT *
|
$group_stat = db_get_all_rows_sql ("SELECT *
|
||||||
FROM tgroup_stat, tgrupo
|
FROM tgroup_stat, tgrupo
|
||||||
WHERE tgrupo.id_grupo = tgroup_stat.id_group AND tgroup_stat.id_group = $group
|
WHERE tgrupo.id_grupo = tgroup_stat.id_group AND tgroup_stat.id_group = $group
|
||||||
ORDER BY nombre");
|
ORDER BY nombre");
|
||||||
|
|
||||||
$data["monitor_checks"] += $group_stat[0]["modules"];
|
$data["monitor_checks"] += $group_stat[0]["modules"];
|
||||||
$data["monitor_not_init"] += $group_stat[0]["non-init"];
|
$data["monitor_not_init"] += $group_stat[0]["non-init"];
|
||||||
$data["monitor_unknown"] += $group_stat[0]["unknown"];
|
$data["monitor_unknown"] += $group_stat[0]["unknown"];
|
||||||
|
|
|
@ -493,7 +493,12 @@ foreach ($agents as $agent) {
|
||||||
|
|
||||||
if (enterprise_installed()) {
|
if (enterprise_installed()) {
|
||||||
if (config_agents_has_remote_configuration($agent["id_agente"])) {
|
if (config_agents_has_remote_configuration($agent["id_agente"])) {
|
||||||
$data[9] = "<a href='index.php?sec=estado&sec2=godmode/agentes/configurar_agente&tab=main&id_agente=".$agent["id_agente"]."&disk_conf=1'>".
|
$data[9] = "<a href='index.php?" .
|
||||||
|
"sec=estado&" .
|
||||||
|
"sec2=godmode/agentes/configurar_agente&" .
|
||||||
|
"tab=remote_configuration&" .
|
||||||
|
"id_agente=" . $agent["id_agente"] . "&" .
|
||||||
|
"disk_conf=1'>".
|
||||||
html_print_image("images/application_edit.png", true, array("align" => 'middle', "title" => __('Edit remote config')))."</a>";
|
html_print_image("images/application_edit.png", true, array("align" => 'middle', "title" => __('Edit remote config')))."</a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue