X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fgraphs.cgi;h=8f590d35cb2752d7f7d82cf3a2271c04d906c09b;hp=f19e5a618e4cc8cdf15a38badcb49c24df00a1b3;hb=6c666a3b18d7be66ac62c3cfef389745a6eed0a4;hpb=2175773794fd0fd3122c59d12ac07b6186253abf diff --git a/html/cgi-bin/graphs.cgi b/html/cgi-bin/graphs.cgi index f19e5a618e..8f590d35cb 100644 --- a/html/cgi-bin/graphs.cgi +++ b/html/cgi-bin/graphs.cgi @@ -40,6 +40,25 @@ if ($cgigraphs[1] =~ /(network|GREEN|BLUE|ORANGE|RED|lq)/) { } else { &Header::openpage($Lang::tr{'system graphs'}, 1, ''); } + +sub diskbox { + my $disk = $_[0]; + if (-e "$graphdir/disk-$disk-day.png") { + + &Header::openbox('100%', 'center', "Disk /dev/$disk $Lang::tr{'graph'}"); + my $ftime = localtime((stat("$graphdir/disk-$disk-day.png"))[9]); + print "
$Lang::tr{'the statistics were last updated at'}: $ftime

\n"; + print ""; + print ""; + print ""; + print "
\n"; + if (-e "/usr/local/bin/hddshutdown-state") { + system("/usr/local/bin/hddshutdown-state $disk"); + } + &Header::closebox(); + } +} + &Header::openbigbox('100%', 'left'); if ($cgigraphs[1] =~ /(GREEN|BLUE|ORANGE|RED|lq|cpu|memory|swap|disk)/) { @@ -143,6 +162,15 @@ if ($cgigraphs[1] =~ /(GREEN|BLUE|ORANGE|RED|lq|cpu|memory|swap|disk)/) { } print "
\n"; &Header::closebox(); + + diskbox("hda"); + diskbox("hdb"); + diskbox("hdc"); + diskbox("hdd"); + diskbox("hde"); + diskbox("hdf"); + diskbox("hdg"); + diskbox("hdh"); } &Header::closebigbox();