Merge branch '3177-Send_custom_report' into 'develop'

3177 send custom report

See merge request artica/pandorafms!2084

Former-commit-id: 7272783ca9a571ce7bfb37ab1918e147945167e5
This commit is contained in:
vgilc 2018-12-13 17:41:45 +01:00
commit 87c56ee5fd
3 changed files with 8 additions and 10 deletions

View File

@ -218,12 +218,10 @@ if (file_exists ('languages/'.$user_language.'.mo')) {
<script type="text/javascript">
$('document').ready(function () {
setTimeout(function () {
if (typeof window.callPhantom === 'function') {
try {
var status = window.callPhantom({ status: "loaded" });
} catch (error) {
console.log("CALLBACK ERROR", error.message)
}
try {
var status = window.callPhantom({ status: "loaded" });
} catch (error) {
console.log("CALLBACK ERROR", error.message)
}
}, 100);
});

View File

@ -3286,18 +3286,18 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined = fal
global $config;
if(is_metaconsole()){
$hack_metaconsole = "../../";
$hack_metaconsole = "../..";
}
else{
$hack_metaconsole = "";
}
$file_js = $config["homedir"] . "/include/web2image.js";
$url = ui_get_full_url(false) . $hack_metaconsole ."include/chart_generator.php";
$url = ui_get_full_url(false) . $hack_metaconsole . "/include/chart_generator.php";
$img_file = "img_". uniqid() .".png";
$img_path = $config["homedir"] . "/attachment/" . $img_file;
$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;
$height_img = (isset($config['graph_image_height'])) ? $config['graph_image_height'] : 280;

View File

@ -55,7 +55,7 @@ page.onError = function(msg){
page.close();
}
page.onCallback = function (st) {console.log("CALLBACK CALLED", st.status)
page.onCallback = function (st) {
if (!base_64) {
page.render(output_filename, { format: 'png' });
} else {