From 5391c0e0de7d9c0fc78e4eda972e3a29e5e94f8d Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Fri, 3 Aug 2007 16:12:21 +0000 Subject: [PATCH] [MRM-329] revised reporting actions Submitted by: Teodoro Cue git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@562514 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/jasperreports/report.jrxml | 170 ++++++++++++++++++ .../web/action/reports/ShowReportsAction.java | 59 ++++++ .../WEB-INF/jsp/reports/blankReport.jsp | 37 ++++ .../reports/{reports.jsp => showReports.jsp} | 27 +-- 4 files changed, 272 insertions(+), 21 deletions(-) create mode 100644 archiva-web/archiva-webapp/src/main/jasperreports/report.jrxml create mode 100644 archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/ShowReportsAction.java create mode 100644 archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/blankReport.jsp rename archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/{reports.jsp => showReports.jsp} (57%) diff --git a/archiva-web/archiva-webapp/src/main/jasperreports/report.jrxml b/archiva-web/archiva-webapp/src/main/jasperreports/report.jrxml new file mode 100644 index 000000000..bebb368d3 --- /dev/null +++ b/archiva-web/archiva-webapp/src/main/jasperreports/report.jrxml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + <band height="50"> + <staticText> + <reportElement x="0" y="0" width="1040" height="50"/> + <textElement textAlignment="Center"> + <font size="14" isBold="true"/> + </textElement> + <text><![CDATA[Archiva Report]]></text> + </staticText> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/ShowReportsAction.java b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/ShowReportsAction.java new file mode 100644 index 000000000..004b4b159 --- /dev/null +++ b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/ShowReportsAction.java @@ -0,0 +1,59 @@ +package org.apache.maven.archiva.web.action.reports; + +/* + * 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.database.ArchivaDAO; +import org.apache.maven.archiva.database.constraints.UniqueFieldConstraint; +import org.apache.maven.archiva.model.RepositoryProblem; +import org.codehaus.plexus.xwork.action.PlexusActionSupport; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * Show reports. + * + * @plexus.component role="com.opensymphony.xwork.Action" role-hint="showReportsAction" + */ +public class ShowReportsAction + extends PlexusActionSupport +{ + /** + * @plexus.requirement role-hint="jdo" + */ + protected ArchivaDAO dao; + + private Collection repositoryIds = new ArrayList(); + + public String execute() + throws Exception + { + repositoryIds.add( "" ); + repositoryIds.addAll( + dao.query( new UniqueFieldConstraint( RepositoryProblem.class.getName(), "repositoryId" ) ) ); + + return SUCCESS; + } + + public Collection getRepositoryIds() + { + return repositoryIds; + } +} diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/blankReport.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/blankReport.jsp new file mode 100644 index 000000000..14cf9a385 --- /dev/null +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/blankReport.jsp @@ -0,0 +1,37 @@ +<%-- + ~ 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" %> + + + + Reports + + + + +

Reports

+ +
+ + + +
+ + diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/reports.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/showReports.jsp similarity index 57% rename from archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/reports.jsp rename to archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/showReports.jsp index 704266df2..589e40074 100644 --- a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/reports.jsp +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/showReports.jsp @@ -18,11 +18,6 @@ --%> <%@ taglib prefix="ww" uri="/webwork" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %> -<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> @@ -31,26 +26,16 @@ -

Reports

- -

- ${report.groupId} : ${report.artifactId} : ${report.version} : ${report.classifier} : ${report.type} -

-
    - -
  • - ${result.reason} -
  • -
    -
-
- - No reports for any artifact. - + + + + + +
-- 2.39.5