'api_password']
)
);
if ($apiPassword === $data_decoded['apipass']) {
$bypassLogin = true;
}
}
if (!isset($config[$slicebar])) {
$config[$slicebar] = $slicebar_value;
}
// Try to initialize session using existing php session id.
$user = new PandoraFMS\User(['phpsessionid' => $session_id]);
if (check_login(false) === false && $bypassLogin !== true) {
// Error handler.
?>
load_tables();
}
$hack_metaconsole = (is_metaconsole() === true) ? '../../' : '';
?>
Pandora FMS Graph
;'>
0,
'height' => 0,
];
$style = 'width:100%;';
if (isset($params['options']['viewport']) === true) {
$viewport = $params['options']['viewport'];
if (empty($viewport['width']) === false) {
$style .= 'width:'.$viewport['width'].'px;';
}
if (empty($viewport['height']) === false) {
$style .= 'height:'.$viewport['height'].'px;';
}
}
echo '
';
switch ($type_graph_pdf) {
case 'combined':
$params['pdf'] = true;
$result = graphic_combined_module(
$module_list,
$params,
$params_combined
);
echo $result;
break;
case 'sparse':
$params['pdf'] = true;
echo grafico_modulo_sparse($params);
break;
case 'pie_graph':
$params['pdf'] = true;
$chart = get_build_setup_charts(
'PIE',
$params['options'],
$params['chart_data']
);
echo $chart->render(true);
break;
case 'vbar_graph':
$params['pdf'] = true;
$chart = get_build_setup_charts(
'BAR',
$params['options'],
$params['chart_data']
);
echo $chart->render(true);
break;
case 'ring_graph':
$params['pdf'] = true;
$params['options']['width'] = 500;
$params['options']['height'] = 500;
$chart = get_build_setup_charts(
'DOUGHNUT',
$params['options'],
$params['chart_data']
);
echo $chart->render(true);
break;
case 'line_graph':
$params['pdf'] = true;
$params['options']['width'] = '100%';
$params['options']['height'] = 200;
$chart = get_build_setup_charts(
'LINE',
$params['options'],
$params['chart_data']
);
echo $chart->render(true);
break;
case 'slicebar':
// TO-DO Cambiar esto para que se pase por POST, NO SE PUEDE PASAR POR GET.
$params['graph_data'] = json_decode(io_safe_output($config[$params['tokem_config']]), true);
delete_config_token($params['tokem_config']);
echo flot_slicesbar_graph(
$params['graph_data'],
$params['period'],
$params['width'],
$params['height'],
$params['legend'],
$params['colors'],
$params['fontpath'],
$params['round_corner'],
$params['homeurl'],
$params['watermark'],
$params['adapt_key'],
$params['stat_winalse'],
$params['id_agent'],
$params['full_legend_daterray'],
$params['not_interactive'],
$params['ttl'],
$params['sizeForTicks'],
$params['show'],
$params['date_to'],
$params['server_id']
);
break;
default:
// Code...
break;
}
echo '
';
?>