Browse Source

[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
tags/archiva-1.4-M3
Olivier Lamy 12 years ago
parent
commit
4ce46c5c58

+ 11
- 7
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js View 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){

+ 8
- 0
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/network-proxies.html View 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>
@@ -139,6 +141,12 @@
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>

Loading…
Cancel
Save