From 57729584fa604e85e92f8379ef67d1f6b0d2dff2 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 1 Aug 2013 11:05:38 +0000 Subject: [PATCH] 2013-08-01 Miguel de Dios * operation/events/events_list.php, extensions/agents_modules.php: removed the debug trace javascript code. * godmode/reporting/visual_console_builder.editor.js: fixed the add fake lines and prevent the remove lines. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8614 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 +++++ pandora_console/extensions/agents_modules.php | 2 +- .../visual_console_builder.editor.js | 32 +++++++++++++------ .../operation/events/events_list.php | 3 +- 4 files changed, 32 insertions(+), 13 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 21b0cf2d60..f4e5afa138 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2013-08-01 Miguel de Dios + + * operation/events/events_list.php, extensions/agents_modules.php: + removed the debug trace javascript code. + + * godmode/reporting/visual_console_builder.editor.js: fixed the + add fake lines and prevent the remove lines. + 2013-08-01 Miguel de Dios * include/javascript/pandora_visual_console.js: fixed the javascript diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index eee788ae5d..b48182e036 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -350,7 +350,7 @@ function mainAgentsModules() { $.each($('.th_class_module_r'), function (i, elem) { id = $(elem).attr('id').replace('th_module_r_', ''); $(\"#th_module_r_\" + id).height(($(\"#div_module_r_\" + id).width() + 10) + 'px'); - console.log($(\"#div_module_r_\" + id).width()); + //$(\"#div_module_r_\" + id).css('margin-top', (max_width - $(\"#div_module_r_\" + id).width()) + 'px'); $(\"#div_module_r_\" + id).css('margin-top', (max_width - 20) + 'px'); $(\"#div_module_r_\" + id).show(); diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 0246622f42..af73e2c001 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -1196,6 +1196,8 @@ function createItem(type, values, id_data) { "node_begin": values['parent'], "node_end": id_data, "color": visual_map_get_color_line_status(id_data) }; + + lines.push(line); refresh_lines(lines, 'background', true); @@ -1356,7 +1358,7 @@ function updateDB_visual(type, idElement , values, event, top, left) { found = true; if (values['parent'] == 0) { //Erased the line - lines.splice(i); + lines.splice(i, 1); end_foreach = true; } else { @@ -1370,12 +1372,17 @@ function updateDB_visual(type, idElement , values, event, top, left) { } }); - if (!found) { - var line = {"id": idElement, - "node_begin": values['parent'], - "node_end": idElement, - "color": visual_map_get_color_line_status(idElement) }; - lines.push(line); + if (typeof(values['parent']) != 'undefined') { + if (!found) { + var line = {"id": idElement, + "node_begin": values['parent'], + "node_end": idElement, + "color": visual_map_get_color_line_status(idElement) }; + + + + lines.push(line); + } } refresh_lines(lines, 'background', true); @@ -1499,10 +1506,15 @@ function deleteDB(idElement) { $("#parent > option[value=" + idElement + "]").remove(); - jQuery.each(lines, function(i, line) { - if ((line['id'] == idElement) || (line['node_begin'] == idElement)) { - lines.splice(i); + if (typeof(line) == 'undefined') { + return; //Continue + } + + if ((line['id'] == idElement) + || (line['node_begin'] == idElement)) { + + lines.splice(i, 1); } }); refresh_lines(lines, 'background', true); diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index c8ec2fbd5f..5013a344a8 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -968,8 +968,7 @@ function click_button_add_tag(what_button) { select_destiny_empty = select_without_tag_empty; } - console.log($(this).val()); - + without_val = $(this).val(); if(without_val == null) { next;