* under the License.
*/
- import org.apache.struts2.interceptor.ServletRequestAware;
-import com.opensymphony.webwork.interceptor.ServletRequestAware;
-import com.opensymphony.xwork.Preparable;
-
+import com.opensymphony.xwork2.Preparable;
+ import org.apache.commons.lang.time.DateFormatUtils;
+ import org.apache.commons.lang.time.DateUtils;
+ import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.database.ArchivaDAO;
+ import org.apache.maven.archiva.database.ArchivaDatabaseException;
import org.apache.maven.archiva.database.Constraint;
+ import org.apache.maven.archiva.database.ObjectNotFoundException;
+ import org.apache.maven.archiva.database.RepositoryContentStatisticsDAO;
import org.apache.maven.archiva.database.constraints.RangeConstraint;
+ import org.apache.maven.archiva.database.constraints.RepositoryContentStatisticsByRepositoryConstraint;
import org.apache.maven.archiva.database.constraints.RepositoryProblemByGroupIdConstraint;
import org.apache.maven.archiva.database.constraints.RepositoryProblemByRepositoryIdConstraint;
import org.apache.maven.archiva.database.constraints.RepositoryProblemConstraint;
import org.apache.maven.archiva.database.constraints.UniqueFieldConstraint;
+ import org.apache.maven.archiva.model.RepositoryContentStatistics;
import org.apache.maven.archiva.model.RepositoryProblem;
import org.apache.maven.archiva.model.RepositoryProblemReport;
+ import org.apache.maven.archiva.reporting.ArchivaReportException;
+ import org.apache.maven.archiva.reporting.DataLimits;
+ import org.apache.maven.archiva.reporting.RepositoryStatistics;
+ import org.apache.maven.archiva.reporting.RepositoryStatisticsReportGenerator;
import org.apache.maven.archiva.security.ArchivaRoleConstants;
- import org.apache.maven.archiva.web.action.PlexusActionSupport;
import org.codehaus.plexus.redback.rbac.Resource;
- import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;
- import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;
- import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;
-import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
-import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
-import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
-import org.codehaus.plexus.xwork.action.PlexusActionSupport;
+ import org.slf4j.Logger;
+ import org.slf4j.LoggerFactory;
import javax.servlet.http.HttpServletRequest;
+
+ import java.text.ParseException;
import java.util.ArrayList;
+ import java.util.Calendar;
import java.util.Collection;
+ import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
++import org.apache.maven.archiva.web.action.PlexusActionSupport;
++import org.apache.struts2.interceptor.ServletRequestAware;
++import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;
++import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;
++import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;
/**
- * @plexus.component role="com.opensymphony.xwork.Action" role-hint="generateReport"
+ * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="generateReport"
*/
public class GenerateReportAction
extends PlexusActionSupport
<html>
<head>
<title>Reports</title>
- <s:head/>
- <ww:head/>
++ <s:head theme="ajax" />
</head>
<body>
<h1>Reports</h1>
-
+
<div id="contentArea">
- <s:form action="generateReport" namespace="/report" validate="true">
+ <h2>Repository Statistics</h2>
- <ww:form action="generateStatisticsReport" namespace="/report" validate="true">
++ <s:form action="generateStatisticsReport" namespace="/report" validate="true">
+
- <ww:optiontransferselect label="Repositories To Be Compared" name="availableRepositories"
++ <s:optiontransferselect label="Repositories To Be Compared" name="availableRepositories"
+ list="availableRepositories" doubleName="selectedRepositories"
+ doubleList="selectedRepositories" size="8" doubleSize="8"/>
+
- <ww:datepicker label="Start Date" name="startDate" id="startDate"/>
- <ww:datepicker label="End Date" name="endDate" id="endDate"/>
- <ww:textfield label="Row Count" name="rowCount" />
++ <s:datetimepicker label="Start Date" name="startDate" id="startDate"/>
++ <s:datetimepicker label="End Date" name="endDate" id="endDate"/>
++ <s:textfield label="Row Count" name="rowCount" />
+
- <ww:submit value="View Statistics"/>
- </ww:form>
++ <s:submit value="View Statistics"/>
++ </s:form>
+
+ <h2>Repository Health</h2>
- <ww:form namespace="/report" action="generateReport" validate="true">
- <ww:textfield label="Row Count" name="rowCount" />
- <ww:textfield label="Group ID" name="groupId"/>
- <ww:select label="Repository ID" name="repositoryId" list="repositoryIds"/>
++ <s:form namespace="/report" action="generateReport" validate="true">
+ <s:textfield label="Row Count" name="rowCount" />
+ <s:textfield label="Group ID" name="groupId"/>
+ <s:select label="Repository ID" name="repositoryId" list="repositoryIds"/>
+
- <ww:submit value="Show Report"/>
- </ww:form>
+ <s:submit value="Show Report"/>
+ </s:form>
</div>