mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-05 03:18:00 +02:00
rrd graphs: Fix indentation after removing graph output
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
05c8c10f19
commit
4190b2a621
@@ -90,70 +90,70 @@ if (@thermal_zone_sensors) {
|
||||
}
|
||||
}
|
||||
|
||||
&Header::showhttpheaders();
|
||||
&Header::openpage($Lang::tr{'hardware graphs'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left');
|
||||
&Header::showhttpheaders();
|
||||
&Header::openpage($Lang::tr{'hardware graphs'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left');
|
||||
|
||||
&Header::getcgihash(\%sensorsettings);
|
||||
&Header::getcgihash(\%sensorsettings);
|
||||
|
||||
if ( $sensorsettings{'ACTION'} eq $Lang::tr{'save'} ) {
|
||||
foreach(@sensorsgraphs){
|
||||
chomp($_);
|
||||
$_ =~ /\/(.*)sensors-(.*)\/(.*)\.rrd/;
|
||||
my $label = $2.$3;$label=~ s/-//g;
|
||||
if ( $sensorsettings{'LINE-'.$label} ne "on" ){
|
||||
$sensorsettings{'LINE-'.$label} = 'off';
|
||||
} elsif ($sensorsettings{'LINE-'.$label} eq "on" ){
|
||||
$sensorsettings{'LINE-'.$label} = 'checked';
|
||||
}
|
||||
$sensorsettings{'LABEL-'.$label} =~ s/\W//g;
|
||||
}
|
||||
&General::writehash("${General::swroot}/sensors/settings", \%sensorsettings);
|
||||
if ( $sensorsettings{'ACTION'} eq $Lang::tr{'save'} ) {
|
||||
foreach(@sensorsgraphs){
|
||||
chomp($_);
|
||||
$_ =~ /\/(.*)sensors-(.*)\/(.*)\.rrd/;
|
||||
my $label = $2.$3;$label=~ s/-//g;
|
||||
if ( $sensorsettings{'LINE-'.$label} ne "on" ){
|
||||
$sensorsettings{'LINE-'.$label} = 'off';
|
||||
} elsif ($sensorsettings{'LINE-'.$label} eq "on" ){
|
||||
$sensorsettings{'LINE-'.$label} = 'checked';
|
||||
}
|
||||
$sensorsettings{'LABEL-'.$label} =~ s/\W//g;
|
||||
}
|
||||
&General::writehash("${General::swroot}/sensors/settings", \%sensorsettings);
|
||||
}
|
||||
|
||||
# This should be save, because no user given content will be processed.
|
||||
#my @disks = `ls -1 /sys/block | grep -E '^sd|^nvme' | sort | uniq`;
|
||||
my @disks = &get_disks();
|
||||
# This should be save, because no user given content will be processed.
|
||||
#my @disks = `ls -1 /sys/block | grep -E '^sd|^nvme' | sort | uniq`;
|
||||
my @disks = &get_disks();
|
||||
|
||||
foreach (@disks){
|
||||
my $disk = $_;
|
||||
chomp $disk;
|
||||
my @array = split(/\//,$disk);
|
||||
foreach (@disks){
|
||||
my $disk = $_;
|
||||
chomp $disk;
|
||||
my @array = split(/\//,$disk);
|
||||
|
||||
&Header::openbox('100%', 'center', "$array[$#array] $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("hardwaregraphs.cgi",$array[$#array],"day");
|
||||
&Header::closebox();
|
||||
}
|
||||
&Header::openbox('100%', 'center', "$array[$#array] $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("hardwaregraphs.cgi",$array[$#array],"day");
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
if ( grep(/thermal-thermal_zone/, @sensorsgraphs) ) {
|
||||
&Header::openbox('100%', 'center', "ACPI Thermal-Zone Temp $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("hardwaregraphs.cgi","thermaltemp","day");
|
||||
&Header::closebox();
|
||||
}
|
||||
if ( grep(/thermal-thermal_zone/, @sensorsgraphs) ) {
|
||||
&Header::openbox('100%', 'center', "ACPI Thermal-Zone Temp $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("hardwaregraphs.cgi","thermaltemp","day");
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
if ( grep(/temperature-/, @sensorsgraphs) ) {
|
||||
&Header::openbox('100%', 'center', "hwtemp $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("hardwaregraphs.cgi","hwtemp","day");
|
||||
Header::closebox();
|
||||
}
|
||||
if ( grep(/temperature-/, @sensorsgraphs) ) {
|
||||
&Header::openbox('100%', 'center', "hwtemp $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("hardwaregraphs.cgi","hwtemp","day");
|
||||
Header::closebox();
|
||||
}
|
||||
|
||||
if ( grep(/fanspeed-/, @sensorsgraphs) ) {
|
||||
&Header::openbox('100%', 'center', "hwfan $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("hardwaregraphs.cgi","hwfan","day");
|
||||
&Header::closebox();
|
||||
}
|
||||
if ( grep(/fanspeed-/, @sensorsgraphs) ) {
|
||||
&Header::openbox('100%', 'center', "hwfan $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("hardwaregraphs.cgi","hwfan","day");
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
if ( grep(/voltage-/, @sensorsgraphs) ) {
|
||||
&Header::openbox('100%', 'center', "hwvolt $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("hardwaregraphs.cgi","hwvolt","day");
|
||||
&Header::closebox();
|
||||
}
|
||||
if ( grep(/voltage-/, @sensorsgraphs) ) {
|
||||
&Header::openbox('100%', 'center', "hwvolt $Lang::tr{'graph'}");
|
||||
&Graphs::makegraphbox("hardwaregraphs.cgi","hwvolt","day");
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
if ( @sensorsgraphs ) {
|
||||
sensorsbox();
|
||||
}
|
||||
&Header::closebigbox();
|
||||
&Header::closepage();
|
||||
if ( @sensorsgraphs ) {
|
||||
sensorsbox();
|
||||
}
|
||||
&Header::closebigbox();
|
||||
&Header::closepage();
|
||||
|
||||
sub sensorsbox {
|
||||
&Header::openbox('100%', 'center', "$Lang::tr{'mbmon settings'}");
|
||||
|
||||
Reference in New Issue
Block a user