<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
	  
<h1><bean:message key="prompt.schedulerControlForm.title"/></h1>

<bean:define id="scheduler" name="SchedulerChooseForm" property="scheduler"/>
<html:form action="/scheduler/schedulerControl.do" focus="choosenSchedulerName">
<table>
	<tr>
		<td width="200"><bean:message key="prompt.schedulerControlForm.scheduler"/></td>
		<td>
		<html:select name="SchedulerChooseForm" property="choosenSchedulerName" onchange="submit()">
			<bean:define id="schedulers" name="SchedulerChooseForm" property="schedulers"/>
			<html:options collection="schedulers" property="schedulerName" labelProperty="schedulerName"/>
		</html:select>
		</td>
	</tr>
	<tr/>
	<tr>
		<td><bean:message key="prompt.schedulerControlForm.schedulerName"/></td><td><bean:write name="scheduler" property="schedulerName"/></td>
	</tr>
	<tr>
		<td><bean:message key="prompt.schedulerControlForm.schedulerState"/></td><td><bean:write name="scheduler" property="state"/></td>
	</tr>
	<tr>
		<td><bean:message key="prompt.schedulerControlForm.runningSince"/></td><td><bean:write name="scheduler" property="runningSince"/></td>
	</tr>
	<tr>
		<td><bean:message key="prompt.schedulerControlForm.numJobsExecuted"/></td><td><bean:write name="scheduler" property="numJobsExecuted"/></td>
	</tr>
	<tr>
		<td><bean:message key="prompt.schedulerControlForm.persistenceType"/></td><td><bean:write name="scheduler" property="persistenceType"/></td>
	</tr>
	<tr>
		<td><bean:message key="prompt.schedulerControlForm.threadPoolSize"/></td><td><bean:write name="scheduler" property="threadPoolSize"/></td>
	</tr>
	<tr>
		<td><bean:message key="prompt.schedulerControlForm.version"/></td><td><bean:write name="scheduler" property="version"/></td>
	</tr>
	<tr/>
</table>	
<table>
	<tr>
		<td width="30">
			<input type="image" name="start" value="start" src="images/Play24.gif" alt="<bean:message key="prompt.schedulerControlForm.schedulerStart"/>"/>
		</td>
		<td width="30">
			<input type="image" name="pause" value="pause" src="images/Pause24.gif" alt="<bean:message key="prompt.schedulerControlForm.schedulerPause"/>"/></td>
		<td width="30">
			<input type="image" name="stop" value="stop" src="images/Stop24.gif" alt="<bean:message key="prompt.schedulerControlForm.schedulerStop"/>"/>
		</td>
		<td width="30">
			<input type="image" name="waitAndStopScheduler" value="waitAndStopScheduler" src="images/Stop24.gif" alt="<bean:message key="prompt.schedulerControlForm.waitAndStopScheduler"/>"/>	
		</td>
	</tr>
</table>
<p><bean:message key="prompt.schedulerControlForm.setCurrentScheduler"/>
<input type="submit" class="submit" value="<bean:message key="prompt.schedulerControlForm.set"/>" property="btnSetSchedulerAsCurrent"/></p>
</html:form>

<hr/>
<p><bean:message key="prompt.schedulerControlForm.currentRunningJob"/></p>
<table><tr>
<td><bean:message key="prompt.schedulerControlForm.jobGroup"/></td>
<td><bean:message key="prompt.schedulerControlForm.jobName"/></td>
<td><bean:message key="prompt.schedulerControlForm.jobDescription"/></td>
<td><bean:message key="prompt.schedulerControlForm.jobClass"/></td>
</tr>
<logic:notEmpty name="SchedulerChooseForm" property="executingJobs">
<logic:iterate id="job" name="SchedulerChooseForm" property="executingJobs">
	<tr>
		<td><bean:write name="job" property="groupName"/></td>
		<td><bean:write name="job" property="name"/></td>
		<td><bean:write name="job" property="description"/></td>
		<td><bean:write name="job" property="jobClass"/></td>
	</tr>
</logic:iterate>
</logic:notEmpty>
</table>
<table>
	<tr>
		<td width="30">
			<input type="image" name="btnPauseAllJobs" value="btnPauseAllJobs" src="images/Play24.gif" alt="<bean:message key="prompt.schedulerControlForm.btnPauseAllJobs"/>"/>
		</td>
		<td width="30">
			<input type="image" name="btnResumeAllJobs" value="btnResumeAllJobs" src="images/Pause24.gif" alt="<bean:message key="prompt.schedulerControlForm.btnResumeAllJobs"/>"/>
		</td>
	</tr>
</table>
<hr/>

<p><bean:message key="prompt.schedulerControlForm.summary"/><i><pre><bean:write name="scheduler" property="summary"/></pre></i></p>

