diff options
author | Joakim Erdfelt <joakime@apache.org> | 2007-05-11 18:04:39 +0000 |
---|---|---|
committer | Joakim Erdfelt <joakime@apache.org> | 2007-05-11 18:04:39 +0000 |
commit | e245b5c063566d82c88ab4a5764ea3c897fbb1f3 (patch) | |
tree | 7238fc1d53cd97d2afa72b9f8a5f2095b95f7b8c | |
parent | 688bd8114eaf70e8efebb67b317892aa254548e4 (diff) | |
download | archiva-e245b5c063566d82c88ab4a5764ea3c897fbb1f3.tar.gz archiva-e245b5c063566d82c88ab4a5764ea3c897fbb1f3.zip |
[MRM-332]: Adding a Proxy Connector displays a blank page
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@537251 13f79535-47bb-0310-9956-ffa450edef68
8 files changed, 277 insertions, 240 deletions
diff --git a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java index 9375b0859..7432b9bb9 100644 --- a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java +++ b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java @@ -20,7 +20,6 @@ package org.apache.maven.archiva.web.action.admin.connectors.proxy; */ import com.opensymphony.xwork.Preparable; -import com.opensymphony.xwork.Validateable; import org.apache.commons.collections.Closure; import org.apache.commons.collections.CollectionUtils; @@ -29,7 +28,6 @@ import org.apache.commons.collections.functors.NotPredicate; import org.apache.commons.lang.StringUtils; import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; -import org.apache.maven.archiva.configuration.InvalidConfigurationException; import org.apache.maven.archiva.configuration.NetworkProxyConfiguration; import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration; import org.apache.maven.archiva.configuration.functors.ProxyConnectorSelectionPredicate; @@ -46,7 +44,6 @@ import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException; import org.codehaus.plexus.registry.RegistryException; import org.codehaus.plexus.xwork.action.PlexusActionSupport; -import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -64,7 +61,7 @@ import java.util.Map.Entry; */ public class ConfigureProxyConnectorAction extends PlexusActionSupport - implements SecureAction, Preparable, Validateable, Initializable + implements SecureAction, Preparable, Initializable { private static final String DIRECT_CONNECTION = "(direct connection)"; @@ -408,35 +405,32 @@ public class ConfigureProxyConnectorAction String sourceId = getConnector().getSourceRepoId(); String targetId = getConnector().getTargetRepoId(); + if ( !validateConnector( getConnector() ) ) + { + return INPUT; + } + if ( StringUtils.equalsIgnoreCase( "edit", mode ) ) { removeConnector( sourceId, targetId ); } - - try + else { - if ( StringUtils.equals( DIRECT_CONNECTION, getConnector().getProxyId() ) ) + if ( findProxyConnector( sourceId, targetId ) != null ) { - getConnector().setProxyId( null ); + addActionError( "Unable to add new proxy connector with source [" + sourceId + "] and target [" + + targetId + "] as previously declared proxy connector, go edit that one instead." ); + return INPUT; } - - addProxyConnector( getConnector() ); - saveConfiguration(); - } - catch ( IOException e ) - { - addActionError( "I/O Exception: " + e.getMessage() ); } - catch ( InvalidConfigurationException e ) - { - addActionError( "Invalid Configuration Exception: " + e.getMessage() ); - } - catch ( RegistryException e ) + + if ( StringUtils.equals( DIRECT_CONNECTION, getConnector().getProxyId() ) ) { - addActionError( "Configuration Registry Exception: " + e.getMessage() ); + getConnector().setProxyId( null ); } - return SUCCESS; + addProxyConnector( getConnector() ); + return saveConfiguration(); } public void setBlackListPattern( String blackListPattern ) @@ -490,7 +484,6 @@ public class ConfigureProxyConnectorAction } private void addProxyConnector( ProxyConnectorConfiguration proxyConnector ) - throws IOException { archivaConfiguration.getConfiguration().addProxyConnector( proxyConnector ); } @@ -502,11 +495,9 @@ public class ConfigureProxyConnectorAction ProxyConnectorSelectionPredicate selectedProxy = new ProxyConnectorSelectionPredicate( sourceId, targetId ); return (ProxyConnectorConfiguration) CollectionUtils.find( config.getProxyConnectors(), selectedProxy ); } - - public void validate() + + public boolean validateConnector( ProxyConnectorConfiguration proxyConnector ) { - ProxyConnectorConfiguration proxyConnector = getConnector(); - if ( proxyConnector.getPolicies() == null ) { addActionError( "Policies must be set." ); @@ -544,6 +535,8 @@ public class ConfigureProxyConnectorAction continue; } } + + return !hasActionErrors(); } private void removeConnector( String sourceId, String targetId ) @@ -554,11 +547,16 @@ public class ConfigureProxyConnectorAction } private String saveConfiguration() - throws IOException, InvalidConfigurationException, RegistryException { - archivaConfiguration.save( archivaConfiguration.getConfiguration() ); - - addActionMessage( "Successfully saved configuration" ); + try + { + archivaConfiguration.save( archivaConfiguration.getConfiguration() ); + addActionMessage( "Successfully saved configuration" ); + } + catch ( RegistryException e ) + { + addActionError( "Unable to save configuration: " + e.getMessage() ); + } return SUCCESS; } diff --git a/archiva-web/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnector-saveProxyConnector-validation.xml b/archiva-web/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnector-saveProxyConnector-validation.xml new file mode 100644 index 000000000..5c6e25ce3 --- /dev/null +++ b/archiva-web/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnector-saveProxyConnector-validation.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you 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. + --> + +<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" + "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> + +<validators> + <field name="connector.sourceRepoId"> + <field-validator type="requiredstring"> + <param name="trim">true</param> + <message>You must select a source repository Id.</message> + </field-validator> + </field> + <field name="connector.targetRepoId"> + <field-validator type="requiredstring"> + <param name="trim">true</param> + <message>You must select a target repository Id.</message> + </field-validator> + </field> +</validators>
\ No newline at end of file diff --git a/archiva-web/archiva-webapp/src/main/resources/xwork.xml b/archiva-web/archiva-webapp/src/main/resources/xwork.xml index c791e7206..94d9d7b62 100644 --- a/archiva-web/archiva-webapp/src/main/resources/xwork.xml +++ b/archiva-web/archiva-webapp/src/main/resources/xwork.xml @@ -271,7 +271,7 @@ </action> <action name="addProxyConnector" class="configureProxyConnectorAction" method="add"> - <result name="input">/WEB-INF/jsp/admin/addProxyConnector.jsp</result> + <result name="input">/WEB-INF/jsp/admin/editProxyConnector.jsp</result> <result name="success" type="redirect-action">proxyConnectors</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editNetworkProxy.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editNetworkProxy.jsp index 97cf89cd7..d371fb121 100644 --- a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editNetworkProxy.jsp +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editNetworkProxy.jsp @@ -49,7 +49,7 @@ <ww:actionmessage/> <ww:form method="post" action="saveNetworkProxy" namespace="/admin"> - <ww:hidden name="mode"/> + <ww:hidden name="mode"/> <ww:textfield name="proxy.id" label="Identifier" size="10" required="true" disabled="${disableId}"/> diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editProxyConnector.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editProxyConnector.jsp index 879347e36..5c9f87fb8 100644 --- a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editProxyConnector.jsp +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editProxyConnector.jsp @@ -18,27 +18,215 @@ --%> <%@ taglib prefix="ww" uri="/webwork" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + +<c:choose> + <c:when test="${mode == 'edit'}"> + <c:set var="addedit" value="Edit" /> + </c:when> + <c:otherwise> + <c:set var="addedit" value="Add" /> + </c:otherwise> +</c:choose> <html> <head> - <title>Admin : Edit Proxy Connector</title> + <title>Admin : ${addedit} Proxy Connector</title> <ww:head/> + <script type="text/javascript"> + <!-- + function setAndSubmit(id, value, action) + { + var f = document.forms.saveProxyConnector; + + f.action = action; + f[id].value = value; + f.submit(); + } + //--> + </script> </head> <body> -<h1>Admin : Edit Proxy Connector</h1> +<h1>Admin : ${addedit} Proxy Connector</h1> <div id="contentArea"> - <h2>Edit Proxy Connector</h2> - <ww:actionerror/> <ww:actionmessage/> - <ww:form method="post" action="saveProxyConnector" namespace="/admin" validate="false"> + <ww:form method="post" action="saveProxyConnector" namespace="/admin"> <ww:hidden name="mode"/> - <%@ include file="/WEB-INF/jsp/admin/include/proxyConnectorForm.jspf" %> + + <input type="hidden" name="pattern"/> + <ww:select name="connector.proxyId" list="proxyIdOptions" label="Network Proxy" required="true"/> + <ww:select name="connector.sourceRepoId" list="localRepoIdList" + label="Local Repository" required="true"/> + <ww:select name="connector.targetRepoId" list="remoteRepoIdList" + label="Remote Repository" required="true" /> + + <tr> + <td valign="top"><label>Policies:</label> + </td> + <td> + <table> + <c:forEach items="${policyMap}" var="policy" varStatus="i"> + <tr> + <td> + <ww:label for="policy_${policy.key}" required="true" + theme="simple">${policy.key}:</ww:label> + </td> + <td> + <ww:select name="connector.policies['${policy.key}']" + list="policyMap['${policy.key}'].options" + value="connector.policies['${policy.key}']" + id="policy_${policy.key}" + theme="simple" + cssStyle="width: 10em" /> + </td> + </tr> + </c:forEach> + </table> + </td></tr> + + <tr class="seperator"> + <td valign="top"> + <label for="propertiesEntry">Properties:</label> + </td> + <td> + <ww:textfield name="propertyKey" size="15" id="propertiesEntry" theme="simple" /> : + <ww:textfield name="propertyValue" size="15" id="propertiesValue" theme="simple" /> + <ww:submit name="action:editProxyConnector!addProperty" value="Add Property" theme="simple" /> + </td> + </tr> + + <tr> + <td> + </td> + <td> + <c:choose> + <c:when test="${empty(connector.properties)}"> + <i>No properties have been set.</i> + </c:when> + <c:otherwise> + <ww:url id="removePropertyUrl" + action="editProxyConnector" + method="removeProperty" /> + <table> + <c:forEach items="${connector.properties}" var="property" varStatus="i"> + <tr> + <td> + <ww:label for="property_${property.key}" + theme="simple">${property.key}</ww:label> + </td> + <td> + <ww:textfield name="connector.properties['${property.key}']" + size="15" + id="property_${property.key}" + theme="simple" /> + </td> + <td> + <ww:a href="#" title="Remove [${property.key}] Property" + onclick="setAndSubmit('propertyKey', '${property.key}', '%{removePropertyUrl}')" + theme="simple"> + <img src="${iconDeleteUrl}" /></ww:a> + + </td> + </tr> + </c:forEach> + </table> + </c:otherwise> + </c:choose> + </td> + </tr> + + <tr class="seperator"> + <td valign="top"> + <label for="blackListEntry">Black List:</label> + </td> + <td> + <ww:textfield name="blackListPattern" size="30" id="blackListEntry" theme="simple" /> + <ww:submit name="action:editProxyConnector!addBlackListPattern" value="Add Pattern" theme="simple" /> + </td> + </tr> + + <tr> + <td> + </td> + <td> + <ww:url id="removeBlackListPatternUrl" + action="editProxyConnector" + method="removeBlackListPattern" /> + <c:choose> + <c:when test="${empty(connector.blackListPatterns)}"> + <i>No black list patterns have been set.</i> + </c:when> + <c:otherwise> + <table> + <c:forEach items="${connector.blackListPatterns}" var="pattern" varStatus="i"> + <tr> + <td> + <ww:hidden name="connector.blackListPatterns" value="${pattern}"/> + <code>"${pattern}"</code> + </td> + <td> + <ww:a href="#" title="Remove [${pattern}] Pattern" + onclick="setAndSubmit('pattern', '${pattern}', '%{removeBlackListPatternUrl}')" + theme="simple"> + <img src="${iconDeleteUrl}" /></ww:a> + </td> + </tr> + </c:forEach> + </table> + </c:otherwise> + </c:choose> + </td> + </tr> + + <tr class="seperator"> + <td valign="top"> + <label for="whiteListEntry">White List:</label> + </td> + <td> + <ww:textfield name="whiteListPattern" size="30" id="whiteListEntry" theme="simple" /> + <ww:submit name="action:editProxyConnector!addWhiteListPattern" value="Add Pattern" theme="simple" /> + </td> + </tr> + <tr> + <td> + </td> + <td> + <ww:url id="removeWhiteListPatternUrl" + action="editProxyConnector" + method="removeWhiteListPattern" /> + <c:choose> + <c:when test="${empty(connector.whiteListPatterns)}"> + <i>No white list patterns have been set.</i> + </c:when> + <c:otherwise> + <table> + <c:forEach items="${connector.whiteListPatterns}" var="pattern" varStatus="i"> + <tr> + <td> + <ww:hidden name="connector.whiteListPatterns" value="${pattern}"/> + <code>"${pattern}"</code> + </td> + <td> + <ww:a href="#" title="Remove [${pattern}] Pattern" + onclick="setAndSubmit('pattern', '${pattern}', '%{removeWhiteListPatternUrl}')" + theme="simple"> + <img src="${iconDeleteUrl}" /></ww:a> + </td> + </tr> + </c:forEach> + </table> + </c:otherwise> + </c:choose> + </td> + </tr> + + <ww:submit value="Save Proxy Connector"/> </ww:form> diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/proxyConnectorForm.jspf b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/proxyConnectorForm.jspf deleted file mode 100644 index a6a1b2a02..000000000 --- a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/proxyConnectorForm.jspf +++ /dev/null @@ -1,196 +0,0 @@ -<%-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you 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" %> - -<c:url var="iconDeleteUrl" value="/images/icons/delete.gif" /> - -<input type="hidden" name="pattern"/> -<ww:select name="connector.proxyId" list="proxyIdOptions" label="Network Proxy" required="true"/> -<ww:select name="connector.sourceRepoId" list="localRepoIdList" label="Local Repository" required="true"/> -<ww:select name="connector.targetRepoId" list="remoteRepoIdList" label="Remote Repository" required="true" /> - -<script type="text/javascript"> -<!-- - function setAndSubmit(id, value, action) - { - var f = document.forms.saveProxyConnector; - - f.action = action; - f[id].value = value; - f.submit(); - } -//--> -</script> - -<tr><td valign="top"><label>Policies:</label></td> -<td> - <table> - <c:forEach items="${policyMap}" var="policy" varStatus="i"> - <tr> - <td> - <ww:label for="policy_${policy.key}" required="true" - theme="simple">${policy.key}:</ww:label> - </td> - <td> - <ww:select name="connector.policies['${policy.key}']" - list="policyMap['${policy.key}'].options" - value="connector.policies['${policy.key}']" - id="policy_${policy.key}" - theme="simple" - cssStyle="width: 10em" /> - </td> - </tr> - </c:forEach> - </table> -</td></tr> - -<tr class="seperator"> - <td valign="top"> - <label for="propertiesEntry">Properties:</label> - </td> - <td> - <ww:textfield name="propertyKey" size="15" id="propertiesEntry" theme="simple" /> : - <ww:textfield name="propertyValue" size="15" id="propertiesValue" theme="simple" /> - <ww:submit name="action:editProxyConnector!addProperty" value="Add Property" theme="simple" /> - </td> -</tr> -<tr> - <td> - </td> - <td> - <c:choose> - <c:when test="${empty(connector.properties)}"> - <i>No properties have been set.</i> - </c:when> - <c:otherwise> - <ww:url id="removePropertyUrl" - action="editProxyConnector" - method="removeProperty" /> - <table> - <c:forEach items="${connector.properties}" var="property" varStatus="i"> - <tr> - <td> - <ww:label for="property_${property.key}" - theme="simple">${property.key}</ww:label> - </td> - <td> - <ww:textfield name="connector.properties['${property.key}']" - size="15" - id="property_${property.key}" - theme="simple" /> - </td> - <td> - <ww:a href="#" title="Remove [${property.key}] Property" - onclick="setAndSubmit('propertyKey', '${property.key}', '%{removePropertyUrl}')" - theme="simple"> - <img src="${iconDeleteUrl}" /></ww:a> - - </td> - </tr> - </c:forEach> - </table> - </c:otherwise> - </c:choose> - </td> -</tr> - -<tr class="seperator"> - <td valign="top"> - <label for="blackListEntry">Black List:</label> - </td> - <td> - <ww:textfield name="blackListPattern" size="30" id="blackListEntry" theme="simple" /> - <ww:submit name="action:editProxyConnector!addBlackListPattern" value="Add Pattern" theme="simple" /> - </td> -</tr> -<tr> - <td> - </td> - <td> - <ww:url id="removeBlackListPatternUrl" - action="editProxyConnector" - method="removeBlackListPattern" /> - <c:choose> - <c:when test="${empty(connector.blackListPatterns)}"> - <i>No black list patterns have been set.</i> - </c:when> - <c:otherwise> - <table> - <c:forEach items="${connector.blackListPatterns}" var="pattern" varStatus="i"> - <tr> - <td> - <ww:hidden name="connector.blackListPatterns" value="${pattern}"/> - <code>"${pattern}"</code> - </td> - <td> - <ww:a href="#" title="Remove [${pattern}] Pattern" - onclick="setAndSubmit('pattern', '${pattern}', '%{removeBlackListPatternUrl}')" - theme="simple"> - <img src="${iconDeleteUrl}" /></ww:a> - </td> - </tr> - </c:forEach> - </table> - </c:otherwise> - </c:choose> - </td> -</tr> - -<tr class="seperator"> - <td valign="top"> - <label for="whiteListEntry">White List:</label> - </td> - <td> - <ww:textfield name="whiteListPattern" size="30" id="whiteListEntry" theme="simple" /> - <ww:submit name="action:editProxyConnector!addWhiteListPattern" value="Add Pattern" theme="simple" /> - </td> -</tr> -<tr> - <td> - </td> - <td> - <ww:url id="removeWhiteListPatternUrl" - action="editProxyConnector" - method="removeWhiteListPattern" /> - <c:choose> - <c:when test="${empty(connector.whiteListPatterns)}"> - <i>No white list patterns have been set.</i> - </c:when> - <c:otherwise> - <table> - <c:forEach items="${connector.whiteListPatterns}" var="pattern" varStatus="i"> - <tr> - <td> - <ww:hidden name="connector.whiteListPatterns" value="${pattern}"/> - <code>"${pattern}"</code> - </td> - <td> - <ww:a href="#" title="Remove [${pattern}] Pattern" - onclick="setAndSubmit('pattern', '${pattern}', '%{removeWhiteListPatternUrl}')" - theme="simple"> - <img src="${iconDeleteUrl}" /></ww:a> - </td> - </tr> - </c:forEach> - </table> - </c:otherwise> - </c:choose> - </td> -</tr> diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/repositoryForm.jspf b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/repositoryForm.jspf index 683bb9dac..4f5c77fb2 100644 --- a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/repositoryForm.jspf +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/repositoryForm.jspf @@ -20,10 +20,10 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <ww:textfield name="repository.name" label="Name" size="50" required="true"/> -<ww:textfield name="repository.url" label="Directory or URL" size="100" required="true"/> +<ww:textfield name="repository.url" label="Directory or URL" size="50" required="true"/> <ww:select list="#@java.util.LinkedHashMap@{'default' : 'Maven 2.x Repository', 'legacy' : 'Maven 1.x Repository'}" name="repository.layout" label="Type"/> -<ww:textfield name="repository.refreshCronExpression" label="Cron" size="100" required="true" /> +<ww:textfield name="repository.refreshCronExpression" label="Cron" size="40" required="true" /> <ww:checkbox name="repository.releases" fieldValue="true" label="Releases Included"/> <ww:checkbox name="repository.snapshots" fieldValue="false" label="Snapshots Included"/> <ww:checkbox name="repository.indexed" fieldValue="true" label="Indexed"/> diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/proxyConnectors.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/proxyConnectors.jsp index 1e98a81e4..eb5146b4f 100644 --- a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/proxyConnectors.jsp +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/proxyConnectors.jsp @@ -33,6 +33,10 @@ <h1>Administration - Proxy Connectors</h1> +<c:url var="iconDeleteUrl" value="/images/icons/delete.gif" /> +<c:url var="iconEditUrl" value="/images/icons/edit.png" /> +<c:url var="iconCreateUrl" value="/images/icons/create.png" /> + <div id="contentArea"> <ww:actionerror /> @@ -82,10 +86,10 @@ <ww:param name="target" value="%{'${connector.targetRepoId}'}" /> </ww:url> <ww:a href="%{editProxyConnectorUrl}" cssClass="edit" title="Edit Proxy Connector"> - <img src="<c:url value="/images/icons/edit.png" />" /> + <img src="${iconEditUrl}" /> </ww:a> <ww:a href="%{deleteProxyConnectorUrl}" cssClass="delete" title="Delete Proxy Connector"> - <img src="<c:url value="/images/icons/delete.gif" />" /> + <img src="${iconDeleteUrl}" /> </ww:a> </redback:ifAnyAuthorized> </div> @@ -100,7 +104,13 @@ <i>(Direct Connection)</i> </c:when> <c:otherwise> - ${connector.proxyId} + <ww:url id="editProxyIdUrl" action="editNetworkProxy"> + <ww:param name="proxyid" value="%{'${connector.proxyId}'}" /> + </ww:url> + <ww:a href="%{editProxyIdUrl}" cssClass="edit" title="Edit Network Proxy"> + ${connector.proxyId} + <img src="${iconEditUrl}" /> + </ww:a> </c:otherwise> </c:choose> </td> |