mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
fixed errors graph
This commit is contained in:
parent
ead978ea60
commit
05d8d0ccf5
@ -2926,8 +2926,6 @@ function chooseType() {
|
|||||||
$("#row_agent").show();
|
$("#row_agent").show();
|
||||||
$("#row_module").show();
|
$("#row_module").show();
|
||||||
$("#row_period").show();
|
$("#row_period").show();
|
||||||
$("#row_show_in_landscape").show();
|
|
||||||
$("#row_time_compare_overlapped").show();
|
|
||||||
$("#row_historical_db_check").hide();
|
$("#row_historical_db_check").hide();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -2937,8 +2935,6 @@ function chooseType() {
|
|||||||
$("#row_module").show();
|
$("#row_module").show();
|
||||||
$("#row_period1").show();
|
$("#row_period1").show();
|
||||||
$("#row_estimate").show();
|
$("#row_estimate").show();
|
||||||
$("#row_show_in_two_columns").show();
|
|
||||||
$("#row_show_in_landscape").show();
|
|
||||||
$("#row_historical_db_check").hide();
|
$("#row_historical_db_check").hide();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -2957,8 +2953,6 @@ function chooseType() {
|
|||||||
$("#row_description").show();
|
$("#row_description").show();
|
||||||
$("#row_period").show();
|
$("#row_period").show();
|
||||||
$("#row_custom_graph").show();
|
$("#row_custom_graph").show();
|
||||||
$("#row_show_in_two_columns").show();
|
|
||||||
$("#row_show_in_landscape").show();
|
|
||||||
$("#row_historical_db_check").hide();
|
$("#row_historical_db_check").hide();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3116,9 +3110,7 @@ function chooseType() {
|
|||||||
$("#row_description").show();
|
$("#row_description").show();
|
||||||
$("#row_query").show();
|
$("#row_query").show();
|
||||||
$("#row_max_items").show();
|
$("#row_max_items").show();
|
||||||
$("#row_show_in_two_columns").show();
|
|
||||||
$("#row_dyn_height").show();
|
$("#row_dyn_height").show();
|
||||||
$("#row_show_in_landscape").show();
|
|
||||||
$("#row_servers").show();
|
$("#row_servers").show();
|
||||||
$("#row_historical_db_check").show();
|
$("#row_historical_db_check").show();
|
||||||
break;
|
break;
|
||||||
|
@ -3053,10 +3053,20 @@ function series_type_graph_array($data, $show_elements_graph){
|
|||||||
|
|
||||||
if($show_elements_graph['id_widget_dashboard']){
|
if($show_elements_graph['id_widget_dashboard']){
|
||||||
$opcion = unserialize(db_get_value_filter('options','twidget_dashboard',array('id' => $show_elements_graph['id_widget_dashboard'])));
|
$opcion = unserialize(db_get_value_filter('options','twidget_dashboard',array('id' => $show_elements_graph['id_widget_dashboard'])));
|
||||||
foreach ($opcion as $key => $value) {
|
if($show_elements_graph['graph_combined']){
|
||||||
|
|
||||||
|
foreach ($show_elements_graph['modules_id'] as $key => $value) {
|
||||||
|
$color_series[$key] = array(
|
||||||
|
'border' => '#000000',
|
||||||
|
'color' => $opcion[$value],
|
||||||
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
$color_series[0] = array(
|
$color_series[0] = array(
|
||||||
'border' => '#000000',
|
'border' => '#000000',
|
||||||
'color' => $opcion['avg'],
|
'color' => $opcion['max'],
|
||||||
'alpha' => CHART_DEFAULT_ALPHA
|
'alpha' => CHART_DEFAULT_ALPHA
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ function config_create_value ($token, $value) {
|
|||||||
*/
|
*/
|
||||||
function config_update_value ($token, $value) {
|
function config_update_value ($token, $value) {
|
||||||
global $config;
|
global $config;
|
||||||
|
$config['flash_charts'] = true;
|
||||||
// Include functions_io to can call __() function
|
// Include functions_io to can call __() function
|
||||||
include_once($config['homedir'] . '/include/functions_io.php');
|
include_once($config['homedir'] . '/include/functions_io.php');
|
||||||
|
|
||||||
|
@ -701,7 +701,8 @@ function grafico_modulo_sparse_data(
|
|||||||
'show_overview' => true,
|
'show_overview' => true,
|
||||||
'return_img_base_64' => false,
|
'return_img_base_64' => false,
|
||||||
'image_treshold' => false,
|
'image_treshold' => false,
|
||||||
'graph_combined' => false
|
'graph_combined' => false,
|
||||||
|
'zoom' => 1
|
||||||
);
|
);
|
||||||
*/
|
*/
|
||||||
function grafico_modulo_sparse ($params) {
|
function grafico_modulo_sparse ($params) {
|
||||||
@ -873,7 +874,7 @@ function grafico_modulo_sparse ($params) {
|
|||||||
$params['grid_color'] = '#C1C1C1';
|
$params['grid_color'] = '#C1C1C1';
|
||||||
$params['legend_color'] = '#636363';
|
$params['legend_color'] = '#636363';
|
||||||
$params['font'] = $config['fontpath'];
|
$params['font'] = $config['fontpath'];
|
||||||
$params['font-size'] = $config['font_size'];
|
$params['font_size'] = $config['font_size'];
|
||||||
$params['short_data'] = $config['short_module_graph_data'];
|
$params['short_data'] = $config['short_module_graph_data'];
|
||||||
|
|
||||||
if($params['only_image']){
|
if($params['only_image']){
|
||||||
@ -1084,22 +1085,6 @@ function grafico_modulo_sparse ($params) {
|
|||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function graph_get_formatted_date($timestamp, $format1, $format2) {
|
|
||||||
global $config;
|
|
||||||
|
|
||||||
if ($config['flash_charts']) {
|
|
||||||
$date = date("$format1 $format2", $timestamp);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$date = date($format1, $timestamp);
|
|
||||||
if ($format2 != '') {
|
|
||||||
$date .= "\n".date($format2, $timestamp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $date;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Produces a combined/user defined graph
|
* Produces a combined/user defined graph
|
||||||
*
|
*
|
||||||
@ -1168,6 +1153,8 @@ function graphic_combined_module (
|
|||||||
$params_combined
|
$params_combined
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
global $config;
|
||||||
|
|
||||||
if(!isset($params_combined['from_interface'])){
|
if(!isset($params_combined['from_interface'])){
|
||||||
$params_combined['from_interface'] = false;
|
$params_combined['from_interface'] = false;
|
||||||
}
|
}
|
||||||
@ -1182,11 +1169,11 @@ function graphic_combined_module (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($id_graph == 0) {
|
if ($params_combined['id_graph'] == 0) {
|
||||||
$params_combined['stacked'] = CUSTOM_GRAPH_AREA;
|
$params_combined['stacked'] = CUSTOM_GRAPH_AREA;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$params_combined['stacked'] = db_get_row('tgraph', 'id_graph', $id_graph);
|
$params_combined['stacked'] = db_get_row('tgraph', 'id_graph', $params_combined['id_graph']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1334,6 +1321,7 @@ function graphic_combined_module (
|
|||||||
}
|
}
|
||||||
|
|
||||||
$params['graph_combined'] = true;
|
$params['graph_combined'] = true;
|
||||||
|
$params_combined['graph_combined'] = true;
|
||||||
|
|
||||||
if($params['only_image']){
|
if($params['only_image']){
|
||||||
return generator_chart_to_pdf('combined', $params, $params_combined, $module_list);
|
return generator_chart_to_pdf('combined', $params, $params_combined, $module_list);
|
||||||
@ -1348,13 +1336,15 @@ function graphic_combined_module (
|
|||||||
$params['grid_color'] = '#C1C1C1';
|
$params['grid_color'] = '#C1C1C1';
|
||||||
$params['legend_color'] = '#636363';
|
$params['legend_color'] = '#636363';
|
||||||
$params['font'] = $config['fontpath'];
|
$params['font'] = $config['fontpath'];
|
||||||
$params['font-size'] = $config['font_size'];
|
$params['font_size'] = $config['font_size'];
|
||||||
|
|
||||||
$params['short_data'] = $config['short_module_graph_data'];
|
$params['short_data'] = $config['short_module_graph_data'];
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
global $graphic_type;
|
global $graphic_type;
|
||||||
|
|
||||||
$sources = false;
|
$sources = false;
|
||||||
|
|
||||||
if ($params_combined['id_graph'] == 0) {
|
if ($params_combined['id_graph'] == 0) {
|
||||||
$count_modules = count($module_list);
|
$count_modules = count($module_list);
|
||||||
|
|
||||||
@ -1402,6 +1392,13 @@ function graphic_combined_module (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($module_list){
|
||||||
|
$params_combined['modules_id'] = $module_list;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$params_combined['modules_id'] = $modules;
|
||||||
|
}
|
||||||
|
|
||||||
if(isset($summatory)){
|
if(isset($summatory)){
|
||||||
$params_combined['summatory'] = $summatory;
|
$params_combined['summatory'] = $summatory;
|
||||||
}
|
}
|
||||||
@ -1543,6 +1540,8 @@ function graphic_combined_module (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($params_combined['projection'] && is_array($params_combined['projection'])){
|
if($params_combined['projection'] && is_array($params_combined['projection'])){
|
||||||
|
$date_array_projection = max($params_combined['projection']);
|
||||||
|
$date_array['final_date'] = $date_array_projection[0] / 1000;
|
||||||
$array_data['projection']['data']= $params_combined['projection'];
|
$array_data['projection']['data']= $params_combined['projection'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2252,7 +2251,7 @@ function graphic_agentaccess ($id_agent, $width, $height, $period = 0, $return =
|
|||||||
'backgroundColor' => '#f9faf9',
|
'backgroundColor' => '#f9faf9',
|
||||||
'type_graph' => 'area',
|
'type_graph' => 'area',
|
||||||
'font' => $config['fontpath'],
|
'font' => $config['fontpath'],
|
||||||
'font-size' => $config['font_size'],
|
'font_size' => $config['font_size'],
|
||||||
'array_data_create' => $data_array,
|
'array_data_create' => $data_array,
|
||||||
'show_overview' => false,
|
'show_overview' => false,
|
||||||
'show_export_csv' => false,
|
'show_export_csv' => false,
|
||||||
@ -4123,7 +4122,7 @@ function graph_netflow_aggregate_area ($data, $period, $width, $height, $unit =
|
|||||||
'backgroundColor' => 'white',
|
'backgroundColor' => 'white',
|
||||||
'type_graph' => 'area',
|
'type_graph' => 'area',
|
||||||
'font' => $config['fontpath'],
|
'font' => $config['fontpath'],
|
||||||
'font-size' => $config['font_size'],
|
'font_size' => $config['font_size'],
|
||||||
'array_data_create' => $chart
|
'array_data_create' => $chart
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4184,7 +4183,7 @@ function graph_netflow_total_area ($data, $period, $width, $height, $unit = '',
|
|||||||
'backgroundColor' => 'white',
|
'backgroundColor' => 'white',
|
||||||
'type_graph' => 'area',
|
'type_graph' => 'area',
|
||||||
'font' => $config['fontpath'],
|
'font' => $config['fontpath'],
|
||||||
'font-size' => $config['font_size'],
|
'font_size' => $config['font_size'],
|
||||||
'array_data_create' => $chart
|
'array_data_create' => $chart
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -6295,77 +6295,12 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
|
|||||||
$report,
|
$report,
|
||||||
$content);
|
$content);
|
||||||
|
|
||||||
$graphs = db_get_all_rows_field_filter ("tgraph_source",
|
$graphs = db_get_all_rows_field_filter ("tgraph", "id_graph", $content['id_gs']);
|
||||||
"id_graph", $content['id_gs']);
|
|
||||||
$modules = array ();
|
|
||||||
$weights = array ();
|
|
||||||
if ($graphs === false)
|
|
||||||
$graphs = array();
|
|
||||||
|
|
||||||
$labels = array();
|
|
||||||
foreach ($graphs as $graph_item) {
|
|
||||||
if ($type_report == 'automatic_graph') {
|
|
||||||
array_push ($modules, array(
|
|
||||||
'module' => $graph_item['id_agent_module'],
|
|
||||||
'server' => $graph_item['id_server']));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
array_push ($modules, $graph_item['id_agent_module']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (in_array('label',$content['style'])) {
|
|
||||||
if (defined('METACONSOLE')) {
|
|
||||||
$server_name = $content['server_name'];
|
|
||||||
$connection = metaconsole_get_connection($server_name);
|
|
||||||
if (!metaconsole_load_external_db($connection)) {
|
|
||||||
//ui_print_error_message ("Error connecting to ".$server_name);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$item = array('type' => 'custom_graph',
|
|
||||||
'id_agent' =>modules_get_agentmodule_agent($graph_item['id_agent_module']),
|
|
||||||
'id_agent_module'=>$graph_item['id_agent_module']);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$item = array('type' => 'custom_graph',
|
|
||||||
'id_agent' =>modules_get_agentmodule_agent($graph_item['id_agent_module']),
|
|
||||||
'id_agent_module'=>$graph_item['id_agent_module']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$label = reporting_label_macro($item, $content['style']['label']);
|
|
||||||
|
|
||||||
$labels[$graph_item['id_agent_module']] = $label;
|
|
||||||
if (defined('METACONSOLE')) {
|
|
||||||
//Restore db connection
|
|
||||||
metaconsole_restore_db();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
array_push ($weights, $graph_item["weight"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($config['metaconsole'] && $type_report != 'automatic_graph') {
|
|
||||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
|
||||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
|
||||||
metaconsole_connect($server);
|
|
||||||
}
|
|
||||||
|
|
||||||
$return['chart'] = '';
|
$return['chart'] = '';
|
||||||
// Get chart
|
|
||||||
//reporting_set_conf_charts($width, $height, $only_image, $type,
|
|
||||||
// $content, $ttl);
|
|
||||||
$width =null;
|
$width =null;
|
||||||
$height =null;
|
$height =null;
|
||||||
//height for bullet chart
|
|
||||||
/*
|
|
||||||
if($graph['stacked'] != 4){
|
|
||||||
$height += count($modules) * REPORTING_CUSTOM_GRAPH_LEGEND_EACH_MODULE_VERTICAL_SIZE;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
if(!$only_image){
|
|
||||||
$height = 50;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'dinamic':
|
case 'dinamic':
|
||||||
@ -6379,17 +6314,16 @@ $height =null;
|
|||||||
'only_image' => $pdf,
|
'only_image' => $pdf,
|
||||||
'homeurl' => ui_get_full_url(false, false, false, false),
|
'homeurl' => ui_get_full_url(false, false, false, false),
|
||||||
'ttl' => $ttl,
|
'ttl' => $ttl,
|
||||||
'percentil' => $graph["percentil"],
|
'percentil' => $graphs[0]["percentil"],
|
||||||
'fullscale' => $graph["fullscale"],
|
'fullscale' => $graphs[0]["fullscale"],
|
||||||
);
|
);
|
||||||
|
|
||||||
$params_combined = array(
|
$params_combined = array(
|
||||||
'weight_list' => $weights,
|
'stacked' => $graphs[0]["stacked"],
|
||||||
'stacked' => $graph["stacked"],
|
'summatory' => $graphs[0]["summatory_series"],
|
||||||
'labels' => $labels,
|
'average' => $graphs[0]["average_series"],
|
||||||
'summatory' => $graph["summatory_series"],
|
'modules_series' => $graphs[0]["modules_series"],
|
||||||
'average' => $graph["average_series"],
|
'id_graph' => $content['id_gs']
|
||||||
'modules_series' => $graph["modules_series"]
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$return['chart'] = graphic_combined_module(
|
$return['chart'] = graphic_combined_module(
|
||||||
|
@ -874,7 +874,7 @@ function pandoraFlotArea( graph_id, values, legend,
|
|||||||
var menu = params.menu;
|
var menu = params.menu;
|
||||||
var min_x = date_array['start_date'] *1000;
|
var min_x = date_array['start_date'] *1000;
|
||||||
var max_x = date_array['final_date'] *1000;
|
var max_x = date_array['final_date'] *1000;
|
||||||
var type = params.stacked;
|
var type = parseInt(params.stacked);
|
||||||
var show_legend = params.show_legend;
|
var show_legend = params.show_legend;
|
||||||
var image_treshold = params.image_treshold;
|
var image_treshold = params.image_treshold;
|
||||||
var short_data = params.short_data;
|
var short_data = params.short_data;
|
||||||
@ -884,7 +884,7 @@ function pandoraFlotArea( graph_id, values, legend,
|
|||||||
|
|
||||||
//XXXXXX colocar
|
//XXXXXX colocar
|
||||||
var force_integer = 0;
|
var force_integer = 0;
|
||||||
|
console.log(type);
|
||||||
if(typeof type === 'undefined' || type == ''){
|
if(typeof type === 'undefined' || type == ''){
|
||||||
type = params.type_graph;
|
type = params.type_graph;
|
||||||
}
|
}
|
||||||
@ -1475,7 +1475,7 @@ function pandoraFlotArea( graph_id, values, legend,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(type);
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'line':
|
case 'line':
|
||||||
case 2:
|
case 2:
|
||||||
@ -1593,7 +1593,7 @@ function pandoraFlotArea( graph_id, values, legend,
|
|||||||
}
|
}
|
||||||
|
|
||||||
var maxticks = date_array['period'] / 3600 / number_ticks;
|
var maxticks = date_array['period'] / 3600 / number_ticks;
|
||||||
console.log(grid_color);
|
|
||||||
var options = {
|
var options = {
|
||||||
series: {
|
series: {
|
||||||
stack: stacked,
|
stack: stacked,
|
||||||
@ -1628,7 +1628,7 @@ console.log(grid_color);
|
|||||||
xaxes: [{
|
xaxes: [{
|
||||||
axisLabelUseCanvas: true,
|
axisLabelUseCanvas: true,
|
||||||
axisLabelFontSizePixels: font_size,
|
axisLabelFontSizePixels: font_size,
|
||||||
axisLabelFontFamily: font+'Font',
|
axisLabelFontFamily: font,
|
||||||
axisLabelPadding: 0,
|
axisLabelPadding: 0,
|
||||||
mode: "time",
|
mode: "time",
|
||||||
timezone: "browser",
|
timezone: "browser",
|
||||||
@ -1730,7 +1730,7 @@ if (vconsole) {
|
|||||||
xaxes: [{
|
xaxes: [{
|
||||||
axisLabelUseCanvas: true,
|
axisLabelUseCanvas: true,
|
||||||
axisLabelFontSizePixels: font_size,
|
axisLabelFontSizePixels: font_size,
|
||||||
axisLabelFontFamily: font+'Font',
|
axisLabelFontFamily: font,
|
||||||
axisLabelPadding: 0,
|
axisLabelPadding: 0,
|
||||||
mode: "time",
|
mode: "time",
|
||||||
timezone: "browser",
|
timezone: "browser",
|
||||||
@ -1755,8 +1755,6 @@ if (vconsole) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#legend_' + graph_id + ' .legendLabel').css('color', legend_color);
|
|
||||||
|
|
||||||
// Adjust overview when main chart is resized
|
// Adjust overview when main chart is resized
|
||||||
$('#overview_'+graph_id).resize(function(){
|
$('#overview_'+graph_id).resize(function(){
|
||||||
update_left_width_canvas(graph_id);
|
update_left_width_canvas(graph_id);
|
||||||
@ -1805,7 +1803,7 @@ if (vconsole) {
|
|||||||
xaxes: [{
|
xaxes: [{
|
||||||
axisLabelUseCanvas: true,
|
axisLabelUseCanvas: true,
|
||||||
axisLabelFontSizePixels: font_size,
|
axisLabelFontSizePixels: font_size,
|
||||||
axisLabelFontFamily: font+'Font',
|
axisLabelFontFamily: font,
|
||||||
axisLabelPadding: 0,
|
axisLabelPadding: 0,
|
||||||
mode: "time",
|
mode: "time",
|
||||||
timezone: "browser",
|
timezone: "browser",
|
||||||
@ -1846,7 +1844,7 @@ if (vconsole) {
|
|||||||
xaxes: [{
|
xaxes: [{
|
||||||
axisLabelUseCanvas: true,
|
axisLabelUseCanvas: true,
|
||||||
axisLabelFontSizePixels: font_size,
|
axisLabelFontSizePixels: font_size,
|
||||||
axisLabelFontFamily: font+'Font',
|
axisLabelFontFamily: font,
|
||||||
axisLabelPadding: 0,
|
axisLabelPadding: 0,
|
||||||
mode: "time",
|
mode: "time",
|
||||||
timezone: "browser",
|
timezone: "browser",
|
||||||
@ -2163,6 +2161,7 @@ if (vconsole) {
|
|||||||
$('#legend_' + graph_id + ' .legendLabel')
|
$('#legend_' + graph_id + ' .legendLabel')
|
||||||
.eq(i).html(label_aux);
|
.eq(i).html(label_aux);
|
||||||
}
|
}
|
||||||
|
$('#legend_' + graph_id + ' .legendLabel').css('color', legend_color);
|
||||||
plot.clearCrosshair();
|
plot.clearCrosshair();
|
||||||
if(!vconsole){
|
if(!vconsole){
|
||||||
overview.clearCrosshair();
|
overview.clearCrosshair();
|
||||||
@ -2211,7 +2210,7 @@ if (vconsole) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function lFormatter(v, item) {
|
function lFormatter(v, item) {
|
||||||
return '<div style="font-size:'+font_size+'pt;">'+legend[v]+'</div>';
|
return '<div style="font-size:'+font_size+'pt; color:'+legend_color+';">'+legend[v]+'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (menu) {
|
if (menu) {
|
||||||
|
@ -137,7 +137,7 @@ function flot_area_graph (
|
|||||||
$return = "<div class='parent_graph' style='width: " . ($params['width']) . ";" . $background_style . "'>";
|
$return = "<div class='parent_graph' style='width: " . ($params['width']) . ";" . $background_style . "'>";
|
||||||
// Set some containers to legend, graph, timestamp tooltip, etc.
|
// Set some containers to legend, graph, timestamp tooltip, etc.
|
||||||
if($params['show_legend']){
|
if($params['show_legend']){
|
||||||
$return .= "<p id='legend_$graph_id' class='legend_graph' style='font-size:" . $params['font_size'] ."pt !important;'></p>";
|
$return .= "<p id='legend_$graph_id' class='legend_graph' style='font-size:" . $params['font_size'] ."pt !important; color:" . $params['legend_color'] . " !important;'></p>";
|
||||||
}
|
}
|
||||||
if(isset($params['graph_combined']) && $params['graph_combined'] &&
|
if(isset($params['graph_combined']) && $params['graph_combined'] &&
|
||||||
(!isset($params['from_interface']) || !$params['from_interface']) ){
|
(!isset($params['from_interface']) || !$params['from_interface']) ){
|
||||||
@ -280,7 +280,9 @@ function flot_area_graph (
|
|||||||
"JSON.parse('$params'), \n" .
|
"JSON.parse('$params'), \n" .
|
||||||
"JSON.parse('$array_events_alerts')".
|
"JSON.parse('$array_events_alerts')".
|
||||||
");";
|
");";
|
||||||
|
$return .= "$('#legend_" . $graph_id . " .legendLabel').css('color', 'green')";
|
||||||
$return .= "});";
|
$return .= "});";
|
||||||
|
|
||||||
$return .= "</script>";
|
$return .= "</script>";
|
||||||
|
|
||||||
// Parent layer
|
// Parent layer
|
||||||
|
@ -4629,13 +4629,11 @@ form ul.form_flex li ul li{
|
|||||||
border: 0px;
|
border: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
.yAxis.y1Axis > .tickLabel {
|
.yAxis.y1Axis > .tickLabel {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
line-height: 1.05em!important;
|
line-height: 1.05em!important;
|
||||||
width: auto!important;
|
width: auto!important;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
.pandora_confirm_dialog .ui-dialog-buttonset {
|
.pandora_confirm_dialog .ui-dialog-buttonset {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -384,6 +384,9 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
|
|
||||||
$form_table = html_print_table($table, true);
|
$form_table = html_print_table($table, true);
|
||||||
|
$form_table .= '<div style="width:100%; text-align:right;">' .
|
||||||
|
html_print_submit_button(__('Reload'), "submit", false,
|
||||||
|
'class="sub upd"', true) . "</div>";
|
||||||
|
|
||||||
unset($table);
|
unset($table);
|
||||||
|
|
||||||
@ -400,14 +403,6 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
|||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
|
|
||||||
$data = array();
|
|
||||||
$data[0] = '<div style="width:100%; text-align:right;">' .
|
|
||||||
html_print_submit_button(__('Reload'), "submit", false,
|
|
||||||
'class="sub upd"', true) .
|
|
||||||
"</div>";
|
|
||||||
$table->data[] = $data;
|
|
||||||
$table->rowclass[] = '';
|
|
||||||
|
|
||||||
$params['body_text'] .= html_print_table($table, true);
|
$params['body_text'] .= html_print_table($table, true);
|
||||||
$params['body_text'] .= '</form>';
|
$params['body_text'] .= '</form>';
|
||||||
$params['body_text'] .= '</div>'; // outer
|
$params['body_text'] .= '</div>'; // outer
|
||||||
|
@ -104,6 +104,7 @@ if ($view_graph) {
|
|||||||
$events = $graph["events"];
|
$events = $graph["events"];
|
||||||
$description = $graph["description"];
|
$description = $graph["description"];
|
||||||
$stacked = (int) get_parameter ('stacked', -1);
|
$stacked = (int) get_parameter ('stacked', -1);
|
||||||
|
|
||||||
$percentil = ($graph['percentil']) ? 1 : null;
|
$percentil = ($graph['percentil']) ? 1 : null;
|
||||||
$check = get_parameter('threshold',false);
|
$check = get_parameter('threshold',false);
|
||||||
$fullscale = ($graph['fullscale']) ? 1 : null;
|
$fullscale = ($graph['fullscale']) ? 1 : null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user