mirror of https://github.com/apache/archiva.git
fix available proxy connectors in proxy connectors screen
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1399030 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1a9f55d9c4
commit
2879d8775e
|
@ -175,10 +175,25 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
||||||
var self=this;
|
var self=this;
|
||||||
this.proxyConnectorRule=proxyConnectorRule;
|
this.proxyConnectorRule=proxyConnectorRule;
|
||||||
this.proxyConnectorRulesViewModel=proxyConnectorRulesViewModel;
|
this.proxyConnectorRulesViewModel=proxyConnectorRulesViewModel;
|
||||||
this.availableProxyConnectors=proxyConnectorRulesViewModel.proxyConnectors;
|
this.availableProxyConnectors=ko.observableArray([]);
|
||||||
this.availableProxyConnectors.id="availableProxyConnectors";
|
this.availableProxyConnectors.id="availableProxyConnectors";
|
||||||
this.update=update;
|
this.update=update;
|
||||||
|
|
||||||
|
|
||||||
|
$.each(this.proxyConnectorRulesViewModel.proxyConnectors(), function(idx, value) {
|
||||||
|
$.log(idx + ': ' + value.sourceRepoId() +":"+value.targetRepoId());
|
||||||
|
var available=true;
|
||||||
|
// is it in proxyConnectorRule.proxyConnectors
|
||||||
|
$.each(self.proxyConnectorRule.proxyConnectors(),function(index,proxyConnector){
|
||||||
|
if(value.sourceRepoId()==proxyConnector.sourceRepoId() && value.targetRepoId()==proxyConnector.targetRepoId()){
|
||||||
|
available=false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if(available==true){
|
||||||
|
self.availableProxyConnectors.push(value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
proxyConnectorMoved=function(arg){
|
proxyConnectorMoved=function(arg){
|
||||||
$.log("repositoryMoved:"+arg.sourceIndex+" to " + arg.targetIndex);
|
$.log("repositoryMoved:"+arg.sourceIndex+" to " + arg.targetIndex);
|
||||||
self.proxyConnectorRule.modified(true);
|
self.proxyConnectorRule.modified(true);
|
||||||
|
|
Loading…
Reference in New Issue