diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 0e46581178..22c6c4d8d4 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -698,10 +698,6 @@ function create_button_palette_callback() { alert($("#message_alert_no_agent").html()); validate = false; } - if ((values['module'] == 0)) { - alert($("#message_alert_no_module").html()); - validate = false; - } break; case 'label': if ((values['label'] == '')) { diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index c318673184..c97867733b 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -3792,11 +3792,13 @@ function graph_graphic_moduleevents ($id_agent, $id_module, $width, $height, $pe $top = $datelimit + ($periodtime * ($i + 1)); - $event = db_get_row_filter ('tevento', - array ('id_agente' => $id_agent, - 'id_agentmodule' => $id_module, - 'utimestamp > '.$bottom, - 'utimestamp < '.$top), 'criticity, utimestamp'); + $event_filter = array ('id_agente' => $id_agent, + 'utimestamp > '.$bottom, + 'utimestamp < '.$top); + if ((int)$id_module !== 0) { + $event_filter['id_agentmodule'] = $id_module; + } + $event = db_get_row_filter ('tevento', $event_filter, 'criticity, utimestamp'); if (!empty($event['utimestamp'])) { $data[$cont]['utimestamp'] = $periodtime;