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:
commit
87c56ee5fd
|
@ -218,13 +218,11 @@ 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)
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue