From 6ff6fab1e4754021b01dafaca98aeb41fe6b70a0 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 7 May 2007 21:30:38 +0000 Subject: [PATCH] Adding Network Proxy admin screens. git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@535999 13f79535-47bb-0310-9956-ffa450edef68 --- .../util/NetworkProxyComparator.java | 62 +++++ .../util/NetworkProxySelectionPredicate.java | 54 +++++ .../proxy/ConfigureProxyConnectorAction.java | 43 +--- .../ConfigureNetworkProxyAction.java | 211 ++++++++++++++++++ .../networkproxies/NetworkProxiesAction.java | 42 ++-- .../src/main/resources/xwork.xml | 24 ++ .../WEB-INF/jsp/admin/addNetworkProxy.jsp | 51 +++++ .../WEB-INF/jsp/admin/deleteNetworkProxy.jsp | 51 +++++ .../WEB-INF/jsp/admin/deleteRepository.jsp | 6 +- .../WEB-INF/jsp/admin/editNetworkProxy.jsp | 51 +++++ .../jsp/admin/include/networkProxyForm.jspf | 26 +++ .../WEB-INF/jsp/admin/networkProxies.jsp | 128 +++++++++++ .../webapp/WEB-INF/jsp/admin/repositories.jsp | 45 ++-- .../src/main/webapp/css/site.css | 23 ++ 14 files changed, 744 insertions(+), 73 deletions(-) create mode 100644 archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxyComparator.java create mode 100644 archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxySelectionPredicate.java create mode 100644 archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java create mode 100644 archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addNetworkProxy.jsp create mode 100644 archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteNetworkProxy.jsp create mode 100644 archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editNetworkProxy.jsp create mode 100644 archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/networkProxyForm.jspf create mode 100644 archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/networkProxies.jsp diff --git a/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxyComparator.java b/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxyComparator.java new file mode 100644 index 000000000..6acd20ff5 --- /dev/null +++ b/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxyComparator.java @@ -0,0 +1,62 @@ +package org.apache.maven.archiva.configuration.util; + +/* + * 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. + */ + +import org.apache.maven.archiva.configuration.NetworkProxyConfiguration; + +import java.util.Comparator; + +/** + * NetworkProxyComparator + * + * @author Joakim Erdfelt + * @version $Id$ + */ +public class NetworkProxyComparator + implements Comparator +{ + + public int compare( Object o1, Object o2 ) + { + if ( o1 == null && o2 == null ) + { + return 0; + } + + if ( o1 == null && o2 != null ) + { + return 1; + } + + if ( o1 != null && o2 == null ) + { + return -1; + } + + if ( ( o1 instanceof NetworkProxyConfiguration ) && ( o2 instanceof NetworkProxyConfiguration ) ) + { + String id1 = ( (NetworkProxyConfiguration) o1 ).getId(); + String id2 = ( (NetworkProxyConfiguration) o2 ).getId(); + return id1.compareToIgnoreCase( id2 ); + } + + return 0; + } +} diff --git a/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxySelectionPredicate.java b/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxySelectionPredicate.java new file mode 100644 index 000000000..c21630866 --- /dev/null +++ b/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxySelectionPredicate.java @@ -0,0 +1,54 @@ +package org.apache.maven.archiva.configuration.util; + +/* + * 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. + */ + +import org.apache.commons.collections.Predicate; +import org.apache.commons.lang.StringUtils; +import org.apache.maven.archiva.configuration.NetworkProxyConfiguration; + +/** + * NetworkProxySelectionPredicate + * + * @author Joakim Erdfelt + * @version $Id$ + */ +public class NetworkProxySelectionPredicate + implements Predicate +{ + private String proxyId; + + public NetworkProxySelectionPredicate( String id ) + { + this.proxyId = id; + } + + public boolean evaluate( Object object ) + { + boolean satisfies = false; + + if ( object instanceof NetworkProxyConfiguration ) + { + NetworkProxyConfiguration proxy = (NetworkProxyConfiguration) object; + return ( StringUtils.equals( proxyId, proxy.getId() ) ); + } + + return satisfies; + } +} 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 cca665ae5..8b416bc9c 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,6 +20,7 @@ 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; @@ -63,7 +64,7 @@ import java.util.Map.Entry; */ public class ConfigureProxyConnectorAction extends PlexusActionSupport - implements SecureAction, Preparable, Initializable + implements SecureAction, Preparable, Validateable, Initializable { private static final String DIRECT_CONNECTION = "(direct connection)"; @@ -128,26 +129,22 @@ public class ConfigureProxyConnectorAction public String add() { - getLogger().info( ".add()" ); this.mode = "add"; return INPUT; } public String confirm() { - getLogger().info( ".confirm()" ); return INPUT; } public String delete() { - getLogger().info( ".delete()" ); return INPUT; } public String addProperty() { - getLogger().info( ".addProperty()" ); String key = getPropertyKey(); String value = getPropertyValue(); @@ -173,7 +170,6 @@ public class ConfigureProxyConnectorAction public String removeProperty() { - getLogger().info( ".removeProperty()" ); String key = getPropertyKey(); if ( StringUtils.isBlank( key ) ) @@ -193,7 +189,6 @@ public class ConfigureProxyConnectorAction public String addWhiteListPattern() { - getLogger().info( ".addWhiteListPattern()" ); String pattern = getWhiteListPattern(); if ( StringUtils.isBlank( pattern ) ) @@ -203,10 +198,6 @@ public class ConfigureProxyConnectorAction if ( !hasActionErrors() ) { - getLogger().info( - "whitelist patterns: (" + getConnector().getWhiteListPatterns().size() + "): " - + getConnector().getWhiteListPatterns() ); - getConnector().getWhiteListPatterns().add( pattern ); setWhiteListPattern( null ); } @@ -217,7 +208,6 @@ public class ConfigureProxyConnectorAction public String removeWhiteListPattern() { String pattern = getPattern(); - getLogger().info( ".removeWhiteListPattern(" + pattern + ")" ); if ( StringUtils.isBlank( pattern ) ) { @@ -235,7 +225,6 @@ public class ConfigureProxyConnectorAction public String addBlackListPattern() { - getLogger().info( ".addBlackListPattern()" ); String pattern = getBlackListPattern(); if ( StringUtils.isBlank( pattern ) ) @@ -254,7 +243,6 @@ public class ConfigureProxyConnectorAction public String removeBlackListPattern() { - getLogger().info( ".removeBlackListPattern()" ); String pattern = getBlackListPattern(); if ( StringUtils.isBlank( pattern ) ) @@ -273,7 +261,6 @@ public class ConfigureProxyConnectorAction public String edit() { - getLogger().info( ".edit()" ); this.mode = "edit"; return INPUT; } @@ -359,7 +346,6 @@ public class ConfigureProxyConnectorAction public String input() { - getLogger().info( "input()" ); return INPUT; } @@ -369,13 +355,10 @@ public class ConfigureProxyConnectorAction String sourceId = getSource(); String targetId = getTarget(); - getLogger().info( ".prepare() - sourceId [" + sourceId + "], targetId [" + targetId + "]" ); - if ( StringUtils.isBlank( sourceId ) || StringUtils.isBlank( targetId ) ) { if ( this.connector == null ) { - getLogger().info( "Creating new connector." ); this.connector = new ProxyConnectorConfiguration(); } } @@ -383,7 +366,6 @@ public class ConfigureProxyConnectorAction { this.connector = findProxyConnector( sourceId, targetId ); } - getLogger().info( "Connector: " + connector ); Configuration config = archivaConfiguration.getConfiguration(); @@ -426,13 +408,6 @@ public class ConfigureProxyConnectorAction String sourceId = getConnector().getSourceRepoId(); String targetId = getConnector().getTargetRepoId(); - getLogger().info( ".save(" + mode + ":" + sourceId + "->" + targetId + ")" ); - - if ( !isValid( getConnector() ) ) - { - return INPUT; - } - if ( StringUtils.equalsIgnoreCase( "edit", mode ) ) { removeConnector( sourceId, targetId ); @@ -527,13 +502,14 @@ public class ConfigureProxyConnectorAction ProxyConnectorSelectionPredicate selectedProxy = new ProxyConnectorSelectionPredicate( sourceId, targetId ); return (ProxyConnectorConfiguration) CollectionUtils.find( config.getProxyConnectors(), selectedProxy ); } - - private boolean isValid( ProxyConnectorConfiguration proxyConnector ) + + public void validate() { + ProxyConnectorConfiguration proxyConnector = getConnector(); + if ( proxyConnector.getPolicies() == null ) { addActionError( "Policies must be set." ); - return false; } Iterator it = policyMap.entrySet().iterator(); @@ -568,13 +544,6 @@ public class ConfigureProxyConnectorAction continue; } } - - if ( hasActionErrors() || hasActionMessages() ) - { - return false; - } - - return true; } private void removeConnector( String sourceId, String targetId ) diff --git a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java new file mode 100644 index 000000000..5da2144b5 --- /dev/null +++ b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java @@ -0,0 +1,211 @@ +package org.apache.maven.archiva.web.action.admin.networkproxies; + +/* + * 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. + */ + +import com.opensymphony.xwork.Preparable; + +import org.apache.commons.collections.CollectionUtils; +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.util.NetworkProxySelectionPredicate; +import org.apache.maven.archiva.security.ArchivaRoleConstants; +import org.codehaus.plexus.registry.RegistryException; +import org.codehaus.plexus.security.rbac.Resource; +import org.codehaus.plexus.security.ui.web.interceptor.SecureAction; +import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle; +import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException; +import org.codehaus.plexus.xwork.action.PlexusActionSupport; + +import java.io.IOException; + +/** + * ConfigureNetworkProxyAction + * + * @author Joakim Erdfelt + * @version $Id$ + * + * @plexus.component role="com.opensymphony.xwork.Action" role-hint="configureNetworkProxyAction" + */ +public class ConfigureNetworkProxyAction + extends PlexusActionSupport + implements SecureAction, Preparable +{ + /** + * @plexus.requirement + */ + private ArchivaConfiguration archivaConfiguration; + + private String mode; + + private String proxyid; + + private NetworkProxyConfiguration proxy; + + public String add() + { + this.mode = "add"; + return INPUT; + } + + public String confirm() + { + return INPUT; + } + + public String delete() + { + return INPUT; + } + + public String edit() + { + this.mode = "edit"; + return INPUT; + } + + public String getMode() + { + return mode; + } + + public NetworkProxyConfiguration getProxy() + { + return proxy; + } + + public String getProxyid() + { + return proxyid; + } + + public SecureActionBundle getSecureActionBundle() + throws SecureActionException + { + SecureActionBundle bundle = new SecureActionBundle(); + + bundle.setRequiresAuthentication( true ); + bundle.addRequiredAuthorization( ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION, Resource.GLOBAL ); + + return bundle; + } + + public String input() + { + return INPUT; + } + + public void prepare() + throws Exception + { + String id = getProxyid(); + + if ( StringUtils.isNotBlank( id ) ) + { + proxy = findNetworkProxy( id ); + } + + if ( proxy == null ) + { + proxy = new NetworkProxyConfiguration(); + } + } + + public String save() + { + String mode = getMode(); + + String id = getProxy().getId(); + + if ( StringUtils.equalsIgnoreCase( "edit", mode ) ) + { + removeNetworkProxy( id ); + } + + try + { + addNetworkProxy( getProxy() ); + saveConfiguration(); + } + catch ( IOException e ) + { + addActionError( "I/O Exception: " + e.getMessage() ); + } + catch ( InvalidConfigurationException e ) + { + addActionError( "Invalid Configuration Exception: " + e.getMessage() ); + } + catch ( RegistryException e ) + { + addActionError( "Configuration Registry Exception: " + e.getMessage() ); + } + + return SUCCESS; + } + + public void setMode( String mode ) + { + this.mode = mode; + } + + public void setProxy( NetworkProxyConfiguration proxy ) + { + this.proxy = proxy; + } + + public void setProxyid( String proxyid ) + { + this.proxyid = proxyid; + } + + private void addNetworkProxy( NetworkProxyConfiguration proxy ) + { + archivaConfiguration.getConfiguration().addNetworkProxy( proxy ); + } + + private NetworkProxyConfiguration findNetworkProxy( String id ) + { + Configuration config = archivaConfiguration.getConfiguration(); + + NetworkProxySelectionPredicate selectedProxy = new NetworkProxySelectionPredicate( id ); + + return (NetworkProxyConfiguration) CollectionUtils.find( config.getNetworkProxies(), selectedProxy ); + } + + private void removeNetworkProxy( String id ) + { + NetworkProxySelectionPredicate selectedProxy = new NetworkProxySelectionPredicate( id ); + NotPredicate notSelectedProxy = new NotPredicate( selectedProxy ); + CollectionUtils.filter( archivaConfiguration.getConfiguration().getNetworkProxies(), notSelectedProxy ); + } + + private String saveConfiguration() + throws IOException, InvalidConfigurationException, RegistryException + { + archivaConfiguration.save( archivaConfiguration.getConfiguration() ); + + addActionMessage( "Successfully saved configuration" ); + + return SUCCESS; + } +} diff --git a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java index 160a93cca..84d8974a0 100644 --- a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java +++ b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java @@ -19,17 +19,17 @@ package org.apache.maven.archiva.web.action.admin.networkproxies; * under the License. */ -import com.opensymphony.webwork.interceptor.ServletRequestAware; -import com.opensymphony.xwork.ModelDriven; import com.opensymphony.xwork.Preparable; -import com.opensymphony.xwork.Validateable; +import org.apache.maven.archiva.configuration.ArchivaConfiguration; +import org.apache.maven.archiva.security.ArchivaRoleConstants; +import org.codehaus.plexus.security.rbac.Resource; import org.codehaus.plexus.security.ui.web.interceptor.SecureAction; import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle; import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException; import org.codehaus.plexus.xwork.action.PlexusActionSupport; -import javax.servlet.http.HttpServletRequest; +import java.util.List; /** * NetworkProxiesAction @@ -40,34 +40,40 @@ import javax.servlet.http.HttpServletRequest; * @plexus.component role="com.opensymphony.xwork.Action" role-hint="networkProxiesAction" */ public class NetworkProxiesAction -extends PlexusActionSupport -implements ModelDriven, Preparable, Validateable, SecureAction, ServletRequestAware + extends PlexusActionSupport + implements Preparable, SecureAction { + /** + * @plexus.requirement + */ + private ArchivaConfiguration configuration; - public Object getModel() - { - // TODO Auto-generated method stub - return null; - } + private List networkProxies; public void prepare() throws Exception { - // TODO Auto-generated method stub - + networkProxies = configuration.getConfiguration().getNetworkProxies(); } public SecureActionBundle getSecureActionBundle() throws SecureActionException { - // TODO Auto-generated method stub - return null; + SecureActionBundle bundle = new SecureActionBundle(); + + bundle.setRequiresAuthentication( true ); + bundle.addRequiredAuthorization( ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION, Resource.GLOBAL ); + + return bundle; } - public void setServletRequest( HttpServletRequest request ) + public List getNetworkProxies() { - // TODO Auto-generated method stub - + return networkProxies; } + public void setNetworkProxies( List networkProxies ) + { + this.networkProxies = networkProxies; + } } diff --git a/archiva-web/archiva-webapp/src/main/resources/xwork.xml b/archiva-web/archiva-webapp/src/main/resources/xwork.xml index 7bd0cd23b..a60c3c423 100644 --- a/archiva-web/archiva-webapp/src/main/resources/xwork.xml +++ b/archiva-web/archiva-webapp/src/main/resources/xwork.xml @@ -306,6 +306,30 @@ /WEB-INF/jsp/admin/networkProxies.jsp + + /WEB-INF/jsp/admin/addNetworkProxy.jsp + networkProxies + + + + + /WEB-INF/jsp/admin/editNetworkProxy.jsp + networkProxies + + + + + /WEB-INF/jsp/admin/editNetworkProxy.jsp + networkProxies + + + + + /WEB-INF/jsp/admin/deleteNetworkProxy.jsp + networkProxies + + + diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addNetworkProxy.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addNetworkProxy.jsp new file mode 100644 index 000000000..7561af365 --- /dev/null +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addNetworkProxy.jsp @@ -0,0 +1,51 @@ +<%-- + ~ 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" %> + + + + Admin: Add Network Proxy + + + + + +

Admin: Add Network Proxy

+ +
+ +

Add Network Proxy

+ + + + + + <%@ include file="/WEB-INF/jsp/admin/include/networkProxyForm.jspf" %> + + + + + +
+ + + diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteNetworkProxy.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteNetworkProxy.jsp new file mode 100644 index 000000000..584a99c72 --- /dev/null +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteNetworkProxy.jsp @@ -0,0 +1,51 @@ +<%-- + ~ 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" %> + + + + Admin: Delete Network Proxy + + + + + +

Admin: Delete Network Proxy

+ +
+ +

Delete Network Proxy

+ +
+ WARNING: This operation can not be undone. +
+ +

+ Are you sure you want to delete network proxy ${proxyid} ? +

+ + + + + +
+ + + \ No newline at end of file diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteRepository.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteRepository.jsp index 379b178b3..c028c1dd3 100644 --- a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteRepository.jsp +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteRepository.jsp @@ -21,17 +21,17 @@ - Configuration + Admin: Delete Repository -

Configuration

+

Admin: Delete Repository

-

Delete Managed Repository

+

Delete Repository

WARNING: This operation can not be undone. 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 new file mode 100644 index 000000000..73da77a8f --- /dev/null +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editNetworkProxy.jsp @@ -0,0 +1,51 @@ +<%-- + ~ 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" %> + + + + Admin: Edit Network Proxy + + + + + +

Admin: Network Proxy

+ +
+ +

Edit Network Proxy

+ + + + + + <%@ include file="/WEB-INF/jsp/admin/include/networkProxyForm.jspf" %> + + + + + +
+ + + \ No newline at end of file diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/networkProxyForm.jspf b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/networkProxyForm.jspf new file mode 100644 index 000000000..935c4b176 --- /dev/null +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/networkProxyForm.jspf @@ -0,0 +1,26 @@ +<%-- + ~ 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" %> + + + + + + diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/networkProxies.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/networkProxies.jsp new file mode 100644 index 000000000..96b59b373 --- /dev/null +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/networkProxies.jsp @@ -0,0 +1,128 @@ +<%-- + ~ 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"%> +<%@ taglib prefix="pss" uri="/plexusSecuritySystem"%> +<%@ taglib prefix="archiva" uri="http://maven.apache.org/archiva"%> + + + +Administration - Network Proxies + + + + + +

Administration - Network Proxies

+ +
+ + + +
+
+ + + + " /> + Add Network Proxy +
+

Network Proxies

+ + + + <%-- No Local Repositories. --%> + There are no network proxies configured yet. + + + <%-- Display the repositories. --%> + + + + + + + + + + + +
+ +
+ + + + + + + + + " /> + Edit Network Proxy + + " /> + Delete Network Proxy +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Identifier${proxy.id}
Protocol${proxy.protocol}
Host${proxy.host}
Port${proxy.port}
Username${proxy.username}
Password••••••••
+ +
+
+ +
+
+
+ +
+ + + diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp index 9c00884d2..e977bc7d6 100644 --- a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp @@ -37,18 +37,16 @@ -
-
- <%-- TODO replace with icons --%> - - - - " /> - Add Repository - -
-

Local Repositories

+
+
+ + + + " /> + Add Repository +
+

Local Repositories

@@ -59,10 +57,18 @@ <%-- Display the repositories. --%> + + + + + + + + -
+
-
+
<%-- TODO: make some icons --%> @@ -200,9 +206,18 @@ <%-- Display the repositories. --%> -
+ + + + + + + + + +
-
+
<%-- TODO: make some icons --%> diff --git a/archiva-web/archiva-webapp/src/main/webapp/css/site.css b/archiva-web/archiva-webapp/src/main/webapp/css/site.css index fcdd9fc84..5091385f1 100644 --- a/archiva-web/archiva-webapp/src/main/webapp/css/site.css +++ b/archiva-web/archiva-webapp/src/main/webapp/css/site.css @@ -284,4 +284,27 @@ tr.proxyConnector td.connector table p { tr.seperator td { border-top: 1px dashed #dddddd !important; +} + +div.admin div.dark, +div.admin div.lite { + border: 1px solid #aaaaaa; + font-size: 11pt; + margin-left: 15px; + margin-right: 15px; + margin-bottom: 5px; + padding: 5px; +} + +div.admin div.lite { + background-color: white; +} + +div.admin div.dark { + background-color: #eeeeee; +} + +div.admin div.controls { + float: right; + font-size: 8pt !important; } \ No newline at end of file -- 2.39.5