<%@ include file="adminHeaders.jsp" %> <% /* $Id$ */ /** * 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. */ boolean maintenanceUnderway = org.apache.manifoldcf.crawler.system.ManifoldCF.checkMaintenanceUnderway(); %> Apache ManifoldCF: Status of all jobs

Status of Jobs

<% if (maintenanceUnderway == false) { %>
<% try { // Get the job manager handle IJobManager manager = JobManagerFactory.make(threadContext); JobStatus[] jobs = manager.getAllStatus(); %> <% int i = 0; while (i < jobs.length) { JobStatus js = jobs[i++]; String statusName; int status = js.getStatus(); switch (status) { case JobStatus.JOBSTATUS_NOTYETRUN: statusName = "Not yet run"; break; case JobStatus.JOBSTATUS_RUNNING: statusName = "Running"; break; case JobStatus.JOBSTATUS_RUNNING_UNINSTALLED: statusName = "Running, no connector"; break; case JobStatus.JOBSTATUS_ABORTING: statusName = "Aborting"; break; case JobStatus.JOBSTATUS_RESTARTING: statusName = "Restarting"; break; case JobStatus.JOBSTATUS_STOPPING: statusName = "Stopping"; break; case JobStatus.JOBSTATUS_RESUMING: statusName = "Resuming"; break; case JobStatus.JOBSTATUS_PAUSED: statusName = "Paused"; break; case JobStatus.JOBSTATUS_COMPLETED: statusName = "Done"; break; case JobStatus.JOBSTATUS_WINDOWWAIT: statusName = "Waiting"; break; case JobStatus.JOBSTATUS_STARTING: statusName = "Starting up"; break; case JobStatus.JOBSTATUS_DESTRUCTING: statusName = "Cleaning up"; break; case JobStatus.JOBSTATUS_JOBENDCLEANUP: statusName = "Terminating"; break; case JobStatus.JOBSTATUS_JOBENDNOTIFICATION: statusName = "End notification"; break; case JobStatus.JOBSTATUS_ERROR: statusName = "Error: "+js.getErrorText(); break; default: statusName = "Unknown"; break; } String startTime = "Not started"; if (js.getStartTime() != -1L) startTime = new Date(js.getStartTime()).toString(); String endTime = "Aborted"; if (js.getStartTime() == -1L) endTime = "Never run"; else { if (js.getEndTime() == -1L) { if (status == JobStatus.JOBSTATUS_COMPLETED) endTime = "Aborted"; else endTime = ""; } else endTime = new Date(js.getEndTime()).toString(); } %> > <% } %>

NameStatusStart TimeEnd TimeDocumentsActiveProcessed
<% if (status == JobStatus.JOBSTATUS_NOTYETRUN || status == JobStatus.JOBSTATUS_COMPLETED || status == JobStatus.JOBSTATUS_ERROR) { %> Start  <% } if (status == JobStatus.JOBSTATUS_RUNNING || status == JobStatus.JOBSTATUS_RUNNING_UNINSTALLED || status == JobStatus.JOBSTATUS_WINDOWWAIT || status == JobStatus.JOBSTATUS_PAUSED || status == JobStatus.JOBSTATUS_STARTING) { %> Restart  <% } if (status == JobStatus.JOBSTATUS_RUNNING || status == JobStatus.JOBSTATUS_RUNNING_UNINSTALLED || status == JobStatus.JOBSTATUS_WINDOWWAIT) { %> Pause  <% } if (status == JobStatus.JOBSTATUS_RUNNING || status == JobStatus.JOBSTATUS_RUNNING_UNINSTALLED || status == JobStatus.JOBSTATUS_STOPPING || status == JobStatus.JOBSTATUS_RESUMING || status == JobStatus.JOBSTATUS_WINDOWWAIT || status == JobStatus.JOBSTATUS_PAUSED || status == JobStatus.JOBSTATUS_STARTING || status == JobStatus.JOBSTATUS_RESTARTING) { %> Abort  <% } if (status == JobStatus.JOBSTATUS_PAUSED) { %> Resume  <% } %> <%=""%><%=js.getDescription()%><%=statusName%><%=startTime%><%=endTime%> <%=new Long(js.getDocumentsInQueue()).toString()%> <%=new Long(js.getDocumentsOutstanding()).toString()%> <%=new Long(js.getDocumentsProcessed()).toString()%>

Refresh
<% } catch (ManifoldCFException e) { out.println("Error: "+e.getMessage()); e.printStackTrace(); } %>
<% } else { %>

This page is unavailable due to maintenance operations. Please try again later.
<% } %>