]> source.dussan.org Git - archiva.git/blob
b084a1d3431bf14122e9f4149504e6a43105ec9a
[archiva.git] /
1 <%--
2   ~ Licensed to the Apache Software Foundation (ASF) under one
3   ~ or more contributor license agreements.  See the NOTICE file
4   ~ distributed with this work for additional information
5   ~ regarding copyright ownership.  The ASF licenses this file
6   ~ to you under the Apache License, Version 2.0 (the
7   ~ "License"); you may not use this file except in compliance
8   ~ with the License.  You may obtain a copy of the License at
9   ~
10   ~   http://www.apache.org/licenses/LICENSE-2.0
11   ~
12   ~ Unless required by applicable law or agreed to in writing,
13   ~ software distributed under the License is distributed on an
14   ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   ~ KIND, either express or implied.  See the License for the
16   ~ specific language governing permissions and limitations
17   ~ under the License.
18   --%>
19
20 <%@ taglib prefix="ww" uri="/webwork" %>
21 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
22 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
23 <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
24 <%@ taglib prefix="archiva" uri="http://archiva.apache.org" %>
25
26 <html>
27 <head>
28   <title>Administration - Proxy Connectors</title>
29   <ww:head/>
30 </head>
31
32 <body>
33
34 <h1>Administration - Proxy Connectors</h1>
35
36 <c:url var="iconDeleteUrl" value="/images/icons/delete.gif"/>
37 <c:url var="iconEditUrl" value="/images/icons/edit.png"/>
38 <c:url var="iconCreateUrl" value="/images/icons/create.png"/>
39 <c:url var="iconUpUrl" value="/images/icons/up.gif"/>
40 <c:url var="iconDownUrl" value="/images/icons/down.gif"/>
41 <c:url var="iconEnable" value="/images/icons/on-symbol.png"/>
42 <c:url var="iconDisable" value="/images/icons/off-symbol.png"/>
43
44 <div id="contentArea">
45
46 <ww:actionerror/>
47 <ww:actionmessage/>
48
49 <div style="float:right">
50   <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
51     <ww:url id="addProxyConnectorUrl" action="addProxyConnector"/>
52     <ww:a href="%{addProxyConnectorUrl}" cssClass="create">
53       <img src="<c:url value="/images/icons/create.png" />"/>
54       Add
55     </ww:a>
56   </redback:ifAnyAuthorized>
57 </div>
58
59 <h2>Repository Proxy Connectors</h2>
60
61 <c:choose>
62 <c:when test="${empty (proxyConnectorMap)}">
63   <strong>No Repository Proxy Connectors Defined.</strong>
64 </c:when>
65 <c:otherwise>
66
67 <div class="admin">
68
69 <c:forEach items="${proxyConnectorMap}" var="repository" varStatus="i">
70
71 <div class="proxyConfig">
72   <div class="managedRepo">
73     <img src="<c:url value="/images/archiva-splat-32.gif"/>"/>
74     <p class="id">${repository.key}</p>
75     <p class="name">${repoMap[repository.key].name}</p>
76   </div>
77
78   <c:set var="numberOfRepos" value="${fn:length(repository.value)}" />
79
80   <c:forEach items="${repository.value}" var="connector" varStatus="pc">
81   
82   <c:choose>
83     <c:when test='${(pc.index)%2 eq 0}'>
84       <c:set var="rowColor" value="dark" scope="page"/>
85     </c:when>
86     <c:otherwise>
87       <c:set var="rowColor" value="lite" scope="page"/>
88     </c:otherwise>
89   </c:choose>
90   
91   <div class="connector ${rowColor}"> 
92     <div class="controls">
93       <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
94         <ww:url id="sortDownProxyConnectorUrl" action="sortDownProxyConnector">
95           <ww:param name="target" value="%{'${connector.targetRepoId}'}"/>
96           <ww:param name="source" value="%{'${connector.sourceRepoId}'}"/>
97         </ww:url>
98         <ww:url id="sortUpProxyConnectorUrl" action="sortUpProxyConnector">
99           <ww:param name="target" value="%{'${connector.targetRepoId}'}"/>
100           <ww:param name="source" value="%{'${connector.sourceRepoId}'}"/>
101         </ww:url>
102         <ww:url id="editProxyConnectorUrl" action="editProxyConnector">
103           <ww:param name="target" value="%{'${connector.targetRepoId}'}"/>
104           <ww:param name="source" value="%{'${connector.sourceRepoId}'}"/>
105         </ww:url>
106         <ww:url id="deleteProxyConnectorUrl" action="deleteProxyConnector" method="confirmDelete">
107           <ww:param name="source" value="%{'${connector.sourceRepoId}'}"/>
108           <ww:param name="target" value="%{'${connector.targetRepoId}'}"/>
109         </ww:url>
110         <ww:url id="enableProxyConnectorUrl" action="enableProxyConnector" method="confirmEnable">
111           <ww:param name="source" value="%{'${connector.sourceRepoId}'}"/>
112           <ww:param name="target" value="%{'${connector.targetRepoId}'}"/>
113         </ww:url>
114         <ww:url id="disableProxyConnectorUrl" action="disableProxyConnector" method="confirmDisable">
115           <ww:param name="source" value="%{'${connector.sourceRepoId}'}"/>
116           <ww:param name="target" value="%{'${connector.targetRepoId}'}"/>
117         </ww:url>
118         <c:if test="${connector.disabled}">
119             <ww:a href="%{enableProxyConnectorUrl}" title="Enable Proxy Connector">
120                                 <img src="${iconDisable}"/>
121                         </ww:a>
122         </c:if>
123         <c:if test="${connector.disabled == false}">
124             <ww:a href="%{disableProxyConnectorUrl}" title="Disable Proxy Connector">
125                                 <img src="${iconEnable}"/>
126                         </ww:a>
127         </c:if>
128         <c:if test="${pc.count > 1}">
129           <ww:a href="%{sortUpProxyConnectorUrl}" title="Move Proxy Connector Up">
130             <img src="${iconUpUrl}"/>
131           </ww:a>
132         </c:if>
133         <c:if test="${pc.count < numberOfRepos}">
134           <ww:a href="%{sortDownProxyConnectorUrl}" cssClass="down" title="Move Proxy Connector Down">
135             <img src="${iconDownUrl}"/>
136           </ww:a>
137         </c:if>
138         <ww:a href="%{editProxyConnectorUrl}" cssClass="edit" title="Edit Proxy Connector">
139           <img src="${iconEditUrl}"/>
140         </ww:a>
141         <ww:a href="%{deleteProxyConnectorUrl}" cssClass="delete" title="Delete Proxy Connector">
142           <img src="${iconDeleteUrl}"/>
143         </ww:a>
144       </redback:ifAnyAuthorized>
145     </div>
146
147     <h4>Proxy Connector</h4>
148     
149     <div class="remoteRepo">
150       <img src="<c:url value="/images/archiva-world.png"/>"/>
151       <p class="id">${connector.targetRepoId}</p>
152       <p class="name">${repoMap[connector.targetRepoId].name}</p>
153       <p class="url"><a href="${repoMap[connector.targetRepoId].url}">${repoMap[connector.targetRepoId].url}</a></p>
154     </div>
155     
156     <a class="expand" href="#" onclick="Effect.toggle('proxySettings_${connector.sourceRepoId}_${connector.targetRepoId}','slide'); return false;">Expand</a>
157     <table class="settings" style="display: none;" id="proxySettings_${connector.sourceRepoId}_${connector.targetRepoId}">
158       <tr>
159         <th nowrap="nowrap">Network Proxy:</th>
160         <td>
161           <c:choose>
162             <c:when test="${empty (connector.proxyId)}">
163               <span class="directConnection">(Direct Connection)</span>
164             </c:when>
165             <c:otherwise>
166               <ww:url id="editProxyIdUrl" action="editNetworkProxy">
167                 <ww:param name="proxyid" value="%{'${connector.proxyId}'}"/>
168               </ww:url>
169               <ww:a href="%{editProxyIdUrl}" cssClass="edit" title="Edit Network Proxy">
170                 ${connector.proxyId}
171                 <img src="${iconEditUrl}"/>
172               </ww:a>
173             </c:otherwise>
174           </c:choose>
175         </td>
176       </tr>
177       <tr>
178         <th>Policies:</th>
179         <td nowrap="nowrap">
180           <table class="policies">
181             <c:forEach items="${connector.policies}" var="policies">
182               <tr>
183                 <th>${policies.key}</th>
184                 <td>${policies.value}</td>
185               </tr>
186             </c:forEach>
187           </table>
188         </td>
189       </tr>
190
191       <c:if test="${not (empty (connector.whiteListPatterns))}">
192         <tr>
193           <th nowrap="nowrap">White List:</th>
194           <td nowrap="nowrap">
195             <c:forEach items="${connector.whiteListPatterns}" var="pattern">
196               <p><code>"${pattern}"</code></p>
197             </c:forEach>
198           </td>
199         </tr>
200       </c:if>
201
202       <c:if test="${not (empty (connector.blackListPatterns))}">
203         <tr>
204           <th nowrap="nowrap">Black List:</th>
205           <td>
206             <c:forEach items="${connector.blackListPatterns}" var="pattern">
207               <p><code>"${pattern}"</code></p>
208             </c:forEach>
209           </td>
210         </tr>
211       </c:if>
212
213       <c:if test="${not (empty (connector.properties))}">
214         <tr>
215           <th>Properties:</th>
216           <td>
217             <table class="props">
218               <c:forEach items="${connector.properties}" var="prop">
219                 <tr>
220                   <th>${prop.key}</th>
221                   <td>${prop.value}</td>
222                 </tr>
223               </c:forEach>
224             </table>
225           </td>
226         </tr>
227       </c:if>
228     </table>
229   </div> <%-- connector --%>
230
231 </c:forEach>
232 </div> <%-- proxyConfig --%>
233 </c:forEach>
234 </div> <%-- admin --%>
235 </c:otherwise>
236 </c:choose>
237
238 </div>
239
240 </body>
241 </html>