diff --git a/pandora_console/godmode/reporting/visual_console_builder.elements.php b/pandora_console/godmode/reporting/visual_console_builder.elements.php
index 6d67a8ab43..78ca646a47 100755
--- a/pandora_console/godmode/reporting/visual_console_builder.elements.php
+++ b/pandora_console/godmode/reporting/visual_console_builder.elements.php
@@ -143,6 +143,10 @@ foreach ($layoutDatas as $layoutData) {
$table->data[$i + 1]['icon'] =
html_print_image('images/photo.png', true, array('title' => __('Icon')));
break;
+ case BOX_ITEM:
+ $table->data[$i + 1]['icon'] =
+ html_print_image('images/box_item.png', true, array('title' => __('Box')));
+ break;
default:
if (enterprise_installed()) {
$table->data[$i + 1]['icon'] =
@@ -158,27 +162,35 @@ foreach ($layoutDatas as $layoutData) {
//First row
- //Label
- if ($layoutData['type'] != ICON) {
- $table->data[$i + 1][0] = '' .
- html_print_input_hidden('label_' . $idLayoutData, $layoutData['label'], true) .
- '' . __('Edit label') .'' .
- '';
+ //Label
+ switch ($layoutData['type']) {
+ case ICON:
+ case BOX_ITEM:
+ // hasn't the label.
+ $table->data[$i + 1][0] = '';
+ break;
+ default:
+ $table->data[$i + 1][0] = '' .
+ html_print_input_hidden('label_' . $idLayoutData, $layoutData['label'], true) .
+ '' . __('Edit label') .'' .
+ '';
+ break;
}
- else {
- //Icon haven't the label.
- $table->data[$i + 1][0] = '';
- }
-
-
//Image
- if (($layoutData['type'] == STATIC_GRAPH) || ($layoutData['type'] == ICON)) {
- $table->data[$i + 1][1] = html_print_select ($images_list, 'image_' . $idLayoutData, $layoutData['image'], '', 'None', '', true, false, true, '', false, "width: 120px");
- }
- else {
- $table->data[$i + 1][1] = '';
+ switch ($layoutData['type']) {
+ case STATIC_GRAPH:
+ case ICON:
+ $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] = '';
+ break;
}
@@ -194,8 +206,14 @@ foreach ($layoutDatas as $layoutData) {
')';
//Parent
- $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;');
+ switch ($layoutData['type']) {
+ case BOX_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
if (!defined('METACONSOLE')) {
@@ -217,6 +235,7 @@ foreach ($layoutDatas as $layoutData) {
//Agent
switch ($layoutData['type']) {
+ case BOX_ITEM:
case ICON:
case LABEL:
$table->data[$i + 2][0] = '';
@@ -268,6 +287,7 @@ foreach ($layoutDatas as $layoutData) {
switch ($layoutData['type']) {
case ICON:
case LABEL:
+ case BOX_ITEM:
$table->data[$i + 2][1] = '';
break;
default:
@@ -328,9 +348,17 @@ foreach ($layoutDatas as $layoutData) {
}
//Map linked
- $table->data[$i + 2][4] = html_print_select_from_sql(
- 'SELECT id, name FROM tlayout WHERE id != ' . $idVisualConsole,
- 'map_linked_' . $idLayoutData, $layoutData['id_layout_linked'], '', 'None', '', true, false, true, '', false, "width: 120px");
+ switch ($layoutData['type']) {
+ case BOX_ITEM:
+ $table->data[$i + 2][4] = "";
+ break;
+ default:
+ $table->data[$i + 2][4] = html_print_select_from_sql(
+ 'SELECT id, name FROM tlayout WHERE id != ' . $idVisualConsole,
+ 'map_linked_' . $idLayoutData, $layoutData['id_layout_linked'], '', 'None', '', true, false, true, '', false, "width: 120px");
+ break;
+ }
+
$table->data[$i + 2][5] = '';
if ($alternativeStyle) {