mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
status/rrd: trying to pin down #113
This commit is contained in:
parent
7e1a1a106c
commit
e964915cab
@ -526,7 +526,7 @@ function get_dates($curperiod, $graph) {
|
||||
echo "<tr><td colspan=\"100%\" class=\"list\">\n";
|
||||
echo "<img border=\"0\" width=\"100%;\" name=\"{$id}\"";
|
||||
echo "id=\"{$id}\" alt=\"$prettydb Graph\" ";
|
||||
echo "src=\"status_rrd_graph_img.php?start={$start}&end={$end}&database={$curdatabase}&style={$curstyle}&graph={$graph}?refresh_date={$img_date}\" />\n";
|
||||
echo "src=\"status_rrd_graph_img.php?start={$start}&end={$end}&database={$curdatabase}&style={$curstyle}&graph={$graph}-{$img_date}\" />\n";
|
||||
echo "<br /><hr /><br />\n";
|
||||
echo "</td></tr>\n";
|
||||
}
|
||||
@ -595,7 +595,7 @@ function get_dates($curperiod, $graph) {
|
||||
echo "<tr><td colspan=\"100%\" class=\"list\">\n";
|
||||
echo "<img border=\"0\" width=\"100%;\" name=\"{$id}\" ";
|
||||
echo "id=\"{$id}\" alt=\"$prettydb Graph\" ";
|
||||
echo "src=\"status_rrd_graph_img.php?start={$start}&end={$end}&database={$curdatabase}&style={$curstyle}&graph={$graph}?refresh_date={$img_date}\" />\n";
|
||||
echo "src=\"status_rrd_graph_img.php?start={$start}&end={$end}&database={$curdatabase}&style={$curstyle}&graph={$graph}-{$img_date}\" />\n";
|
||||
echo "<br /><hr /><br />\n";
|
||||
echo "</td></tr>\n";
|
||||
}
|
||||
|
||||
@ -1217,18 +1217,20 @@ else {
|
||||
/* check modification time to see if we need to generate image */
|
||||
if (file_exists("$rrdtmppath$curdatabase-$curgraph.png")) {
|
||||
if((time() - filemtime("$rrdtmppath$curdatabase-$curgraph.png")) >= 15 ) {
|
||||
if($data)
|
||||
if ($data) {
|
||||
$_gb = exec("$graphcmd 2>&1", $graphcmdoutput, $graphcmdreturn);
|
||||
$graphcmdoutput = implode(" ", $graphcmdoutput) . $graphcmd;
|
||||
flush();
|
||||
usleep(500);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if($data)
|
||||
if ($data) {
|
||||
$_gb = exec("$graphcmd 2>&1", $graphcmdoutput, $graphcmdreturn);
|
||||
$graphcmdoutput = implode(" ", $graphcmdoutput) . $graphcmd;
|
||||
flush();
|
||||
usleep(500);
|
||||
}
|
||||
}
|
||||
if(($graphcmdreturn <> 0) || (! $data)) {
|
||||
log_error(sprintf(gettext('Failed to create graph with error code %1$s, the error is: %2$s'),$graphcmdreturn,$graphcmdoutput));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user