Merge branch 'ent-5204-Resolucion-imagenes-fechas-graficas-en-PDF' into 'develop'
Fixed resulution charts See merge request artica/pandorafms!3077
This commit is contained in:
commit
fd0db4b6bc
|
@ -169,7 +169,7 @@ if (file_exists('languages/'.$user_language.'.mo') === true) {
|
||||||
$module_list = json_decode($_REQUEST['data_module_list'], true);
|
$module_list = json_decode($_REQUEST['data_module_list'], true);
|
||||||
$type_graph_pdf = $_REQUEST['type_graph_pdf'];
|
$type_graph_pdf = $_REQUEST['type_graph_pdf'];
|
||||||
|
|
||||||
if ($params['vconsole'] === false) {
|
if (isset($params['vconsole']) === false || $params['vconsole'] === false) {
|
||||||
$params['width'] = (int) $_REQUEST['viewport_width'];
|
$params['width'] = (int) $_REQUEST['viewport_width'];
|
||||||
if ((isset($params['width']) === false
|
if ((isset($params['width']) === false
|
||||||
|| ($params['width'] <= 0))
|
|| ($params['width'] <= 0))
|
||||||
|
@ -180,7 +180,7 @@ if (file_exists('languages/'.$user_language.'.mo') === true) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type_graph_pdf === 'slicebar') {
|
if ($type_graph_pdf === 'slicebar') {
|
||||||
$params['width'] = 150;
|
$params['width'] = 100;
|
||||||
$params['height'] = 70;
|
$params['height'] = 70;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3870,23 +3870,12 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined=false
|
||||||
$img_url = ui_get_full_url(false).$hack_metaconsole.'/attachment/'.$img_file;
|
$img_url = ui_get_full_url(false).$hack_metaconsole.'/attachment/'.$img_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
$width_img = 500;
|
$width_img = 550;
|
||||||
|
$height_img = $params['height'];
|
||||||
|
|
||||||
if ($params['vconsole'] === false) {
|
if ((int) $params['landscape'] === 1) {
|
||||||
// Set height image.
|
$height_img = 150;
|
||||||
$height_img = 170;
|
$params['height'] = 150;
|
||||||
$params['height'] = 170;
|
|
||||||
if ((int) $params['landscape'] === 1) {
|
|
||||||
$height_img = 150;
|
|
||||||
$params['height'] = 150;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($type_graph_pdf === 'slicebar') {
|
|
||||||
$width_img = 360;
|
|
||||||
$height_img = 70;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$height_img = $params['height'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$params_encode_json = urlencode(json_encode($params));
|
$params_encode_json = urlencode(json_encode($params));
|
||||||
|
|
|
@ -3473,7 +3473,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check failover availability report.
|
// Check failover availability report.
|
||||||
if ($item['data'][$k_chart]['failover'] === '') {
|
if (empty($item['data'][$k_chart]['failover']) === true) {
|
||||||
$table1 = new stdClass();
|
$table1 = new stdClass();
|
||||||
$table1->width = '100%';
|
$table1->width = '100%';
|
||||||
$table1->data = [];
|
$table1->data = [];
|
||||||
|
@ -3482,12 +3482,6 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
|
||||||
$table1->size[1] = '80%';
|
$table1->size[1] = '80%';
|
||||||
$table1->size[2] = '5%';
|
$table1->size[2] = '5%';
|
||||||
$table1->size[3] = '5%';
|
$table1->size[3] = '5%';
|
||||||
if ($pdf !== 0) {
|
|
||||||
$table1->size[0] = '20%';
|
|
||||||
$table1->size[1] = '60%';
|
|
||||||
$table1->size[2] = '10%';
|
|
||||||
$table1->size[3] = '10%';
|
|
||||||
}
|
|
||||||
|
|
||||||
$table1->data[0][0] = $chart['agent'].'<br />'.$chart['module'];
|
$table1->data[0][0] = $chart['agent'].'<br />'.$chart['module'];
|
||||||
$table1->data[0][1] = $chart['chart'];
|
$table1->data[0][1] = $chart['chart'];
|
||||||
|
|
Loading…
Reference in New Issue