archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edwin Punzalan <epunza...@exist.com>
Subject Re: svn commit: r485552 - in /maven/archiva/trunk: archiva-core/src/main/java/org/apache/maven/archiva/scheduler/executors/ archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/ archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/
Date Wed, 13 Dec 2006 17:29:50 GMT

oh, yeah.   Sorry about that, wasn't intentional... i'll edit my comment 
in there, thanks


Brett Porter wrote:
> Edwin,
>
> You should list who submitted the fix in the comment.
>
> - Brett
>
> On 11/12/2006, at 7:30 PM, epunzalan@apache.org wrote:
>
>> Author: epunzalan
>> Date: Mon Dec 11 00:30:32 2006
>> New Revision: 485552
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=485552
>> Log:
>> PR: MRM-247
>>
>> Add timestamp when the indexer last run for user reference
>>
>> Modified:
>>     
>> maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/scheduler/executors/IndexerTaskExecutor.java

>>
>>     
>> maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/ConfigureAction.java

>>
>>     
>> maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/index.jsp 
>>
>>
>> Modified: 
>> maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/scheduler/executors/IndexerTaskExecutor.java

>>
>> URL: 
>> http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/scheduler/executors/IndexerTaskExecutor.java?view=diff&rev=485552&r1=485551&r2=485552

>>
>> ============================================================================== 
>>
>> --- 
>> maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/scheduler/executors/IndexerTaskExecutor.java

>> (original)
>> +++ 
>> maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/scheduler/executors/IndexerTaskExecutor.java

>> Mon Dec 11 00:30:32 2006
>> @@ -104,8 +104,15 @@
>>       */
>>      private ReportGroup reportGroup;
>>
>> +    private long lastIndexingTime = 0;
>> +
>>      private static final int ARTIFACT_BUFFER_SIZE = 1000;
>>
>> +    public long getLastIndexingTime()
>> +    {
>> +        return lastIndexingTime;
>> +    }
>> +
>>      public void executeTask( Task task )
>>          throws TaskExecutionException
>>      {
>> @@ -282,6 +289,7 @@
>>          }
>>
>>          time = System.currentTimeMillis() - time;
>> +        lastIndexingTime = System.currentTimeMillis();
>>          getLogger().info( "Finished repository indexing process in " 
>> + time + "ms" );
>>      }
>>
>>
>> Modified: 
>> maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/ConfigureAction.java

>>
>> URL: 
>> http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/ConfigureAction.java?view=diff&rev=485552&r1=485551&r2=485552

>>
>> ============================================================================== 
>>
>> --- 
>> maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/ConfigureAction.java

>> (original)
>> +++ 
>> maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/ConfigureAction.java

>> Mon Dec 11 00:30:32 2006
>> @@ -26,6 +26,7 @@
>>  import 
>> org.apache.maven.archiva.configuration.InvalidConfigurationException;
>>  import org.apache.maven.archiva.indexer.RepositoryIndexException;
>>  import org.apache.maven.archiva.indexer.RepositoryIndexSearchException;
>> +import 
>> org.apache.maven.archiva.scheduler.executors.IndexerTaskExecutor;
>>  import org.apache.maven.archiva.security.ArchivaRoleConstants;
>>  import org.codehaus.plexus.scheduler.CronExpressionValidator;
>>  import org.codehaus.plexus.security.rbac.Resource;
>> @@ -36,6 +37,7 @@
>>
>>  import java.io.File;
>>  import java.io.IOException;
>> +import java.util.Date;
>>
>>  /**
>>   * Configures the application.
>> @@ -52,6 +54,11 @@
>>      private ConfigurationStore configurationStore;
>>
>>      /**
>> +     * @plexus.requirement 
>> role="org.codehaus.plexus.taskqueue.execution.TaskExecutor" 
>> role-hint="indexer"
>> +     */
>> +    private IndexerTaskExecutor indexer;
>> +
>> +    /**
>>       * The configuration.
>>       */
>>      private Configuration configuration;
>> @@ -72,6 +79,8 @@
>>
>>      private String year;
>>
>> +    private String lastIndexingTime;
>> +
>>      public void validate()
>>      {
>>          //validate cron expression
>> @@ -146,6 +155,14 @@
>>              i++;
>>          }
>>
>> +        if ( indexer.getLastIndexingTime() != 0 ) {
>> +            lastIndexingTime = new Date( 
>> indexer.getLastIndexingTime() ).toString();
>> +        }
>> +        else
>> +        {
>> +            lastIndexingTime = "Never been run.";
>> +        }
>> +
>>          return INPUT;
>>      }
>>
>> @@ -158,6 +175,16 @@
>>          throws ConfigurationStoreException
>>      {
>>          configuration = configurationStore.getConfigurationFromStore();
>> +    }
>> +
>> +    public String getLastIndexingTime()
>> +    {
>> +        return lastIndexingTime;
>> +    }
>> +
>> +    public void setLastIndexingTime(String lastIndexingTime)
>> +    {
>> +        this.lastIndexingTime = lastIndexingTime;
>>      }
>>
>>      public String getSecond()
>>
>> Modified: 
>> maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/index.jsp 
>>
>> URL: 
>> http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/index.jsp?view=diff&rev=485552&r1=485551&r2=485552

>>
>> ============================================================================== 
>>
>> --- 
>> maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/index.jsp 
>> (original)
>> +++ 
>> maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/index.jsp 
>> Mon Dec 11 00:30:32 2006
>> @@ -57,6 +57,13 @@
>>        </pss:ifAuthorized>
>>      </td>
>>    </tr>
>> +  <tr>
>> +    <th>Last Indexing Time</th>
>> +    <td>
>> +      <ww:property value="lastIndexingTime"/>
>> +    </td>
>> +    <td></td>
>> +  </tr>
>>  </table>
>>
>>  <ww:set name="proxy" value="proxy"/>
>>
>

Mime
View raw message