incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r961405 - in /incubator/lcf/trunk/modules/framework/crawler-ui: execute.jsp showjobstatus.jsp
Date Wed, 07 Jul 2010 15:22:51 GMT
Author: kwright
Date: Wed Jul  7 15:22:50 2010
New Revision: 961405

URL: http://svn.apache.org/viewvc?rev=961405&view=rev
Log:
Fix jobstatus page treatment, so you can actually start jobs via the UI.

Modified:
    incubator/lcf/trunk/modules/framework/crawler-ui/execute.jsp
    incubator/lcf/trunk/modules/framework/crawler-ui/showjobstatus.jsp

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/execute.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/execute.jsp?rev=961405&r1=961404&r2=961405&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/execute.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/execute.jsp Wed Jul  7 15:22:50 2010
@@ -811,7 +811,7 @@
 			else
 			{
 				// Error
-				variableContext.setParameter("text","Illegal parameter to job definition execution page");
+				variableContext.setParameter("text","Illegal parameter to job definition execution page:
"+op);
 				variableContext.setParameter("target","listjobs.jsp");
 %>
 				<jsp:forward page="error.jsp"/>
@@ -832,62 +832,74 @@
 			else
 			{
 				// Error
-				variableContext.setParameter("text","Illegal parameter to report/status execution page");
+				variableContext.setParameter("text","Illegal parameter to report/status execution page:
"+op);
 				variableContext.setParameter("target","index.jsp");
 %>
 				<jsp:forward page="error.jsp"/>
 <%
 			}
 		}
-		else if (op != null && op.equals("Start"))
+		else if (op != null && type != null && type.equals("jobstatus"))
 		{
-			// -- Start a job --
-			String jobID = variableContext.getParameter("jobid");
-			manager.manualStart(new Long(jobID));
-			// Forward to showjobstatus
+			if (op.equals("Start"))
+			{
+				// -- Start a job --
+				String jobID = variableContext.getParameter("jobid");
+				manager.manualStart(new Long(jobID));
+				// Forward to showjobstatus
 %>
-			<jsp:forward page="showjobstatus.jsp"/>
+				<jsp:forward page="showjobstatus.jsp"/>
 <%
-		}
-		else if (op != null && op.equals("Pause"))
-		{
-			// -- Pause a job --
-			String jobID = variableContext.getParameter("jobid");
-			manager.pauseJob(new Long(jobID));
-			// Forward to showjobstatus
+			}
+			else if (op.equals("Pause"))
+			{
+				// -- Pause a job --
+				String jobID = variableContext.getParameter("jobid");
+				manager.pauseJob(new Long(jobID));
+				// Forward to showjobstatus
 %>
-			<jsp:forward page="showjobstatus.jsp"/>
+				<jsp:forward page="showjobstatus.jsp"/>
 <%
-		}
-		else if (op != null && op.equals("Abort"))
-		{
-			// -- Abort a job --
-			String jobID = variableContext.getParameter("jobid");
-			manager.manualAbort(new Long(jobID));
-			// Forward to showjobstatus
+			}
+			else if (op.equals("Abort"))
+			{
+				// -- Abort a job --
+				String jobID = variableContext.getParameter("jobid");
+				manager.manualAbort(new Long(jobID));
+				// Forward to showjobstatus
 %>
-			<jsp:forward page="showjobstatus.jsp"/>
+				<jsp:forward page="showjobstatus.jsp"/>
 <%
-		}
-		else if (op != null && op.equals("Restart"))
-		{
-			// -- Restart a job --
-			String jobID = variableContext.getParameter("jobid");
-			manager.manualAbortRestart(new Long(jobID));
-			// Forward to showjobstatus
+			}
+			else if (op.equals("Restart"))
+			{
+				// -- Restart a job --
+				String jobID = variableContext.getParameter("jobid");
+				manager.manualAbortRestart(new Long(jobID));
+				// Forward to showjobstatus
 %>
-			<jsp:forward page="showjobstatus.jsp"/>
+				<jsp:forward page="showjobstatus.jsp"/>
 <%
-		}
-		else if (op != null && op.equals("Resume"))
-		{
-			// -- Resume a job --
-			String jobID = variableContext.getParameter("jobid");
-			manager.restartJob(new Long(jobID));
-			// Forward to showjobstatus
+			}
+			else if (op.equals("Resume"))
+			{
+				// -- Resume a job --
+				String jobID = variableContext.getParameter("jobid");
+				manager.restartJob(new Long(jobID));
+				// Forward to showjobstatus
 %>
-			<jsp:forward page="showjobstatus.jsp"/>
+				<jsp:forward page="showjobstatus.jsp"/>
 <%
+			}
+			else
+			{
+				// Error
+				variableContext.setParameter("text","Illegal parameter to jobstatus execution page: "+op);
+				variableContext.setParameter("target","index.jsp");
+%>
+				<jsp:forward page="error.jsp"/>
+<%
+			}
 		}
 		else
 		{

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/showjobstatus.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/showjobstatus.jsp?rev=961405&r1=961404&r2=961405&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/showjobstatus.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/showjobstatus.jsp Wed Jul  7 15:22:50
2010
@@ -90,7 +90,7 @@ if (maintenanceUnderway == false)
 %>
 	<form class="standardform" name="liststatuses" action="execute.jsp" method="POST">
 		<input type="hidden" name="op" value="Continue"/>
-		<input type="hidden" name="type" value="job"/>
+		<input type="hidden" name="type" value="jobstatus"/>
 		<input type="hidden" name="jobid" value=""/>
 
 <%



Mime
View raw message