]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1576] add layout for proxy connectors screen.
authorOlivier Lamy <olamy@apache.org>
Mon, 30 Jan 2012 09:38:17 +0000 (09:38 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 30 Jan 2012 09:38:17 +0000 (09:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1237576 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js
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/proxy-connectors.js [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/proxy-connectors.html [new file with mode: 0644]

index 7581bfdd931ab255068a9d1dbc7984c9fb051b09..a3cad210a66d83d0554851df95dd91a44f635e41 100644 (file)
@@ -78,6 +78,7 @@ $.ajax(
            .script("archiva/main-tmpl.js").wait()
            .script("archiva/repositories.js").wait()
            .script("archiva/network-proxies.js").wait()
+           .script("archiva/proxy-connectors.js").wait()
            .script("redback/operation.js").wait()
            .script("redback/redback-tmpl.js").wait()
            .script("bootstrap-tabs.js")
index a49d1d35d559eb67786d923b48c625b1a253d2d7..bfd0c8fb8de6718a3715891f9c65ad463c56de71 100644 (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/grids-generics.html?"+timestampNoCache(),
           "text!archiva/templates/repositories.html?"+timestampNoCache(),
-          "text!archiva/templates/network-proxies.html?"+timestampNoCache()],
-  function(menu,topbar,message,modal,grids_generics,repositories,network_proxies) {
+          "text!archiva/templates/network-proxies.html?"+timestampNoCache(),
+          "text!archiva/templates//proxy-connectors.html?"+timestampNoCache()],
+  function(menu,topbar,message,modal,grids_generics,repositories,network_proxies,proxies_connectors) {
 
     // template loading
     $.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(repositories);
     $("#html-fragments").append(network_proxies);
+    $("#html-fragments").append(proxies_connectors);
     $.log("main-tmpl.js menu loaded");
   }
 );
\ No newline at end of file
index 46cbb03fbfbeafc81c34ca1aa30dd6071acb7fa6..6f93853ff92d143ef6fb8cd58b9ae18a64f21075 100644 (file)
 $(function() {
 
 
-  displayNetworkProxies=function(){
-
-  }
-
   NetworkProxy=function(id,protocol,host,port,username,password){
     //private String id;
     this.id = ko.observable(id);
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js
new file mode 100644 (file)
index 0000000..e608884
--- /dev/null
@@ -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());
+  }
+
+});
\ No newline at end of file
index 003006f6e80a78560f85467d42e1518a2868236d..fd4a397d53eb65183a8f056e6486704e9d14d722 100644 (file)
@@ -30,5 +30,8 @@
       <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>
       </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>
   </div>
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/proxy-connectors.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/proxy-connectors.html
new file mode 100644 (file)
index 0000000..e8fc03f
--- /dev/null
@@ -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>
\ No newline at end of file