diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 8033c055d2..773c54094e 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1240,6 +1240,7 @@ ALTER TABLE tlayout ADD `background_color` varchar(50) NOT NULL default '#FFF'; ALTER TABLE tlayout_data ADD `type_graph` varchar(50) NOT NULL default 'area'; ALTER TABLE tlayout_data ADD `label_position` varchar(50) NOT NULL default 'down'; ALTER TABLE tlayout_data ADD COLUMN `show_statistics` tinyint(2) NOT NULL default '0'; +ALTER TABLE tlayout_data ADD COLUMN `element_group` int(10) NOT NULL default '0'; ALTER TABLE tlayout_data ADD COLUMN `id_layout_linked_weight` int(10) NOT NULL default '0'; -- --------------------------------------------------------------------- @@ -1258,6 +1259,8 @@ UPDATE tagente_modulo SET cron_interval = '' WHERE cron_interval LIKE '% %'; -- Table `tgraph` -- --------------------------------------------------------------------- ALTER TABLE tgraph ADD COLUMN `percentil` int(4) unsigned default '0'; +ALTER TABLE tgraph ADD COLUMN `summatory_series` tinyint(1) UNSIGNED NOT NULL default '0'; +ALTER TABLE tgraph ADD COLUMN `average_series` tinyint(1) UNSIGNED NOT NULL default '0'; -- --------------------------------------------------------------------- -- Table `tnetflow_filter` diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index a0b4a4bf46..aad9d3ec0e 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -822,6 +822,7 @@ function readFields() { values['bars_graph_type'] = $("select[name=bars_graph_type]").val(); values['parent'] = $("select[name=parent]").val(); values['map_linked'] = $("select[name=map_linked]").val(); + values['element_group'] = $("select[name=element_group]").val(); values['map_linked_weight'] = $("select[name=map_linked_weight]").val(); values['width_percentile'] = $("input[name=width_percentile]").val(); values['bars_graph_height'] = $("input[name=bars_graph_height]").val(); @@ -1513,6 +1514,8 @@ function loadFieldsFromDB(item) { $("select[name=map_linked]").val(val); if (key == 'id_layout_linked_weight') $("select[name=map_linked_weight]").val(val); + if (key == 'element_group') + $("select[name=element_group]").val(val); if (key == 'width_percentile') $("input[name=width_percentile]").val(val); if (key == 'bars_graph_height') @@ -1803,6 +1806,9 @@ function hiddenFields(item) { $("#map_linked_row").css('display', 'none'); $("#map_linked_row." + item).css('display', ''); + $("#element_group_row").css('display', 'none'); + $("#element_group_row." + item).css('display', ''); + $("#map_linked_weight").css('display', 'none'); $("#map_linked_weight." + item).css('display', ''); @@ -1856,14 +1862,6 @@ function hiddenFields(item) { if (typeof(enterprise_hiddenFields) == 'function') { enterprise_hiddenFields(item); } - - //~ var code_control = tinyMCE.activeEditor.controlManager.controls['text-label_code']; - //~ if (item == 'label') { - //~ code_control.setDisabled(false); - //~ } - //~ else { - //~ code_control.setDisabled(true); - //~ } } function cleanFields(item) { @@ -1885,6 +1883,7 @@ function cleanFields(item) { $("input[name=height]").val(0); $("select[name=parent]").val(''); $("select[name=map_linked]").val(''); + $("select[name=element_group]").val(''); $("select[name=map_linked_weight]").val(''); $("input[name=width_module_graph]").val(300); $("input[name=height_module_graph]").val(180); diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index 7d8fcadae9..551ed0477d 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -101,6 +101,7 @@ $height = get_parameter('height', null); $parent = get_parameter('parent', null); $map_linked = get_parameter('map_linked', null); $map_linked_weight = get_parameter('map_linked_weight', null); +$element_group = get_parameter('element_group', null); $width_percentile = get_parameter('width_percentile', null); $bars_graph_height = get_parameter('bars_graph_height', null); $max_percentile = get_parameter('max_percentile', null); @@ -588,6 +589,9 @@ switch ($action) { if ($map_linked !== null) { $values['id_layout_linked'] = $map_linked; } + if ($element_group !== null) { + $values['element_group'] = $element_group; + } if ($map_linked_weight !== null) { $values['id_layout_linked_weight'] = $map_linked_weight; } @@ -1026,6 +1030,7 @@ switch ($action) { } $values['id_agente_modulo'] = $id_module; $values['id_layout_linked'] = $map_linked; + $values['element_group'] = $element_group; $values['id_layout_linked_weight'] = $map_linked_weight; $values['parent_item'] = $parent; $values['enable_link'] = $enable_link; diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 40b34ae4f1..d83db618e7 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -3256,6 +3256,11 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, foreach ($layout_datas as $layout_data) { + $layout_group = $layout_data['element_group']; + if (!check_acl ($config['id_user'], $layout_group, "VR")) { + continue; + } + //Check the items are from disabled or pending delete modules if ($layout_data['id_agente_modulo'] != 0 && (($layout_data['type'] != LABEL) diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index e909bb0017..ba4ecb3940 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -690,6 +690,17 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items_advance['line_case']['html'] = '