mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Added the lost fields for item group in the element list.
This commit is contained in:
parent
ab5c8d4948
commit
b0ee3ed266
@ -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');
|
||||||
@ -147,6 +147,10 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
$table->data[$i + 1]['icon'] =
|
$table->data[$i + 1]['icon'] =
|
||||||
html_print_image('images/box_item.png', true, array('title' => __('Box')));
|
html_print_image('images/box_item.png', true, array('title' => __('Box')));
|
||||||
break;
|
break;
|
||||||
|
case GROUP_ITEM:
|
||||||
|
$table->data[$i + 1]['icon'] =
|
||||||
|
html_print_image('images/group_green.png', true, array('title' => __('Group')));
|
||||||
|
break;
|
||||||
case LINE_ITEM:
|
case LINE_ITEM:
|
||||||
$table->data[$i + 1]['icon'] =
|
$table->data[$i + 1]['icon'] =
|
||||||
html_print_image('images/line_item.png', true,
|
html_print_image('images/line_item.png', true,
|
||||||
@ -188,6 +192,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
switch ($layoutData['type']) {
|
switch ($layoutData['type']) {
|
||||||
case STATIC_GRAPH:
|
case STATIC_GRAPH:
|
||||||
case ICON:
|
case ICON:
|
||||||
|
case GROUP_ITEM:
|
||||||
$table->data[$i + 1][1] =
|
$table->data[$i + 1][1] =
|
||||||
html_print_select ($images_list,
|
html_print_select ($images_list,
|
||||||
'image_' . $idLayoutData, $layoutData['image'], '',
|
'image_' . $idLayoutData, $layoutData['image'], '',
|
||||||
@ -234,8 +239,14 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
$table->data[$i + 1][4] = "";
|
$table->data[$i + 1][4] = "";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$table->data[$i + 1][4] = html_print_select_from_sql ('SELECT id, label FROM tlayout_data WHERE id_layout = '. $idVisualConsole . ' AND id !=' . $idLayoutData,
|
$table->data[$i + 1][4] = html_print_select_from_sql(
|
||||||
'parent_' . $idLayoutData, $layoutData['parent_item'], '', 'None', 0, true, false, true, false, 'width: 120px;');
|
'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
|
||||||
@ -258,6 +269,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 BOX_ITEM:
|
case BOX_ITEM:
|
||||||
case ICON:
|
case ICON:
|
||||||
case LABEL:
|
case LABEL:
|
||||||
@ -313,6 +334,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
case LABEL:
|
case LABEL:
|
||||||
case BOX_ITEM:
|
case BOX_ITEM:
|
||||||
case LINE_ITEM:
|
case LINE_ITEM:
|
||||||
|
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…
x
Reference in New Issue
Block a user