Fixed errors PDF images relative routes

This commit is contained in:
daniel 2019-12-17 18:18:00 +01:00 committed by Daniel Rodriguez
parent 3b0de7d448
commit 3e58746cd5
4 changed files with 21 additions and 7 deletions

View File

@ -3868,8 +3868,8 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined=false
}
if ($type_graph_pdf === 'slicebar') {
$height_img = 90;
$params['height'] = 90;
$width_img = 360;
$height_img = 70;
}
$params_encode_json = urlencode(json_encode($params));

View File

@ -725,11 +725,14 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
$table->data['error']['cell'] = __('There are no Agent/Modules defined');
}
if (!empty($item['charts'])) {
if (empty($item['charts']) === false) {
$table1 = new stdClass();
$table1->width = '99%';
$table1->width = '100%';
$table1->size = [];
$table1->size[0] = '10%';
if ($pdf !== 0) {
$table1->size[0] = '20%';
}
$table1->data = [];
@ -3424,13 +3427,20 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
// Check failover availability report.
if ($item['data'][$k_chart]['failover'] === '') {
$table1 = new stdClass();
$table1->width = '99%';
$table1->width = '100%';
$table1->data = [];
$table1->size = [];
$table1->size[0] = '10%';
$table1->size[1] = '80%';
$table1->size[2] = '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][1] = $chart['chart'];
$table1->data[0][2] = "<span style = 'font: bold 2em Arial, Sans-serif; color: ".$color."'>".$sla_value.'</span>';

View File

@ -22,8 +22,8 @@ function include_javascript_d3($return=false)
$is_include_javascript = true;
if (is_metaconsole()) {
$output .= '<script type="text/javascript" src="'.'../../'.'include/javascript/d3.3.5.14.js" charset="utf-8"></script>';
$output .= '<script type="text/javascript" src="'.'../../'.'include/graphs/pandora.d3.js" charset="utf-8"></script>';
$output .= '<script type="text/javascript" src="'.$config['homeurl'].'../../include/javascript/d3.3.5.14.js" charset="utf-8"></script>';
$output .= '<script type="text/javascript" src="'.$config['homeurl'].'../../include/graphs/pandora.d3.js" charset="utf-8"></script>';
} else {
$output .= '<script type="text/javascript" src="'.$config['homeurl'].'include/javascript/d3.3.5.14.js" charset="utf-8"></script>';
$output .= '<script type="text/javascript" src="'.$config['homeurl'].'include/graphs/pandora.d3.js" charset="utf-8"></script>';

View File

@ -196,6 +196,10 @@ h4 {
color: #3f3f3f;
text-transform: none;
}
table tbody tr td h4 {
color: #ffffff;
}
a {
color: #3f3f3f;
text-decoration: none;