]> source.dussan.org Git - archiva.git/blob
43a0b5da2acc32a059ab803585b97e70ee35dd4c
[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   <c:choose>
51         <c:when test="${remoteRepoExists}">
52           <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
53             <ww:url id="addProxyConnectorUrl" action="addProxyConnector"/>
54             <ww:a href="%{addProxyConnectorUrl}" cssClass="create">
55               <img src="<c:url value="/images/icons/create.png" />"/>
56               Add
57             </ww:a>
58           </redback:ifAnyAuthorized>
59         </c:when>
60         <c:otherwise>
61                 <img src="<c:url value="/images/icons/create.png" />"/>
62               Add (Disabled. No remote repositories)
63         </c:otherwise>
64   </c:choose>    
65 </div>
66
67 <h2>Repository Proxy Connectors</h2>
68
69 <c:choose>
70 <c:when test="${empty (proxyConnectorMap)}">
71   <strong>No Repository Proxy Connectors Defined.</strong>
72 </c:when>
73 <c:otherwise>
74
75 <div class="admin">
76
77 <c:forEach items="${proxyConnectorMap}" var="repository" varStatus="i">
78
79 <div class="proxyConfig">
80   <div class="managedRepo">
81     <img src="<c:url value="/images/archiva-splat-32.gif"/>"/>
82     <p class="id">${repository.key}</p>
83     <p class="name">${repoMap[repository.key].name}</p>
84   </div>
85
86   <c:set var="numberOfRepos" value="${fn:length(repository.value)}" />
87
88   <c:forEach items="${repository.value}" var="connector" varStatus="pc">
89   
90   <c:choose>
91     <c:when test='${(pc.index)%2 eq 0}'>
92       <c:set var="rowColor" value="dark" scope="page"/>
93     </c:when>
94     <c:otherwise>
95       <c:set var="rowColor" value="lite" scope="page"/>
96     </c:otherwise>
97   </c:choose>
98   
99   <div class="connector ${rowColor}"> 
100     <div class="controls">
101       <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
102         <ww:url id="sortDownProxyConnectorUrl" action="sortDownProxyConnector">
103           <ww:param name="target" value="%{'${connector.targetRepoId}'}"/>
104           <ww:param name="source" value="%{'${connector.sourceRepoId}'}"/>
105         </ww:url>
106         <ww:url id="sortUpProxyConnectorUrl" action="sortUpProxyConnector">
107           <ww:param name="target" value="%{'${connector.targetRepoId}'}"/>
108           <ww:param name="source" value="%{'${connector.sourceRepoId}'}"/>
109         </ww:url>
110         <ww:url id="editProxyConnectorUrl" action="editProxyConnector">
111           <ww:param name="target" value="%{'${connector.targetRepoId}'}"/>
112           <ww:param name="source" value="%{'${connector.sourceRepoId}'}"/>
113         </ww:url>
114         <ww:url id="deleteProxyConnectorUrl" action="deleteProxyConnector" method="confirmDelete">
115           <ww:param name="source" value="%{'${connector.sourceRepoId}'}"/>
116           <ww:param name="target" value="%{'${connector.targetRepoId}'}"/>
117         </ww:url>
118         <ww:url id="enableProxyConnectorUrl" action="enableProxyConnector" method="confirmEnable">
119           <ww:param name="source" value="%{'${connector.sourceRepoId}'}"/>
120           <ww:param name="target" value="%{'${connector.targetRepoId}'}"/>
121         </ww:url>
122         <ww:url id="disableProxyConnectorUrl" action="disableProxyConnector" method="confirmDisable">
123           <ww:param name="source" value="%{'${connector.sourceRepoId}'}"/>
124           <ww:param name="target" value="%{'${connector.targetRepoId}'}"/>
125         </ww:url>
126         <c:if test="${connector.disabled}">
127             <ww:a href="%{enableProxyConnectorUrl}" title="Enable Proxy Connector">
128                                 <img src="${iconDisable}"/>
129                         </ww:a>
130         </c:if>
131         <c:if test="${connector.disabled == false}">
132             <ww:a href="%{disableProxyConnectorUrl}" title="Disable Proxy Connector">
133                                 <img src="${iconEnable}"/>
134                         </ww:a>
135         </c:if>
136         <c:if test="${pc.count > 1}">
137           <ww:a href="%{sortUpProxyConnectorUrl}" title="Move Proxy Connector Up">
138             <img src="${iconUpUrl}"/>
139           </ww:a>
140         </c:if>
141         <c:if test="${pc.count < numberOfRepos}">
142           <ww:a href="%{sortDownProxyConnectorUrl}" cssClass="down" title="Move Proxy Connector Down">
143             <img src="${iconDownUrl}"/>
144           </ww:a>
145         </c:if>
146         <ww:a href="%{editProxyConnectorUrl}" cssClass="edit" title="Edit Proxy Connector">
147           <img src="${iconEditUrl}"/>
148         </ww:a>
149         <ww:a href="%{deleteProxyConnectorUrl}" cssClass="delete" title="Delete Proxy Connector">
150           <img src="${iconDeleteUrl}"/>
151         </ww:a>
152       </redback:ifAnyAuthorized>
153     </div>
154
155     <h4>Proxy Connector</h4>
156     
157     <div class="remoteRepo">
158       <img src="<c:url value="/images/archiva-world.png"/>"/>
159       <p class="id">${connector.targetRepoId}</p>
160       <p class="name">${repoMap[connector.targetRepoId].name}</p>
161       <p class="url"><a href="${repoMap[connector.targetRepoId].url}">${repoMap[connector.targetRepoId].url}</a></p>
162     </div>
163     
164     <a class="expand" href="#" onclick="Effect.toggle('proxySettings_${connector.sourceRepoId}_${connector.targetRepoId}','slide'); return false;">Expand</a>
165     <table class="settings" style="display: none;" id="proxySettings_${connector.sourceRepoId}_${connector.targetRepoId}">
166       <tr>
167         <th nowrap="nowrap">Network Proxy:</th>
168         <td>
169           <c:choose>
170             <c:when test="${empty (connector.proxyId)}">
171               <span class="directConnection">(Direct Connection)</span>
172             </c:when>
173             <c:otherwise>
174               <ww:url id="editProxyIdUrl" action="editNetworkProxy">
175                 <ww:param name="proxyid" value="%{'${connector.proxyId}'}"/>
176               </ww:url>
177               <ww:a href="%{editProxyIdUrl}" cssClass="edit" title="Edit Network Proxy">
178                 ${connector.proxyId}
179                 <img src="${iconEditUrl}"/>
180               </ww:a>
181             </c:otherwise>
182           </c:choose>
183         </td>
184       </tr>
185       <tr>
186         <th>Policies:</th>
187         <td nowrap="nowrap">
188           <table class="policies">
189             <c:forEach items="${connector.policies}" var="policies">
190               <tr>
191                 <th>${policies.key}</th>
192                 <td>${policies.value}</td>
193               </tr>
194             </c:forEach>
195           </table>
196         </td>
197       </tr>
198
199       <c:if test="${not (empty (connector.whiteListPatterns))}">
200         <tr>
201           <th nowrap="nowrap">White List:</th>
202           <td nowrap="nowrap">
203             <c:forEach items="${connector.whiteListPatterns}" var="pattern">
204               <p><code>"${pattern}"</code></p>
205             </c:forEach>
206           </td>
207         </tr>
208       </c:if>
209
210       <c:if test="${not (empty (connector.blackListPatterns))}">
211         <tr>
212           <th nowrap="nowrap">Black List:</th>
213           <td>
214             <c:forEach items="${connector.blackListPatterns}" var="pattern">
215               <p><code>"${pattern}"</code></p>
216             </c:forEach>
217           </td>
218         </tr>
219       </c:if>
220
221       <c:if test="${not (empty (connector.properties))}">
222         <tr>
223           <th>Properties:</th>
224           <td>
225             <table class="props">
226               <c:forEach items="${connector.properties}" var="prop">
227                 <tr>
228                   <th>${prop.key}</th>
229                   <td>${prop.value}</td>
230                 </tr>
231               </c:forEach>
232             </table>
233           </td>
234         </tr>
235       </c:if>
236     </table>
237   </div> <%-- connector --%>
238
239 </c:forEach>
240 </div> <%-- proxyConfig --%>
241 </c:forEach>
242 </div> <%-- admin --%>
243 </c:otherwise>
244 </c:choose>
245
246 </div>
247
248 </body>
249 </html>