2010-10-21 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_config.php: added check tconfig parameter
	"can_block_policies" in functions.
	
	Pending task: #3080762
	
	* operation/agentes/ver_agente.php: added hook enterprise the tab policy.
	
	Pending task: #3080762

	* include/functions_ui.php, operation/agentes/estado_monitores.php: cleaned
	source code style.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3442 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-10-21 15:06:53 +00:00
parent 5700244ff3
commit 1fbffe56b5
5 changed files with 34 additions and 4 deletions

View File

@ -1,3 +1,17 @@
2010-10-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php: added check tconfig parameter
"can_block_policies" in functions.
Pending task: #3080762
* operation/agentes/ver_agente.php: added hook enterprise the tab policy.
Pending task: #3080762
* include/functions_ui.php, operation/agentes/estado_monitores.php: cleaned
source code style.
2010-10-20 Sergio Martin <sergio.martin@artica.es>
* godmode/servers/manage_export_form.php

View File

@ -219,6 +219,8 @@ function update_config () {
update_config_value ('sound_alert', get_parameter('sound_alert', $config['sound_alert']));
update_config_value ('sound_critical', get_parameter('sound_critical', $config['sound_critical']));
update_config_value ('sound_warning', get_parameter('sound_warning', $config['sound_warning']));
update_config_value ('can_block_policies', get_parameter('can_block_policies', $config['can_block_policies']));
}
/**
@ -563,6 +565,10 @@ function process_config () {
if (!isset ($config['autoupdate'])) {
update_config_value ( 'autoupdate', 0);
}
if (!isset ($config['can_block_policies'])) {
update_config_value ( 'can_block_policies', 0);
}
/* Finally, check if any value was overwritten in a form */
update_config ();

View File

@ -492,7 +492,7 @@ function format_alert_row ($alert, $compound = false, $agent = true, $url = '')
$actions = get_alert_agent_module_actions ($alert['id'], false, $compound);
if (!empty($actions)){
if (!empty($actions)) {
$actionText = '<ul class="action_list">';
foreach ($actions as $action) {
$actionText .= '<li><div><span class="action_name">' . $action['name'];

View File

@ -303,7 +303,8 @@ foreach ($modules as $module) {
case 60: $salida = "FATAL"; $style="font-weight:bold; color:red;"; break;
}
$salida = "<span style='$style'>$salida</span>";
} else {
}
else {
if (is_numeric($module["datos"])){
$salida = format_numeric($module["datos"]);
}

View File

@ -382,7 +382,8 @@ $slatab['text']= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agent
if ($tab == 'sla') {
$slatab['active'] = true;
} else {
}
else {
$slatab['active'] = false;
}
@ -397,6 +398,11 @@ $collectiontab = enterprise_hook('collection_tab');
if ($collectiontab == -1)
$collectiontab = "";
/* Policy */
$policyTab = enterprise_hook('policy_tab');
if ($policyTab == -1)
$policyTab = "";
/* Group tab */
@ -444,7 +450,7 @@ else {
$onheader = array('manage' => $managetab, 'separator' => "", 'main' => $maintab,
'data' => $datatab, 'alert' => $alerttab, 'sla' => $slatab,
'inventory' => $inventorytab, 'collection' => $collectiontab,
'group' => $grouptab, 'gis' => $gistab, 'custom' => $custom_fields, 'graphs' => $graphs);
'group' => $grouptab, 'gis' => $gistab, 'custom' => $custom_fields, 'graphs' => $graphs, 'policy' => $policyTab);
print_page_header (__('Agent').'&nbsp;-&nbsp;'.mb_substr(get_agent_name($id_agente),0,25), $icon, false, "", false, $onheader);
@ -483,6 +489,9 @@ switch ($tab) {
case "collection":
enterprise_include ('operation/agentes/collection_view.php');
break;
case 'policy':
enterprise_include ('operation/agentes/policy_view.php');
break;
case "graphs";
require("operation/agentes/graphs.php");
break;