2009-09-14 Miguel de Dios <miguel.dedios@artica.es>

* godmode/agentes/module_manager.php: change the method for test if a
	module is a numeric, and can normalize. Now obtain the ids from modules tipe
	that it's not proc or string, and this ids use to test.
	Fixes: 2849325



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1942 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2009-09-15 12:02:06 +00:00
parent 602f3c4cdb
commit f7278fbd98
2 changed files with 25 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2009-09-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager.php: change the method for test if a
module is a numeric, and can normalize. Now obtain the ids from modules tipe
that it's not proc or string, and this ids use to test.
Fixes: 2849325
2009-09-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/map_builder.php: change (at the moment) the ajax for

View File

@ -105,6 +105,16 @@ $table->data = array ();
$agent_interval = get_agent_interval ($id_agente);
$last_modulegroup = "0";
//Extract the ids only numeric modules for after show the normalize link.
$tempRows = get_db_all_rows_sql("SELECT *
FROM ttipo_modulo
WHERE nombre NOT LIKE '%string%' AND nombre NOT LIKE '%proc%'");
$numericModules = array();
foreach($tempRows as $row) {
$numericModules[$row['id_tipo']] = true;
}
foreach ($modules as $module) {
$type = $module["id_tipo_modulo"];
$id_module = $module["id_modulo"];
@ -172,12 +182,14 @@ foreach ($modules as $module) {
$data[6] .= '</a> ';
// Make a data normalization
if (($type == 22) OR ($type == 1) OR ($type == 4) OR ($type == 7) OR
($type == 8) OR ($type == 11) OR ($type == 16) OR ($type == 22)) {
$data[6] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&fix_module='.$module['id_agente_modulo'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[6] .= print_image ('images/chart_curve.png', true,
array ('title' => __('Normalize')));
$data[6] .= '</a>';
if (isset($numericModules[$type])) {
if ($numericModules[$type] === true) {
$data[6] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&fix_module='.$module['id_agente_modulo'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[6] .= print_image ('images/chart_curve.png', true,
array ('title' => __('Normalize')));
$data[6] .= '</a>';
}
}
array_push ($table->data, $data);