Make admin tool graphs work on windows

ryzomclassic-develop
kaetemi 3 years ago
parent cb47713119
commit 7a95ff23f3
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -17,7 +17,14 @@
define('NELTOOL_LOGBASE', NELTOOL_SYSTEMBASE .'/logs/');
define('NELTOOL_IMGBASE', NELTOOL_SYSTEMBASE .'/imgs/');
define('NELTOOL_RRDTOOL', '/usr/bin/rrdtool');
if ((strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'))
{
define('NELTOOL_RRDTOOL', NELTOOL_SYSTEMBASE . '../../../../external/rrdtool/rrdtool.exe');
}
else
{
define('NELTOOL_RRDTOOL', '/usr/bin/rrdtool');
}
define('NELTOOL_RRDSYSBASE', NELTOOL_SYSTEMBASE . 'graphs_output/');
define('NELTOOL_RRDWEBBASE', NELTOOL_SITEBASE . 'graphs_output/');

@ -159,7 +159,7 @@
foreach($graph_list as $graph_item)
{
$rrd_path = $AS_RRDPath . $graph_item['rd_file'];
$rrd_def = "DEF:val=". $rrd_path .":var:AVERAGE";
$rrd_def = "DEF:val=". str_replace(":", "\\:", $rrd_path) .":var:AVERAGE";
$rrd_draw = "LINE2:val#0000FF --no-legend";
$rrd_output = NELTOOL_RRDSYSBASE . $graph_item['rd_file'] ."-". $view_time_lowframe .".gif";
$rrd_web = NELTOOL_RRDWEBBASE . $graph_item['rd_file'] ."-". $view_time_lowframe .".gif";
@ -216,7 +216,7 @@
foreach($graph_list as $graph_item)
{
$rrd_path = $AS_RRDPath . $graph_item['rd_file'];
$rrd_def = "DEF:val=". $rrd_path .":var:AVERAGE";
$rrd_def = "DEF:val=". str_replace(":", "\\:", $rrd_path) .":var:AVERAGE";
$rrd_draw = "LINE2:val#0000FF --no-legend";
$rrd_output = NELTOOL_RRDSYSBASE . $graph_item['rd_file'] ."-". $view_time_lowframe .".gif";
$rrd_web = NELTOOL_RRDWEBBASE . $graph_item['rd_file'] ."-". $view_time_lowframe .".gif";
@ -373,7 +373,7 @@
{
$rrd_values = array(1200, 10800, 86400, 604800, 2592000, 7776000); // 20mins, 3h, 24h, 7days, 30 days, 90 days (unit is 1 second)
$rrd_path = $AS_RRDPath . $tool_selected_variable_data['low_file'];
$rrd_def = "DEF:val=". $rrd_path .":var:AVERAGE";
$rrd_def = "DEF:val=". str_replace(":", "\\:", $rrd_path) .":var:AVERAGE";
$rrd_draw = "LINE2:val#0000FF";
$rrd_webs = array();

Loading…
Cancel
Save