]> source.dussan.org Git - archiva.git/blob
ecd8719b0d6b39bea1d4bc78953e1dcc7c688e73
[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="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
23 <%@ taglib prefix="archiva" uri="http://archiva.apache.org" %>
24
25 <html>
26 <head>
27   <title>Administration - Repositories</title>
28   <ww:head/>
29 </head>
30
31 <body>
32
33 <h1>Administration - Repositories</h1>
34
35 <div id="contentArea">
36
37 <ww:actionerror/>
38 <ww:actionmessage/>
39
40 <div class="admin">
41 <div class="controls">
42   <redback:ifAuthorized permission="archiva-manage-configuration">
43     <ww:url id="addRepositoryUrl" action="addRepository"/>
44     <ww:a href="%{addRepositoryUrl}">
45       <img src="<c:url value="/images/icons/create.png" />" alt="" width="16" height="16"/>
46       Add
47     </ww:a>
48   </redback:ifAuthorized>
49 </div>
50 <h2>Managed Repositories</h2>
51
52 <c:choose>
53 <c:when test="${empty (managedRepositories)}">
54   <%-- No Managed Repositories. --%>
55   <strong>There are no managed repositories configured yet.</strong>
56 </c:when>
57 <c:otherwise>
58 <%-- Display the repositories. --%>
59
60 <c:forEach items="${managedRepositories}" var="repository" varStatus="i">
61 <c:choose>
62   <c:when test='${(i.index)%2 eq 0}'>
63     <c:set var="rowColor" value="dark" scope="page"/>
64   </c:when>
65   <c:otherwise>
66     <c:set var="rowColor" value="lite" scope="page"/>
67   </c:otherwise>
68 </c:choose>
69
70 <div class="repository ${rowColor}">
71
72 <div class="controls">
73     <%-- TODO: make some icons --%>
74   <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
75     <ww:url id="editRepositoryUrl" action="editRepository">
76       <ww:param name="repoid" value="%{'${repository.id}'}"/>
77     </ww:url>
78     <ww:url id="deleteRepositoryUrl" action="confirmDeleteRepository">
79       <ww:param name="repoid" value="%{'${repository.id}'}"/>
80     </ww:url>
81     <ww:a href="%{editRepositoryUrl}">
82       <img src="<c:url value="/images/icons/edit.png" />" alt="" width="16" height="16"/>
83       Edit
84     </ww:a>
85     <ww:a href="%{deleteRepositoryUrl}">
86       <img src="<c:url value="/images/icons/delete.gif" />" alt="" width="16" height="16"/>
87       Delete
88     </ww:a>
89   </redback:ifAnyAuthorized>
90   <c:url var="rssFeedIconUrl" value="/images/icons/rss-feed.png"/>
91   <a href="/archiva/rss/rss_feeds?repoId=${repository.id}">
92         <img src="${rssFeedIconUrl}" />
93   </a>
94 </div>
95
96 <div style="float: left">
97   <img src="<c:url value="/images/archiva-splat-32.gif"/>" alt="" width="32" height="32"/>
98 </div>
99
100 <h3 class="repository">${repository.name}</h3>
101
102 <table class="infoTable">
103 <tr>
104   <th>Identifier</th>
105   <td>
106     <code>${repository.id}</code>
107   </td>
108 </tr>
109 <tr>
110   <th>Name</th>
111   <td>
112     <code>${repository.name}</code>
113   </td>
114 </tr>
115 <tr>
116   <th>Directory</th>
117   <td>${repository.location}</td>
118 </tr>
119 <c:if test="${!empty (repository.indexDir)}">
120         <tr>
121           <th>Index Directory</th>
122           <td>${repository.indexDir}</td>
123         </tr>
124 </c:if>
125 <tr>
126   <th>WebDAV URL</th>
127   <td><a href="${baseUrl}/${repository.id}/">${baseUrl}/${repository.id}/</a></td>
128 </tr>
129 <tr>
130   <th>Type</th>
131     <%-- TODO: can probably just use layout appended to a key prefix in i18n to simplify this --%>
132   <td>
133     <c:choose>
134       <c:when test="${repository.layout == 'default'}">
135         Maven 2.x Repository
136       </c:when>
137       <c:otherwise>
138         Maven 1.x Repository
139       </c:otherwise>
140     </c:choose>
141   </td>
142 </tr>
143 <c:if test="${!empty (repositoryToGroupMap[repository.id])}">
144   <tr>
145     <th>Groups</th>
146     <td>
147       <c:forEach items="${repositoryToGroupMap[repository.id]}" varStatus="i" var="group">
148         ${group}<c:if test="${!i.last}">,</c:if>        
149       </c:forEach>
150     </td>
151   </tr>
152 </c:if>
153 <tr>
154   <th>Releases Included</th>
155   <td class="${repository.releases ? 'donemark' : 'errormark'} booleanIcon"> </td>
156 </tr>
157 <tr>
158   <th>Snapshots Included</th>
159   <td class="${repository.snapshots ? 'donemark' : 'errormark'} booleanIcon"> </td>
160 </tr>
161 <c:if test="${repository.snapshots}">
162   <tr>
163     <th>Delete Released Snapshots</th>
164     <td class="${repository.deleteReleasedSnapshots ? 'donemark' : 'errormark'} booleanIcon"> </td>
165   </tr>
166   <tr>
167     <th>Repository Purge By Days Older Than</th>
168     <td>${repository.daysOlder}</td>
169   </tr>
170   <tr>
171     <th>Repository Purge By Retention Count</th>
172     <td>${repository.retentionCount}</td>
173   </tr>
174 </c:if>
175 <tr>
176   <th>Scanned</th>
177   <td class="${repository.scanned ? 'donemark' : 'errormark'} booleanIcon"> </td>
178 </tr>
179 <c:if test="${repository.scanned}">
180   <tr>
181     <th>Scanning Cron</th>
182     <td>${repository.refreshCronExpression}</td>
183   </tr>
184   <tr>
185     <th>
186       Actions
187     </th>
188     <td>
189       <table>
190         <tr>
191           <td>
192             <redback:ifAuthorized permission="archiva-run-indexer">
193               <ww:form action="indexRepository" theme="simple">
194                 <ww:hidden name="repoid" value="%{'${repository.id}'}"/>
195                 <ww:submit value="Scan Repository Now"/>
196               </ww:form>
197             </redback:ifAuthorized>
198           </td>
199         </tr>
200       </table>
201     </td>
202   </tr>
203   <tr>
204     <th>Stats</th>
205     <td>
206       <c:set var="stats" value="${repositoryStatistics[repository.id]}"/>
207       <c:choose>
208         <c:when test="${empty (stats)}">
209           No Statistics Available.
210         </c:when>
211         <c:otherwise>
212           <table>
213             <tr>
214               <th>Last Scanned</th>
215               <td>${stats.whenGathered}</td>
216             </tr>
217             <tr>
218               <th>Duration</th>
219               <td>${stats.duration} ms</td>
220             </tr>
221             <tr>
222               <th>Total File Count</th>
223               <td>${stats.totalFileCount}
224             </tr>
225             <tr>
226               <th>New Files Found</th>
227               <td>${stats.newFileCount}
228             </tr>
229           </table>
230         </c:otherwise>
231       </c:choose>
232     </td>
233   </tr>
234 </c:if>
235 <tr>
236   <th>POM Snippet</th>
237   <td>
238     <archiva:copy-paste-snippet object="${repository}" wrapper="toggle" />
239   </td>
240 </tr>
241 </table>
242
243 </div>
244 </c:forEach>
245
246 </c:otherwise>
247 </c:choose>
248
249 <div class="controls">
250   <redback:ifAuthorized permission="archiva-manage-configuration">
251     <ww:url id="addRepositoryUrl" action="addRemoteRepository"/>
252     <ww:a href="%{addRepositoryUrl}">
253       <img src="<c:url value="/images/icons/create.png" />" alt="" width="16" height="16"/>
254       Add
255     </ww:a>
256   </redback:ifAuthorized>
257 </div>
258 <h2>Remote Repositories</h2>
259
260 <c:choose>
261   <c:when test="${empty (remoteRepositories)}">
262     <%-- No Remote Repositories. --%>
263     <strong>There are no remote repositories configured yet.</strong>
264   </c:when>
265   <c:otherwise>
266     <%-- Display the repositories. --%>
267     <c:forEach items="${remoteRepositories}" var="repository" varStatus="i">
268       <c:choose>
269         <c:when test='${(i.index)%2 eq 0}'>
270           <c:set var="rowColor" value="dark" scope="page"/>
271         </c:when>
272         <c:otherwise>
273           <c:set var="rowColor" value="lite" scope="page"/>
274         </c:otherwise>
275       </c:choose>
276
277       <div class="repository ${rowColor}">
278
279         <div class="controls">
280           <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
281             <ww:url id="editRepositoryUrl" action="editRemoteRepository">
282               <ww:param name="repoid" value="%{'${repository.id}'}"/>
283             </ww:url>
284             <ww:a href="%{editRepositoryUrl}">
285               <img src="<c:url value="/images/icons/edit.png" />" alt="" width="16" height="16"/>
286               Edit
287             </ww:a>
288             <ww:url id="deleteRepositoryUrl" action="confirmDeleteRemoteRepository">
289               <ww:param name="repoid" value="%{'${repository.id}'}"/>
290             </ww:url>
291             <ww:a href="%{deleteRepositoryUrl}">
292               <img src="<c:url value="/images/icons/delete.gif" />" alt="" width="16" height="16"/>
293               Delete
294             </ww:a>
295           </redback:ifAnyAuthorized>
296         </div>
297
298         <div style="float: left">
299           <img src="<c:url value="/images/archiva-world.png"/>" alt="" width="32" height="32"/>
300         </div>
301
302         <h3 class="repository">${repository.name}</h3>
303
304         <table class="infoTable">
305           <tr>
306             <th>Identifier</th>
307             <td>
308               <code>${repository.id}</code>
309             </td>
310           </tr>
311           <tr>
312             <th>Name</th>
313             <td>
314               <code>${repository.name}</code>
315             </td>
316           </tr>
317           <tr>
318             <th>URL</th>
319             <td>${repository.url}</td>
320           </tr>
321           <tr>
322             <th>Type</th>
323               <%-- TODO: can probably just use layout appended to a key prefix in i18n to simplify this --%>
324             <td>
325               <c:choose>
326                 <c:when test="${repository.layout == 'default'}">
327                   Maven 2.x Repository
328                 </c:when>
329                 <c:otherwise>
330                   Maven 1.x Repository
331                 </c:otherwise>
332               </c:choose>
333             </td>
334           </tr>
335         </table>
336
337       </div>
338     </c:forEach>
339   </c:otherwise>
340 </c:choose>
341
342 </div>
343
344 </div>
345
346 </body>
347 </html>