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:
parent
8a71b5b4ae
commit
97c73a7fec
|
@ -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>
|
2009-09-14 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* godmode/reporting/map_builder.php: change (at the moment) the ajax for
|
* godmode/reporting/map_builder.php: change (at the moment) the ajax for
|
||||||
|
|
|
@ -105,6 +105,16 @@ $table->data = array ();
|
||||||
|
|
||||||
$agent_interval = get_agent_interval ($id_agente);
|
$agent_interval = get_agent_interval ($id_agente);
|
||||||
$last_modulegroup = "0";
|
$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) {
|
foreach ($modules as $module) {
|
||||||
$type = $module["id_tipo_modulo"];
|
$type = $module["id_tipo_modulo"];
|
||||||
$id_module = $module["id_modulo"];
|
$id_module = $module["id_modulo"];
|
||||||
|
@ -172,13 +182,15 @@ foreach ($modules as $module) {
|
||||||
$data[6] .= '</a> ';
|
$data[6] .= '</a> ';
|
||||||
|
|
||||||
// Make a data normalization
|
// 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)) {
|
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] .= '<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,
|
$data[6] .= print_image ('images/chart_curve.png', true,
|
||||||
array ('title' => __('Normalize')));
|
array ('title' => __('Normalize')));
|
||||||
$data[6] .= '</a>';
|
$data[6] .= '</a>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue