incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1205411 - in /incubator/lcf/branches/CONNECTORS-290/framework: crawler-ui/src/main/webapp/ pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/ pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ pull-agent/src/main/...
Date Wed, 23 Nov 2011 14:18:39 GMT
Author: kwright
Date: Wed Nov 23 14:18:38 2011
New Revision: 1205411

URL: http://svn.apache.org/viewvc?rev=1205411&view=rev
Log:
Update job status to include stopping and resuming

Modified:
    incubator/lcf/branches/CONNECTORS-290/framework/crawler-ui/src/main/webapp/showjobstatus.jsp
    incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/JobStatus.java
    incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
    incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java

Modified: incubator/lcf/branches/CONNECTORS-290/framework/crawler-ui/src/main/webapp/showjobstatus.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-290/framework/crawler-ui/src/main/webapp/showjobstatus.jsp?rev=1205411&r1=1205410&r2=1205411&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-290/framework/crawler-ui/src/main/webapp/showjobstatus.jsp
(original)
+++ incubator/lcf/branches/CONNECTORS-290/framework/crawler-ui/src/main/webapp/showjobstatus.jsp
Wed Nov 23 14:18:38 2011
@@ -131,6 +131,12 @@ if (maintenanceUnderway == false)
 		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;
@@ -180,24 +186,53 @@ if (maintenanceUnderway == false)
 %>
 		<tr <%="class=\""+((i%2==0)?"evendatarow":"odddatarow")+"\""%>>
 			<td class="columncell">
-<% if (status == JobStatus.JOBSTATUS_NOTYETRUN || status == JobStatus.JOBSTATUS_COMPLETED
|| status == JobStatus.JOBSTATUS_ERROR) { %>
-	<a href='<%="javascript:Start(\""+js.getJobID()+"\")"%>' alt='<%="Start job
"+js.getJobID()%>'>Start</a>&nbsp;
-<% } %>
-<% if (status == JobStatus.JOBSTATUS_RUNNING || status == JobStatus.JOBSTATUS_RUNNING_UNINSTALLED
|| status == JobStatus.JOBSTATUS_WINDOWWAIT ||
-	status == JobStatus.JOBSTATUS_PAUSED || status == JobStatus.JOBSTATUS_STARTING) { %>
-	<a href='<%="javascript:Restart(\""+js.getJobID()+"\")"%>' alt='<%="Restart
job "+js.getJobID()%>'>Restart</a>&nbsp;
-<% } %>
-<% if (status == JobStatus.JOBSTATUS_RUNNING || status == JobStatus.JOBSTATUS_RUNNING_UNINSTALLED
|| status == JobStatus.JOBSTATUS_WINDOWWAIT) { %>
-	<a href='<%="javascript:Pause(\""+js.getJobID()+"\")"%>' alt='<%="Pause job
"+js.getJobID()%>'>Pause</a>&nbsp;
-<% } %>
-<% if (status == JobStatus.JOBSTATUS_RUNNING || status == JobStatus.JOBSTATUS_RUNNING_UNINSTALLED
|| status == JobStatus.JOBSTATUS_WINDOWWAIT ||
-	status == JobStatus.JOBSTATUS_PAUSED || status == JobStatus.JOBSTATUS_STARTING || status
== JobStatus.JOBSTATUS_RESTARTING) { %>
-	<a href='<%="javascript:Abort(\""+js.getJobID()+"\")"%>' alt='<%="Abort job
"+js.getJobID()%>'>Abort</a>&nbsp;
-<% } %>
-<% if (status == JobStatus.JOBSTATUS_PAUSED) { %>
-	<a href='<%="javascript:Resume(\""+js.getJobID()+"\")"%>' alt='<%="Resume job
"+js.getJobID()%>'>Resume</a>&nbsp;
-<% } %>
-
+<%
+		if (status == JobStatus.JOBSTATUS_NOTYETRUN ||
+			status == JobStatus.JOBSTATUS_COMPLETED ||
+			status == JobStatus.JOBSTATUS_ERROR)
+		{
+%>
+				<a href='<%="javascript:Start(\""+js.getJobID()+"\")"%>' alt='<%="Start job
"+js.getJobID()%>'>Start</a>&nbsp;
+<%
+		}
+		if (status == JobStatus.JOBSTATUS_RUNNING ||
+			status == JobStatus.JOBSTATUS_RUNNING_UNINSTALLED ||
+			status == JobStatus.JOBSTATUS_WINDOWWAIT ||
+			status == JobStatus.JOBSTATUS_PAUSED ||
+			status == JobStatus.JOBSTATUS_STARTING)
+		{
+%>
+				<a href='<%="javascript:Restart(\""+js.getJobID()+"\")"%>' alt='<%="Restart
job "+js.getJobID()%>'>Restart</a>&nbsp;
+<%
+		}
+		if (status == JobStatus.JOBSTATUS_RUNNING ||
+			status == JobStatus.JOBSTATUS_RUNNING_UNINSTALLED ||
+			status == JobStatus.JOBSTATUS_WINDOWWAIT)
+		{
+%>
+				<a href='<%="javascript:Pause(\""+js.getJobID()+"\")"%>' alt='<%="Pause job
"+js.getJobID()%>'>Pause</a>&nbsp;
+<%
+		}
+		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)
+		{
+%>
+				<a href='<%="javascript:Abort(\""+js.getJobID()+"\")"%>' alt='<%="Abort job
"+js.getJobID()%>'>Abort</a>&nbsp;
+<%
+		}
+		if (status == JobStatus.JOBSTATUS_PAUSED)
+		{
+%>
+				<a href='<%="javascript:Resume(\""+js.getJobID()+"\")"%>' alt='<%="Resume
job "+js.getJobID()%>'>Resume</a>&nbsp;
+<%
+		}
+%>
 			</td>
 			<td class="columncell"><%="<!--jobid="+js.getJobID()+"-->"%><%=js.getDescription()%></td><td
