mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-12 20:16:49 +02:00
Disabled some graphs if data is collected yet
This commit is contained in:
@@ -107,19 +107,25 @@ if ( $querry[0] =~ "hwtemp"){
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*` ) {
|
||||
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/temperature-*` ) {
|
||||
&Header::openbox('100%', 'center', "hwtemp $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("hardwaregraphs.cgi","hwtemp","day");
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/fanspeed-*` ) {
|
||||
&Header::openbox('100%', 'center', "hwfan $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("hardwaregraphs.cgi","hwfan","day");
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/voltage-*` ) {
|
||||
&Header::openbox('100%', 'center', "hwvolt $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("hardwaregraphs.cgi","hwvolt","day","375");
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*` ) {
|
||||
sensorsbox();
|
||||
}
|
||||
&Header::closebigbox();
|
||||
|
||||
@@ -56,9 +56,11 @@ if ( $querry[0] =~ "memory"){
|
||||
&Graphs::makegraphbox("memory.cgi","memory","day");
|
||||
&Header::closebox();
|
||||
|
||||
&Header::openbox('100%', 'center', "Swap $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("memory.cgi","swap","day");
|
||||
&Header::closebox();
|
||||
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/swap` ) {
|
||||
&Header::openbox('100%', 'center', "Swap $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("memory.cgi","swap","day");
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
&Header::openbox('100%', 'center', $Lang::tr{'memory'});
|
||||
print "<table width='95%' cellspacing='5'>";
|
||||
|
||||
Reference in New Issue
Block a user