diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php
index f66aa17296..9b9b96ffaf 100644
--- a/pandora_console/godmode/agentes/module_manager_editor_common.php
+++ b/pandora_console/godmode/agentes/module_manager_editor_common.php
@@ -291,7 +291,7 @@ if (modules_is_string_type($id_module_type) || $edit) {
$table_simple->data[4][1] .= '
'.__('Inverse interval').'';
$table_simple->data[4][1] .= html_print_checkbox ("warning_inverse", 1, $warning_inverse, true, $disabledBecauseInPolicy);
if (!modules_is_string_type($id_module_type) || $edit) {
- $table_simple->data[4][2] = '';
+ $table_simple->data[4][2] = '';
$table_simple->colspan[4][2] = 2;
$table_simple->rowspan[4][2] = 3;
}
@@ -1323,8 +1323,8 @@ function paint_graph_status(min_w, max_w, min_c, max_c, inverse_w, inverse_c, er
.attr("id", "legend_normal")
.attr("x", 72)
.attr("y", -30)
- .attr("width", 10)
- .attr("height", 10)
+ .attr("width", '10px')
+ .attr("height", '10px')
.style("fill", "#82B92E");
//legend Warning text
@@ -1343,8 +1343,8 @@ function paint_graph_status(min_w, max_w, min_c, max_c, inverse_w, inverse_c, er
.attr("id", "legend_warning")
.attr("x", 168)
.attr("y", -30)
- .attr("width", 10)
- .attr("height", 10)
+ .attr("width", '10px')
+ .attr("height", '10px')
.style("fill", "#ffd731");
//legend Critical text
@@ -1363,8 +1363,8 @@ function paint_graph_status(min_w, max_w, min_c, max_c, inverse_w, inverse_c, er
.attr("id", "legend_critical")
.attr("x", 258)
.attr("y", -30)
- .attr("width", 10)
- .attr("height", 10)
+ .attr("width", '10px')
+ .attr("height", '10px')
.style("fill", "#fc4444");
//styles for number and axes
@@ -1382,8 +1382,8 @@ function paint_graph_status(min_w, max_w, min_c, max_c, inverse_w, inverse_c, er
.attr("id", "warning_rect")
.attr("x", 3)
.attr("y", 0)
- .attr("width", 300)
- .attr("height", 200)
+ .attr("width", '300px')
+ .attr("height", '200px')
.style("fill", "#82B92E");
//controls the inverse warning
diff --git a/pandora_console/godmode/modules/manage_network_components_form_common.php b/pandora_console/godmode/modules/manage_network_components_form_common.php
index 83b21b225b..b9cc96a468 100644
--- a/pandora_console/godmode/modules/manage_network_components_form_common.php
+++ b/pandora_console/godmode/modules/manage_network_components_form_common.php
@@ -473,8 +473,8 @@ $next_row++;
.attr("id", "legend_normal")
.attr("x", 72)
.attr("y", -30)
- .attr("width", 10)
- .attr("height", 10)
+ .attr("width", '10px')
+ .attr("height", '10px')
.style("fill", "#82B92E");
//legend Warning text
diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js
index af73a7365d..e84c5d8c56 100755
--- a/pandora_console/godmode/reporting/visual_console_builder.editor.js
+++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js
@@ -1826,16 +1826,16 @@ function setBarsGraph(id_data, values) {
success: function (data) {
if (data['no_data'] == true) {
if (values['width'] == "0" || values['height'] == "0") {
- $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/module-events.png');
+ $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/barras-no.png');
}
else {
- $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/module-events.png');
+ $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/barras-no.png');
$("#" + id_data + " img").css('width', values['width'] + 'px');
$("#" + id_data + " img").css('height', values['height'] + 'px');
}
}
else {
- $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/module-events.png');
+ $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/barras.png');
if($('#text-width').val() == 0 || $('#text-height').val() == 0){
// Image size
diff --git a/pandora_console/images/console/signes/barras-no.png b/pandora_console/images/console/signes/barras-no.png
new file mode 100644
index 0000000000..c4545405e0
Binary files /dev/null and b/pandora_console/images/console/signes/barras-no.png differ
diff --git a/pandora_console/images/console/signes/barras.png b/pandora_console/images/console/signes/barras.png
new file mode 100644
index 0000000000..be81fb2212
Binary files /dev/null and b/pandora_console/images/console/signes/barras.png differ
diff --git a/pandora_console/images/icono-barras-arriba.disabled.png b/pandora_console/images/icono-barras-arriba.disabled.png
new file mode 100644
index 0000000000..94fb50dc5f
Binary files /dev/null and b/pandora_console/images/icono-barras-arriba.disabled.png differ
diff --git a/pandora_console/images/icono-barras-arriba.png b/pandora_console/images/icono-barras-arriba.png
new file mode 100644
index 0000000000..4029c48c87
Binary files /dev/null and b/pandora_console/images/icono-barras-arriba.png differ
diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php
index 3894313b4f..afa3e8d8ba 100755
--- a/pandora_console/include/ajax/visual_console_builder.ajax.php
+++ b/pandora_console/include/ajax/visual_console_builder.ajax.php
@@ -104,6 +104,7 @@ $width_percentile = get_parameter('width_percentile', null);
$max_percentile = get_parameter('max_percentile', null);
$height_module_graph = get_parameter('height_module_graph', null);
$width_module_graph = get_parameter('width_module_graph', null);
+$bars_graph_type = get_parameter('bars_graph_type', null);
$id_agent_module = get_parameter('id_agent_module', 0);
$process_simple_value = get_parameter('process_simple_value', PROCESS_VALUE_NONE);
$type_percentile = get_parameter('type_percentile', 'percentile');
@@ -498,6 +499,7 @@ switch ($action) {
case 'label':
case 'icon':
case 'auto_sla_graph':
+ case 'bars_graph':
default:
if ($type == 'label') {
$values['type'] = LABEL;
@@ -621,6 +623,20 @@ switch ($action) {
$values['id_custom_graph'] = $id_custom_graph;
}
break;
+ case 'bars_graph':
+ if ($height_module_graph !== null) {
+ $values['height'] = $height_module_graph;
+ }
+ if ($width_module_graph !== null) {
+ $values['width'] = $width_module_graph;
+ }
+ if ($bars_graph_type !== null) {
+ $values['type_graph'] = $id_custom_graph;
+ }
+ if ($background_color !== null) {
+ $values['image'] = $background_color;
+ }
+ break;
case 'percentile_item':
case 'percentile_bar':
if ($action == 'update') {
@@ -683,6 +699,10 @@ switch ($action) {
unset($values['image']);
unset($values['type_graph']);
break;
+ case 'bars_graph':
+ unset($values['image']);
+ unset($values['type_graph']);
+ break;
case 'box_item':
unset($values['border_width']);
unset($values['border_color']);
@@ -740,6 +760,7 @@ switch ($action) {
case 'static_graph':
case 'group_item':
case 'module_graph':
+ case 'bars_graph':
case 'simple_value':
case 'label':
case 'icon':
@@ -820,6 +841,11 @@ switch ($action) {
$elementFields['width_module_graph'] = $elementFields['width'];
$elementFields['height_module_graph'] = $elementFields['height'];
break;
+ case 'bars_graph':
+ $elementFields['width_module_graph'] = $elementFields['width'];
+ $elementFields['height_module_graph'] = $elementFields['height'];
+ $elementFields['bars_graph_type'] = $elementFields['type_graph'];
+ break;
case 'box_item':
$elementFields['width_box'] = $elementFields['width'];
$elementFields['height_box'] = $elementFields['height'];
@@ -956,6 +982,13 @@ switch ($action) {
}
$values['period'] = $period;
break;
+ case 'bars_graph':
+ $values['type'] = BARS_GRAPH;
+ $values['height'] = $height_module_graph;
+ $values['width'] = $width_module_graph;
+ $values['type_graph'] = $bars_graph_type;
+ $values['image'] = $background_color;
+ break;
case 'auto_sla_graph':
$values['type'] = AUTO_SLA_GRAPH;
$values['period'] = $event_max_time_row;
diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php
index f039a90504..fd3ecc056e 100644
--- a/pandora_console/include/constants.php
+++ b/pandora_console/include/constants.php
@@ -197,6 +197,7 @@ define('SERVICE', 10); //Enterprise Item.
define('GROUP_ITEM', 11);
define('BOX_ITEM', 12);
define('LINE_ITEM', 13);
+define('BARS_GRAPH', 18);
//Some styles
define('MIN_WIDTH', 300);
define('MIN_HEIGHT', 120);
diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php
index b06a0c6d5c..355d6cbd1a 100755
--- a/pandora_console/include/functions_visual_map.php
+++ b/pandora_console/include/functions_visual_map.php
@@ -375,6 +375,9 @@ function visual_map_print_item($mode = "read", $layoutData,
$link = true;
}
+ break;
+ case BARS_GRAPH:
+ $link = true;
break;
case AUTO_SLA_GRAPH:
$link = true;
@@ -487,6 +490,17 @@ function visual_map_print_item($mode = "read", $layoutData,
"&date_to=" . $date_to . "&time_to=" . $time_to . "&status=-1";
}
break;
+
+ case BARS_GRAPH:
+ if (empty($layout_data['id_metaconsole'])) {
+ $url = $config['homeurl'] . "index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente=" . $layoutData['id_agent'] .
+ "&tab=module&edit_module=1&id_agent_module=" . $layoutData['id_agente_modulo'];
+ }
+ else {
+ $url = "index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente=" . $layoutData['id_agent'] .
+ "&tab=module&edit_module=1&id_agent_module=" . $layoutData['id_agente_modulo'];
+ }
+ break;
case GROUP_ITEM:
$is_a_link_to_other_visualconsole = false;
if ($layoutData['id_layout_linked'] != 0) {
@@ -1143,6 +1157,9 @@ function visual_map_print_item($mode = "read", $layoutData,
case MODULE_GRAPH:
$class .= "module_graph";
break;
+ case MODULE_GRAPH:
+ $class .= "bars_graph";
+ break;
case SIMPLE_VALUE:
case SIMPLE_VALUE_MAX:
case SIMPLE_VALUE_MIN:
@@ -1554,6 +1571,20 @@ function visual_map_print_item($mode = "read", $layoutData,
echo $img;
+ if ($layoutData['label_position']=='down') {
+ echo io_safe_output($text);
+ }
+ elseif($layoutData['label_position']=='left' || $layoutData['label_position']=='right') {
+ echo io_safe_output($text);
+ }
+ break;
+ case BARS_GRAPH:
+ if ($layoutData['label_position']=='up') {
+ echo io_safe_output($text);
+ }
+
+ echo $img;
+
if ($layoutData['label_position']=='down') {
echo io_safe_output($text);
}
@@ -2947,6 +2978,10 @@ function visual_map_create_internal_name_item($label = null, $type, $image, $age
case MODULE_GRAPH:
$text = __('Module graph');
break;
+ case 'bars_graph':
+ case BARS_GRAPH:
+ $text = __('Bars graph');
+ break;
case 'auto_sla_graph':
case AUTO_SLA_GRAPH:
$text = __('Auto SLA Graph');
@@ -3062,6 +3097,9 @@ function visual_map_type_in_js($type) {
case MODULE_GRAPH:
return 'module_graph';
break;
+ case BARS_GRAPH:
+ return 'bars_graph';
+ break;
case AUTO_SLA_GRAPH:
return 'auto_sla_graph';
break;
diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css
index 6194b87b78..94af9716a9 100644
--- a/pandora_console/include/styles/pandora.css
+++ b/pandora_console/include/styles/pandora.css
@@ -767,10 +767,10 @@ input.graph_min {
background: #fefefe url(../../images/chart_curve.png) no-repeat center !important;
}
input.graph_min[disabled] {
- background: #fefefe url(../../images/chart_curve.disabled.png) no-repeat center !important;
+ background: #fefefe url(../../images/icono-barras-arriba.disabled.png) no-repeat center !important;
}
input.bars_graph_min {
- background: #fefefe url(../../images/chart_curve.png) no-repeat center !important;
+ background: #fefefe url(../../images/icono-barras-arriba.png) no-repeat center !important;
}
input.bars_graph_min[disabled] {
background: #fefefe url(../../images/chart_curve.disabled.png) no-repeat center !important;