<%-- 
 Copyright : All Rights Reserved. Copyright (C) 2006, Hitachi, Ltd. 
 Title     : ServerConductor WebConsole 
 Version   : 08-00 
 Name      : basicSystemCPU.jsp 
 Date      : 2006/06/01 
 Author    : Dharini N
--%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<%@ page language = "java" %>
<%@ page session = "false" %>
<%@ page errorPage = "errorDialog.jsp" %>
<%@ page import = "JP.co.Hitachi.soft.System_Manager.webconsole.common.Const"%>
<%@ page contentType = "text/html; charset = UTF-8" pageEncoding = "UTF-8" %> 
<%@ page import = "java.util.Vector" %>
<%@ taglib prefix = "bean"  uri = "/WEB-INF/struts-bean.tld" %>
<%@ taglib prefix = "html"  uri = "/WEB-INF/struts-html.tld" %>
<%@ taglib prefix = "util"  uri = "/WEB-INF/common-tags.tld" %>
<%@ page import = 
"JP.co.Hitachi.soft.System_Manager.webconsole.model.bean.InventoryDetailListBean"%>
<%@ page import = 
"JP.co.Hitachi.soft.System_Manager.data.HsmConst" %>
<%-- <% response.addHeader("Cache-control","NO CACHE"); %> --%>					<% // 800WA_WEBCONSOLE308 %>
<% response.addHeader("Cache-control","no-cache"); %> 							<% // 800WA_WEBCONSOLE308 %>
<util:checkURL/>

<%-- Get instance of InventoryDetailListBean in request scope--%>
<jsp:useBean id = "InventoryDetailListBean"
class = 
"JP.co.Hitachi.soft.System_Manager.webconsole.model.bean.InventoryDetailListBean" 
scope = "request"/>

<%-- Declaring a vector to store the table data --%>
<%! Vector l_vtDetailInfo = new Vector(); %>

<%-- Get table data vector using instance of InventoryDetailListBean --%>
<% l_vtDetailInfo = InventoryDetailListBean.getDetailInfo(); %>

<%-- Get help string and help url from InventoryDetailListBean --%>
<%
String l_stHelp = (String) l_vtDetailInfo.get(0);
String l_stUrl = (String) l_vtDetailInfo.get(1);
%>

<%-- Get url of help in inventory detail block from the InventoryProperties file
 and set it into the pageContext implicit object as an attribute --%>
<util:set name = "InventoryDetailHelp">
	<bean:message bundle = '<%= Const.MESSAGE_RESOURCES_KEY_INVENTORY %>' 
		key = '<%= l_stUrl %>' />												
</util:set>

<util:set name = "HelpActionClass">
	<util:rewrite action = "help" />
</util:set>

<util:set name = "FnOpenHelp">
	openHelp('<%= pageContext.getAttribute("HelpActionClass").toString() %>',
    '<%= pageContext.getAttribute("InventoryDetailHelp").toString() %>',
    '<%= Const.ATTRIBUTE_REQUEST_HELP_CONTENTS %>',								
    '<%= request.getSession().getId() %>help');									
</util:set>

<util:set name = "ProcessorName">
	<bean:message bundle = '<%= Const.MESSAGE_RESOURCES_KEY_INVENTORY %>' 
		key = 'inventory.detail.cpu.processor.name' />												
</util:set>

<util:set name = "MaximumSpeed">
	<bean:message bundle = '<%= Const.MESSAGE_RESOURCES_KEY_INVENTORY %>' 
		key = 'inventory.detail.cpu.max.speed' />												
</util:set>

<util:set name = "CoProcessorName">
	<bean:message bundle = '<%= Const.MESSAGE_RESOURCES_KEY_INVENTORY %>' 
		key = 'inventory.detail.cpu.coprocessor.name' />												
</util:set>

<util:set name = "InstallationState">
	<bean:message bundle = '<%= Const.MESSAGE_RESOURCES_KEY_INVENTORY %>' 
		key = 'inventory.detail.cpu.installation.state' />												
</util:set>

