]> source.dussan.org Git - archiva.git/blob
6359c4e12d59aeff76481d93a1f67ea32972fbae
[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 - Database</title>
29 <ww:head />
30 </head>
31
32 <body>
33
34 <h1>Administration - Database</h1>
35
36 <div id="contentArea">
37
38 <ww:actionerror /> 
39 <ww:actionmessage /> 
40
41 <c:url var="iconDeleteUrl" value="/images/icons/delete.gif" /> 
42 <c:url var="iconCreateUrl" value="/images/icons/create.png" /> 
43    
44 <div class="admin">
45
46 <h2>Database - Unprocessed Artifacts Scanning</h2>
47
48   <ww:form method="post" action="database!updateSchedule" 
49              namespace="/admin" validate="false" theme="simple">
50     <table>
51       <ww:textfield name="cron" label="Cron" size="40" theme="xhtml" />
52       <tr>
53         <td colspan="2">
54           <ww:submit value="Update Cron" />
55         </td>
56       </tr>
57     </table>                 
58   </ww:form>
59   
60   <ww:form action="updateDatabase" theme="simple">
61     <ww:submit value="Update Database Now"/>
62   </ww:form>
63
64 <h2>Database - Unprocessed Artifacts Scanning</h2>
65
66 <c:choose>
67   <c:when test="${empty (unprocessedConsumers)}">
68     <%-- No Consumers. Eeek! --%>
69     <strong>There are no consumers for unprocessed artifacts.</strong>
70   </c:when>
71   <c:otherwise>
72     <%-- Display the consumers. --%>
73
74     <ww:form method="post" action="database!updateUnprocessedConsumers" 
75              namespace="/admin" validate="false" theme="simple">
76     <table class="consumers">
77       <tr>
78         <th>&nbsp;</th>
79         <th>Enabled?</th>
80         <th>ID</th>
81         <th>Description</th>
82       </tr>
83       <c:forEach items="${unprocessedConsumers}" var="consumer" varStatus="i">
84         <c:choose>
85           <c:when test='${(i.index)%2 eq 0}'>
86             <c:set var="bgcolor" value="even" scope="page" />
87           </c:when>
88           <c:otherwise>
89             <c:set var="bgcolor" value="odd" scope="page" />
90           </c:otherwise>
91         </c:choose>
92
93         <tr>
94           <td class="${bgcolor}">
95             <input type="checkbox" name="enabledUnprocessedConsumers" theme="simple" value="${consumer.id}" <c:if test="${consumer.enabled}">checked</c:if> />
96           </td>
97           <td class="${bgcolor}">
98             <c:if test="${consumer.enabled}">
99               <strong>enabled</strong>
100             </c:if>
101           </td>
102           <td class="${bgcolor}">
103             <code>${consumer.id}</code>
104           </td>
105           <td class="${bgcolor}">${consumer.description}</td>
106         </tr>
107       </c:forEach>
108       <tr>
109         <td colspan="4">
110           <ww:submit value="Update Consumers" />
111         </td>
112       </tr>
113     </table>
114     </ww:form>
115
116   </c:otherwise>
117 </c:choose>
118
119 <h2>Database - Artifact Cleanup Scanning</h2>
120
121 <c:choose>
122   <c:when test="${empty (cleanupConsumers)}">
123     <%-- No Consumers. Eeek! --%>
124     <strong>There are no consumers for artifact cleanup.</strong>
125   </c:when>
126   <c:otherwise>
127     <%-- Display the consumers. --%>
128
129     <ww:form method="post" action="database!updateCleanupConsumers" 
130              namespace="/admin" validate="false" theme="simple">
131     <table class="consumers">
132       <tr>
133         <th>&nbsp;</th>
134         <th>Enabled?</th>
135         <th>ID</th>
136         <th>Description</th>
137       </tr>
138       <c:forEach items="${cleanupConsumers}" var="consumer" varStatus="i">
139         <c:choose>
140           <c:when test='${(i.index)%2 eq 0}'>
141             <c:set var="bgcolor" value="even" scope="page" />
142           </c:when>
143           <c:otherwise>
144             <c:set var="bgcolor" value="odd" scope="page" />
145           </c:otherwise>
146         </c:choose>
147
148         <tr>
149           <td class="${bgcolor}">
150             <input type="checkbox" name="enabledCleanupConsumers" theme="simple" value="${consumer.id}" <c:if test="${consumer.enabled}">checked</c:if> />
151           </td>
152           <td class="${bgcolor}">
153             <c:if test="${consumer.enabled}">
154               <strong>enabled</strong>
155             </c:if>
156           </td>
157           <td class="${bgcolor}">
158             <code>${consumer.id}</code>
159           </td>
160           <td class="${bgcolor}">${consumer.description}</td>
161         </tr>
162       </c:forEach>
163       <tr>
164         <td colspan="4">
165           <ww:submit value="Update Consumers" />
166         </td>
167       </tr>
168     </table>
169     </ww:form>
170
171   </c:otherwise>
172 </c:choose>
173
174
175 </div>
176 </div>
177 </body>
178 </html>