import org.apache.archiva.metadata.repository.MetadataResolutionException;
import org.apache.archiva.metadata.repository.MetadataResolver;
import org.apache.archiva.metadata.repository.RepositorySession;
-import org.apache.archiva.rest.api.model.BrowseResultEntry;
import org.apache.archiva.rest.api.model.BrowseResult;
+import org.apache.archiva.rest.api.model.BrowseResultEntry;
import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
import org.apache.archiva.rest.api.services.BrowseService;
import org.apache.commons.collections.CollectionUtils;
{
repositorySession.close();
}
- List<BrowseResultEntry> browseGroupResultEntries = new ArrayList<BrowseResultEntry>( namespaces.size() + projects.size() );
+ List<BrowseResultEntry> browseGroupResultEntries =
+ new ArrayList<BrowseResultEntry>( namespaces.size() + projects.size() );
for ( String namespace : namespaces )
{
browseGroupResultEntries.add( new BrowseResultEntry( namespace, false ) );
}
for ( String project : projects )
{
- browseGroupResultEntries.add( new BrowseResultEntry( project, true ) );
+ browseGroupResultEntries.add( new BrowseResultEntry( groupId + '.' + project, true ) );
}
Collections.sort( browseGroupResultEntries );
return new BrowseResult( browseGroupResultEntries );
return breadCrumbEntries;
}
-
+ displayEntry=function(value){
+ if (self.groupId){
+ return value.substr(self.groupId.length+1,value.length-self.groupId.length);
+ }
+ return value;
+ }
}
displayGroupDetail(groupId,parentBrowseViewModel,null)
}
- function BrowseResultEntry(a, b){
-
- }
mapbrowseResultEntries=function(data){
if (data.browseResult && data.browseResult.browseResultEntries) {
return $.isArray(data.browseResult.browseResultEntries) ?
$.map(data.browseResult.browseResultEntries,function(item){
return new BrowseResultEntry(item.name, item.project);
- }): [data.browseResult.browseResultEntries];
+ } ).sort(): [data.browseResult.browseResultEntries];
}
return [];
}
{{each(i,browseResultEntry) browseResultEntries}}
<li class="browse-list" data-bind="click:function(){displayGroupId(browseResultEntry.name)}">
<a href="#">
- ${browseResultEntry.name} (project: ${browseResultEntry.project})
+ ${displayEntry(browseResultEntry.name)} (project: ${browseResultEntry.project})
</a>
</li>
{{/each}}