<%--
 Copyright : All Rights Reserved. Copyright (C) 2006, Hitachi, Ltd.
 Title     : ServerConductor WebConsole
 Version   : 08-00
 Name      : envAgtNet.jsp
 Date      : 26-04-06
 Author    : SivaRajan.S.K.A
 --%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<%@ page language = "java" %>
<%@ page errorPage = "errorDialog.jsp" %>
<%@ page import = 
"JP.co.Hitachi.soft.System_Manager.webconsole.common.Const"%>
<%@ page import =
"JP.co.Hitachi.soft.System_Manager.webconsole.common.MessageConstant"%>
<%@ page contentType = "text/html; charset = UTF-8" pageEncoding = "UTF-8" %>
<%@ taglib uri = "/WEB-INF/struts-html.tld" prefix = "html" %>
<%@ taglib uri = "/WEB-INF/struts-bean.tld" prefix = "bean" %>
<%@ taglib uri = "/WEB-INF/struts-logic.tld" prefix = "logic" %>
<%@ taglib uri = "/WEB-INF/common-tags.tld" prefix = "util" %>
<% response.addHeader("Cache-Control","no-cache"); %>
<jsp:useBean id="AgentNetworkSettingBean"
class="JP.co.Hitachi.soft.System_Manager.webconsole.model.bean.AgentNetworkSettingBean" 
scope="request"/>

