mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
Multiple CGI files: Check if BLUE or ORANGE are actually configured.
This commit is contained in:
@@ -61,8 +61,8 @@ if ( $querry[0] =~ /wireless/ ){
|
||||
&Header::openbigbox('100%', 'left');
|
||||
|
||||
push (@graphs, ($netsettings{'GREEN_DEV'}));
|
||||
if ($netsettings{'BLUE_DEV'}) {push (@graphs, ($netsettings{'BLUE_DEV'})); }
|
||||
if ($netsettings{'ORANGE_DEV'}) {push (@graphs, ($netsettings{'ORANGE_DEV'})); }
|
||||
if (&Header::blue_used() && $netsettings{'BLUE_DEV'}) {push (@graphs, ($netsettings{'BLUE_DEV'})); }
|
||||
if (&Header::orange_used() && $netsettings{'ORANGE_DEV'}) {push (@graphs, ($netsettings{'ORANGE_DEV'})); }
|
||||
|
||||
my @wirelessgraphs = `ls -dA /var/log/rrd/collectd/localhost/wireless* 2>/dev/null`;
|
||||
foreach (@wirelessgraphs){
|
||||
|
||||
@@ -180,8 +180,8 @@ close(FILE);
|
||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||
|
||||
my $green_cidr = &General::ipcidr("$netsettings{'GREEN_NETADDRESS'}\/$netsettings{'GREEN_NETMASK'}");
|
||||
my $blue_cidr = "# Blue not defined";
|
||||
if ($netsettings{'BLUE_DEV'}) {
|
||||
my $blue_cidr = "";
|
||||
if (&Header::blue_used() && $netsettings{'BLUE_DEV'}) {
|
||||
$blue_cidr = &General::ipcidr("$netsettings{'BLUE_NETADDRESS'}\/$netsettings{'BLUE_NETMASK'}");
|
||||
}
|
||||
|
||||
|
||||
@@ -61,11 +61,11 @@ my %mainsettings = ();
|
||||
|
||||
my $green_cidr = &General::ipcidr("$netsettings{'GREEN_NETADDRESS'}/$netsettings{'GREEN_NETMASK'}");
|
||||
my $blue_cidr = "# Blue not defined";
|
||||
if ($netsettings{'BLUE_DEV'}) {
|
||||
if (&Header::blue_used() && $netsettings{'BLUE_DEV'}) {
|
||||
$blue_cidr = &General::ipcidr("$netsettings{'BLUE_NETADDRESS'}/$netsettings{'BLUE_NETMASK'}");
|
||||
}
|
||||
my $orange_cidr = "# Orange not defined";
|
||||
if ($netsettings{'ORANGE_DEV'}) {
|
||||
if (&Header::orange_used() && $netsettings{'ORANGE_DEV'}) {
|
||||
$orange_cidr = &General::ipcidr("$netsettings{'ORANGE_NETADDRESS'}/$netsettings{'ORANGE_NETMASK'}");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user