# Call to get uptime info for template.
_UPTIME = %x[uptime]
# Call to get current date for template.
_DATE =%x[date +%Y-%m-%d]

# Main page.
%{
	<HTML> <HEAD> <!-- This HTML file has been created by a ruby servlet -->
	<TITLE>Camera Monitor Interface</TITLE>
	<SCRIPT type="text/javascript">
	<!--
	function redirecter(){
		window.location = "/monitor"
	}
	//-->
	</SCRIPT>
	</HEAD>
	<BODY LINK=#{LINK} ALINK=#{ALINK} VLINK=#{VLINK} BGCOLOR=#{BGCOLOR}  onLoad="setTimeout('redirecter()', 30000)">
	<TABLE border="1" cellpadding="5" >
	<TBODY>
	<TD align="center">
		<A HREF="#{HOMELINK}"><img src="/ifetch.png" width=100 heigth=100 ></A>
		<br>Monitor View
	</TD>
	<TD>
		<CENTER><FONT size=+2>Operation & Action Legend</FONT></Center>
		<TABLE border="0" cellpadding="5" >
		<TBODY>
		<TD>
			<IMG src="/start.jpg" border="0"> - Start collection
			<BR><IMG src="/stop.jpg" border="0"> - Stop collection
			<BR><IMG src="/log.jpg" border="0"> - View log
			<BR><A HREF="/startallcameras"><IMG src="/restart.jpg" border="0"></A> - Start all cameras
			<BR>
		</TD>
		<TD>
			<IMG src="/grey.jpg" border="0"> - Collection offline
			<BR><IMG src="/green.jpg" border="0"> - Collection working
			<BR><IMG src="/red.jpg" border="0"> - Collection in alarm mode
			<BR><IMG src="/mdpplog.jpg" border="0"> - View mdpp
		</TD>
		</TR>
		</TBODY></TABLE>
	</TD>
	</TR>
	<TD align="center" colspan="2" >
		#{_DATE} #{_UPTIME}
	</TD>

	</TBODY></TABLE>
	<TABLE border="1" cellpadding="5" >
	<TBODY>
	<TR>
	<TD>Camera</TD>
	<TD>PID - (Memory) VIRT RES SHR</TD>
	<TD>Actions</TD>
	<TD>Status</TD>
	<TD>Logs</TD>
	<TD>mdpp</TD>
	<TD>Information</TD>
	</TR>
	#{myTempRespond}
	</TBODY></TABLE>
	<P>ifetch-tools version: #{VER}</P>
	</BODY>
	</HTML>
}
