diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 2da50acdd4..7f81514b06 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -1083,6 +1083,9 @@ if ($list_modules) { $url = 'include/procesos.php?agente='.$module["id_agente_modulo"]; $win_handle=dechex(crc32($module["id_agente_modulo"].$module["nombre"])); + // Try to display the SNMP module realtime graph + $data[8] .= get_module_realtime_link_graph($module); + # Show events for boolean modules by default. if ($graph_type == 'boolean') { $draw_events = 1; @@ -1099,9 +1102,8 @@ if ($list_modules) { base64_encode($module["nombre"]))) . "&" . "refresh=" . SECONDS_10MINUTES . "&" . "draw_events=$draw_events', 'day_".$win_handle."')"; - - if(!is_snapshot_data($module['datos'])){ - $data[8] .= '' . html_print_image("images/chart_curve.png", true, array("border" => '0', "alt" => "")) . '   '; + if(!is_snapshot_data($module['datos'])){ + $data[8] .= '' . html_print_image("images/chart_curve.png", true, array("border" => '0', "alt" => "")) . '   '; } $server_name = ''; $data[8] .= " 'snmp_module', + 'agent_alias' => modules_get_agentmodule_agent_alias($module['id_agente_modulo']), + 'module_name' => $module['nombre'], + 'snmp_address' => $module['ip_target'], + 'snmp_community' => $module['snmp_community'], + 'snmp_oid' => $module['snmp_oid'], + 'snmp_ver' => $module['tcp_send'] + ); + // Incremental type + if ($module['id_tipo_modulo'] == 16) $params['incremental'] = 1; + $link = "index.php?sec=view&sec2=extensions/realtime_graphs&"; //FIXME: Not definitive URL + foreach ($params as $p_key => $p_value) { + $link .= "$p_key=" . urlencode(io_safe_output($p_value)) . "&"; + } + $link = substr($link, 0, -1); + + $win_handle = "realtime_" . dechex(crc32($module["id_agente_modulo"].$module["nombre"])); + + $link_button = '' . + html_print_image("images/chart_curve.png", true, array("border" => '0', "alt" => "")) . //FIXME: Not definitive image + '   '; + + return $link_button; +} ?>