diff --git a/pandora_console/godmode/reporting/create_container.php b/pandora_console/godmode/reporting/create_container.php
index f53852fd1f..98fbfe6b67 100644
--- a/pandora_console/godmode/reporting/create_container.php
+++ b/pandora_console/godmode/reporting/create_container.php
@@ -36,43 +36,35 @@ if (is_ajax()){
$add_custom = (bool) get_parameter('add_custom',0);
$add_dynamic = (bool) get_parameter('add_dynamic',0);
$id_container2 = get_parameter('id_container',0);
-
+
if($add_single) {
$id_agent = get_parameter('id_agent');
$id_agent_module = get_parameter('id_agent_module');
$time_lapse = get_parameter('time_lapse');
- $only_avg = get_parameter('only_avg');
$simple_type_graph = get_parameter('simple_type_graph');
$fullscale = get_parameter('fullscale');
-
- if($only_avg != 'false'){
- $only_avg = 1;
- } else{
- $only_avg = 0;
- }
-
+
if($fullscale != 'false'){
$fullscale = 1;
}
else{
$fullscale = 0;
}
-
+
$values = array(
'id_container' => $id_container2,
'type' => "simple_graph",
'id_agent' => $id_agent,
'id_agent_module' => $id_agent_module,
'time_lapse' => $time_lapse,
- 'only_average' => $only_avg,
'type_graph' => $simple_type_graph,
'fullscale' => $fullscale);
$id_item = db_process_sql_insert('tcontainer_item', $values);
return;
}
-
- if($add_custom) {
+
+if($add_custom) {
$time_lapse = get_parameter('time_lapse');
$id_custom = get_parameter('id_custom');
$fullscale = get_parameter('fullscale');
@@ -93,8 +85,8 @@ if (is_ajax()){
$id_item = db_process_sql_insert('tcontainer_item', $values);
return;
- }
-
+}
+
if($add_dynamic) {
$time_lapse = get_parameter('time_lapse');
$group = get_parameter('group',0);
@@ -102,34 +94,29 @@ if (is_ajax()){
$agent_alias = get_parameter('agent_alias','');
$module_name = get_parameter('module_name','');
$tag = get_parameter('tag',0);
- $only_avg = get_parameter('only_avg');
+
$simple_type_graph2 = get_parameter('simple_type_graph2');
$fullscale = get_parameter('fullscale');
- if($only_avg != 'false') {
- $only_avg = 1;
- } else {
- $only_avg = 0;
- }
-
+
if($fullscale != 'false'){
$fullscale = 1;
}
else{
$fullscale = 0;
}
-
+
$values = array(
- 'id_container' => $id_container2,
- 'type' => "dynamic_graph",
- 'time_lapse' => $time_lapse,
- 'id_group' => $group,
- 'id_module_group' => $module_group,
+ 'id_container' => $id_container2,
+ 'type' => "dynamic_graph",
+ 'time_lapse' => $time_lapse,
+ 'id_group' => $group,
+ 'id_module_group' => $module_group,
'agent' => $agent_alias,
- 'module' => $module_name,
- 'id_tag' => $tag,
- 'only_average' => $only_avg,
+ 'module' => $module_name,
+ 'id_tag' => $tag,
'type_graph' => $simple_type_graph2,
- 'fullscale' => $fullscale);
+ 'fullscale' => $fullscale
+ );
$id_item = db_process_sql_insert('tcontainer_item', $values);
return;
@@ -356,25 +343,16 @@ if($edit_container){
}
$single_table .= "";
$single_table .= "";
-
- $single_table .= "
|
@@ -2825,7 +2822,6 @@ function chooseType() {
$("#row_show_address_agent").hide();
$("#row_show_graph").hide();
$("#row_max_min_avg").hide();
- $("#row_only_avg").hide();
$("#row_fullscale").hide();
$("#row_time_compare_overlapped").hide();
$("#row_quantity").hide();
@@ -2920,7 +2916,6 @@ function chooseType() {
case 'simple_graph':
$("#row_time_compare_overlapped").show();
- // $("#row_only_avg").show();
$("#row_fullscale").show();
if ($("#checkbox-percentil").prop("checked"))
$("#row_percentil").show();
diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php
index 33b304d81f..61a53fe5ea 100755
--- a/pandora_console/godmode/reporting/reporting_builder.php
+++ b/pandora_console/godmode/reporting/reporting_builder.php
@@ -1232,7 +1232,6 @@ switch ($action) {
case 'simple_graph':
// Warning. We are using this column to hold this value to avoid
// the modification of the database for compatibility reasons.
- $style['only_avg'] = (int) get_parameter('only_avg');
$style['percentil'] = (int) get_parameter('percentil');
$style['fullscale'] = (int) get_parameter('fullscale');
if ($label != '')
@@ -1592,7 +1591,6 @@ switch ($action) {
case 'simple_graph':
// Warning. We are using this column to hold this value to avoid
// the modification of the database for compatibility reasons.
- $style['only_avg'] = (int) get_parameter('only_avg');
$style['percentil'] = (int) get_parameter('percentil');
$style['fullscale'] = (int) get_parameter('fullscale');
if ($label != '')
diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php
index c9ae4d9a0c..088554cfc7 100755
--- a/pandora_console/godmode/setup/setup_visuals.php
+++ b/pandora_console/godmode/setup/setup_visuals.php
@@ -580,15 +580,15 @@ $table_chars->style[0] = 'font-weight: bold;';
$table_chars->size[0] = '50%';
$table_chars->data = array ();
-$table_chars->data[$row][0] = __('Graph color (min)');
+$table_chars->data[$row][0] = __('Graph color #1');
$table_chars->data[$row][1] = html_print_input_text ('graph_color1', $config["graph_color1"], '', 8, 8, true);
$row++;
-$table_chars->data[$row][0] = __('Graph color (avg)');
+$table_chars->data[$row][0] = __('Graph color #2');
$table_chars->data[$row][1] = html_print_input_text ('graph_color2', $config["graph_color2"], '', 8, 8, true);
$row++;
-$table_chars->data[$row][0] = __('Graph color (max)');
+$table_chars->data[$row][0] = __('Graph color #3');
$table_chars->data[$row][1] = html_print_input_text ('graph_color3', $config["graph_color3"], '', 8, 8, true);
$row++;
@@ -655,15 +655,6 @@ $table_chars->data[$row][1] = __('Yes').' '.html_print_radio_button ('round
$table_chars->data[$row][1] .= __('No').' '.html_print_radio_button ('round_corner', 0, '', $config["round_corner"], true);
$row++;
-$table_chars->data[$row][0] = __('Interactive charts') .
- ui_print_help_tip(__('Whether to use Javascript or static PNG graphs'), true);
-$table_chars->data[$row][1] = __('Yes').' ' .
- html_print_radio_button ('flash_charts', 1, '', $config["global_flash_charts"], true).' ';
-$table_chars->data[$row][1] .= __('No').' ' .
- html_print_radio_button ('flash_charts', 0, '', $config["global_flash_charts"], true);
-$row++;
-
-
$table_chars->data[$row][0] = __('Type of module charts');
$table_chars->data[$row][1] = __('Area').' ' .
html_print_radio_button ('type_module_charts', 'area', '',
@@ -682,14 +673,6 @@ $table_chars->data[$row][1] .= __('Line').' ' .
$config["type_interface_charts"] != 'area', true);
$row++;
-$table_chars->data[$row][0] = __('Show only average');
-$table_chars->data[$row][0] .= ui_print_help_tip(__('Hide Max and Min values in graphs'), true);
-$table_chars->data[$row][1] = __('Yes').' ' .
- html_print_radio_button ('only_average', 1, '', $config["only_average"], true).' ';
-$table_chars->data[$row][1] .= __('No').' ' .
- html_print_radio_button ('only_average', 0, '', $config["only_average"], true);
-$row++;
-
$table_chars->data[$row][0] = __('Percentile');
$table_chars->data[$row][0] .= ui_print_help_tip(__('Show percentile 95 in graphs'), true);
$table_chars->data[$row][1] = html_print_input_text ('percentil', $config['percentil'], '', 20, 20, true);
diff --git a/pandora_console/include/ajax/graph.ajax.php b/pandora_console/include/ajax/graph.ajax.php
index a4f5bc80a7..d6f8317f3d 100644
--- a/pandora_console/include/ajax/graph.ajax.php
+++ b/pandora_console/include/ajax/graph.ajax.php
@@ -88,7 +88,6 @@ if ($print_sparse_graph) {
'title' => (string) get_parameter('title'),
'unit_name' => (string) get_parameter('unit_name'),
'show_alerts' => (bool) get_parameter('show_alerts'),
- 'avg_only' => (int) get_parameter('avg_only'),
'pure' => (bool) get_parameter('pure'),
'date' => (int) get_parameter('date', time()),
'unit' => (string) get_parameter('unit'),
@@ -177,7 +176,6 @@ if ($get_graphs){
$params =array(
'agent_module_id' => $value['id_agent_module'],
'period' => $value['time_lapse'],
- 'avg_only' => $value['only_average'],
'homeurl' => ui_get_full_url(false, false, false, false),
'type_graph' => $type_graph,
'fullscale' => $value['fullscale']
@@ -271,7 +269,6 @@ if ($get_graphs){
$params =array(
'agent_module_id' => $value2['id_agente_modulo'],
'period' => $value['time_lapse'],
- 'avg_only' => $value['only_average'],
'homeurl' => ui_get_full_url(false, false, false, false),
'type_graph' => $type_graph,
'fullscale' => $value['fullscale']
diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php
index b413e0078d..5a0b9fad34 100644
--- a/pandora_console/include/class/Tree.class.php
+++ b/pandora_console/include/class/Tree.class.php
@@ -1668,7 +1668,6 @@ class Tree {
);
if (is_metaconsole() && !empty($server)) {
- $graph_params["avg_only"] = 1;
// Set the server id
$graph_params["server"] = $module['serverID'];
}
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index e4b28db1a5..823461e375 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -199,8 +199,6 @@ else {
// Save the global values
$config["global_block_size"] = $config["block_size"];
-$config["global_flash_charts"] = $config["flash_charts"];
-
if (isset ($config['id_user'])) {
config_user_set_custom_config();
diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php
index 420ba76ab0..95eae04ca1 100644
--- a/pandora_console/include/functions.php
+++ b/pandora_console/include/functions.php
@@ -2895,76 +2895,73 @@ function color_graph_array(){
'alpha' => CHART_DEFAULT_ALPHA
);
- //XXX Hablar con Sancho del tema de los slices
- /*
- $color_series[1] = array(
- 'border' => '#000000',
- 'color' => $config['graph_color2'],
- 'alpha' => CHART_DEFAULT_ALPHA
- );
- $color_series[2] = array(
- 'border' => '#000000',
- 'color' => $config['graph_color3'],
- 'alpha' => CHART_DEFAULT_ALPHA
- );
- */
-
$color_series[1] = array(
'border' => '#000000',
- 'color' => $config['graph_color4'],
+ 'color' => $config['graph_color2'],
'alpha' => CHART_DEFAULT_ALPHA
);
$color_series[2] = array(
'border' => '#000000',
- 'color' => $config['graph_color5'],
+ 'color' => $config['graph_color3'],
'alpha' => CHART_DEFAULT_ALPHA
);
+
$color_series[3] = array(
'border' => '#000000',
- 'color' => $config['graph_color6'],
+ 'color' => $config['graph_color4'],
'alpha' => CHART_DEFAULT_ALPHA
);
$color_series[4] = array(
'border' => '#000000',
- 'color' => $config['graph_color7'],
+ 'color' => $config['graph_color5'],
'alpha' => CHART_DEFAULT_ALPHA
);
$color_series[5] = array(
'border' => '#000000',
- 'color' => $config['graph_color8'],
+ 'color' => $config['graph_color6'],
'alpha' => CHART_DEFAULT_ALPHA
);
$color_series[6] = array(
'border' => '#000000',
- 'color' => $config['graph_color9'],
+ 'color' => $config['graph_color7'],
'alpha' => CHART_DEFAULT_ALPHA
);
$color_series[7] = array(
'border' => '#000000',
- 'color' => $config['graph_color10'],
+ 'color' => $config['graph_color8'],
'alpha' => CHART_DEFAULT_ALPHA
);
$color_series[8] = array(
'border' => '#000000',
- 'color' => COL_GRAPH9,
+ 'color' => $config['graph_color9'],
'alpha' => CHART_DEFAULT_ALPHA
);
$color_series[9] = array(
'border' => '#000000',
- 'color' => COL_GRAPH10,
+ 'color' => $config['graph_color10'],
'alpha' => CHART_DEFAULT_ALPHA
);
$color_series[10] = array(
'border' => '#000000',
- 'color' => COL_GRAPH11,
+ 'color' => COL_GRAPH9,
'alpha' => CHART_DEFAULT_ALPHA
);
$color_series[11] = array(
'border' => '#000000',
- 'color' => COL_GRAPH12,
+ 'color' => COL_GRAPH10,
'alpha' => CHART_DEFAULT_ALPHA
);
$color_series[12] = array(
+ 'border' => '#000000',
+ 'color' => COL_GRAPH11,
+ 'alpha' => CHART_DEFAULT_ALPHA
+ );
+ $color_series[13] = array(
+ 'border' => '#000000',
+ 'color' => COL_GRAPH12,
+ 'alpha' => CHART_DEFAULT_ALPHA
+ );
+ $color_series[14] = array(
'border' => '#000000',
'color' => COL_GRAPH13,
'alpha' => CHART_DEFAULT_ALPHA
diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php
index a87de34dd7..9ccf2eb1cd 100644
--- a/pandora_console/include/functions_api.php
+++ b/pandora_console/include/functions_api.php
@@ -7012,7 +7012,6 @@ function api_get_graph_module_data($id, $thrash1, $other, $thrash2) {
$draw_events = 0;
$zoom = 1;
$label = $other['data'][3];
- $avg_only = 0;
$start_date = $other['data'][4];
$date = strtotime($start_date);
diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php
index f51f409d8f..415d60441d 100644
--- a/pandora_console/include/functions_config.php
+++ b/pandora_console/include/functions_config.php
@@ -498,9 +498,7 @@ function config_update_config () {
$error_update[] = __('Font path');
if (!config_update_value ('font_size', get_parameter('font_size')))
$error_update[] = __('Font size');
- if (!config_update_value ('flash_charts', (bool) get_parameter ('flash_charts')))
- $error_update[] = __('Interactive charts');
-
+
if (!config_update_value ('custom_favicon', (string) get_parameter ('custom_favicon')))
$error_update[] = __('Custom favicon');
if (!config_update_value ('custom_logo', (string) get_parameter ('custom_logo')))
@@ -610,8 +608,6 @@ function config_update_config () {
$error_update[] = __('Default type of module charts.');
if (!config_update_value ('type_interface_charts', (string) get_parameter('type_interface_charts', 'line')))
$error_update[] = __('Default type of interface charts.');
- if (!config_update_value ('only_average', (bool) get_parameter('only_average', false)))
- $error_update[] = __('Default show only average or min and max');
if (!config_update_value ('render_proc', (bool) get_parameter('render_proc', false)))
$error_update[] = __('Display data of proc modules in other format');
if (!config_update_value ('render_proc_ok', (string) get_parameter('render_proc_ok', __('Ok') )))
@@ -1175,11 +1171,7 @@ function config_process_config () {
if (!isset ($config['style'])) {
config_update_value ( 'style', 'pandora');
}
-
- if (!isset ($config['flash_charts'])) {
- config_update_value ( 'flash_charts', true);
- }
-
+
if (!isset ($config["login_background"])) {
config_update_value ('login_background', '');
}
@@ -2240,10 +2232,7 @@ function config_user_set_custom_config() {
// If block_size or flash_chart are provided then override global settings
if (!empty($userinfo["block_size"]) && ($userinfo["block_size"] != 0))
$config["block_size"] = $userinfo["block_size"];
-
- if ($userinfo["flash_chart"] != -1)
- $config["flash_charts"] = $userinfo["flash_chart"];
-
+
// Each user could have it's own timezone)
if (isset($userinfo["timezone"])) {
if ($userinfo["timezone"] != "") {
diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php
index 5e4ad2041a..1348afc96b 100644
--- a/pandora_console/include/functions_events.php
+++ b/pandora_console/include/functions_events.php
@@ -2239,7 +2239,6 @@ function events_page_details ($event, $server = "") {
);
if (defined('METACONSOLE')) {
- $graph_params["avg_only"] = 1;
// Set the server id
$graph_params["server"] = $server["id"];
}
diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php
index acc2c407ba..48ac7caed5 100644
--- a/pandora_console/include/functions_graph.php
+++ b/pandora_console/include/functions_graph.php
@@ -234,8 +234,11 @@ function grafico_modulo_sparse_data_chart (
global $config;
- //XXX add zoom
- $data_slice = $date_array['period'] / 250; //zoom
+ //XXXXX
+ //Para evitar mostrar todos los datos a la vez lo cual puede recargar se hace un sistema de cajas que parte de una constante = 250
+ //y el periodo de tiempo seleccionado ademas de poder ir reducciendo el nivel de cajas es decir aumentando el nivel de detalle de la grafica
+ //hasta la opcion full que mostraria todos los puntos(datos) que contiene ese periodo.
+ $data_slice = $date_array['period'] / (250 * $params['zoom']);
if( $data_module_graph['id_module_type'] == 23 ||
$data_module_graph['id_module_type'] == 3 ||
@@ -255,17 +258,32 @@ function grafico_modulo_sparse_data_chart (
);
}
else{
- $data = db_get_all_rows_filter (
- 'tagente_datos',
- array ('id_agente_modulo' => (int)$agent_module_id,
- "utimestamp > '". $date_array['start_date']. "'",
- "utimestamp < '". $date_array['final_date'] . "'",
- 'group' => "ROUND(utimestamp / $data_slice)",
- 'order' => 'utimestamp ASC'),
- array ('max(datos) as datos', 'min(utimestamp) as utimestamp'),
- 'AND',
- $data_module_graph['history_db']
- );
+ //all points(data)
+ if($params['zoom'] == 5){
+ $data = db_get_all_rows_filter (
+ 'tagente_datos',
+ array ('id_agente_modulo' => (int)$agent_module_id,
+ "utimestamp > '". $date_array['start_date']. "'",
+ "utimestamp < '". $date_array['final_date'] . "'",
+ 'order' => 'utimestamp ASC'),
+ array ('datos', 'utimestamp'),
+ 'AND',
+ $data_module_graph['history_db']
+ );
+ }
+ else{
+ $data = db_get_all_rows_filter (
+ 'tagente_datos',
+ array ('id_agente_modulo' => (int)$agent_module_id,
+ "utimestamp > '". $date_array['start_date']. "'",
+ "utimestamp < '". $date_array['final_date'] . "'",
+ 'group' => "ROUND(utimestamp / $data_slice)",
+ 'order' => 'utimestamp ASC'),
+ array ('sum(datos)/count(datos) as datos', 'min(utimestamp) as utimestamp'),
+ 'AND',
+ $data_module_graph['history_db']
+ );
+ }
}
if($data === false){
@@ -847,10 +865,13 @@ function grafico_modulo_sparse ($params) {
$params['graph_combined'] = false;
}
+ if(!isset($params['zoom'])){
+ $params['zoom'] = 1;
+ }
+
//XXXX Configurable
$params['grid_color'] = '#C1C1C1';
$params['legend_color'] = '#636363';
-
$params['font'] = $config['fontpath'];
$params['font-size'] = $config['font_size'];
$params['short_data'] = $config['short_module_graph_data'];
@@ -1318,6 +1339,18 @@ function graphic_combined_module (
return generator_chart_to_pdf('combined', $params, $params_combined, $module_list);
}
+ if(!isset($params['zoom'])){
+ $params['zoom'] = 1;
+ }
+
+ //XXXXXXXX
+ //XXXX Configurable
+ $params['grid_color'] = '#C1C1C1';
+ $params['legend_color'] = '#636363';
+ $params['font'] = $config['fontpath'];
+ $params['font-size'] = $config['font_size'];
+ $params['short_data'] = $config['short_module_graph_data'];
+
global $config;
global $graphic_type;
diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php
index c17b4650af..5cfca22016 100755
--- a/pandora_console/include/functions_reporting.php
+++ b/pandora_console/include/functions_reporting.php
@@ -6447,13 +6447,6 @@ function reporting_simple_graph($report, $content, $type = 'dinamic',
$label = reporting_label_macro($content, $label);
}
- $only_avg = true;
- // Due to database compatibility problems, the 'only_avg' value
- // is stored into the json contained into the 'style' column.
- if (isset($content['style']['only_avg'])) {
- $only_avg = (bool) $content['style']['only_avg'];
- }
-
if (isset($content['style']['fullscale'])) {
$fullscale = (bool) $content['style']['fullscale'];
}
@@ -6484,7 +6477,6 @@ function reporting_simple_graph($report, $content, $type = 'dinamic',
'agent_module_id' => $content['id_agent_module'],
'period' => $content['period'],
'title' => $label,
- 'avg_only' => $only_avg,
'pure' => false,
'date' => $report["datetime"],
'only_image' => $only_image,
diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js
index 7d478e90cc..722d1dbf6b 100644
--- a/pandora_console/include/graphs/flot/pandora.flot.js
+++ b/pandora_console/include/graphs/flot/pandora.flot.js
@@ -902,9 +902,6 @@ function pandoraFlotArea( graph_id, values, legend,
//XXXXX
var markins_graph = true;
- var legend_events = null;
- var legend_alerts = null;
-
// If threshold and up are the same, that critical or warning is disabled
if (yellow_threshold == yellow_up){
yellow_inverse = false;
@@ -923,10 +920,6 @@ function pandoraFlotArea( graph_id, values, legend,
var red_only_min = ((red_up == 0) && (red_threshold != 0));
//color
- var normalw = '#efe';
- var warningw = '#ffe';
- var criticalw = '#fee';
- var normal = '#0f0';
var warning = 'yellow';
var critical = 'red';
@@ -1629,8 +1622,8 @@ console.log(grid_color);
autoHighlight: true
},
xaxis: {
- min: date_array.start_date * 1000,
- max: date_array.final_date * 1000
+ min: min_x,
+ max: max_x
},
xaxes: [{
axisLabelUseCanvas: true,
@@ -2004,7 +1997,7 @@ if (vconsole) {
.eq(i).css('color', legend_color);
$('#legend_' + graph_id + ' .legendLabel')
- .eq(i).css('font-family',font+'Font');
+ .eq(i).css('font-family',font);
i++;
}
diff --git a/pandora_console/mobile/operation/module_graph.php b/pandora_console/mobile/operation/module_graph.php
index 31be54c7f8..07037426b4 100644
--- a/pandora_console/mobile/operation/module_graph.php
+++ b/pandora_console/mobile/operation/module_graph.php
@@ -24,7 +24,6 @@ class ModuleGraph {
private $width = 0;
private $height = 0;
private $draw_alerts = 0;
- private $avg_only = 0;
private $start_date = 0;
private $time_compare_separated = 0;
private $time_compare_overlapped = 0;
@@ -65,7 +64,6 @@ class ModuleGraph {
}
$this->draw_events = (int)$system->getRequest('draw_events', 0);
$this->draw_alerts = (int)$system->getRequest('draw_alerts', 0);
- $this->avg_only = (int)$system->getRequest('avg_only', 0);
$this->start_date = $system->getRequest('start_date', false);
if ($this->start_date === false) {
$this->start_date = date("Y-m-d");
@@ -144,7 +142,6 @@ class ModuleGraph {
'width' => $this->width,
'height' => $this->height,
'show_alerts' => $this->draw_alerts,
- 'avg_only' => $this->avg_only,
'date' => $date,
'unit' => $unit,
'baseline' => $this->baseline,
@@ -245,7 +242,6 @@ class ModuleGraph {
postvars["time_compare_separated"] = ($("input[name = 'time_compare_separated']").is(":checked"))?1:0;
postvars["time_compare_overlapped"] = ($("input[name = 'time_compare_overlapped']").is(":checked"))?1:0;
postvars["unknown_graph"] = ($("input[name = 'unknown_graph']").is(":checked"))?1:0;;
- postvars["avg_only"] = ($("input[name = 'avg_only']").is(":checked"))?1:0;;
postvars["period_hours"] = $("input[name = 'period_hours']").val();
postvars["zoom"] = $("input[name = 'zoom']").val();
@@ -358,14 +354,6 @@ class ModuleGraph {
);
$ui->formAddCheckbox($options);
- $options = array(
- 'name' => 'avg_only',
- 'value' => 1,
- 'checked' => (bool)$this->avg_only,
- 'label' => __('Avg Only')
- );
- $ui->formAddCheckbox($options);
-
$options = array(
'label' => __('Time range (hours)'),
'name' => 'period_hours',
diff --git a/pandora_console/operation/agentes/graphs.php b/pandora_console/operation/agentes/graphs.php
index e33d499fe8..2c1e15a79c 100644
--- a/pandora_console/operation/agentes/graphs.php
+++ b/pandora_console/operation/agentes/graphs.php
@@ -29,7 +29,6 @@ if (! check_acl ($config['id_user'], $id_grupo, "AR") && ! check_acl ($config['i
require_once ($config["homedir"] . '/include/functions_graph.php');
$draw_alerts = get_parameter("draw_alerts", 0);
-$avg_only = get_parameter ("avg_only", 1);
$period = get_parameter ("period", SECONDS_1HOUR);
$width = get_parameter ("width", 555);
$height = get_parameter ("height", 245);
@@ -228,7 +227,6 @@ else {
. 'data-draw_events="'. (int)$draw_events . '"'
. 'data-title="'. $title . '"'
. 'data-draw_alerts="'. (int)$draw_alerts . '"'
- . 'data-avg_only="'. (int)$avg_only . '"'
. 'data-date="'. $date . '"'
. 'data-unit="'. $unit . '"'
. 'data-date="'. $date . '"'
@@ -401,7 +399,6 @@ echo "";
height: height,
title: title,
show_alerts: showAlerts,
- avg_only: avgOnly,
date: date,
unit: unit,
type_g: type_g
@@ -467,7 +464,6 @@ echo "";
var showEvents = $container.data('draw_events');
var title = $container.data('title');
var showAlerts = $container.data('draw_alerts');
- var avgOnly = $container.data('avg_only');
var date = $container.data('date');
var unit = $container.data('unit');
var date = $container.data('date');
diff --git a/pandora_console/operation/agentes/interface_traffic_graph_win.php b/pandora_console/operation/agentes/interface_traffic_graph_win.php
index 04a0316355..7bd9499ff9 100644
--- a/pandora_console/operation/agentes/interface_traffic_graph_win.php
+++ b/pandora_console/operation/agentes/interface_traffic_graph_win.php
@@ -102,15 +102,6 @@ $interface_traffic_modules = array(
period_select_init(periodSelectId);
};
-
- function show_others() {
- if (!$("#checkbox-avg_only").attr('checked')) {
- $("#hidden-show_other").val(1);
- }
- else {
- $("#hidden-show_other").val(0);
- }
- }
-->
@@ -165,19 +156,6 @@ $interface_traffic_modules = array(
}
}
- if ($zoom > 1) {
- $height = $height * ($zoom / 2.1);
- $width = $width * ($zoom / 1.4);
- echo "";
- }
-
- /*$current = date("Y-m-d");
-
- if ($start_date != $current)
- $date = strtotime($start_date);
- else
- $date = $utime;
- */
$date = strtotime("$start_date $start_time");
$now = time();
@@ -203,16 +181,25 @@ $interface_traffic_modules = array(
'date' => $date,
'homeurl' => $config['homeurl'],
'percentil' => (($show_percentil)? $config['percentil'] : null),
- 'fullscale' => $fullscale
+ 'fullscale' => $fullscale,
+ 'zoom' => $zoom
);
+ if($config['type_interface_charts'] == 'line'){
+ $stacked = CUSTOM_GRAPH_LINE;
+ }
+ else{
+ $stacked = CUSTOM_GRAPH_AREA;
+ }
+
$params_combined = array(
'weight_list' => array(),
'projection' => false,
'labels' => array_keys($interface_traffic_modules),
'from_interface' => true,
'modules_series' => array_values($interface_traffic_modules),
- 'return' => 0
+ 'return' => 0,
+ 'stacked' => $stacked
);
graphic_combined_module(
@@ -297,7 +284,8 @@ $interface_traffic_modules = array(
$options[2] = 'x2';
$options[3] = 'x3';
$options[4] = 'x4';
- $data[1] = html_print_select($options, "zoom", $zoom, '', '', 0, true);
+ $options[5] = __('Full');
+ $data[1] = html_print_select($options, "zoom", $zoom, '', '', 0, true, false, false);
$table->data[] = $data;
$table->rowclass[] = '';
diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php
index f433fb626a..722a7fb2f4 100644
--- a/pandora_console/operation/agentes/stat_win.php
+++ b/pandora_console/operation/agentes/stat_win.php
@@ -96,15 +96,6 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
period_select_init(periodSelectId);
};
-
- function show_others() {
- if ($('#checkbox-avg_only').is(":checked") == true) {
- $("#hidden-show_other").val(1);
- }
- else {
- $("#hidden-show_other").val(0);
- }
- }
@@ -142,16 +133,6 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
$draw_alerts = get_parameter("draw_alerts", 0);
- if(isset($config['only_average'])){
- $avg_only = $config['only_average'];
- }
-
- $show_other = get_parameter('show_other',-1);
-
- if ($show_other != -1) {
- $avg_only = $show_other;
- }
-
$period = get_parameter ("period");
$id = get_parameter ("id", 0);
$label = get_parameter ("label", "");
@@ -236,7 +217,6 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
'title' => $label_graph,
'unit_name' => $unit,
'show_alerts' => $draw_alerts,
- 'avg_only' => $avg_only,
'date' => $date,
'unit' => $unit,
'baseline' => $baseline,
@@ -246,7 +226,8 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
'show_unknown' => $unknown_graph,
'percentil' => (($show_percentil)? $config['percentil'] : null),
'type_graph' => $config['type_module_charts'],
- 'fullscale' => $fullscale
+ 'fullscale' => $fullscale,
+ 'zoom' => $zoom
);
echo grafico_modulo_sparse ($params);
echo ' ';
@@ -303,16 +284,6 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
$table->data[] = $data;
$table->rowclass[] = '';
- if ($graph_type != "boolean" && $graph_type != "string") {
- $data = array();
- $data[0] = __('Avg. Only');
- $data[1] = html_print_checkbox ("avg_only", 1,
- (bool)$avg_only, true, false, 'show_others()');
- $data[1] .= html_print_input_hidden('show_other', 0, true);
- $table->data[] = $data;
- $table->rowclass[] = '';
- }
-
$data = array();
$data[0] = __('Begin date');
$data[1] = html_print_input_text ("start_date", $start_date,'', 10, 20, true);
@@ -326,14 +297,15 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
$table->rowclass[] = '';
$data = array();
- $data[0] = __('Zoom factor');
+ $data[0] = __('Zoom');
$options = array ();
$options[$zoom] = 'x' . $zoom;
$options[1] = 'x1';
$options[2] = 'x2';
$options[3] = 'x3';
$options[4] = 'x4';
- $data[1] = html_print_select ($options, "zoom", $zoom, '', '', 0, true);
+ $options[5] = __('full');
+ $data[1] = html_print_select ($options, "zoom", $zoom, '', '', 0, true, false, false);
$table->data[] = $data;
$table->rowclass[] = '';
@@ -367,11 +339,13 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
$table->data[] = $data;
$table->rowclass[] = '';
+ /*
$data = array();
$data[0] = __('Show event graph');
$data[1] = html_print_checkbox ("show_events_graph", 1, (bool) $show_events_graph, true);
$table->data[] = $data;
$table->rowclass[] = '';
+ */
switch ($graph_type) {
case 'boolean':
diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php
index 35c7061ff0..812df978f1 100644
--- a/pandora_console/operation/agentes/status_monitor.php
+++ b/pandora_console/operation/agentes/status_monitor.php
@@ -1268,7 +1268,6 @@ if (!empty($result)) {
);
if (is_metaconsole() && isset($row['server_id'])) {
- $graph_params['avg_only'] = 1;
// Set the server id
$graph_params['server'] = $row['server_id'];
}
diff --git a/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_view.php b/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_view.php
index 837e5d35ea..64972139aa 100644
--- a/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_view.php
+++ b/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_view.php
@@ -164,8 +164,7 @@ function main_intel_dcm_agent_view () {
$draw_events = false;
$draw_alerts = false;
$period = 7200;
- $avg_only = true;
-
+
$module = modules_get_agentmodule_id (io_safe_input("Avg. Power"), $id_agent);
$unit = modules_get_unit ($module['id_agente_modulo']);
@@ -178,7 +177,6 @@ function main_intel_dcm_agent_view () {
'title' => $module['nombre'],
'unit_name' => null,
'show_alerts' => $draw_alerts,
- 'avg_only' => $avg_only,
'pure' => false,
'date' => $date,
'unit' => $unit
@@ -213,7 +211,6 @@ function main_intel_dcm_agent_view () {
'title' => $module['nombre'],
'unit_name' => null,
'show_alerts' => $draw_alerts,
- 'avg_only' => $avg_only,
'pure' => false,
'date' => $date,
'unit' => $unit
@@ -232,7 +229,6 @@ function main_intel_dcm_agent_view () {
'title' => $module['nombre'],
'unit_name' => null,
'show_alerts' => $draw_alerts,
- 'avg_only' => $avg_only,
'pure' => false,
'date' => $date,
'unit' => $unit
|