mirror of https://github.com/apache/archiva.git
Moved the Managed Repository administration out of the main Administration page and onto its own page.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@479065 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fb36d24b9b
commit
74d149d557
|
@ -190,21 +190,25 @@
|
||||||
<result name="input">/WEB-INF/jsp/admin/index.jsp</result>
|
<result name="input">/WEB-INF/jsp/admin/index.jsp</result>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
|
<action name="managedRepositories" class="configureAction" method="input">
|
||||||
|
<result name="input">/WEB-INF/jsp/admin/managedRepositories.jsp</result>
|
||||||
|
</action>
|
||||||
|
|
||||||
<action name="addRepository" class="configureRepositoryAction" method="add">
|
<action name="addRepository" class="configureRepositoryAction" method="add">
|
||||||
<result name="input">/WEB-INF/jsp/admin/addRepository.jsp</result>
|
<result name="input">/WEB-INF/jsp/admin/addRepository.jsp</result>
|
||||||
<result type="redirect-action">index</result>
|
<result type="redirect-action">managedRepositories</result>
|
||||||
<interceptor-ref name="unconfiguredStack"/>
|
<interceptor-ref name="unconfiguredStack"/>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
<action name="editRepository" class="configureRepositoryAction" method="edit">
|
<action name="editRepository" class="configureRepositoryAction" method="edit">
|
||||||
<result name="input">/WEB-INF/jsp/admin/editRepository.jsp</result>
|
<result name="input">/WEB-INF/jsp/admin/editRepository.jsp</result>
|
||||||
<result type="redirect-action">index</result>
|
<result type="redirect-action">managedRepositories</result>
|
||||||
<interceptor-ref name="configuredPrepareParamsStack"/>
|
<interceptor-ref name="configuredPrepareParamsStack"/>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
<action name="deleteRepository" class="deleteRepositoryAction">
|
<action name="deleteRepository" class="deleteRepositoryAction">
|
||||||
<result name="input">/WEB-INF/jsp/admin/deleteRepository.jsp</result>
|
<result name="input">/WEB-INF/jsp/admin/deleteRepository.jsp</result>
|
||||||
<result type="redirect-action">index</result>
|
<result type="redirect-action">managedRepositories</result>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
<action name="proxiedRepositories" class="configureAction" method="input">
|
<action name="proxiedRepositories" class="configureAction" method="input">
|
||||||
|
|
|
@ -79,110 +79,5 @@
|
||||||
</table>
|
</table>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
<c:set var="urlbase">${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/repository/</c:set>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<div style="float: right">
|
|
||||||
<%-- TODO replace with icons --%>
|
|
||||||
<pss:ifAuthorized permission="archiva-add-repository">
|
|
||||||
<ww:url id="addRepositoryUrl" action="addRepository" method="input"/>
|
|
||||||
<ww:a href="%{addRepositoryUrl}">Add Repository</ww:a>
|
|
||||||
</pss:ifAuthorized>
|
|
||||||
</div>
|
|
||||||
<h2>Managed Repositories</h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ww:set name="repositories" value="repositories"/>
|
|
||||||
<c:if test="${empty(repositories)}">
|
|
||||||
<strong>There are no managed repositories configured yet.</strong>
|
|
||||||
</c:if>
|
|
||||||
<c:forEach items="${repositories}" var="repository" varStatus="i">
|
|
||||||
<div>
|
|
||||||
<div style="float: right">
|
|
||||||
<ww:url id="editRepositoryUrl" action="editRepository" method="input">
|
|
||||||
<ww:param name="repoId" value="%{'${repository.id}'}" />
|
|
||||||
</ww:url>
|
|
||||||
<ww:url id="deleteRepositoryUrl" action="deleteRepository" method="input">
|
|
||||||
<ww:param name="repoId" value="%{'${repository.id}'}" />
|
|
||||||
</ww:url>
|
|
||||||
<%-- TODO replace with icons --%>
|
|
||||||
<pss:ifAuthorized permission="archiva-edit-repository" resource="${repository.id}"><ww:a href="%{editRepositoryUrl}">Edit Repository</ww:a></pss:ifAuthorized>
|
|
||||||
<pss:ifAuthorized permission="archiva-delete-repository" resource="${repository.id}"><ww:a href="%{deleteRepositoryUrl}">Delete Repository</ww:a></pss:ifAuthorized>
|
|
||||||
</div>
|
|
||||||
<h3>${repository.name}</h3>
|
|
||||||
<table class="infoTable">
|
|
||||||
<tr>
|
|
||||||
<th>Identifier</th>
|
|
||||||
<td>
|
|
||||||
<code>${repository.id}</code>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Directory</th>
|
|
||||||
<td>${repository.directory}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>WebDAV URL</th>
|
|
||||||
<td><a href="${urlbase}${repository.urlName}">${urlbase}${repository.urlName}</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Type</th>
|
|
||||||
<%-- TODO: can probably just use layout appended to a key prefix in i18n to simplify this --%>
|
|
||||||
<td>
|
|
||||||
<c:choose>
|
|
||||||
<c:when test="${repository.layout == 'default'}">
|
|
||||||
Maven 2.x Repository
|
|
||||||
</c:when>
|
|
||||||
<c:otherwise>
|
|
||||||
Maven 1.x Repository
|
|
||||||
</c:otherwise>
|
|
||||||
</c:choose>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Snapshots Included</th>
|
|
||||||
<td class="${repository.includeSnapshots ? 'doneMark' : 'errorMark'} booleanIcon"> ${repository.includeSnapshots}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Indexed</th>
|
|
||||||
<td class="${repository.indexed ? 'doneMark' : 'errorMark'} booleanIcon"> ${repository.indexed}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>POM Snippet</th>
|
|
||||||
<td><a href="#" onclick="Effect.toggle('repoPom${repository.id}','slide'); return false;">Show POM Snippet</a><br />
|
|
||||||
<pre class="pom" style="display: none;" id="repoPom${repository.id}"><code><project>
|
|
||||||
...
|
|
||||||
<distributionManagement>
|
|
||||||
<${repository.includeSnapshots ? 'snapshotRepository' : 'repository'}>
|
|
||||||
<id>${repository.id}</id>
|
|
||||||
<url>dav:${urlbase}${repository.urlName}</url><c:if test="${repository.layout != 'default'}">
|
|
||||||
<layout>${repository.layout}</layout></c:if>
|
|
||||||
</${repository.includeSnapshots ? 'snapshotRepository' : 'repository'}>
|
|
||||||
</distributionManagement>
|
|
||||||
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>${repository.id}</id>
|
|
||||||
<name>${repository.name}</name>
|
|
||||||
<url>${urlbase}${repository.urlName}</url><c:if test="${repository.layout != 'default'}">
|
|
||||||
<layout>${repository.layout}</layout></c:if>
|
|
||||||
<releases>
|
|
||||||
<enabled>${repository.includeSnapshots ? 'false' : 'true'}</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>${repository.includeSnapshots ? 'true' : 'false'}</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
...
|
|
||||||
</project>
|
|
||||||
</code></pre>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</c:forEach>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -0,0 +1,139 @@
|
||||||
|
<%--
|
||||||
|
~ Copyright 2005-2006 The Apache Software Foundation.
|
||||||
|
~
|
||||||
|
~ Licensed 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.
|
||||||
|
--%>
|
||||||
|
|
||||||
|
<%@ taglib prefix="ww" uri="/webwork" %>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Administration</title>
|
||||||
|
<ww:head/>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>Administration</h1>
|
||||||
|
|
||||||
|
<div id="contentArea">
|
||||||
|
|
||||||
|
<c:set var="urlbase">${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/repository/</c:set>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div style="float: right">
|
||||||
|
<%-- TODO replace with icons --%>
|
||||||
|
<pss:ifAuthorized permission="archiva-add-repository">
|
||||||
|
<ww:url id="addRepositoryUrl" action="addRepository" method="input"/>
|
||||||
|
<ww:a href="%{addRepositoryUrl}">Add Repository</ww:a>
|
||||||
|
</pss:ifAuthorized>
|
||||||
|
</div>
|
||||||
|
<h2>Managed Repositories</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ww:set name="repositories" value="repositories"/>
|
||||||
|
<c:if test="${empty(repositories)}">
|
||||||
|
<strong>There are no managed repositories configured yet.</strong>
|
||||||
|
</c:if>
|
||||||
|
<c:forEach items="${repositories}" var="repository" varStatus="i">
|
||||||
|
<div>
|
||||||
|
<div style="float: right">
|
||||||
|
<ww:url id="editRepositoryUrl" action="editRepository" method="input">
|
||||||
|
<ww:param name="repoId" value="%{'${repository.id}'}" />
|
||||||
|
</ww:url>
|
||||||
|
<ww:url id="deleteRepositoryUrl" action="deleteRepository" method="input">
|
||||||
|
<ww:param name="repoId" value="%{'${repository.id}'}" />
|
||||||
|
</ww:url>
|
||||||
|
<%-- TODO replace with icons --%>
|
||||||
|
<pss:ifAuthorized permission="archiva-edit-repository" resource="${repository.id}"><ww:a href="%{editRepositoryUrl}">Edit Repository</ww:a></pss:ifAuthorized>
|
||||||
|
<pss:ifAuthorized permission="archiva-delete-repository" resource="${repository.id}"><ww:a href="%{deleteRepositoryUrl}">Delete Repository</ww:a></pss:ifAuthorized>
|
||||||
|
</div>
|
||||||
|
<h3>${repository.name}</h3>
|
||||||
|
<table class="infoTable">
|
||||||
|
<tr>
|
||||||
|
<th>Identifier</th>
|
||||||
|
<td>
|
||||||
|
<code>${repository.id}</code>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Directory</th>
|
||||||
|
<td>${repository.directory}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>WebDAV URL</th>
|
||||||
|
<td><a href="${urlbase}${repository.urlName}">${urlbase}${repository.urlName}</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Type</th>
|
||||||
|
<%-- TODO: can probably just use layout appended to a key prefix in i18n to simplify this --%>
|
||||||
|
<td>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${repository.layout == 'default'}">
|
||||||
|
Maven 2.x Repository
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
Maven 1.x Repository
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Snapshots Included</th>
|
||||||
|
<td class="${repository.includeSnapshots ? 'doneMark' : 'errorMark'} booleanIcon"> ${repository.includeSnapshots}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Indexed</th>
|
||||||
|
<td class="${repository.indexed ? 'doneMark' : 'errorMark'} booleanIcon"> ${repository.indexed}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>POM Snippet</th>
|
||||||
|
<td><a href="#" onclick="Effect.toggle('repoPom${repository.id}','slide'); return false;">Show POM Snippet</a><br />
|
||||||
|
<pre class="pom" style="display: none;" id="repoPom${repository.id}"><code><project>
|
||||||
|
...
|
||||||
|
<distributionManagement>
|
||||||
|
<${repository.includeSnapshots ? 'snapshotRepository' : 'repository'}>
|
||||||
|
<id>${repository.id}</id>
|
||||||
|
<url>dav:${urlbase}${repository.urlName}</url><c:if test="${repository.layout != 'default'}">
|
||||||
|
<layout>${repository.layout}</layout></c:if>
|
||||||
|
</${repository.includeSnapshots ? 'snapshotRepository' : 'repository'}>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>${repository.id}</id>
|
||||||
|
<name>${repository.name}</name>
|
||||||
|
<url>${urlbase}${repository.urlName}</url><c:if test="${repository.layout != 'default'}">
|
||||||
|
<layout>${repository.layout}</layout></c:if>
|
||||||
|
<releases>
|
||||||
|
<enabled>${repository.includeSnapshots ? 'false' : 'true'}</enabled>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>${repository.includeSnapshots ? 'true' : 'false'}</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
...
|
||||||
|
</project>
|
||||||
|
</code></pre>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -119,6 +119,9 @@
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li class="none">
|
||||||
|
<my:currentWWUrl action="managedRepositories" namespace="/admin">Managed Repositories</my:currentWWUrl>
|
||||||
|
</li>
|
||||||
<li class="none">
|
<li class="none">
|
||||||
<my:currentWWUrl action="proxiedRepositories" namespace="/admin">Proxied Repositories</my:currentWWUrl>
|
<my:currentWWUrl action="proxiedRepositories" namespace="/admin">Proxied Repositories</my:currentWWUrl>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in New Issue