our (@sections, %section_groups, %group_elems, %graphs);
-our @timeranges= (3600, map { $_*86400 } qw(1 7 28), 13*7+1);
+our @timeranges= (3600, map { $_*86400 } qw(1 7 28), 13*7+1, 366);
sub graph_of_group ($$$$$) {
my ($section, $group, $elem, $basis, $args) = @_;
foreach my $src (<$R/df/df-*.rrd>) {
my $vol= $src;
+ $vol =~ s,\.rrd$,, or next;
$vol =~ s,.*/,,;
$vol =~ s,^df-,,;
- $vol =~ s,\.rrd$,,;
graph('Disk space', $vol, {
Slower => 1,
},
]);
}
-foreach my $src (<$SELF/news-stats/*.rrd>) {
+foreach my $src (<$SELF/data/news/*.rrd>) {
my $site= $src;
+ $site =~ s,\.rrd$,, or next;
$site =~ s,.*/,,;
- $site =~ s,\.rrd$,,;
$site =~ s,_(in|out)$,,;
my $inout= $1;
$site =~ s/^([-.0-9a-z]+)_//;
graph_of_group("News", $site, $inout,
{
Slower => 1,
+ Units => '[art/s]'
}, $inout eq 'out' ?
[
(map { "DEF:$_=$src:$_:AVERAGE" }
my $elems= $group_elems{$section,$detail};
die unless $elems;
start_page("$detail graphs");
- foreach my $elem (@$elems) {
- my $g= $graphs{$section,$detail,$elem};
- die unless $g;
- foreach my $tsloth ($g->{Slower}..$g->{Slower}+3) {
+ foreach my $xsloth (0..5) {
+ foreach my $elem (@$elems) {
+ my $g= $graphs{$section,$detail,$elem};
+ die unless $g;
+ my $tsloth= $xsloth + $g->{Slower};
my $imgurl= "$self?graph=$detail§ion=$section".
"&sloth=$tsloth&elem=$elem";
print "<a href=\"$imgurl&w=780&h=800\">";
Param => 'sloth',
Variable => \$sloth,
Default => 1,
- Values => [0..2],
+ Values => [0..3],
Show => sub {
my ($sl) = @_;
- return ('Narrower', 'Normal', 'Wider')[$sl];
+ return ('Narrower', 'Normal', 'Wider', 'Extra wide')[$sl];
}
});