version 1.209, 2013/09/29 00:49:28
|
version 1.210, 2013/09/29 06:53:35
|
Line 86 $dom,$settings,$rowtotal,$action.
|
Line 86 $dom,$settings,$rowtotal,$action.
|
|
|
$dom is the domain, $settings is a reference to a hash of current settings for |
$dom is the domain, $settings is a reference to a hash of current settings for |
the current context, $rowtotal is a reference to the scalar used to record the |
the current context, $rowtotal is a reference to the scalar used to record the |
number of rows displayed on the page, and $action is the context (quotas, |
number of rows displayed on the page, and $action is the context (quotas, |
requestcourses or requestauthor). |
requestcourses or requestauthor). |
|
|
The print_quotas routine was orginally created to display/store information |
The print_quotas routine was orginally created to display/store information |
Line 442 sub handler {
|
Line 442 sub handler {
|
unless ($configuserok eq 'ok') { |
unless ($configuserok eq 'ok') { |
&Apache::lonconfigsettings::print_header($r,$phase,$context); |
&Apache::lonconfigsettings::print_header($r,$phase,$context); |
$r->print(&mt('The domain configuration user "[_1]" has yet to be created.', |
$r->print(&mt('The domain configuration user "[_1]" has yet to be created.', |
$confname). |
$confname). |
'<br />' |
'<br />' |
); |
); |
if ($switchserver) { |
if ($switchserver) { |
Line 575 sub print_config_box {
|
Line 575 sub print_config_box {
|
if ($numheaders > 1) { |
if ($numheaders > 1) { |
my $colspan = ''; |
my $colspan = ''; |
my $rightcolspan = ''; |
my $rightcolspan = ''; |
if (($action eq 'rolecolors') || ($action eq 'coursecategories') || |
if (($action eq 'rolecolors') || ($action eq 'coursecategories') || |
(($action eq 'login') && ($numheaders < 3))) { |
(($action eq 'login') && ($numheaders < 3))) { |
$colspan = ' colspan="2"'; |
$colspan = ' colspan="2"'; |
} |
} |
Line 1556 sub print_quotas {
|
Line 1556 sub print_quotas {
|
} elsif ($context eq 'requestauthor') { |
} elsif ($context eq 'requestauthor') { |
@usertools = ('author'); |
@usertools = ('author'); |
@options = ('norequest','approval','automatic'); |
@options = ('norequest','approval','automatic'); |
%titles = &authorrequest_titles(); |
%titles = &authorrequest_titles(); |
} else { |
} else { |
@usertools = ('aboutme','blog','webdav','portfolio'); |
@usertools = ('aboutme','blog','webdav','portfolio'); |
%titles = &tool_titles(); |
%titles = &tool_titles(); |
Line 2156 sub print_autocreate {
|
Line 2156 sub print_autocreate {
|
} |
} |
} |
} |
} |
} |
if ($settings->{'xmldc'} ne '') { |
if ($settings->{'xmldc'} ne '') { |
$currhash{$settings->{'xmldc'}} = 1; |
$currhash{$settings->{'xmldc'}} = 1; |
} |
} |
} else { |
} else { |
Line 2542 sub print_coursedefaults {
|
Line 2542 sub print_coursedefaults {
|
$datatable .= '</tr></table></td></tr>'."\n"; |
$datatable .= '</tr></table></td></tr>'."\n"; |
$itemcount += 2; |
$itemcount += 2; |
my $onclick = 'toggleCredits(this.form);'; |
my $onclick = 'toggleCredits(this.form);'; |
my $display = 'none'; |
my $display = 'none'; |
if ($currusecredits) { |
if ($currusecredits) { |
$display = 'block'; |
$display = 'block'; |
} |
} |
Line 3028 sub print_loadbalancing {
|
Line 3028 sub print_loadbalancing {
|
'<td rowspan="'.$rownum.'" valign="top">'. |
'<td rowspan="'.$rownum.'" valign="top">'. |
'<p>'; |
'<p>'; |
if ($lonhost eq '') { |
if ($lonhost eq '') { |
$datatable .= '<span class="LC_nobreak">'; |
$datatable .= '<span class="LC_nobreak">'; |
if (keys(%currbalancer) > 0) { |
if (keys(%currbalancer) > 0) { |
$datatable .= &mt('Add balancer:'); |
$datatable .= &mt('Add balancer:'); |
} else { |
} else { |
Line 3044 sub print_loadbalancing {
|
Line 3044 sub print_loadbalancing {
|
next if ($currbalancer{$server}); |
next if ($currbalancer{$server}); |
$datatable .= '<option value="'.$server.'">'.$server.'</option>'."\n"; |
$datatable .= '<option value="'.$server.'">'.$server.'</option>'."\n"; |
} |
} |
$datatable .= |
$datatable .= |
'</select>'."\n". |
'</select>'."\n". |
'<input type="hidden" name="loadbalancing_prevlonhost_'.$balnum.'" id="loadbalancing_prevlonhost_'.$balnum.'" value="" /> </span>'."\n"; |
'<input type="hidden" name="loadbalancing_prevlonhost_'.$balnum.'" id="loadbalancing_prevlonhost_'.$balnum.'" value="" /> </span>'."\n"; |
} else { |
} else { |
Line 3083 sub print_loadbalancing {
|
Line 3083 sub print_loadbalancing {
|
if (exists($currbalancer{$spares[$i]})) { |
if (exists($currbalancer{$spares[$i]})) { |
$disabled = ' disabled="disabled"'; |
$disabled = ' disabled="disabled"'; |
} |
} |
$targettable .= |
$targettable .= |
'<td><label><input type="checkbox" name="loadbalancing_target_'.$balnum.'_'.$sparetype.'"'. |
'<td><label><input type="checkbox" name="loadbalancing_target_'.$balnum.'_'.$sparetype.'"'. |
$checked.$disabled.' value="'.$chkboxval.'" id="loadbalancing_target_'.$balnum.'_'.$sparetype.'_'.$i.'" onclick="checkOffloads('."this,'$balnum','$sparetype'".');" /><span id="loadbalancing_targettxt_'.$balnum.'_'.$sparetype.'_'.$i.'"> '.$chkboxval. |
$checked.$disabled.' value="'.$chkboxval.'" id="loadbalancing_target_'.$balnum.'_'.$sparetype.'_'.$i.'" onclick="checkOffloads('."this,'$balnum','$sparetype'".');" /><span id="loadbalancing_targettxt_'.$balnum.'_'.$sparetype.'_'.$i.'"> '.$chkboxval. |
'</span></label></td>'; |
'</span></label></td>'; |
Line 3167 sub loadbalancing_rules {
|
Line 3167 sub loadbalancing_rules {
|
$css_class,$balnum,$islast) = @_; |
$css_class,$balnum,$islast) = @_; |
my $output; |
my $output; |
my $num = 0; |
my $num = 0; |
my ($alltypes,$othertypes,$titles) = |
my ($alltypes,$othertypes,$titles) = |
&loadbalancing_titles($dom,$intdom,$usertypes,$types); |
&loadbalancing_titles($dom,$intdom,$usertypes,$types); |
if ((ref($alltypes) eq 'ARRAY') && (ref($titles) eq 'HASH')) { |
if ((ref($alltypes) eq 'ARRAY') && (ref($titles) eq 'HASH')) { |
foreach my $type (@{$alltypes}) { |
foreach my $type (@{$alltypes}) { |
Line 3246 sub loadbalance_rule_row {
|
Line 3246 sub loadbalance_rule_row {
|
if ($islast && $num == 1) { |
if ($islast && $num == 1) { |
$space = '<div display="inline-block"> </div>'; |
$space = '<div display="inline-block"> </div>'; |
} |
} |
my $output = |
my $output = |
'<tr class="'.$css_class.'" id="balanceruletr_'.$balnum.'_'.$num.'"><td valign="top">'.$space. |
'<tr class="'.$css_class.'" id="balanceruletr_'.$balnum.'_'.$num.'"><td valign="top">'.$space. |
'<div id="balanceruletitle_'.$balnum.'_'.$type.'" style="'.$style.'">'.$title.'</div></td>'."\n". |
'<div id="balanceruletitle_'.$balnum.'_'.$type.'" style="'.$style.'">'.$title.'</div></td>'."\n". |
'<td valaign="top">'.$space. |
'<td valaign="top">'.$space. |
Line 3266 sub loadbalance_rule_row {
|
Line 3266 sub loadbalance_rule_row {
|
unless ($checked) { |
unless ($checked) { |
$default = ' selected="selected"'; |
$default = ' selected="selected"'; |
} |
} |
$extra = |
$extra = |
': <select name="loadbalancing_singleserver_'.$balnum.'_'.$type. |
': <select name="loadbalancing_singleserver_'.$balnum.'_'.$type. |
'" id="loadbalancing_singleserver_'.$balnum.'_'.$type. |
'" id="loadbalancing_singleserver_'.$balnum.'_'.$type. |
'" onchange="singleServerToggle('."'$balnum','$type'".')">'."\n". |
'" onchange="singleServerToggle('."'$balnum','$type'".')">'."\n". |
Line 3371 sub authorrequest_titles {
|
Line 3371 sub authorrequest_titles {
|
automatic => 'Automatic approval', |
automatic => 'Automatic approval', |
); |
); |
return %titles; |
return %titles; |
} |
} |
|
|
sub courserequest_conditions { |
sub courserequest_conditions { |
my %conditions = &Apache::lonlocal::texthash ( |
my %conditions = &Apache::lonlocal::texthash ( |
Line 3610 sub captcha_choice {
|
Line 3610 sub captcha_choice {
|
# |
# |
# Note: If reCAPTCHA is to be used for LON-CAPA servers in a domain, a domain coordinator should visit: |
# Note: If reCAPTCHA is to be used for LON-CAPA servers in a domain, a domain coordinator should visit: |
# https://www.google.com/recaptcha and generate a Public and Private key. For domains with multiple |
# https://www.google.com/recaptcha and generate a Public and Private key. For domains with multiple |
# servers a single key pair will be used for all servers, so the internet domain (e.g., yourcollege.edu) |
# servers a single key pair will be used for all servers, so the internet domain (e.g., yourcollege.edu) |
# specified for use with the key should be broad enough to accommodate all servers in the LON-CAPA domain. |
# specified for use with the key should be broad enough to accommodate all servers in the LON-CAPA domain. |
# |
# |
$output .= '</td></tr>'."\n". |
$output .= '</td></tr>'."\n". |
'<tr><td>'."\n". |
'<tr><td>'."\n". |
'<span class="LC_nobreak"><span id="'.$context.'_recaptchapubtxt">'.$pubtext.'</span> '."\n". |
'<span class="LC_nobreak"><span id="'.$context.'_recaptchapubtxt">'.$pubtext.'</span> '."\n". |
Line 4922 sub modify_login {
|
Line 4922 sub modify_login {
|
} else { |
} else { |
my $puberror = &mt("Upload of [_1] failed because an error occurred publishing the file in RES space. Error was: [_2].",$newfile{$lang},$result); |
my $puberror = &mt("Upload of [_1] failed because an error occurred publishing the file in RES space. Error was: [_2].",$newfile{$lang},$result); |
$errors .= '<li><span class="LC_error">'.$puberror.'</span></li>'; |
$errors .= '<li><span class="LC_error">'.$puberror.'</span></li>'; |
if ((grep(/^\Q$lang\E$/,@currlangs)) && |
if ((grep(/^\Q$lang\E$/,@currlangs)) && |
(!grep(/^\Q$lang\E$/,@delurls))) { |
(!grep(/^\Q$lang\E$/,@delurls))) { |
|
|
$loginhash{'login'}{'helpurl'}{$lang} = $domconfig{'login'}{'helpurl'}{$lang}; |
$loginhash{'login'}{'helpurl'}{$lang} = $domconfig{'login'}{'helpurl'}{$lang}; |
Line 5040 sub modify_login {
|
Line 5040 sub modify_login {
|
} |
} |
} elsif ($item eq 'captcha') { |
} elsif ($item eq 'captcha') { |
if (ref($loginhash{'login'}) eq 'HASH') { |
if (ref($loginhash{'login'}) eq 'HASH') { |
my $chgtxt; |
my $chgtxt; |
if ($loginhash{'login'}{$item} eq 'notused') { |
if ($loginhash{'login'}{$item} eq 'notused') { |
$chgtxt .= &mt('No CAPTCHA validation in use for helpdesk form.'); |
$chgtxt .= &mt('No CAPTCHA validation in use for helpdesk form.'); |
} else { |
} else { |
Line 5540 sub publishlogo {
|
Line 5540 sub publishlogo {
|
# See if there is anything left |
# See if there is anything left |
unless ($fname) { return ('error: no uploaded file'); } |
unless ($fname) { return ('error: no uploaded file'); } |
$fname="$subdir/$fname"; |
$fname="$subdir/$fname"; |
my $docroot=$r->dir_config('lonDocRoot'); |
my $docroot=$r->dir_config('lonDocRoot'); |
my $filepath="$docroot/priv"; |
my $filepath="$docroot/priv"; |
my $relpath = "$dom/$confname"; |
my $relpath = "$dom/$confname"; |
my ($fnamepath,$file,$fetchthumb); |
my ($fnamepath,$file,$fetchthumb); |
Line 6032 sub modify_quotas {
|
Line 6032 sub modify_quotas {
|
&Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime); |
&Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime); |
|
|
$resulttext = &mt('Changes made:').'<ul>'; |
$resulttext = &mt('Changes made:').'<ul>'; |
unless (($context eq 'requestcourses') || |
unless (($context eq 'requestcourses') || |
($context eq 'requestauthor')) { |
($context eq 'requestauthor')) { |
if (ref($changes{'defaultquota'}) eq 'HASH') { |
if (ref($changes{'defaultquota'}) eq 'HASH') { |
$resulttext .= '<li>'.&mt('Portfolio default quotas').'<ul>'; |
$resulttext .= '<li>'.&mt('Portfolio default quotas').'<ul>'; |
Line 6066 sub modify_quotas {
|
Line 6066 sub modify_quotas {
|
my (%haschgs,%inconf); |
my (%haschgs,%inconf); |
if ($context eq 'requestauthor') { |
if ($context eq 'requestauthor') { |
%haschgs = %changes; |
%haschgs = %changes; |
%inconf = %confhash; |
%inconf = %confhash; |
} else { |
} else { |
if (ref($changes{$item}) eq 'HASH') { |
if (ref($changes{$item}) eq 'HASH') { |
%haschgs = %{$changes{$item}}; |
%haschgs = %{$changes{$item}}; |
Line 6080 sub modify_quotas {
|
Line 6080 sub modify_quotas {
|
&Apache::lonnet::usertools_access($env{'user.name'}, |
&Apache::lonnet::usertools_access($env{'user.name'}, |
$env{'user.domain'}, |
$env{'user.domain'}, |
$item,'reload',$context); |
$item,'reload',$context); |
if (($context eq 'requestcourses') || |
if (($context eq 'requestcourses') || |
($context eq 'requestauthor')) { |
($context eq 'requestauthor')) { |
if ($env{'environment.canrequest.'.$item} ne $newacc) { |
if ($env{'environment.canrequest.'.$item} ne $newacc) { |
$newenv{'environment.canrequest.'.$item} = $newacc; |
$newenv{'environment.canrequest.'.$item} = $newacc; |
Line 6647 sub modify_directorysrch {
|
Line 6647 sub modify_directorysrch {
|
} else { |
} else { |
$chgtext =~ s/\; $//; |
$chgtext =~ s/\; $//; |
} |
} |
$resulttext .= |
$resulttext .= |
'<li>'. |
'<li>'. |
&mt("Users from domain '[_1]' permitted to search the institutional directory set to: [_2]", |
&mt("Users from domain '[_1]' permitted to search the institutional directory set to: [_2]", |
'<span class="LC_cusr_emph">'.$dom.'</span>',$chgtext). |
'<span class="LC_cusr_emph">'.$dom.'</span>',$chgtext). |
Line 7147 sub modify_usercreation {
|
Line 7147 sub modify_usercreation {
|
if ($captchas{$cancreate{$type}}) { |
if ($captchas{$cancreate{$type}}) { |
$chgtext .= &mt("Validation for self-creation screen set to $captchas{$cancreate{$type}}."); |
$chgtext .= &mt("Validation for self-creation screen set to $captchas{$cancreate{$type}}."); |
} else { |
} else { |
$chgtext .= &mt('Validation for self-creation screen set to unknown type.'); |
$chgtext .= &mt('Validation for self-creation screen set to unknown type.'); |
} |
} |
} |
} |
} elsif ($type eq 'recaptchakeys') { |
} elsif ($type eq 'recaptchakeys') { |
Line 7275 sub process_captcha {
|
Line 7275 sub process_captcha {
|
$newsettings->{'captcha'} = 'original'; |
$newsettings->{'captcha'} = 'original'; |
} |
} |
if ($current->{'captcha'} ne $newsettings->{'captcha'}) { |
if ($current->{'captcha'} ne $newsettings->{'captcha'}) { |
if ($container eq 'cancreate') { |
if ($container eq 'cancreate') { |
if (ref($changes->{'cancreate'}) eq 'ARRAY') { |
if (ref($changes->{'cancreate'}) eq 'ARRAY') { |
push(@{$changes->{'cancreate'}},'captcha'); |
push(@{$changes->{'cancreate'}},'captcha'); |
} elsif (!defined($changes->{'cancreate'})) { |
} elsif (!defined($changes->{'cancreate'})) { |
Line 7314 sub process_captcha {
|
Line 7314 sub process_captcha {
|
$changes->{'cancreate'} = ['recaptchakeys']; |
$changes->{'cancreate'} = ['recaptchakeys']; |
} |
} |
} else { |
} else { |
$changes->{'recaptchakeys'} = 1; |
$changes->{'recaptchakeys'} = 1; |
} |
} |
} |
} |
return; |
return; |
Line 8009 sub modify_helpsettings {
|
Line 8009 sub modify_helpsettings {
|
$changes{$item} = 1; |
$changes{$item} = 1; |
} |
} |
} |
} |
if (($env{'form.'.$item} eq '0') || ($env{'form.'.$item} eq '1')) { |
if (($env{'form.'.$item} eq '0') || ($env{'form.'.$item} eq '1')) { |
$helphash{'helpsettings'}{$item} = $env{'form.'.$item}; |
$helphash{'helpsettings'}{$item} = $env{'form.'.$item}; |
} |
} |
} |
} |
Line 8502 sub modify_loadbalancing {
|
Line 8502 sub modify_loadbalancing {
|
if ($balancer eq '') { |
if ($balancer eq '') { |
next; |
next; |
} |
} |
if (!exists($servers{$balancer})) { |
if (!exists($servers{$balancer})) { |
if (exists($currbalancer{$balancer})) { |
if (exists($currbalancer{$balancer})) { |
push(@{$changes{'delete'}},$balancer); |
push(@{$changes{'delete'}},$balancer); |
} |
} |
Line 8553 sub modify_loadbalancing {
|
Line 8553 sub modify_loadbalancing {
|
} |
} |
} else { |
} else { |
if (ref($defaultshash{'loadbalancing'}{$balancer}) eq 'HASH') { |
if (ref($defaultshash{'loadbalancing'}{$balancer}) eq 'HASH') { |
foreach my $sparetype (@sparestypes) { |
foreach my $sparetype (@sparestypes) { |
if (ref($defaultshash{'loadbalancing'}{$balancer}{'targets'}{$sparetype}) eq 'ARRAY') { |
if (ref($defaultshash{'loadbalancing'}{$balancer}{'targets'}{$sparetype}) eq 'ARRAY') { |
if (@{$defaultshash{'loadbalancing'}{$balancer}{'targets'}{$sparetype}} > 0) { |
if (@{$defaultshash{'loadbalancing'}{$balancer}{'targets'}{$sparetype}} > 0) { |
$changes{'curr'}{$balancer}{'targets'} = 1; |
$changes{'curr'}{$balancer}{'targets'} = 1; |
} |
} |
} |
} |
} |
} |
} |
} |
} |
} |
my $ishomedom; |
my $ishomedom; |
if (&Apache::lonnet::host_domain($balancer) eq $dom) { |
if (&Apache::lonnet::host_domain($balancer) eq $dom) { |
Line 8569 sub modify_loadbalancing {
|
Line 8569 sub modify_loadbalancing {
|
if (ref($alltypes) eq 'ARRAY') { |
if (ref($alltypes) eq 'ARRAY') { |
foreach my $type (@{$alltypes}) { |
foreach my $type (@{$alltypes}) { |
my $rule; |
my $rule; |
unless ((($type eq '_LC_external') || ($type eq '_LC_internetdom')) && |
unless ((($type eq '_LC_external') || ($type eq '_LC_internetdom')) && |
(!$ishomedom)) { |
(!$ishomedom)) { |
$rule = $env{'form.loadbalancing_rules_'.$i.'_'.$type}; |
$rule = $env{'form.loadbalancing_rules_'.$i.'_'.$type}; |
} |
} |
Line 8594 sub modify_loadbalancing {
|
Line 8594 sub modify_loadbalancing {
|
} |
} |
my $putresult = &Apache::lonnet::put_dom('configuration', |
my $putresult = &Apache::lonnet::put_dom('configuration', |
\%defaultshash,$dom); |
\%defaultshash,$dom); |
|
|
if ($putresult eq 'ok') { |
if ($putresult eq 'ok') { |
if (keys(%changes) > 0) { |
if (keys(%changes) > 0) { |
if (ref($changes{'delete'}) eq 'ARRAY') { |
if (ref($changes{'delete'}) eq 'ARRAY') { |
Line 8604 sub modify_loadbalancing {
|
Line 8603 sub modify_loadbalancing {
|
} |
} |
} |
} |
if (ref($changes{'add'}) eq 'ARRAY') { |
if (ref($changes{'add'}) eq 'ARRAY') { |
foreach my $balancer (sort(@{$changes{'add'}})) { |
foreach my $balancer (sort(@{$changes{'add'}})) { |
$resulttext .= '<li>'.&mt('Load Balancing enabled for: [_1]',$balancer); |
$resulttext .= '<li>'.&mt('Load Balancing enabled for: [_1]',$balancer); |
} |
} |
} |
} |
Line 8651 sub modify_loadbalancing {
|
Line 8650 sub modify_loadbalancing {
|
} else { |
} else { |
$balancetext = &mt('offload to [_1]',$defaultshash{'loadbalancing'}{$balancer}{'rules'}{$type}); |
$balancetext = &mt('offload to [_1]',$defaultshash{'loadbalancing'}{$balancer}{'rules'}{$type}); |
} |
} |
$resulttext .= '<li>'.&mt('Load Balancer: [_1] -- balancing for [_2] set to - "[_3]"',$balancer,$titles->{$type},$balancetext).'</li>'; |
$resulttext .= '<li>'.&mt('Load Balancer: [_1] -- balancing for [_2] set to - "[_3]"',$balancer,$titles->{$type},$balancetext).'</li>'; |
} |
} |
} |
} |
} |
} |
Line 8744 sub active_dc_picker {
|
Line 8743 sub active_dc_picker {
|
} |
} |
} |
} |
@domcoord = sort(@domcoord); |
@domcoord = sort(@domcoord); |
my $numdcs = scalar(@domcoord); |
my $numdcs = scalar(@domcoord); |
my $rows = 0; |
my $rows = 0; |
my $table; |
my $table; |
if ($numdcs > 1) { |
if ($numdcs > 1) { |
Line 8878 sub lonbalance_targets_js {
|
Line 8877 sub lonbalance_targets_js {
|
} |
} |
&get_loadbalancers_config($servers,\%existing,\%currbalancer, |
&get_loadbalancers_config($servers,\%existing,\%currbalancer, |
\%currtargets,\%currrules); |
\%currtargets,\%currrules); |
my $balancers = join("','",sort(keys(%currbalancer))); |
my $balancers = join("','",sort(keys(%currbalancer))); |
return <<"END"; |
return <<"END"; |
|
|
<script type="text/javascript"> |
<script type="text/javascript"> |
Line 8949 function showSpares(balancer,ishomedom,b
|
Line 8948 function showSpares(balancer,ishomedom,b
|
} else { |
} else { |
document.getElementById('balanceruletitle_'+balnum+'_'+insttypes[k]).style.display='none'; |
document.getElementById('balanceruletitle_'+balnum+'_'+insttypes[k]).style.display='none'; |
document.getElementById('balancerule_'+balnum+'_'+insttypes[k]).style.display='none'; |
document.getElementById('balancerule_'+balnum+'_'+insttypes[k]).style.display='none'; |
|
|
} |
} |
} else { |
} else { |
document.getElementById('balanceruletitle_'+balnum+'_'+insttypes[k]).style.display='block'; |
document.getElementById('balanceruletitle_'+balnum+'_'+insttypes[k]).style.display='block'; |
Line 8961 function showSpares(balancer,ishomedom,b
|
Line 8959 function showSpares(balancer,ishomedom,b
|
var item = document.getElementById('loadbalancing_singleserver_'+balnum+'_'+insttypes[k]); |
var item = document.getElementById('loadbalancing_singleserver_'+balnum+'_'+insttypes[k]); |
item.options.length = 0; |
item.options.length = 0; |
item.options[0] = new Option("","",true,true); |
item.options[0] = new Option("","",true,true); |
var idx = 0; |
var idx = 0; |
for (var m=0; m<alltargets.length; m++) { |
for (var m=0; m<alltargets.length; m++) { |
if ((currBalancers.indexOf(alltargets[m]) == -1) && (alltargets[m] != balancer)) { |
if ((currBalancers.indexOf(alltargets[m]) == -1) && (alltargets[m] != balancer)) { |
idx ++; |
idx ++; |
item.options[idx] = new Option(alltargets[m],alltargets[m],false,false); |
item.options[idx] = new Option(alltargets[m],alltargets[m],false,false); |
|
|
} |
} |
} |
} |
} |
} |