<util:set name = "TempState">
	<bean:message bundle = '<%= Const.MESSAGE_RESOURCES_KEY_INVENTORY %>' 
		key = 'inventory.detail.cpu.temp' />												
</util:set>

<util:set name = "FanState">
	<bean:message bundle = '<%= Const.MESSAGE_RESOURCES_KEY_INVENTORY %>' 
		key = 'inventory.detail.cpu.fan' />												
</util:set>

<util:set name = "CacheSize">
	<bean:message bundle = '<%= Const.MESSAGE_RESOURCES_KEY_INVENTORY %>' 
		key = 'inventory.detail.cpu.cache.size' />												
</util:set>

<html:html locale = "true">
	<head>
		<link rel = "stylesheet" type = "text/css" href = "css/common.css">
		<script src = "js/header.js"></script>
		<script src = "js/common.js"></script>
	</head>
	<%-- <body> --%>                                                            <% // 800WA_WEBCONSOLE445 %>
	<body onclick = "releaseSelection()">                                       <% // 800WA_WEBCONSOLE445 %>
		<span class = "middle">
			<%-- Get the value of climb trail --%> 				
			<jsp:getProperty name = "InventoryDetailListBean" 
				property = "climbTrail"/>
		</span>
		<div align = "right">
			<html:link href = "#" styleClass = "small" onclick = 
				"<%= pageContext.getAttribute("FnOpenHelp").toString()%>">
	            <bean:message bundle = 
                	'<%= Const.MESSAGE_RESOURCES_KEY_INVENTORY %>' 
	                key = '<%= l_stHelp %>' />			 						
			</html:link>
		</div>
		<hr>

		<%-- Heading of the detail block	--%>
		<div class = "middle" align = "center" style = "margin-bottom:10px">
			<%= request.getParameter("nodeName").toString().trim() %>
		</div>
		
		<%-- Getting the UPS information from vector --%>
		
		<% 	Vector l_vtProc = null;
			if(l_vtDetailInfo.size() >= 3) {									// 800WA_WEBCONSOLE253
			l_vtProc = (Vector) l_vtDetailInfo.get(2); }%>
		
		<table border = "0" width = "80%" align = "center">
		<tr class = "middle">
			<%-- Print the processor name sub title --%> 								
			<td align = "left">
				<%= pageContext.getAttribute("ProcessorName").toString() %>
			</td>
		</tr>
		<tr><td>
		<table border = "1" width = "100%">
		<tr class = "small">
			<%	if(l_vtDetailInfo.size() >= 3) {%>								<% // 800WA_WEBCONSOLE253 %>			
			<td align = "left">
			<%-- <% if(((String) l_vtProc.get(0)).length() != 0) { %> --%>      <% // 800WA_WEBCONSOLE430 %>
				<% if(((String) l_vtProc.get(0)).trim().length() != 0) { %>     <% // 800WA_WEBCONSOLE430 %>
					<%= ((String) l_vtProc.get(0)) %>
					<% }
					else {%>
						&nbsp;
					<% } %>
			</td>
			<% } 								 								// 800WA_WEBCONSOLE253 
			else {	%>															<% // 800WA_WEBCONSOLE253 %>
				<td>&nbsp;</td>													<% // 800WA_WEBCONSOLE253 %>
			<% } %>																<% // 800WA_WEBCONSOLE253 %>					
		</tr>
		</table>
		</td></tr>
		<tr class = "middle">
			<%-- Print the maximum speed sub title --%> 								
			<td align = "left" style = "padding-top:10px">
				<%= pageContext.getAttribute("MaximumSpeed").toString() %>
			</td>
		</tr>
		<tr><td>
		<table border = "1" width = "100%">
		<tr class = "small">
			<%	if(l_vtDetailInfo.size() >= 3) {%>								<% // 800WA_WEBCONSOLE253 %>		
			<td align = "left">
			<%-- <% if(((String) l_vtProc.get(1)).length() != 0) { %> --%>      <% // 800WA_WEBCONSOLE430 %>
				<% if(((String) l_vtProc.get(1)).trim().length() != 0) { %>     <% // 800WA_WEBCONSOLE430 %>
					<%= ((String) l_vtProc.get(1)) %>
					<% }
					else {%>
						&nbsp;
					<% } %>
			</td>
			<% } 								 								// 800WA_WEBCONSOLE253 
			else {	%>															<% // 800WA_WEBCONSOLE253 %>
				<td>&nbsp;</td>													<% // 800WA_WEBCONSOLE253 %>
			<% } %>																<% // 800WA_WEBCONSOLE253 %>								
		</tr>
		</table>
		</td></tr>
		<tr class = "middle">
			<%-- Print the processor name sub title --%> 								
			<td align = "left" style = "padding-top:10px">
				<%= pageContext.getAttribute("CoProcessorName").toString() %>
			</td>
		</tr>
		<tr><td>
		<table border = "1" width = "100%">
		<tr class = "small">
			<%	if(l_vtDetailInfo.size() >= 3) {%>								<% // 800WA_WEBCONSOLE253 %>		
			<td align = "left">
			<%-- <% if(((String) l_vtProc.get(2)).length() != 0) { %> --%>      <% // 800WA_WEBCONSOLE430 %>
				<% if(((String) l_vtProc.get(2)).trim().length() != 0) { %>     <% // 800WA_WEBCONSOLE430 %>
					<%= ((String) l_vtProc.get(2)) %>
					<% }
					else {%>
						&nbsp;
					<% } %>
			</td>
			<% } 								 								// 800WA_WEBCONSOLE253 
			else {	%>															<% // 800WA_WEBCONSOLE253 %>
				<td>&nbsp;</td>													<% // 800WA_WEBCONSOLE253 %>
			<% } %>																<% // 800WA_WEBCONSOLE253 %>								
		</tr>
		</table>
		</td></tr>
		<tr>
			<td align = "left" class = "middle" style = "padding-top:10px">
				<%= pageContext.getAttribute("InstallationState").toString() %>
			</td>
		</tr>
		<tr><td>
			<table border = "1" width = "100%">
			<%-- Getting the installation state vector --%>
			<% if(l_vtDetailInfo.size() >= 4) {									// 800WA_WEBCONSOLE253
			Vector l_vtInst = (Vector) l_vtDetailInfo.get(3); %>			
			<tr class = "small">
			<% // for(int l_iCount = 2;l_iCount <= l_vtInst.size();             // 800WA_WEBCONSOLE497
				for(int l_iCount = 0;l_iCount < l_vtInst.size();                // 800WA_WEBCONSOLE497
				l_iCount = l_iCount + 2) {%>
				   <td align = "left">
						<%= l_iCount/2 %>
					</td>
				<% } %>
			</tr>
			<tr class = "small">
			<% for(int l_iCount = 0;l_iCount < l_vtInst.size(); 
				l_iCount = l_iCount + 2) {%>
				   <td align = "left">
					<html:img src = '<%= (String) l_vtInst.get(l_iCount) %>' 
	    				  alt = '<%= (String) l_vtInst.get(l_iCount + 1) %>'/>
					</td>
				<% } %>
			</tr>
			<% } 																// 800WA_WEBCONSOLE253
			else { %>															<% 	// 800WA_WEBCONSOLE253 %>
				<tr><td>&nbsp;</td></tr>										<% 	// 800WA_WEBCONSOLE253 %>
				<tr><td>&nbsp;</td></tr>										<% 	// 800WA_WEBCONSOLE253 %>
			<% } %>																<% 	// 800WA_WEBCONSOLE253 %>
			</table>
		<tr>
			<td align = "left" class = "middle" style = "padding-top:10px">
				<%= pageContext.getAttribute("TempState").toString() %>
			</td>
		</tr>
		<tr><td>
			<table border = "1" width = "100%">
			<%-- Getting the temperature state vector --%>
			<% if(l_vtDetailInfo.size() >= 5) {									// 800WA_WEBCONSOLE253
			 Vector l_vtTemp = (Vector) l_vtDetailInfo.get(4); %>
			<tr class = "small">
			<% // for(int l_iCount = 2;l_iCount <= l_vtTemp.size();             // 800WA_WEBCONSOLE497
				for(int l_iCount = 0;l_iCount < l_vtTemp.size();                // 800WA_WEBCONSOLE497
				l_iCount = l_iCount + 2) {%>
				   <td align = "left">
						<%= l_iCount/2 %>
					</td>
				<% } %>
			</tr>
			<tr class = "small">
			<% for(int l_iCount = 0;l_iCount < l_vtTemp.size(); 
				l_iCount = l_iCount + 2) {%>
				   <td align = "left">
					<html:img src = '<%= (String) l_vtTemp.get(l_iCount) %>' 
	    				  alt = '<%= (String) l_vtTemp.get(l_iCount + 1) %>'/>
					</td>
				<% } %>
			</tr>
			<% } 																// 800WA_WEBCONSOLE253
			else { %>															<% 	// 800WA_WEBCONSOLE253 %>
				<tr><td>&nbsp;</td></tr>										<% 	// 800WA_WEBCONSOLE253 %>
				<tr><td>&nbsp;</td></tr>										<% 	// 800WA_WEBCONSOLE253 %>
			<% } %>																<% 	// 800WA_WEBCONSOLE253 %>
			
			</table>
		<tr>
			<td align = "left" class = "middle" style = "padding-top:10px">
				<%= pageContext.getAttribute("FanState").toString() %>
			</td>
		</tr>
		<tr><td>
			<table border = "1" width = "100%">
			<%-- Getting the fan state vector --%>
			<% if(l_vtDetailInfo.size() >= 6) {									// 800WA_WEBCONSOLE253			
			 Vector l_vtFan = (Vector) l_vtDetailInfo.get(5); %>

			<tr class = "small">
			<% // for(int l_iCount = 2;l_iCount <= l_vtFan.size();              // 800WA_WEBCONSOLE497
			    for(int l_iCount = 0;l_iCount < l_vtFan.size();                 // 800WA_WEBCONSOLE497
				l_iCount = l_iCount + 2) {%>
				   <td align = "left">
						<%= l_iCount/2 %>
					</td>
				<% } %>
			</tr>
			<tr class = "small">
			<% for(int l_iCount = 0;l_iCount < l_vtFan.size(); 
				l_iCount = l_iCount + 2) {%>
				   <td align = "left">
					<html:img src = '<%= (String) l_vtFan.get(l_iCount) %>' 
	    				  alt = '<%= (String) l_vtFan.get(l_iCount + 1) %>'/>
					</td>
				<% } %>
			</tr>
			<% } 																// 800WA_WEBCONSOLE253
			else { %>															<% 	// 800WA_WEBCONSOLE253 %>
				<tr><td>&nbsp;</td></tr>										<% 	// 800WA_WEBCONSOLE253 %>
				<tr><td>&nbsp;</td></tr>										<% 	// 800WA_WEBCONSOLE253 %>
			<% } %>																<% 	// 800WA_WEBCONSOLE253 %>
			</table>
		<tr class = "middle">
			<%-- Print the cache size sub title --%> 								
			<td align = "left" style = "padding-top:10px">
				<%= pageContext.getAttribute("CacheSize").toString() %>
			</td>
		</tr>
		<tr><td>
		<table border = "1" width = "100%">
		<tr class = "small">
			<%	if(l_vtDetailInfo.size() >= 3) {%>								<% // 800WA_WEBCONSOLE253 %>		
			<td align = "left">
			<%-- <% if(((String) l_vtProc.get(3)).length() != 0) { %> --%>      <% // 800WA_WEBCONSOLE430 %>
				<% if(((String) l_vtProc.get(3)).trim().length() != 0) { %>     <% // 800WA_WEBCONSOLE430 %>
					<%= ((String) l_vtProc.get(3)) %>
					<% }
					else {%>
						&nbsp;
					<% } %>
			</td>
			<% } 								 								// 800WA_WEBCONSOLE253 
			else {	%>															<% // 800WA_WEBCONSOLE253 %>
				<td>&nbsp;</td>													<% // 800WA_WEBCONSOLE253 %>
			<% } %>																<% // 800WA_WEBCONSOLE253 %>			
		</tr>
		</table>
		</td></tr>
	</td></tr>
	</table>
	</body>
</html:html>