remoteDownloadNetworkProxyId=Proxy for Remote Download Index
downloadRemoteIndexOnStartup=Download Remote Index on Startup
remoteDownloadTimeout=Download Remote Timeout
+remoterepository.added=Remote Repository added.
#network proxy
networkproxy.updated=Network Proxy " {0} " updated.
networkproxy.deleted=Network Proxy {0} deleted
bulk.save.confirm.title=Network Proxy Bulk Save
networkproxy.bulk.save.confirm=Are you sure to update {0} network proxy(ies)
+network.proxy.useNtlm=Use NTLM
#menu
menu.users=User Management
this.name.subscribe(function(newValue){self.modified(true)});
}
+
ProxyConnectorViewModel=function(proxyConnector,update,proxyConnectorsViewModel){
var self=this;
this.proxyConnector=proxyConnector;
ProxyConnectorsViewModel=function(){
var self=this;
this.proxyConnectors=ko.observableArray([]);
+ this.proxyConnectors.subscribe(function(newValue){
+ $.log("ProxyConnectorsViewModel#proxyConnectors modified")
+ self.proxyConnectors().sort(function(a,b){
+ if ( a.sourceRepoId()== b.sourceRepoId()) return a.order() - b.order();
+ return (a.sourceRepoId() > b.sourceRepoId())? -1:1;
+ });
+ });
this.policyInformations=ko.observableArray([]);
this.managedRepositories=ko.observableArray([]);
this.remoteRepositories=ko.observableArray([]);
+proxyConnector.sourceRepoId()+"-"+proxyConnector.targetRepoId());
targetContent.html("");
targetContent.append($("#proxy-connectors-remote-settings-popover-tmpl")
- .tmpl(ko.toJS(proxyConnector)));
+ .tmpl({
+ proxyConnectorsViewModel: self,
+ proxyConnector:ko.toJS(proxyConnector)
+ }));
var targetImg = $("#proxy-connectors-grid-remoterepo-settings-edit-"+proxyConnector.sourceRepoId()
+"-"+proxyConnector.targetRepoId());
}
+ this.findPolicyInformationName=function(id){
+ for(i=0;i<self.policyInformations().length;i++){
+ if (id==self.policyInformations()[i].id()){
+ return self.policyInformations()[i].name();
+ }
+ }
+ return null;
+ }
+
+
this.displayGrid=function(){
this.gridViewModel = new ko.simpleGrid.viewModel({
data: self.proxyConnectors,
<script id='proxy-connectors-remote-settings-popover-tmpl' type='text/x-jquery-tmpl'>
<div>
{{if proxyId}}
- ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${proxyId}
+ ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${proxyConnector.proxyId}
{{else}}
${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${$.i18n.prop('none')}
{{/if}}
<th colspan="2">${$.i18n.prop('proxy-connector.policies')}</th>
</thead>
<tbody>
- {{each(i, entry) policiesEntries}}
+ {{each(i, entry) proxyConnector.policiesEntries}}
+ {{var name = proxyConnectorsViewModel.findPolicyInformationName(entry.key)}}
<tr>
- <td>${entry.key}</td>
+ <td>${name}</td>
<td>${entry.value}</td>
</tr>
{{/each}}