diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f13f830f86..87d849eef1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2011-02-16 Miguel de Dios + + * include/functions_db.php: fixed check "<>" in other case as the ajax + calls in the visual map. + + * godmode/reporting/visual_console_builder.editor.js: cleaned source code + and added some comments. + 2011-02-16 Juan Manuel Ramon * godmode/users/user_list.php: If user is not admin then don't diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index f9b4b6f139..d60c095a96 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -59,9 +59,9 @@ function eventsTextAgent() { }, formatItem: function (data, i, total) { if (total == 0) - $("#text-agent").css ('background-color', '#cc0000'); + $("#text-agent").css('background-color', '#cc0000'); else - $("#text-agent").css ('background-color', ''); + $("#text-agent").css('background-color', ''); if (data == "") return false; return data[0]+'
' + idText + ': '+data[1]+''; @@ -906,6 +906,10 @@ function deleteItem() { selectedItem = null; } +/** + * All events in the visual map, resize map, click item, double click, drag and + * drop. + */ function eventsItems() { $('.item').unbind('click'); $('.item').unbind('dragstop'); @@ -966,6 +970,7 @@ function eventsItems() { } }); + //Double click in the item $('.item').bind('dblclick', function(event, ui) { event.stopPropagation(); if (!openPropertiesPanel) { diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 1a43297a75..8a3c96159d 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -743,10 +743,18 @@ function get_agent_modules ($id_agent = null, $details = false, $filter = false, if (is_array ($filter)) { $fields = array (); foreach ($filter as $field => $value) { + //Check <> operator + $operatorDistin = false; + if (strlen($value) > 2) { + if ($value[0] . $value[1] == '<>') { + $operatorDistin = true; + } + } + if ($value[0] == '%') { array_push ($fields, $field.' LIKE "'.$value.'"'); } - else if ($value[0] . $value[1] == '<>') { + else if ($operatorDistin) { array_push($fields, $field.' <> ' . substr($value, 2)); } else if (substr($value, -1) == '%') {