fix attributes names

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1425374 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-12-22 23:44:25 +00:00
parent 4119701f84
commit 93bca03337
2 changed files with 23 additions and 8 deletions

View File

@ -1160,7 +1160,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
RedbackRuntimeConfiguration=function(userManagerImpls,ldapConfiguration,migratedFromRedbackConfiguration,configurationPropertiesEntries RedbackRuntimeConfiguration=function(userManagerImpls,ldapConfiguration,migratedFromRedbackConfiguration,configurationPropertiesEntries
,useUsersCache,usersCacheTimeToIdleSeconds,usersCacheTimeToLiveSeconds){ ,useUsersCache,cacheConfiguration){
$.log("new RedbackRuntimeConfiguration"); $.log("new RedbackRuntimeConfiguration");
var self=this; var self=this;
this.modified=ko.observable(false); this.modified=ko.observable(false);
@ -1197,11 +1197,9 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
this.useUsersCache=ko.observable(useUsersCache); this.useUsersCache=ko.observable(useUsersCache);
this.useUsersCache.subscribe(function(newValue){self.modified(true)}); this.useUsersCache.subscribe(function(newValue){self.modified(true)});
this.usersCacheTimeToIdleSeconds=ko.observable(usersCacheTimeToIdleSeconds); this.usersCacheConfiguration=ko.observable(cacheConfiguration);
this.usersCacheTimeToIdleSeconds.subscribe(function(newValue){self.modified(true)}); this.usersCacheConfiguration.subscribe(function(newValue){self.modified(true)});
this.usersCacheTimeToLiveSeconds=ko.observable(usersCacheTimeToLiveSeconds);
this.usersCacheTimeToLiveSeconds.subscribe(function(newValue){self.modified(true)});
} }
@ -1212,7 +1210,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
var redbackRuntimeConfiguration = var redbackRuntimeConfiguration =
new RedbackRuntimeConfiguration(data.userManagerImpls,ldapConfiguration,data.migratedFromRedbackConfiguration,[] new RedbackRuntimeConfiguration(data.userManagerImpls,ldapConfiguration,data.migratedFromRedbackConfiguration,[]
,data.useUsersCache,data.usersCacheTimeToIdleSeconds,data.usersCacheTimeToLiveSeconds); ,data.useUsersCache,mapCacheConfiguration(data.usersCacheConfiguration));
$.log("mapRedbackRuntimeConfiguration done"); $.log("mapRedbackRuntimeConfiguration done");
var configurationPropertiesEntries = data.configurationPropertiesEntries == null ? []: $.each(data.configurationPropertiesEntries,function(item){ var configurationPropertiesEntries = data.configurationPropertiesEntries == null ? []: $.each(data.configurationPropertiesEntries,function(item){
@ -1499,6 +1497,23 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
} }
CacheConfiguration=function(timeToIdleSeconds,timeToLiveSeconds){
var self=this;
this.modified=ko.observable(false);
this.timeToIdleSeconds=ko.observable(timeToIdleSeconds);
this.timeToIdleSeconds.subscribe(function(newValue){self.modified(true)});
this.timeToLiveSeconds=ko.observable(timeToLiveSeconds);
this.timeToLiveSeconds.subscribe(function(newValue){self.modified(true)});
}
mapCacheConfiguration=function(data){
if(!data){
return new CacheConfiguration();
}
return new CacheConfiguration(data.timeToIdleSeconds,data.timeToLiveSeconds);
}
}); });

View File

@ -1040,7 +1040,7 @@
<div class="control-group"> <div class="control-group">
<label class="control-label" for="usersCacheTimeToLiveSeconds">${$.i18n.prop('redback.runtime.usersCacheTimeToLiveSeconds.label')}</label> <label class="control-label" for="usersCacheTimeToLiveSeconds">${$.i18n.prop('redback.runtime.usersCacheTimeToLiveSeconds.label')}</label>
<div class="controls"> <div class="controls">
<input type="text" class="xlarge required numeric" data-bind="value: redbackRuntimeConfiguration().usersCacheTimeToLiveSeconds" <input type="text" class="xlarge required numeric" data-bind="value: redbackRuntimeConfiguration().usersCacheConfiguration().timeToLiveSeconds"
id="usersCacheTimeToLiveSeconds" name="usersCacheTimeToLiveSeconds" /> id="usersCacheTimeToLiveSeconds" name="usersCacheTimeToLiveSeconds" />
</div> </div>
</div> </div>
@ -1048,7 +1048,7 @@
<div class="control-group"> <div class="control-group">
<label class="control-label" for="usersCacheTimeToIdleSeconds">${$.i18n.prop('redback.runtime.usersCacheTimeToIdleSeconds.label')}</label> <label class="control-label" for="usersCacheTimeToIdleSeconds">${$.i18n.prop('redback.runtime.usersCacheTimeToIdleSeconds.label')}</label>
<div class="controls"> <div class="controls">
<input type="text" class="xlarge required numeric" data-bind="value: redbackRuntimeConfiguration().usersCacheTimeToIdleSeconds" <input type="text" class="xlarge required numeric" data-bind="value: redbackRuntimeConfiguration().usersCacheConfiguration().timeToIdleSeconds"
id="usersCacheTimeToIdleSeconds" name="usersCacheTimeToIdleSeconds" /> id="usersCacheTimeToIdleSeconds" name="usersCacheTimeToIdleSeconds" />
</div> </div>
</div> </div>