version 1.208, 2013/09/21 13:49:31
|
version 1.209, 2013/09/29 00:49:28
|
Line 2997 sub print_loadbalancing {
|
Line 2997 sub print_loadbalancing {
|
} |
} |
my ($othertitle,$usertypes,$types) = |
my ($othertitle,$usertypes,$types) = |
&Apache::loncommon::sorted_inst_types($dom); |
&Apache::loncommon::sorted_inst_types($dom); |
my $rownum = 6; |
my $rownum = 8; |
if (ref($types) eq 'ARRAY') { |
if (ref($types) eq 'ARRAY') { |
$rownum += scalar(@{$types}); |
$rownum += scalar(@{$types}); |
} |
} |
Line 3176 sub loadbalancing_rules {
|
Line 3176 sub loadbalancing_rules {
|
if (ref($currrules) eq 'HASH') { |
if (ref($currrules) eq 'HASH') { |
$current = $currrules->{$type}; |
$current = $currrules->{$type}; |
} |
} |
if (($type eq '_LC_external') || ($type eq '_LC_internetdom')) { |
if (($type eq '_LC_external') || ($type eq '_LC_internetdom') || ($type eq '_LC_ipchange')) { |
if ($dom ne &Apache::lonnet::host_domain($lonhost)) { |
if ($dom ne &Apache::lonnet::host_domain($lonhost)) { |
$current = ''; |
$current = ''; |
} |
} |
Line 3197 sub loadbalancing_titles {
|
Line 3197 sub loadbalancing_titles {
|
'_LC_author' => &mt('Users from [_1] with author role',$dom), |
'_LC_author' => &mt('Users from [_1] with author role',$dom), |
'_LC_internetdom' => &mt('Users not from [_1], but from [_2]',$dom,$intdom), |
'_LC_internetdom' => &mt('Users not from [_1], but from [_2]',$dom,$intdom), |
'_LC_external' => &mt('Users not from [_1]',$intdom), |
'_LC_external' => &mt('Users not from [_1]',$intdom), |
|
'_LC_ipchangesso' => &mt('SSO users from [_1], with IP mismatch',$dom), |
|
'_LC_ipchange' => &mt('Non-SSO users with IP mismatch'), |
); |
); |
my @alltypes = ('_LC_adv','_LC_author','_LC_internetdom','_LC_external'); |
my @alltypes = ('_LC_adv','_LC_author','_LC_internetdom','_LC_external','_LC_ipchangesso','_LC_ipchange'); |
if (ref($types) eq 'ARRAY') { |
if (ref($types) eq 'ARRAY') { |
unshift(@alltypes,@{$types},'default'); |
unshift(@alltypes,@{$types},'default'); |
} |
} |
Line 3223 sub loadbalancing_titles {
|
Line 3225 sub loadbalancing_titles {
|
sub loadbalance_rule_row { |
sub loadbalance_rule_row { |
my ($type,$title,$current,$servers,$currbalancer,$lonhost,$dom, |
my ($type,$title,$current,$servers,$currbalancer,$lonhost,$dom, |
$targets_div_style,$homedom_div_style,$css_class,$balnum,$num,$islast) = @_; |
$targets_div_style,$homedom_div_style,$css_class,$balnum,$num,$islast) = @_; |
my @rulenames = ('default','homeserver'); |
my @rulenames; |
my %ruletitles = &offloadtype_text(); |
my %ruletitles = &offloadtype_text(); |
if ($type eq '_LC_external') { |
if (($type eq '_LC_ipchangesso') || ($type eq '_LC_ipchange')) { |
push(@rulenames,'externalbalancer'); |
@rulenames = ('balancer','offloadedto'); |
} else { |
} else { |
push(@rulenames,'specific'); |
@rulenames = ('default','homeserver'); |
|
if ($type eq '_LC_external') { |
|
push(@rulenames,'externalbalancer'); |
|
} else { |
|
push(@rulenames,'specific'); |
|
} |
|
push(@rulenames,'none'); |
} |
} |
push(@rulenames,'none'); |
|
my $style = $targets_div_style; |
my $style = $targets_div_style; |
if (($type eq '_LC_external') || ($type eq '_LC_internetdom')) { |
if (($type eq '_LC_external') || ($type eq '_LC_internetdom') || ($type eq '_LC_ipchange')) { |
$style = $homedom_div_style; |
$style = $homedom_div_style; |
} |
} |
my $space; |
my $space; |
Line 3297 sub offloadtype_text {
|
Line 3304 sub offloadtype_text {
|
'externalbalancer' => "Offloads to Load Balancer in user's domain", |
'externalbalancer' => "Offloads to Load Balancer in user's domain", |
'specific' => 'Offloads to specific server', |
'specific' => 'Offloads to specific server', |
'none' => 'No offload', |
'none' => 'No offload', |
|
'balancer' => 'Session hosted on Load Balancer, after re-authentication', |
|
'offloadedto' => 'Session hosted on offload server, after re-authentication', |
); |
); |
return %ruletitles; |
return %ruletitles; |
} |
} |
Line 8636 sub modify_loadbalancing {
|
Line 8645 sub modify_loadbalancing {
|
my $balancetext; |
my $balancetext; |
if ($rule eq '') { |
if ($rule eq '') { |
$balancetext = $ruletitles{'default'}; |
$balancetext = $ruletitles{'default'}; |
} elsif (($rule eq 'homeserver') || ($rule eq 'externalbalancer')) { |
} elsif (($rule eq 'homeserver') || ($rule eq 'externalbalancer') || |
|
($rule eq 'balancer') || ($rule eq 'offloadedto')) { |
$balancetext = $ruletitles{$rule}; |
$balancetext = $ruletitles{$rule}; |
} else { |
} else { |
$balancetext = &mt('offload to [_1]',$defaultshash{'loadbalancing'}{$balancer}{'rules'}{$type}); |
$balancetext = &mt('offload to [_1]',$defaultshash{'loadbalancing'}{$balancer}{'rules'}{$type}); |
Line 9369 sub captcha_phrases {
|
Line 9379 sub captcha_phrases {
|
); |
); |
} |
} |
|
|
|
|
sub devalidate_remote_domconfs { |
sub devalidate_remote_domconfs { |
my ($dom) = @_; |
my ($dom) = @_; |
my $primary_id = &Apache::lonnet::domain($dom,'primary'); |
my $primary_id = &Apache::lonnet::domain($dom,'primary'); |