Merge branch '1505-acl-de-grupos-para-los-elementos-de-la-consola-visual-dev' into 'develop'
Added groups acl in all visual console elements See merge request artica/pandorafms!1044
This commit is contained in:
commit
2b4de0503e
|
@ -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`
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -690,6 +690,17 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||
$form_items_advance['line_case']['html'] = '
|
||||
<td align="left">' . __('Lines haven\'t advanced options') . '</td>';
|
||||
|
||||
$user_groups = users_get_groups($config['id_user']);
|
||||
$form_items_advance['element_group_row'] = array();
|
||||
$form_items_advance['element_group_row']['items'] = array(
|
||||
'group_item', 'static_graph', 'percentile_bar',
|
||||
'percentile_item', 'module_graph', 'simple_value',
|
||||
'icon', 'label', 'datos');
|
||||
$form_items_advance['element_group_row']['html'] = '<td align="left">'.
|
||||
__('Element group') . '</td>' .
|
||||
'<td align="left">' . html_print_select($user_groups, 'element_group', '', '', '', 0, true) .
|
||||
'</td>';
|
||||
|
||||
//Insert and modify before the buttons to create or update.
|
||||
if (enterprise_installed()) {
|
||||
enterprise_visual_map_editor_modify_form_items_advance_palette($form_items_advance);
|
||||
|
|
|
@ -1190,6 +1190,8 @@ CREATE TABLE IF NOT EXISTS `tgraph` (
|
|||
`id_group` mediumint(8) unsigned NULL default 0,
|
||||
`id_graph_template` int(11) NOT NULL default 0,
|
||||
`percentil` tinyint(1) UNSIGNED NOT NULL default 0,
|
||||
`summatory_series` tinyint(1) UNSIGNED NOT NULL default 0,
|
||||
`average_series` tinyint(1) UNSIGNED NOT NULL default 0,
|
||||
PRIMARY KEY(`id_graph`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
@ -1362,6 +1364,7 @@ CREATE TABLE IF NOT EXISTS `tlayout_data` (
|
|||
`fill_color` varchar(200) DEFAULT "",
|
||||
`show_statistics` tinyint(2) NOT NULL default '0',
|
||||
`id_layout_linked_weight` int(10) NOT NULL default '0',
|
||||
`element_group` int(10) NOT NULL default '0',
|
||||
PRIMARY KEY(`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
|
Loading…
Reference in New Issue