class="columncell"><%=statusName%></td><td class="columncell"><%=startTime%></td><td
class="columncell"><%=endTime%></td>
 			<td class="columncell"><%=new Long(js.getDocumentsInQueue()).toString()%></td>

Modified: incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/JobStatus.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/JobStatus.java?rev=1205411&r1=1205410&r2=1205411&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/JobStatus.java
(original)
+++ incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/JobStatus.java
Wed Nov 23 14:18:38 2011
@@ -28,17 +28,19 @@ public class JobStatus
   // Job status values
   public final static int JOBSTATUS_NOTYETRUN = 0;
   public final static int JOBSTATUS_RUNNING = 1;
-  public final static int JOBSTATUS_PAUSED = 2;
-  public final static int JOBSTATUS_COMPLETED = 3;
-  public final static int JOBSTATUS_WINDOWWAIT = 4;
-  public final static int JOBSTATUS_STARTING = 5;
-  public final static int JOBSTATUS_DESTRUCTING = 6;
-  public final static int JOBSTATUS_ERROR = 7;
-  public final static int JOBSTATUS_ABORTING = 8;
-  public final static int JOBSTATUS_RESTARTING = 9;
-  public final static int JOBSTATUS_RUNNING_UNINSTALLED = 10;
-  public final static int JOBSTATUS_JOBENDCLEANUP = 11;
-  public final static int JOBSTATUS_JOBENDNOTIFICATION = 12;
+  public final static int JOBSTATUS_STOPPING = 2;
+  public final static int JOBSTATUS_PAUSED = 3;
+  public final static int JOBSTATUS_RESUMING = 4;
+  public final static int JOBSTATUS_COMPLETED = 5;
+  public final static int JOBSTATUS_WINDOWWAIT = 6;
+  public final static int JOBSTATUS_STARTING = 7;
+  public final static int JOBSTATUS_DESTRUCTING = 8;
+  public final static int JOBSTATUS_ERROR = 9;
+  public final static int JOBSTATUS_ABORTING = 10;
+  public final static int JOBSTATUS_RESTARTING = 11;
+  public final static int JOBSTATUS_RUNNING_UNINSTALLED = 12;
+  public final static int JOBSTATUS_JOBENDCLEANUP = 13;
+  public final static int JOBSTATUS_JOBENDNOTIFICATION = 14;
 
 
   // Member variables.

