mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge branch '3237-Al_ejecutarse_una_tarea_programada_del_usuario_las_graficas_dan_error_de_acceso' into 'develop'
fixed errors in cron jobs See merge request artica/pandorafms!2074 Former-commit-id: d36e73c8393b89c944e8d33fee61b5d07666069e
This commit is contained in:
commit
ca414d30b6
@ -86,9 +86,8 @@ if (file_exists ('languages/'.$user_language.'.mo')) {
|
|||||||
<script language="javascript" type="text/javascript" src="graphs/flot/pandora.flot.js"></script>
|
<script language="javascript" type="text/javascript" src="graphs/flot/pandora.flot.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="#ffffff" style='background:#ffffff;'>
|
<body bgcolor="#ffffff" style='background:#ffffff;'>
|
||||||
<?php
|
<?php
|
||||||
|
$params['only_image'] = false;
|
||||||
$params['only_image'] = false;
|
|
||||||
$params['width'] = (int) $_REQUEST['viewport_width'];
|
$params['width'] = (int) $_REQUEST['viewport_width'];
|
||||||
$params['menu'] = false;
|
$params['menu'] = false;
|
||||||
|
|
||||||
@ -214,17 +213,21 @@ if (file_exists ('languages/'.$user_language.'.mo')) {
|
|||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
$config['font_size'] = $aux_font_size;
|
$config['font_size'] = $aux_font_size;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('document').ready(function () {
|
$('document').ready(function () {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
if (typeof window.callPhantom === 'function') {
|
if (typeof window.callPhantom === 'function') {
|
||||||
window.callPhantom("loaded");
|
try {
|
||||||
|
var status = window.callPhantom({ status: "loaded" });
|
||||||
|
} catch (error) {
|
||||||
|
console.log("CALLBACK ERROR", error.message)
|
||||||
}
|
}
|
||||||
}, 10);
|
}
|
||||||
});
|
}, 100);
|
||||||
</script>
|
});
|
||||||
</body>
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -3320,7 +3320,10 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined = fal
|
|||||||
. ' "' . $session_id . '"'
|
. ' "' . $session_id . '"'
|
||||||
. ' "' . $params['return_img_base_64'] . '"';
|
. ' "' . $params['return_img_base_64'] . '"';
|
||||||
|
|
||||||
exec($cmd, $result);
|
$result = null;
|
||||||
|
$retcode = null;
|
||||||
|
exec($cmd, $result, $retcode);
|
||||||
|
|
||||||
$img_content = join("\n", $result);
|
$img_content = join("\n", $result);
|
||||||
|
|
||||||
if($params['return_img_base_64']){
|
if($params['return_img_base_64']){
|
||||||
|
@ -37,11 +37,8 @@ else{
|
|||||||
"&session_id=" + session_id;
|
"&session_id=" + session_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var page = require('webpage').create();
|
var page = require('webpage').create();
|
||||||
|
|
||||||
|
|
||||||
page.viewportSize = {
|
page.viewportSize = {
|
||||||
width: viewport_width,
|
width: viewport_width,
|
||||||
height: viewport_height
|
height: viewport_height
|
||||||
@ -49,20 +46,26 @@ page.viewportSize = {
|
|||||||
|
|
||||||
page.zoomFactor = 1;
|
page.zoomFactor = 1;
|
||||||
|
|
||||||
|
page.onConsoleMessage = function(msg){
|
||||||
|
console.log(msg);
|
||||||
|
};
|
||||||
|
|
||||||
page.onCallback = function (st){
|
page.onError = function(msg){
|
||||||
if(!base_64){
|
console.log(msg);
|
||||||
page.render(output_filename, {format: 'png'});
|
page.close();
|
||||||
} else{
|
}
|
||||||
|
|
||||||
|
page.onCallback = function (st) {console.log("CALLBACK CALLED", st.status)
|
||||||
|
if (!base_64) {
|
||||||
|
page.render(output_filename, { format: 'png' });
|
||||||
|
} else {
|
||||||
var base64 = page.renderBase64('png');
|
var base64 = page.renderBase64('png');
|
||||||
// do not remove this console.output
|
// do not remove this console.output
|
||||||
console.log(base64);
|
console.log(base64);
|
||||||
}
|
}
|
||||||
phantom.exit();
|
phantom.exit();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
page.open(url, 'POST', post_data, function (status) {
|
page.open(url, 'POST', post_data, function (status) {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user