ipsec: change status display in cgi's for charon.

This commit is contained in:
Arne Fitzenreiter
2011-06-26 15:16:32 +02:00
parent 0d181206ca
commit 4b4b895946
3 changed files with 8 additions and 2 deletions

View File

@@ -369,7 +369,9 @@ END
$active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourblue}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b></td></tr></table>";
} else {
foreach my $line (@status) {
if ($line =~ /\"$confighash{$key}[1]\".*IPsec SA established/) {
if (($line =~ /\"$confighash{$key}[1]\".*IPsec SA established/) ||
($line =~/ $confighash{$key}[1]\[.*ESTABLISHED/ ))
{
$active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourgreen}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsopen'}</font></b></td></tr></table>";
}
}

View File

@@ -2539,7 +2539,9 @@ END
# get real state
my $active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourred}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b></td></tr></table>";
foreach my $line (@status) {
if ($line =~ /\"$confighash{$key}[1]\".*IPsec SA established/) {
if ($line =~ /\"$confighash{$key}[1]\".*IPsec SA established/) ||
($line =~ / $confighash{$key}[1]\[.*ESTABLISHED/))
{
$active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourgreen}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsopen'}</font></b></td></tr></table>";
}
}