<util:checkURL/> 
<html:html locale = "true">
    <title></title>
    <head>        
        <script src = "js/common.js"> </script>                                 <% //800WA_WEBCONSOLE192 %>    
        <SCRIPT src = "js/envSet.js"></SCRIPT>
        <link rel = "stylesheet" type = "text/css" href = "css/common.css">
    </head>

    <body onload = "document.forms[0].cmdTimeOut.focus();setLoadAgtNet();">
        <%-- <html:form action = "AgentNetworkSettingAction"> --%>              <%-- 800WA_WEBCONSOLE451 --%>
        <html:form action = "AgentNetworkSettingAction" 
            onsubmit = "return validateAgtNetForm();">                          <%-- 800WA_WEBCONSOLE451 --%>
           <table border = "0" cellspacing = "0" cellpadding = "3" 
                                                                 width = 100%>  
       <%-- <!-- Command TimeOut Value Part  --> --%>                           <% // 800WA_WEBCONSOLE300 %>
             <tr> 
                <td align = "left" width = "50%">
                   <span class = "small">
                      <bean:message 
                          bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
                          key = "envagt.detail.command.timeout"/>
                   </span>
                </td>
              <td align = "left" width = "50%">
                   <%-- <html:text property = "cmdTimeOut" maxlength = "3"
                   onchange = "isNetValueChanged();setObject(this);" 
                   onblur="removeSelection(this);"
                   size = "10" 
                         styleClass = "small" /> --%>                           <% // 800WA_WEBCONSOLE319 %> <% // 800WA_WEBCONSOLE371 %><% // 800WA_WEBCONSOLE409 %><%-- 800WA_WEBCONSOLE452 --%>
                   <html:text property = "cmdTimeOut" maxlength = "3"
                   onchange = "isNetValueChanged();setObject(this);" 
                   onblur="setNetHasChanged();removeSelection(this);"
                   size = "10" 
                         styleClass = "small" />                                <%-- 800WA_WEBCONSOLE452 --%>
                 <span class = "small">                                         <% // 800WA_WEBCONSOLE319 %>                      
                   <bean:message
                         bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"  
                         key = "envagt.detail.timeout.second"/>                 <% // 800WA_WEBCONSOLE426 %>
                 </span>                                                         <% // 800WA_WEBCONSOLE319 %>
             </td>
          </tr>
                         <%-- <!-- KeepAlive Interval Part --> --%>             <% // 800WA_WEBCONSOLE300 %>
          <tr>
             <td align = "left" width = "50%">
                <%-- <html:multibox property = "keepAliveFlag" value = "true"
                   onclick = 'setEnabledAgtNet
                               (document.forms[0].keepAliveFlag.checked);
                                removeSelection(keepAliveInterval);' /> --%>    <% // 800WA_WEBCONSOLE409 %><%-- 800WA_WEBCONSOLE479  --%>
                <html:multibox property = "keepAliveFlag" value = "true"
                   onclick = 'setEnabledAgtNet
                               (document.forms[0].keepAliveFlag.checked);
                         removeSelection(keepAliveInterval);setObject(this);' /><%-- 800WA_WEBCONSOLE479  --%>
                 <span class = "small">
                    <bean:message
                         bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>" 
                         key = "envagt.detail.keep.alive"/>
                 </span>
             </td>
             <td align="left" width="30%">
                 <html:text property = "keepAliveInterval" 
             onchange = "isNetValueChanged();setObject(this);" disabled = "true" 
                       size = "10"  maxlength = "4" styleClass = "small" />     <% // 800WA_WEBCONSOLE319 %> <% // 800WA_WEBCONSOLE371 %>
                  <span class = "small">
                      <bean:message 
                          bundle = "<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>" 
                          key = "envagt.detail.keep.alive.second"/>
                 </span>        
             </td>
             <input type = "hidden" name = "hdnKeepAlive" >                     <% //800WA_WEBCONSOLE203 %> 
             <input type = "hidden" name = "hdnCmdTimeOut" >                    <%-- 800WA_WEBCONSOLE452 --%>
        </tr> 
        <%-- <tr><td>&nbsp;</td></tr> --%>                                      <%-- 800WA_WEBCONSOLE404 --%><%-- 800WA_WEBCONSOLE428 --%>
        <tr>                                                                    <%-- 800WA_WEBCONSOLE404 --%>
            <td  colspan = "2" align = "right" valign = "top">                  <%-- 800WA_WEBCONSOLE404 --%>
                <%-- <html:submit property = "submit" styleClass = "small"
                    onclick = "return validateAgtNetForm();"> --%>              <%-- 800WA_WEBCONSOLE404 --%><%-- 800WA_WEBCONSOLE451 --%>
                <%-- <html:submit property = "submit" styleClass = "small"> --%><%-- 800WA_WEBCONSOLE451 --%><%-- 800WA_WEBCONSOLE457 --%>
                <html:submit property = "submit" styleClass = "small" 
                      disabled = "true">                                        <%-- 800WA_WEBCONSOLE457 --%>
                    <bean:message  
                        bundle ="<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"
                        key ='envagt.common.set.button'/>                       <%-- 800WA_WEBCONSOLE404 --%>
                </html:submit>                                                  <%-- 800WA_WEBCONSOLE404 --%>
            <%-- <td>  --%>                                                     <%-- 800WA_WEBCONSOLE404 --%><%-- 800WA_WEBCONSOLE443 --%>
            </td>                                                               <%-- 800WA_WEBCONSOLE443 --%> 
        </tr>                                                                   <%-- 800WA_WEBCONSOLE404 --%>
   </table>
       <%-- <div align = "right" class = "small"> --%>                          <%-- 800WA_WEBCONSOLE404 --%>
          <%-- <html:submit property = "submit" styleClass = "small"
               onclick = "return validateAgtNetForm();"> --%>                   <% //800WA_WEBCONSOLE316 %><%-- 800WA_WEBCONSOLE404 --%>
               <%-- <bean:message  
                   bundle ="<%= Const.MESSAGE_RESOURCES_KEY_AGENT%>"
                   key ='envagt.common.set.button'/> --%>                       <%-- 800WA_WEBCONSOLE404 --%>
            <%-- </html:submit> --%>                                            <%-- 800WA_WEBCONSOLE404 --%>
       <%-- </div> --%>                                                         <%-- 800WA_WEBCONSOLE404 --%>
 <util:set name = "errorArray"> 
        var errorMsg = new Array(); 
        var MSG_AGENT_TIMEOUT_CHECK = 
                          "<%=MessageConstant.MSG_AGENT_TIMEOUT_CHECK %>"; 
        var MSG_KEEPALIVE_CHECK = 
                            "<%=MessageConstant.MSG_KEEPALIVE_CHECK %>"; 
        var MSG_COMMON_POSITIVE_INTEGER_CHECK = 
                "<%=MessageConstant.MSG_COMMON_POSITIVE_INTEGER_CHECK %>"; 
        var MSG_COMMON_RANGE_CHECK = 
                            "<%=MessageConstant.MSG_COMMON_RANGE_CHECK %>"; 
      <%-- <!-- Textname.minimum and maximum values of Command Timeout --> --%> <% // 800WA_WEBCONSOLE300 %>
        var AGENT_NETWORK_CMDTIMEOUT_MIN_VALUE = 
                             "<%=Const.AGENT_NETWORK_CMDTIMEOUT_MIN_VALUE%>";
        var AGENT_NETWORK_CMDTIMEOUT_MAX_VALUE = 
                             "<%=Const.AGENT_NETWORK_CMDTIMEOUT_MAX_VALUE %>";
        var AGENT_NETWORK_CMDTIMEOUT_TEXT_NAME = 
                             "<%=Const.AGENT_NETWORK_CMDTIMEOUT_TEXT_NAME%>";

     <%-- <!-- Textname.minimum and maximum values of Keepalive Interval--> --%><% // 800WA_WEBCONSOLE300 %> 
        var AGENT_NETWORK_KEEPALIVE_MIN_VALUE = 
                              "<%=Const.AGENT_NETWORK_KEEPALIVE_MIN_VALUE%>";
        var AGENT_NETWORK_KEEPALIVE_MAX_VALUE = 
                            "<%=Const.AGENT_NETWORK_KEEPALIVE_MAX_VALUE %>";
        var AGENT_NETWORK_KEEPALIVE_TEXT_NAME =
                             "<%=Const.AGENT_NETWORK_KEEPALIVE_TEXT_NAME%>";

  <%-- <!-- Error message for no input of Commandtimeout text field --> --%>    <% // 800WA_WEBCONSOLE300 %>
     errorMsg[MSG_AGENT_TIMEOUT_CHECK]  = 
       '<bean:message bundle = "<%=Const.MESSAGE_RESOURCES_KEY_ERRMESSAGE%>" 
         key = "<%=MessageConstant.MSG_AGENT_TIMEOUT_CHECK %>"/>'; 

     <%-- <!-- Error message for no input of Keepalive text field --> --%>      <% // 800WA_WEBCONSOLE300 %>
    errorMsg[MSG_KEEPALIVE_CHECK] = 
     '<bean:message bundle = "<%=Const.MESSAGE_RESOURCES_KEY_ERRMESSAGE%>" 
      key = "<%=MessageConstant.MSG_KEEPALIVE_CHECK %>"/>'; 
    
