mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 19:00:34 +02:00
web: Refactor graphs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -214,7 +214,7 @@ END
|
||||
print "</table></div>\n";
|
||||
&Header::closebox();
|
||||
|
||||
&Header::openbox('100%', 'center', "$Lang::tr{'processes'} $Lang::tr{'graph'}");
|
||||
&Header::opensection('100%', 'center', "$Lang::tr{'processes'} $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("services.cgi","processescpu","day");
|
||||
&Header::closebox();
|
||||
|
||||
|
||||
@@ -26,32 +26,24 @@ use strict;
|
||||
#use CGI::Carp 'fatalsToBrowser';
|
||||
|
||||
require '/var/ipfire/general-functions.pl';
|
||||
require "${General::swroot}/lang.pl";
|
||||
require "${General::swroot}/header.pl";
|
||||
require "${General::swroot}/graphs.pl";
|
||||
|
||||
my %color = ();
|
||||
my %mainsettings = ();
|
||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||
|
||||
&Header::showhttpheaders();
|
||||
|
||||
&Header::openpage($Lang::tr{'status information'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left');
|
||||
|
||||
&Header::openbox('100%', 'center', "CPU $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("system.cgi","cpu","day");
|
||||
&Header::closebox();
|
||||
# Processor Graph
|
||||
&Header::graph("$Lang::tr{'processors'}", "system.cgi", "cpu", "day");
|
||||
|
||||
# CPU Frequency
|
||||
if ( -e "$mainsettings{'RRDLOG'}/collectd/localhost/cpufreq/cpufreq-0.rrd"){
|
||||
&Header::openbox('100%', 'center', "$Lang::tr{'cpu frequency'} $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("system.cgi","cpufreq","day");
|
||||
&Header::closebox();
|
||||
&Header::graph("$Lang::tr{'cpu frequency'}", "system.cgi", "cpufreq", "day");
|
||||
}
|
||||
|
||||
&Header::openbox('100%', 'center', "$Lang::tr{'uptime load average'} $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("system.cgi","load","day");
|
||||
&Header::closebox();
|
||||
# Load Average
|
||||
&Header::graph("$Lang::tr{'load average'}", "system.cgi", "load", "day");
|
||||
|
||||
&Header::closebigbox();
|
||||
&Header::closepage();
|
||||
|
||||
Reference in New Issue
Block a user