]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1599] NTLM proxy no longer works
authorOlivier Lamy <olamy@apache.org>
Sat, 4 Feb 2012 22:18:56 +0000 (22:18 +0000)
committerOlivier Lamy <olamy@apache.org>
Sat, 4 Feb 2012 22:18:56 +0000 (22:18 +0000)
ui part in new webapp.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1240630 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/network-proxies.html

index fe9fc0ca03db18d877b268298377d0c20368ee23..06a6395c426f5f041b2ba0cb6d09e9e28f165a9f 100644 (file)
@@ -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){
index 105451c60776048045f873ccaa0a80c89c8a8aff..ad83f56e442d154cc8f74bd6ac44b8a04314a490 100644 (file)
@@ -49,6 +49,7 @@
         <th>${ columnDefinition.headerText }</th>
         {{/each}}
         <th>${$.i18n.prop('password')}</th>
+        <th>${$.i18n.prop('network.proxy.useNtlm')}</th>
         <th>${$.i18n.prop('edit')}</th>
         <th>${$.i18n.prop('delete')}</th>
         <th>${$.i18n.prop('modified')}</th>
@@ -68,6 +69,7 @@
         {{else}}
           <td></td>
         {{/if}}
+        <td>${row.useNtlm()}</td>
         <td>
             <a href="#" data-bind="click: function(){ editNetworkProxy(row) }">${$.i18n.prop('edit')}</a>
         </td>
                    data-bind="value: networkProxy.password"/>
           </div>
         </div>
+          <div class="control-group">
+            <label class="control-label"  for="password">${$.i18n.prop('network.proxy.useNtlm')}</label>
+            <div class="controls">
+              <input type="checkbox" id="useNtlm" name="useNtlm" data-bind="checked: networkProxy.useNtlm"/>
+            </div>
+          </div>
 
       </fieldset>
       <button data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>