Added the lost fields for item group in the element list.
(cherry picked from commit c0e767dcbf
)
Conflicts:
pandora_console/godmode/reporting/visual_console_builder.elements.php
This commit is contained in:
parent
8b284ebab5
commit
4f7bfea51c
|
@ -55,7 +55,7 @@ else {
|
||||||
}
|
}
|
||||||
$table->head = array();
|
$table->head = array();
|
||||||
$table->head['icon'] = '';
|
$table->head['icon'] = '';
|
||||||
$table->head[0] = __('Label') . ' / ' . __('Agent');
|
$table->head[0] = __('Label') . ' / ' . __('Agent') . ' / ' . __('Group');
|
||||||
$table->head[1] = __('Image') . ' / ' . __('Module');
|
$table->head[1] = __('Image') . ' / ' . __('Module');
|
||||||
$table->head[2] = __('Width x Height<br>Max value');
|
$table->head[2] = __('Width x Height<br>Max value');
|
||||||
$table->head[3] = __('Period') . ' / ' . __('Position');
|
$table->head[3] = __('Period') . ' / ' . __('Position');
|
||||||
|
@ -146,6 +146,10 @@ foreach ($layoutDatas as $layoutData) {
|
||||||
$table->data[$i + 1]['icon'] =
|
$table->data[$i + 1]['icon'] =
|
||||||
html_print_image('images/photo.png', true, array('title' => __('Icon')));
|
html_print_image('images/photo.png', true, array('title' => __('Icon')));
|
||||||
break;
|
break;
|
||||||
|
case GROUP_ITEM:
|
||||||
|
$table->data[$i + 1]['icon'] =
|
||||||
|
html_print_image('images/group_green.png', true, array('title' => __('Group')));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (enterprise_installed()) {
|
if (enterprise_installed()) {
|
||||||
$table->data[$i + 1]['icon'] =
|
$table->data[$i + 1]['icon'] =
|
||||||
|
@ -177,11 +181,19 @@ foreach ($layoutDatas as $layoutData) {
|
||||||
|
|
||||||
|
|
||||||
//Image
|
//Image
|
||||||
if (($layoutData['type'] == STATIC_GRAPH) || ($layoutData['type'] == ICON)) {
|
switch ($layoutData['type']) {
|
||||||
$table->data[$i + 1][1] = html_print_select ($images_list, 'image_' . $idLayoutData, $layoutData['image'], '', 'None', '', true, false, true, '', false, "width: 120px");
|
case STATIC_GRAPH:
|
||||||
}
|
case ICON:
|
||||||
else {
|
case GROUP_ITEM:
|
||||||
|
$table->data[$i + 1][1] =
|
||||||
|
html_print_select ($images_list,
|
||||||
|
'image_' . $idLayoutData, $layoutData['image'], '',
|
||||||
|
'None', '', true, false, true, '', false,
|
||||||
|
"width: 120px");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
$table->data[$i + 1][1] = '';
|
$table->data[$i + 1][1] = '';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -197,8 +209,21 @@ foreach ($layoutDatas as $layoutData) {
|
||||||
')';
|
')';
|
||||||
|
|
||||||
//Parent
|
//Parent
|
||||||
$table->data[$i + 1][4] = html_print_select_from_sql ('SELECT id, label FROM tlayout_data WHERE id_layout = '. $idVisualConsole . ' AND id !=' . $idLayoutData,
|
switch ($layoutData['type']) {
|
||||||
'parent_' . $idLayoutData, $layoutData['parent_item'], '', 'None', 0, true, false, true, false, 'width: 120px;');
|
case BOX_ITEM:
|
||||||
|
case LINE_ITEM:
|
||||||
|
$table->data[$i + 1][4] = "";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$table->data[$i + 1][4] = html_print_select_from_sql(
|
||||||
|
'SELECT id, label
|
||||||
|
FROM tlayout_data
|
||||||
|
WHERE id_layout = '. $idVisualConsole . '
|
||||||
|
AND id !=' . $idLayoutData,
|
||||||
|
'parent_' . $idLayoutData, $layoutData['parent_item'],
|
||||||
|
'', 'None', 0, true, false, true, false,
|
||||||
|
'width: 120px;');
|
||||||
|
}
|
||||||
|
|
||||||
//Delete row button
|
//Delete row button
|
||||||
if (!defined('METACONSOLE')) {
|
if (!defined('METACONSOLE')) {
|
||||||
|
@ -220,6 +245,16 @@ foreach ($layoutDatas as $layoutData) {
|
||||||
|
|
||||||
//Agent
|
//Agent
|
||||||
switch ($layoutData['type']) {
|
switch ($layoutData['type']) {
|
||||||
|
case GROUP_ITEM:
|
||||||
|
$own_info = get_user_info($config['id_user']);
|
||||||
|
if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, "PM"))
|
||||||
|
$return_all_group = false;
|
||||||
|
else
|
||||||
|
$return_all_group = true;
|
||||||
|
$table->data[$i + 2][0] = html_print_select_groups(false, "AR",
|
||||||
|
$return_all_group, 'group_' . $idLayoutData,
|
||||||
|
$layoutData['id_group'], '', '', 0, true);
|
||||||
|
break;
|
||||||
case ICON:
|
case ICON:
|
||||||
case LABEL:
|
case LABEL:
|
||||||
$table->data[$i + 2][0] = '';
|
$table->data[$i + 2][0] = '';
|
||||||
|
@ -271,6 +306,7 @@ foreach ($layoutDatas as $layoutData) {
|
||||||
switch ($layoutData['type']) {
|
switch ($layoutData['type']) {
|
||||||
case ICON:
|
case ICON:
|
||||||
case LABEL:
|
case LABEL:
|
||||||
|
case GROUP_ITEM:
|
||||||
$table->data[$i + 2][1] = '';
|
$table->data[$i + 2][1] = '';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -175,13 +175,16 @@ switch ($activeTab) {
|
||||||
$values['pos_x'] = get_parameter('left_' . $id, 0);
|
$values['pos_x'] = get_parameter('left_' . $id, 0);
|
||||||
$values['pos_y'] = get_parameter('top_' . $id, 0);
|
$values['pos_y'] = get_parameter('top_' . $id, 0);
|
||||||
$type = db_get_value('type', 'tlayout_data', 'id', $id);
|
$type = db_get_value('type', 'tlayout_data', 'id', $id);
|
||||||
switch($type) {
|
switch ($type) {
|
||||||
case MODULE_GRAPH:
|
case MODULE_GRAPH:
|
||||||
case SIMPLE_VALUE_MAX:
|
case SIMPLE_VALUE_MAX:
|
||||||
case SIMPLE_VALUE_MIN:
|
case SIMPLE_VALUE_MIN:
|
||||||
case SIMPLE_VALUE_AVG:
|
case SIMPLE_VALUE_AVG:
|
||||||
$values['period'] = get_parameter('period_' . $id, 0);
|
$values['period'] = get_parameter('period_' . $id, 0);
|
||||||
break;
|
break;
|
||||||
|
case GROUP_ITEM:
|
||||||
|
$values['id_group'] = get_parameter('group_' . $id, 0);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
$agentName = get_parameter('agent_' . $id, '');
|
$agentName = get_parameter('agent_' . $id, '');
|
||||||
if (defined('METACONSOLE')) {
|
if (defined('METACONSOLE')) {
|
||||||
|
|
Loading…
Reference in New Issue