--- loncom/interface/domainprefs.pm 2014/10/05 13:34:01 1.253 +++ loncom/interface/domainprefs.pm 2014/10/06 00:48:39 1.254 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.253 2014/10/05 13:34:01 raeburn Exp $ +# $Id: domainprefs.pm,v 1.254 2014/10/06 00:48:39 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3806,7 +3806,7 @@ sub loadbalance_rule_row { my @rulenames; my %ruletitles = &offloadtype_text(); if (($type eq '_LC_ipchangesso') || ($type eq '_LC_ipchange')) { - @rulenames = ('balancer','offloadedto'); + @rulenames = ('balancer','offloadedto','specific'); } else { @rulenames = ('default','homeserver'); if ($type eq '_LC_external') { @@ -3868,8 +3868,13 @@ sub loadbalance_rule_row { ' '.$ruletitles{$rulenames[$i]}. - ''.$extra.'
'."\n"; + ')"'.$checked.' /> '; + if (($rulenames[$i] eq 'specific') && ($type =~ /^_LC_ipchange/)) { + $output .= $ruletitles{'particular'}; + } else { + $output .= $ruletitles{$rulenames[$i]}; + } + $output .= ''.$extra.'
'."\n"; } $output .= ''."\n"; return $output; @@ -3884,6 +3889,7 @@ sub offloadtype_text { 'none' => 'No offload', 'balancer' => 'Session hosted on Load Balancer, after re-authentication', 'offloadedto' => 'Session hosted on offload server, after re-authentication', + 'particular' => 'Session hosted (after re-auth) on server:', ); return %ruletitles; } @@ -10847,9 +10853,8 @@ sub modify_loadbalancing { if ($rule eq '') { $balancetext = $ruletitles{'default'}; } elsif (($rule eq 'homeserver') || ($rule eq 'externalbalancer') || - ($rule eq 'balancer') || ($rule eq 'offloadedto')) { - $balancetext = $ruletitles{$rule}; - if (($rule eq 'balancer') || ($rule eq 'offloadedto')) { + ($type eq '_LC_ipchange') || ($type eq '_LC_ipchangesso')) { + if (($type eq '_LC_ipchange') || ($type eq '_LC_ipchangesso')) { foreach my $sparetype (@sparestypes) { if (ref($defaultshash{'loadbalancing'}{$balancer}{'targets'}{$sparetype}) eq 'ARRAY') { map { $toupdate{$_} = 1; } (@{$defaultshash{'loadbalancing'}{$balancer}{'targets'}{$sparetype}}); @@ -10868,6 +10873,17 @@ sub modify_loadbalancing { } } } + if (($rule eq 'balancer') || ($rule eq 'offloadedto')) { + $balancetext = $ruletitles{$rule}; + } else { + my $receiver = $defaultshash{'loadbalancing'}{$balancer}{'rules'}{$type}; + $balancetext = $ruletitles{'particular'}.' '.$receiver; + if ($receiver) { + $toupdate{$receiver}; + } + } + } else { + $balancetext = $ruletitles{$rule}; } } else { $balancetext = &mt('offload to [_1]',$defaultshash{'loadbalancing'}{$balancer}{'rules'}{$type});