From 4ce46c5c58cef963ca103280627f1babfb535ddb Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Sat, 4 Feb 2012 22:18:56 +0000 Subject: [PATCH] [MRM-1599] NTLM proxy no longer works ui part in new webapp. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1240630 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/webapp/js/archiva/network-proxies.js | 18 +++++++++++------- .../js/archiva/templates/network-proxies.html | 8 ++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js index fe9fc0ca0..06a6395c4 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js @@ -19,7 +19,7 @@ $(function() { - NetworkProxy=function(id,protocol,host,port,username,password){ + NetworkProxy=function(id,protocol,host,port,username,password,useNtlm){ var self=this; //private String id; this.id = ko.observable(id); @@ -27,23 +27,27 @@ $(function() { //private String protocol = "http"; this.protocol=ko.observable(protocol); - this.protocol.subscribe(function(newValue){self.modified(true)});; + this.protocol.subscribe(function(newValue){self.modified(true)}); //private String host; this.host=ko.observable(host); - this.host.subscribe(function(newValue){self.modified(true)});; + this.host.subscribe(function(newValue){self.modified(true)}); //private int port = 8080; this.port=ko.observable(port); - this.port.subscribe(function(newValue){self.modified(true)});; + this.port.subscribe(function(newValue){self.modified(true)}); //private String username; this.username=ko.observable(username?username:""); - this.username.subscribe(function(newValue){self.modified(true)});; + this.username.subscribe(function(newValue){self.modified(true)}); //private String password; this.password=ko.observable(password?password:""); - this.password.subscribe(function(newValue){self.modified(true)});; + this.password.subscribe(function(newValue){self.modified(true)}); + + //use NTLM proxy + this.useNtlm=ko.observable(useNtlm); + this.useNtlm.subscribe(function(newValue){self.modified(true)}); this.modified=ko.observable(false); } @@ -294,7 +298,7 @@ $(function() { if (data==null){ return null; } - return new NetworkProxy(data.id,data.protocol,data.host,data.port,data.username,data.password); + return new NetworkProxy(data.id,data.protocol,data.host,data.port,data.username,data.password,data.useNtlm); } mapNetworkProxies=function(data){ diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/network-proxies.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/network-proxies.html index 105451c60..ad83f56e4 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/network-proxies.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/network-proxies.html @@ -49,6 +49,7 @@ ${ columnDefinition.headerText } {{/each}} ${$.i18n.prop('password')} + ${$.i18n.prop('network.proxy.useNtlm')} ${$.i18n.prop('edit')} ${$.i18n.prop('delete')} ${$.i18n.prop('modified')} @@ -68,6 +69,7 @@ {{else}} {{/if}} + ${row.useNtlm()} ${$.i18n.prop('edit')} @@ -139,6 +141,12 @@ data-bind="value: networkProxy.password"/> +
+ +
+ +
+
-- 2.39.5