[MRM-1576] add layout for proxy connectors screen.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1237576 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-01-30 09:38:17 +00:00
parent 0337a1e485
commit 256a116349
6 changed files with 79 additions and 6 deletions

View File

@ -78,6 +78,7 @@ $.ajax(
.script("archiva/main-tmpl.js").wait() .script("archiva/main-tmpl.js").wait()
.script("archiva/repositories.js").wait() .script("archiva/repositories.js").wait()
.script("archiva/network-proxies.js").wait() .script("archiva/network-proxies.js").wait()
.script("archiva/proxy-connectors.js").wait()
.script("redback/operation.js").wait() .script("redback/operation.js").wait()
.script("redback/redback-tmpl.js").wait() .script("redback/redback-tmpl.js").wait()
.script("bootstrap-tabs.js") .script("bootstrap-tabs.js")

View File

@ -20,8 +20,9 @@ require(["text!archiva/templates/menu.html?"+timestampNoCache(),"text!archiva/te
"text!archiva/templates/message.html?"+timestampNoCache(),"text!archiva/templates/modal.html?"+timestampNoCache(), "text!archiva/templates/message.html?"+timestampNoCache(),"text!archiva/templates/modal.html?"+timestampNoCache(),
"text!archiva/templates/grids-generics.html?"+timestampNoCache(), "text!archiva/templates/grids-generics.html?"+timestampNoCache(),
"text!archiva/templates/repositories.html?"+timestampNoCache(), "text!archiva/templates/repositories.html?"+timestampNoCache(),
"text!archiva/templates/network-proxies.html?"+timestampNoCache()], "text!archiva/templates/network-proxies.html?"+timestampNoCache(),
function(menu,topbar,message,modal,grids_generics,repositories,network_proxies) { "text!archiva/templates//proxy-connectors.html?"+timestampNoCache()],
function(menu,topbar,message,modal,grids_generics,repositories,network_proxies,proxies_connectors) {
// template loading // template loading
$.tmpl( menu ).appendTo("#html-fragments"); $.tmpl( menu ).appendTo("#html-fragments");
@ -31,6 +32,7 @@ require(["text!archiva/templates/menu.html?"+timestampNoCache(),"text!archiva/te
$("#html-fragments").append(grids_generics); $("#html-fragments").append(grids_generics);
$("#html-fragments").append(repositories); $("#html-fragments").append(repositories);
$("#html-fragments").append(network_proxies); $("#html-fragments").append(network_proxies);
$("#html-fragments").append(proxies_connectors);
$.log("main-tmpl.js menu loaded"); $.log("main-tmpl.js menu loaded");
} }
); );

View File

@ -19,10 +19,6 @@
$(function() { $(function() {
displayNetworkProxies=function(){
}
NetworkProxy=function(id,protocol,host,port,username,password){ NetworkProxy=function(id,protocol,host,port,username,password){
//private String id; //private String id;
this.id = ko.observable(id); this.id = ko.observable(id);

View File

@ -0,0 +1,48 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
$(function() {
ProxyConnector=function(sourceRepoId,targetRepoId,proxyId,blackListPatterns,whiteListPatterns,policies,properties,
disabled,order){
//private String sourceRepoId;
this.sourceRepoId=ko.observable(sourceRepoId);
//private String targetRepoId;
this.targetRepoId=ko.observable(targetRepoId);
//private String proxyId;
this.proxyId=ko.observable(proxyId);
//private List<String> blackListPatterns;
this.blackListPatterns=ko.observableArray(blackListPatterns);
//private List<String> whiteListPatterns;
this.whiteListPatterns=ko.observableArray(whiteListPatterns);
//private Map<String, String> policies;
//private Map<String, String> properties;
//private boolean disabled = false;
this.disabled=ko.observable(disabled);
//private int order = 0;
this.order=ko.observable(order);
}
displayProxyConnectors=function(){
$("#main-content").html($("#proxyConnectorsMain").tmpl());
$("#main-content").append(smallSpinnerImg());
}
});

View File

@ -30,5 +30,8 @@
<li style="display: none" redback-permissions="{permissions: ['archiva-manage-configuration']}"> <li style="display: none" redback-permissions="{permissions: ['archiva-manage-configuration']}">
<a href="#" id="menu-network-proxies-list-a" onclick="displayNetworkProxies()">${$.i18n.prop('menu.network-proxies')}</a> <a href="#" id="menu-network-proxies-list-a" onclick="displayNetworkProxies()">${$.i18n.prop('menu.network-proxies')}</a>
</li> </li>
<li style="display: none" redback-permissions="{permissions: ['archiva-manage-configuration']}">
<a href="#" id="menu-proxy-connectors-list-a" onclick="displayProxyConnectors()">${$.i18n.prop('menu.proxy-connectors')}</a>
</li>
</ul> </ul>
</div> </div>

View File

@ -0,0 +1,23 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<script id="proxyConnectorsMain" type="text/x-jquery-tmpl">
<div class="page-header">
<h2>${$.i18n.prop('proxy-connectors.list')}</h2>
</div>
</script>