<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/tlds/app.tld" prefix="app" %>
<%@ taglib uri="/WEB-INF/tlds/component.tld" prefix="component" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/component.tld" prefix="component" %>
<%@ page import="com.sun.jade.web.util.BreadCrumbBean" %>

<%
  String sortRule = request.getParameter("sortRule");
  String sortedProperty = request.getParameter("sortedProperty");
  String sortRule3 = request.getParameter("sortRule3");
  String sortedProperty3 = request.getParameter("sortedProperty3");
%>

<app:contentState/>

<html:html locale="true">

<jsp:include page="header.jsp">
  <jsp:param name="title" value="assetsSummary"/>
</jsp:include>

<BODY bgcolor="#FFFFFF" leftmargin="0" marginwidth="0" marginheight="0" topmargin="0">

  <jsp:include page="masthead.jsp">
    <jsp:param name="category"    value="assets"/>
    <jsp:param name="subCategory" value="summary"/>
  </jsp:include>

<%
    java.util.ArrayList breadCrumb = new java.util.ArrayList();
    BreadCrumbBean bcb1 = new BreadCrumbBean();	
    bcb1.setDisplayName("assetsSummary");
    breadCrumb.add(bcb1);
    pageContext.setAttribute("breadCrumbBeanList",breadCrumb);
%>

<component:breadCrumb beanListName = "breadCrumbBeanList" />

<app:healthSummary/>

<app:sortOption/>
<jsp:setProperty name="sortOption" property="beanListName" value="deviceTypeHealths"/>
<jsp:setProperty name="sortOption" property="beanClassName" value="com.sun.jade.web.health.DeviceTypeHealth"/>
<jsp:setProperty name="sortOption" property="propertyList" value="localizedDeviceType,quantity,numWithProblem"/>
<jsp:setProperty name="sortOption" property="sortedProperty" value="<%=sortedProperty%>"/>
<jsp:setProperty name="sortOption" property="sortRule" value="<%=sortRule%>"/>
<app:sort/>

<DIV class="content-layout">
<logic:present name="alertBean" scope="page">
<component:bigHorizontalSpacer />
<component:inlineAlert beanName="alertBean" /> 
</logic:present>

<table cellspacing="0" cellpadding="0" border="0">
<tr><td>
<component:bigHorizontalSpacer />
<div class="table-title-text"><bean:message key="summary"/></div>  
<component:smallHorizontalSpacer />
<component:table propertyList="localizedDeviceTypeWithLink,quantity,numWithProblem" 
                 categoryList="header.category,header.quantity,header.numberWithAlarms" 
                 beanListName="deviceTypeHealths"
                 beanClassName="com.sun.jade.web.health.DeviceTypeHealth" 
	         hasSort="yes" 
                 hasCheckbox="no" checkboxName="null" checkboxValue="null" 
                 wrap="nowrap,nowrap,nowrap"
	         align="left,right,right" width="100%"
                 emptyTableIndication="noDevices"
                 formName="null" sourcePage="healthSummary.jsp" />  

<component:bigHorizontalSpacer />
<div class="table-title-text"><bean:message key="alarms"/></div>
<component:smallHorizontalSpacer />  
<component:table propertyList="quantity,severityWithLink" 
                 categoryList="header.quantity,header.severity" 
                 beanListName="alarmSummary"
                 beanClassName="com.sun.jade.web.notification.AlarmStatisticBean" 
	         hasSort="no" 
                 hasCheckbox="no" checkboxName="null" checkboxValue="null" 
                 wrap="nowrap,nowrap"
	         align="right,left" width="100%"
                 formName="null" sourcePage="healthSummary.jsp" />  

<app:sortOption/>
<jsp:setProperty name="sortOption" property="beanListName" value="errorDevices"/>
<jsp:setProperty name="sortOption" property="beanClassName" value="com.sun.jade.web.health.DeviceHealthBean"/>
<jsp:setProperty name="sortOption" property="propertyList" value="localizedDeviceType,name,alarmNumber,severity"/>
<jsp:setProperty name="sortOption" property="sortedProperty" value="<%=sortedProperty3%>"/>
<jsp:setProperty name="sortOption" property="sortRule" value="<%=sortRule3%>"/>
<app:sort/>

<component:bigHorizontalSpacer />
<div class="table-title-text"><bean:message key="title.defectiveSystemsList"/></div>
<component:smallHorizontalSpacer />
<component:table propertyList="localizedDeviceType,nameWithLink,alarmNumberWithLink,outstandingAlarm,actionsWithLink" 
                 categoryList="header.category,header.logicalName,header.numberOfAlarms,header.outstandingAlarm,header.actions" 
                 dataTypes="normal,link,link,link,action"
                 beanListName="errorDevices"
		 align="left,left,center,left,left" 
                 beanClassName="com.sun.jade.web.health.DeviceHealthBean" 
	         hasSort="yes"  tableIndex="3"  width="100%" 
                 hasCheckbox="no" checkboxName="null" checkboxValue="null"  
                 emptyTableIndication="noDevicesWithAlarms"
                 formName="null" sourcePage="healthSummary.jsp" /> 

</td></tr>
</table>
</DIV>

</BODY>

</html:html>
