From 0460b465f030d4cb9cd1d71c9009c5217fb424ad Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 27 Nov 2018 17:43:59 +0100 Subject: [PATCH] fixed warnings and font chart for pdf report --- pandora_console/include/chart_generator.php | 8 ++++---- pandora_console/include/web2image.js | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/chart_generator.php b/pandora_console/include/chart_generator.php index 8ea57cf3b6..d11445b1dc 100644 --- a/pandora_console/include/chart_generator.php +++ b/pandora_console/include/chart_generator.php @@ -123,7 +123,7 @@ if (file_exists ('languages/'.$user_language.'.mo')) { $params['height'], $params['water_mark_url'], $params['font'], - $params['font_size'], + $config['font_size'], $params['legend_position'], $params['colors'], $params['hide_labels'] @@ -142,7 +142,7 @@ if (file_exists ('languages/'.$user_language.'.mo')) { $params['water_mark_url'], $params['homedir'], $params['font'], - $params['font_size'], + $config['font_size'], $params['from_ux'], $params['from_wux'], $params['backgroundColor'], @@ -156,7 +156,7 @@ if (file_exists ('languages/'.$user_language.'.mo')) { $params['height'], $params['water_mark_url'], $params['font'], - $params['font_size'], + $config['font_size'], $params['backgroundColor'], $params['tick_color'], $params['val_min'], @@ -176,7 +176,7 @@ if (file_exists ('languages/'.$user_language.'.mo')) { '', $params['water_mark'], $params['font'], - $params['font_size'], + $config['font_size'], $params['unit'], $params['ttl'], $params['homeurl'], diff --git a/pandora_console/include/web2image.js b/pandora_console/include/web2image.js index 6c2edeb47c..08419bb118 100644 --- a/pandora_console/include/web2image.js +++ b/pandora_console/include/web2image.js @@ -51,14 +51,18 @@ page.open(url, 'POST', post_data, function start(status) { page.onLoadFinished = function (status) { if(!base_64){ - page.render(output_filename, {format: 'png'}); + setTimeout(function() { + page.render(output_filename, {format: 'png'}); + phantom.exit(); + }, 200); } else{ var base64 = page.renderBase64('png'); //XXXX console.log(base64); + phantom.exit(); } - phantom.exit(); + }