From 3d13eda595c0e4f3a29524590db775c6f955ec79 Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Fri, 18 Apr 2008 10:40:45 +0000 Subject: [PATCH] [MRM-694] display the groups in the repositories page git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@649453 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/mdo/configuration.mdo | 31 +++++++++++++++++++ .../repositories/RepositoriesAction.java | 8 +++++ .../webapp/WEB-INF/jsp/admin/repositories.jsp | 20 +++++++++--- 3 files changed, 55 insertions(+), 4 deletions(-) diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo index 041e3b8f2..57770b885 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo @@ -160,6 +160,37 @@ + + 1.2.0+ + > repositoryToGroupMap; + + public java.util.Map> getRepositoryToGroupMap() + { + if ( repositoryToGroupMap == null ) + { + java.util.Map> map = new java.util.HashMap>(); + + for ( RepositoryGroupConfiguration group : (java.util.List) repositoryGroups ) + { + for ( String repositoryId : (java.util.List) group.getRepositories() ) + { + java.util.List groups = map.get( repositoryId ); + if ( groups == null ) + { + groups = new java.util.ArrayList(); + map.put( repositoryId, groups ); + } + groups.add( group.getId() ); + } + } + + repositoryToGroupMap = map; + } + return repositoryToGroupMap; + } + ]]> + 1.0.0+ remoteRepositories; private Map repositoryStatistics; + + private Map> repositoryToGroupMap; /** * @plexus.requirement role-hint="jdo" @@ -99,6 +101,7 @@ public class RepositoriesAction remoteRepositories = new ArrayList( config.getRemoteRepositories() ); managedRepositories = new ArrayList( config.getManagedRepositories() ); + repositoryToGroupMap = config.getRepositoryToGroupMap(); Collections.sort( managedRepositories, new RepositoryConfigurationComparator() ); Collections.sort( remoteRepositories, new RepositoryConfigurationComparator() ); @@ -134,4 +137,9 @@ public class RepositoriesAction { return baseUrl; } + + public Map> getRepositoryToGroupMap() + { + return repositoryToGroupMap; + } } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp index fcd72989a..eb77e6f48 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp @@ -116,10 +116,12 @@ Directory ${repository.location} - - Index Directory - ${repository.indexDir} - + + + Index Directory + ${repository.indexDir} + + WebDAV URL ${baseUrl}/${repository.id}/ @@ -138,6 +140,16 @@ + + + Groups + + + ${group}, + + + + Releases Included -- 2.39.5