Commit 5766e95e authored by Leigh B. Stoller's avatar Leigh B. Stoller

Minor fixes.

parent 374cccce
......@@ -254,7 +254,7 @@ if (defined($dstvnode)) {
$optargs .= " -t $ip";
}
}
# SENDMAIL($TBOPS, "foo", "$dbname $graphtype $optargs");
#SENDMAIL($TBOPS, "foo", "$dbname $graphtype $optargs");
system("$dbcontrol graphdb $dbname $graphtype $optargs") == 0 or
fatal(-1, "Failed to generate requested graph!");
......
......@@ -721,9 +721,23 @@ sub GraphDB(@)
@x_data = (0);
@y_data = ($first);
my $last = 0;
while (my ($timestamp, $count) = $query_result->fetchrow_array()) {
push(@x_data, $timestamp - $tstart);
my $now = $timestamp - $tstart;
#
# Need to add explicit zero values for gaps.
#
$last++;
while ($last < $now) {
push(@x_data, $last);
push(@y_data, 0);
$last++;
}
push(@x_data, $now);
push(@y_data, $count);
$last = $now;
}
}
......
......@@ -1351,7 +1351,7 @@ class TemplateInstance
$html .= " <img border=0 ";
$html .= " onLoad=\"ClearLoadingIndicators('');\" ";
$html .= " src='linkgraph_image.php?exptidx=$exptidx";
$html .= "&graphtype=$graphtype&now=${now}${runarg}";
$html .= "&graphtype=$graphtype${runarg}";
$html .= "${srcarg}${dstarg}'>\n";
$html .= "</div>\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment