--- loncom/interface/domainprefs.pm 2021/04/29 17:45:22 1.382
+++ loncom/interface/domainprefs.pm 2021/05/28 01:26:02 1.383
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.382 2021/04/29 17:45:22 raeburn Exp $
+# $Id: domainprefs.pm,v 1.383 2021/05/28 01:26:02 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -7337,12 +7337,10 @@ sub print_wafproxy {
foreach my $domain (keys(%otherdoms)) {
%{$values{$domain}} = ();
my %config = &Apache::lonnet::get_dom('configuration',['wafproxy'],$domain);
- if (ref($config{$domain}) eq 'HASH') {
- if (ref($config{$domain}{'wafproxy'}) eq 'HASH') {
- $aliases{$domain} = $config{$domain}{'wafproxy'}{'alias'};
- foreach my $item ('remoteip','ipheader','trusted','vpnint','vpnext') {
- $values{$domain}{$item} = $config{$domain}{'wafproxy'}{$item};
- }
+ if (ref($config{'wafproxy'}) eq 'HASH') {
+ $aliases{$domain} = $config{'wafproxy'}{'alias'};
+ foreach my $item ('remoteip','ipheader','trusted','vpnint','vpnext') {
+ $values{$domain}{$item} = $config{'wafproxy'}{$item};
}
}
}
@@ -7354,22 +7352,25 @@ sub print_wafproxy {
$itemcount ++;
my $dom_in_effect;
my $aliasrows = '
'.
- ''.&mt('Hostname').': '.
- &Apache::lonnet::hostname($server).' | ';
+ ''.
+ &mt('Hostname').': '.
+ ''.&Apache::lonnet::hostname($server).' | | ';
if ($othercontrol{$server}) {
$dom_in_effect = $othercontrol{$server};
my $current;
- if (ref($aliases{$othercontrol{$server}}) eq 'HASH') {
- $current = $aliases{$othercontrol{$server}{$server}};
+ if (ref($aliases{$dom_in_effect}) eq 'HASH') {
+ $current = $aliases{$dom_in_effect}{$server};
}
+ $aliasrows .= ''.
+ &mt('Alias').': ';
if ($current) {
$aliasrows .= $current;
} else {
- $aliasrows .= &mt('None in effect');
+ $aliasrows .= &mt('None');
}
- $aliasrows .= ' | ('.
- &mt('WAF/Reverse Proxy controlled by domain: [_1]',
- ''.$othercontrol{$server}.'').' | ';
+ $aliasrows .= ' ('.
+ &mt('controlled by domain: [_1]',
+ ''.$dom_in_effect.'').')';
} else {
$dom_in_effect = $dom;
my $current;
@@ -7378,7 +7379,8 @@ sub print_wafproxy {
$current = $aliases{$dom}{$server};
}
}
- $aliasrows .= ''.&mt('WAF/Reverse Proxy Alias').': '.
+ $aliasrows .= ' | '.
+ &mt('Alias').': '.
' | ';
}
@@ -7408,17 +7410,18 @@ sub print_wafproxy {
'
';
$itemcount++;
}
- if (keys(%othercontrol)) {
- foreach my $key (sort(keys(%othercontrol))) {
+ if (keys(%otherdoms)) {
+ foreach my $key (sort(keys(%otherdoms))) {
$css_class = $itemcount%2 ? ' class="LC_odd_row"' : '';
- $datatable = ''.
- ''.&mt('Domain: [_1]',''.$key.'').' | '.
- ' |
';
+ $datatable .= ''.
+ ''.&mt('Domain: [_1]',''.$key.'').' | '.
+ ' |
';
$itemcount++;
}
}
} else {
+ my %ip_methods = &remoteip_methods();
if ($setdom) {
$itemcount ++;
$css_class = $itemcount%2 ? ' class="LC_odd_row"' : '';
@@ -7467,7 +7470,6 @@ sub print_wafproxy {
''.
''.$lt{'remoteip'}.': '.
' |