<%-- <!-- Error message for not giving positive integer in both text fields --> --%> <% // 800WA_WEBCONSOLE300 %>
    errorMsg[MSG_COMMON_POSITIVE_INTEGER_CHECK] = 
      '<bean:message 
          bundle = "<%=Const.MESSAGE_RESOURCES_KEY_ERRMESSAGE%>" 
          key = "<%=MessageConstant.MSG_COMMON_POSITIVE_INTEGER_CHECK %>" 
          arg0 = "{0}"/>'; 
        
    <%-- <!-- Error message for range check for both fields --> --%>            <% // 800WA_WEBCONSOLE300 %>
    errorMsg[MSG_COMMON_RANGE_CHECK] = '<bean:message 
        bundle = "<%=Const.MESSAGE_RESOURCES_KEY_ERRMESSAGE%>" 
        key = "<%=MessageConstant.MSG_COMMON_RANGE_CHECK %>" 
        arg0 = "{0}" arg1 = "{1}" arg2 = "{2}"/>'; 
  </util:set> 
    <input type = "hidden" name = "hdnNodeId" value = "">        
    <script >
            var CmdTimeOutGet = 
                      '<%=AgentNetworkSettingBean.getCmdTimeOut() %>'
            var KeepAliveIntervalGet =
                  '<%=AgentNetworkSettingBean.getKeepAliveInterval() %>'
            var KeepAliveIntervalFlagGet =
                  '<%=AgentNetworkSettingBean.isKeepAliveFlag() %>'
            var nodeId = '<%= AgentNetworkSettingBean.getNodeId() %>'
            
          var errorMsg = new Array();
              <%=pageContext.getAttribute("errorArray").toString()%>
            document.forms[0].submit.disabled = false;                          <%-- 800WA_WEBCONSOLE457 --%>
        </script>        
     </html:form> 
  </body>
</html:html>