<%@page import="com.capgemini.reports.database.manager.MngReport.RunningReportEntry"%>
<%@page import="com.capgemini.reports.quartz.SchedulerServer.JobExecution"%>
<%@page import="com.capgemini.reports.formatting.QueueStatus"%>
<%@page import="java.util.List"%>

<%
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1
response.setHeader("Pragma", "no-cache"); // HTTP 1.0
response.setDateHeader("Expires", 0); // Proxies
%>

<!--
	This page shows:
	- the status of each queue (low priority, med priority, high priority)
	- the report requests that have been delayed to tonight
	- the report schedulings whose execution will trigger tonight.
    This page is requested by the QueueReaderServlet which pre-calculates some data which is provided to this page:
    - 'waitingReports' : the list of all Reports wich are currently in the queue
    - 'quartzJobList'  : the list of all the quartz jobs scheduled tonight
-->
   
<% 
    List<RunningReportEntry> theWaitingReports = (List<RunningReportEntry>) request.getAttribute("waitingReports");
    List<JobExecution> tonightJobs = (List<JobExecution>) request.getAttribute("quartzJobList");
%>
<%= new QueueStatus(theWaitingReports, tonightJobs).makeJsContent() %>