2013-02-14 Miguel de Dios <miguel.dedios@artica.es>

* godmode/massive/massive_operations.php,
	godmode/massive/massive_enable_disable_alerts.php,
	godmode/massive/massive_standby_alerts.php,
	godmode/tag/edit_tag.php, include/functions_graph.php,
	include/functions_io.php, include/functions_ui.php: cleaned source
	code style.
	
	* include/functions_modules.php: erased deprecated function
	"modules_give_modulecategory_name".




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7648 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-02-14 10:05:16 +00:00
parent 9fc6fd6bcd
commit eb61caadac
9 changed files with 77 additions and 84 deletions

View File

@ -1,3 +1,15 @@
2013-02-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/massive/massive_operations.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_standby_alerts.php,
godmode/tag/edit_tag.php, include/functions_graph.php,
include/functions_io.php, include/functions_ui.php: cleaned source
code style.
* include/functions_modules.php: erased deprecated function
"modules_give_modulecategory_name".
2013-02-13 Miguel de Dios <miguel.dedios@artica.es> 2013-02-13 Miguel de Dios <miguel.dedios@artica.es>
* extensions/module_groups.php, * extensions/module_groups.php,

View File

@ -1223,29 +1223,33 @@ function graphic_combined_module ($module_list, $weight_list, $period, $width, $
switch ($stacked) { switch ($stacked) {
case GRAPH_AREA: case GRAPH_AREA:
return area_graph($flash_charts, $graph_values, $width, $height, return area_graph($flash_charts, $graph_values, $width,
$color, $module_name_list, $long_index, ui_get_full_url("images/image_problem.opaque.png"), $height, $color, $module_name_list, $long_index,
"", "", $homeurl, $water_mark, ui_get_full_url("images/image_problem.opaque.png"), "",
$config['fontpath'], $fixed_font_size, "", $ttl); "", $homeurl, $water_mark, $config['fontpath'],
$fixed_font_size, "", $ttl);
break; break;
default: default:
case GRAPH_STACKED_AREA: case GRAPH_STACKED_AREA:
return stacked_area_graph($flash_charts, $graph_values, $width, $height, return stacked_area_graph($flash_charts, $graph_values,
$color, $module_name_list, $long_index, ui_get_full_url("images/image_problem.opaque.png"), $width, $height, $color, $module_name_list, $long_index,
"", "", $water_mark, ui_get_full_url("images/image_problem.opaque.png"), "",
$config['fontpath'], $fixed_font_size, "", $ttl, $homeurl); "", $water_mark, $config['fontpath'], $fixed_font_size,
"", $ttl, $homeurl);
break; break;
case GRAPH_LINE: case GRAPH_LINE:
return line_graph($flash_charts, $graph_values, $width, $height, return line_graph($flash_charts, $graph_values, $width,
$color, $module_name_list, $long_index, ui_get_full_url("images/image_problem.opaque.png"), $height, $color, $module_name_list, $long_index,
"", "", $water_mark, ui_get_full_url("images/image_problem.opaque.png"), "",
$config['fontpath'], $fixed_font_size, "", $ttl, $homeurl); "", $water_mark, $config['fontpath'], $fixed_font_size,
"", $ttl, $homeurl);
break; break;
case GRAPH_STACKED_LINE: case GRAPH_STACKED_LINE:
return stacked_line_graph($flash_charts, $graph_values, $width, $height, return stacked_line_graph($flash_charts, $graph_values,
$color, $module_name_list, $long_index, ui_get_full_url("images/image_problem.opaque.png"), $width, $height, $color, $module_name_list, $long_index,
"", "", $water_mark, ui_get_full_url("images/image_problem.opaque.png"), "",
$config['fontpath'], $fixed_font_size, "", $ttl, $homeurl); "", $water_mark, $config['fontpath'], $fixed_font_size,
"", $ttl, $homeurl);
break; break;
} }
} }

View File

@ -1016,6 +1016,7 @@ function modules_get_monitors_in_agent ($id_agent) {
*/ */
function modules_get_monitors_down ($monitors, $period = 0, $date = 0) { function modules_get_monitors_down ($monitors, $period = 0, $date = 0) {
$monitors_down = array (); $monitors_down = array ();
if (empty ($monitors)) if (empty ($monitors))
return $monitors_down; return $monitors_down;
@ -1024,6 +1025,7 @@ function modules_get_monitors_down ($monitors, $period = 0, $date = 0) {
if ($down > 0) if ($down > 0)
array_push ($monitors_down, $monitor); array_push ($monitors_down, $monitor);
} }
return $monitors_down; return $monitors_down;
} }
@ -1084,6 +1086,7 @@ function modules_get_moduletypes ($type = "all", $rows = "nombre") {
$return[$type["id_tipo"]] = $type[reset ($rows)]; $return[$type["id_tipo"]] = $type[reset ($rows)];
} }
} }
return $return; return $return;
} }
@ -1119,32 +1122,6 @@ function modules_show_icon_type ($id_type) {
return (string) db_get_value ('icon', 'ttipo_modulo', 'id_tipo', $id_type); return (string) db_get_value ('icon', 'ttipo_modulo', 'id_tipo', $id_type);
} }
/**
* Get a module category name
*
* @param int Id category
*
* @return Name of the given category
*/
function modules_give_modulecategory_name ($id_category) {
switch ($id_category) {
case 0:
return __('Software agent data');
break;
case 1:
return __('Software agent monitor');
break;
case 2:
return __('Network agent data');
break;
case 3:
return __('Network agent monitor');
break;
}
return __('Unknown');
}
/** /**
* Get agent id from an agent module. * Get agent id from an agent module.
* *