Modified: incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java?rev=1205411&r1=1205410&r2=1205411&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
(original)
+++ incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
Wed Nov 23 14:18:38 2011
@@ -6463,7 +6463,16 @@ public class JobManager implements IJobM
         Jobs.statusToString(Jobs.STATUS_ACTIVEWAIT),
         Jobs.statusToString(Jobs.STATUS_ACTIVEWAITSEEDING),
         Jobs.statusToString(Jobs.STATUS_PAUSEDWAIT),
-        Jobs.statusToString(Jobs.STATUS_PAUSEDWAITSEEDING)})});
+        Jobs.statusToString(Jobs.STATUS_PAUSEDWAITSEEDING),
+        Jobs.statusToString(Jobs.STATUS_PAUSING),
+        Jobs.statusToString(Jobs.STATUS_PAUSINGSEEDING),
+        Jobs.statusToString(Jobs.STATUS_ACTIVEWAITING),
+        Jobs.statusToString(Jobs.STATUS_ACTIVEWAITINGSEEDING),
+        Jobs.statusToString(Jobs.STATUS_PAUSINGWAITING),
+        Jobs.statusToString(Jobs.STATUS_PAUSINGWAITINGSEEDING),
+        Jobs.statusToString(Jobs.STATUS_RESUMING),
+        Jobs.statusToString(Jobs.STATUS_RESUMINGSEEDING)
+        })});
     
     return makeJobStatus(whereClause,whereParams,includeCounts);
   }
@@ -6687,6 +6696,18 @@ public class JobManager implements IJobM
       case Jobs.STATUS_ABORTINGSTARTINGUPFORRESTART:
         rstatus = JobStatus.JOBSTATUS_RESTARTING;
         break;
+      case Jobs.STATUS_PAUSING:
+      case Jobs.STATUS_PAUSINGSEEDING:
+      case Jobs.STATUS_ACTIVEWAITING:
+      case Jobs.STATUS_ACTIVEWAITINGSEEDING:
+      case Jobs.STATUS_PAUSINGWAITING:
+      case Jobs.STATUS_PAUSINGWAITINGSEEDING:
+        rstatus = JobStatus.JOBSTATUS_STOPPING;
+        break;
+      case Jobs.STATUS_RESUMING:
+      case Jobs.STATUS_RESUMINGSEEDING:
+        rstatus = JobStatus.JOBSTATUS_RESUMING;
+        break;
       case Jobs.STATUS_PAUSED:
       case Jobs.STATUS_PAUSEDSEEDING:
         rstatus = JobStatus.JOBSTATUS_PAUSED;

Modified: incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java?rev=1205411&r1=1205410&r2=1205411&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
(original)
+++ incubator/lcf/branches/CONNECTORS-290/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
Wed Nov 23 14:18:38 2011
@@ -2710,6 +2710,10 @@ public class ManifoldCF extends org.apac
       return "not yet run";
     case JobStatus.JOBSTATUS_RUNNING:
       return "running";
+    case JobStatus.JOBSTATUS_STOPPING:
+      return "stopping";
+    case JobStatus.JOBSTATUS_RESUMING:
+      return "resuming";
     case JobStatus.JOBSTATUS_PAUSED:
       return "paused";
     case JobStatus.JOBSTATUS_COMPLETED:



Mime
View raw message