<%-- 
 Copyright : All Rights Reserved. Copyright (C) 2006, Hitachi, Ltd. 
 Title     : ServerConductor WebConsole 
 Version   : 08-00 
 Name      : complete.jsp 
 Date      : 2006/04/10 
 Author    : Annie.J
--%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page session = "false" %>
<%@ page import = "JP.co.Hitachi.soft.System_Manager.webconsole.common.Const"%>
<%@ 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 contentType = "text/html; charset = UTF-8" pageEncoding = "UTF-8" %> 
<% response.addHeader("Cache-control","NO CACHE"); %>							<% // 800WA_WEBCONSOLE308 %>
<% response.addHeader("Cache-control","no-cache"); %>							<% // 800WA_WEBCONSOLE308 %>
<util:checkURL/> 	 
<html:html locale = "true"> 
<head>
<script src = "js/common.js"></script>
<script src = "js/header.js"></script>											<% // 800WA_WEBCONSOLE292 %>
<link rel = "stylesheet" type = "text/css" href = "css/header.css">
<link rel = "stylesheet" type = "text/css" href = "css/common.css">
</head>
<body>
  
<table width = "100%" align = "left" border = "0" cellspacing = "0" >
<tr>
 <td>
   <jsp:useBean id = "CompletionBean" scope = "request"
class = "JP.co.Hitachi.soft.System_Manager.webconsole.model.bean.CompletionBean"/>
  <table width = "100%" align = "left" border = "0" cellspacing = "0" >
 
<%-- Get the location of groupListFrame and set it into 
     the pageContext implicit object as an attribute" --%>	 
<util:set name = "location">
  <util:rewrite action = "groupList"/>
</util:set>

    <%-- Completion screen  for group create functionality --%> 

<%
  	 
	  int comptype = CompletionBean.getCompletionScreenType();
	  if( comptype == Const.COMPLETION_SCREEN_TYPE_GROUP_CREATE )
	{
%>
	<script>
	try{                                                                        // 800WA_WEBCONSOLE364
	if (parent.opener.parent.frames['groupListFrame'] != null){                 // 800WA_WEBCONSOLE364
       parent.opener.parent.frames['groupListFrame'].location = 
                '<%= pageContext.getAttribute("location").toString() %>';		
    }                                                                           // 800WA_WEBCONSOLE364
    }catch(Exception){                                                          // 800WA_WEBCONSOLE364
    }                                                                           // 800WA_WEBCONSOLE364
	</script>

<%--  <tr>      --%>                                                            <% // 800WA_WEBCONSOLE434 %>
<%--	    <td align = "right">    --%>                                        <% // 800WA_WEBCONSOLE434 %>
	    
<%--	    	<util:set name = "GroupCreateHelpUrl">                          <% // 800WA_WEBCONSOLE434 %>                        
                  openHelp('<util:rewrite action = "help"/>',
                        '<bean:message 
                          bundle = "<%= Const.MESSAGE_RESOURCES_KEY_GROUP %>" 
                          key = "group.create.climb.trail.help"/>',
                        '<%= Const.ATTRIBUTE_REQUEST_HELP_CONTENTS%>',
                        '<%= request.getSession().getId() %>help');
            </util:set>		--%>												<% // 800WA_WEBCONSOLE292 %><% // 800WA_WEBCONSOLE434 %>
	    
<%--		<util:set name = "GroupCreateHelpUrl">                              <% // 800WA_WEBCONSOLE434 %>
			   openHelp('<bean:message bundle = "<%= Const.MESSAGE_RESOURCES_KEY_GROUP %>" 
				 key = "group.create.climb.trail.help" />')
		    </util:set>											--%>			<% // 800WA_WEBCONSOLE292 %><% // 800WA_WEBCONSOLE434 %>
<%--		    <html:link href = "#" styleClass = "small"                      <% // 800WA_WEBCONSOLE434 %>
			   onclick ='<%=pageContext.getAttribute("GroupCreateHelpUrl")
			                                                    .toString()%>'>
			   <bean:message bundle = "<%= Const.MESSAGE_RESOURCES_KEY_GROUP %>"
			                            key = "group.create.climb.trail.help"/>
			</html:link>--%>                                                    <% // 800WA_WEBCONSOLE434 %>
<%--	    </td>     --%>                                                      <% // 800WA_WEBCONSOLE434 %>
<%--  </tr>                    --%>                                             <% // 800WA_WEBCONSOLE434 %>
  <br>                                                                          <% // 800WA_WEBCONSOLE434 %>
  <tr>
<%--	    <td styleClass = "small">				--%>						<% // 800WA_WEBCONSOLE284 %>
			<td class = "small">												<% // 800WA_WEBCONSOLE284 %>
		       <%= CompletionBean.getCompletionMessage()%>
		    </td>
  </tr>
  <tr>
	    <td align = "right">
				
	        <util:set name = "close">
			   <bean:message bundle = "<%= Const.MESSAGE_RESOURCES_KEY_GROUP %>"  
			                                      key="group.create.close" />
	        </util:set>
			<html:button property = "Close" styleClass = "small" 
			    	value = "<%= pageContext.getAttribute("close").toString()%>" 
										        onclick = "closeClick()"/>
			<script> Close.focus(); </script>									<% // 800WA_WEBCONSOLE295 %>
        </td>
  </tr>
    <%-- Compeltion screen  for group edit functionality --%> 

<%	
    		
	
	}
	  else if( comptype == Const.COMPLETION_SCREEN_TYPE_GROUP_EDIT  ) 	
	{
%>
	<script>
	try{                                                                        // 800WA_WEBCONSOLE364
	if (parent.opener.parent.frames['groupListFrame'] != null){                 // 800WA_WEBCONSOLE364
       parent.opener.parent.frames['groupListFrame'].location = 
                '<%= pageContext.getAttribute("location").toString() %>';		
    }                                                                           // 800WA_WEBCONSOLE364
    }catch(Exception){                                                          // 800WA_WEBCONSOLE364
    }                                                                           // 800WA_WEBCONSOLE364
	</script>
	
<%--  <tr>    --%>                                                              <% // 800WA_WEBCONSOLE434 %>
<%--		<td align = "right">     --%>                                       <% // 800WA_WEBCONSOLE434 %>
		
<%--			<util:set name = "GroupnameEditHelpUrl">                        <% // 800WA_WEBCONSOLE434 %>
                  openHelp('<util:rewrite action = "help"/>',
                        '<bean:message 
                          bundle = "<%= Const.MESSAGE_RESOURCES_KEY_GROUP %>" 
                          key = "group.name.edit.climb.trail.help"/>',
                        '<%= Const.ATTRIBUTE_REQUEST_HELP_CONTENTS%>',
                        '<%= request.getSession().getId() %>help');
            </util:set>		    --%>											<% // 800WA_WEBCONSOLE292 %><% // 800WA_WEBCONSOLE434 %>
            
<%--	    <util:set name = "GroupnameEditHelpUrl">                            
			 openHelp('<bean:message bundle = "<%= Const.MESSAGE_RESOURCES_KEY_GROUP %>"
				                   key = "group.name.edit.climb.trail.help" />')
			</util:set>										--%>				<% // 800WA_WEBCONSOLE292 %>
				
<%--			<html:link href = "#" styleClass = "small"                      <% // 800WA_WEBCONSOLE434 %>
				 onclick = '<%=pageContext.getAttribute("GroupnameEditHelpUrl")
				                                                 .toString()%>'>
	     		 <bean:message bundle = "<%= Const.MESSAGE_RESOURCES_KEY_GROUP %>" 
	     			             key = "group.name.edit.climb.trail.help"/>
		    </html:link>    --%>                                                <% // 800WA_WEBCONSOLE434 %>
<%--		</td>     --%>                                                      <% // 800WA_WEBCONSOLE434 %>
<%--  </tr>       --%>                                                          <% // 800WA_WEBCONSOLE434 %>
  <br>                                                                          <% // 800WA_WEBCONSOLE434 %>
  <tr>
<%--       <td styleClass = "small">		--%>								<% // 800WA_WEBCONSOLE284 %>
		   <td class = "small">       											<% // 800WA_WEBCONSOLE284 %>
		       <%= CompletionBean.getCompletionMessage()%>
	    </td>
  </tr>
  <tr>
		<td align = "right"> 
				
			<util:set name = "close">
			   <bean:message bundle = "<%= Const.MESSAGE_RESOURCES_KEY_GROUP %>"
			                                 key = "group.name.edit.close"/>
			</util:set>
				
			<html:button property = "Close" styleClass = "small" 
				 value = "<%= pageContext.getAttribute("close").toString()%>" 
									     onclick="closeClick()"/>
			<script> Close.focus(); </script>									<% // 800WA_WEBCONSOLE295 %>									     
		</td>
  </tr>

    <%-- Compeltion screen  for group machine add functionality --%>

<%
   
	
	} 
	  else if( comptype == Const.COMPLETION_SCREEN_TYPE_MACHINE_ADD ) 
	{
%>

	<script>
	try{                                                                        // 800WA_WEBCONSOLE364
	if (parent.opener.parent.frames['groupListFrame'] != null){                 // 800WA_WEBCONSOLE364
       parent.opener.parent.frames['groupListFrame'].location = 
                '<%= pageContext.getAttribute("location").toString() %>';		
    }                                                                           // 800WA_WEBCONSOLE364
    }catch(Exception){                                                          // 800WA_WEBCONSOLE364
    }                                                                           // 800WA_WEBCONSOLE364
	</script>
	
<%--  <tr>   --%>                                                               <% // 800WA_WEBCONSOLE434 %> 
<%--		<td align = "right">      --%>                                      <% // 800WA_WEBCONSOLE434 %>
<%--			<util:set name = "GroupMachineAddHelp">                         <% // 800WA_WEBCONSOLE434 %>
                  openHelp('<util:rewrite action = "help"/>',
                        '<bean:message 
                          bundle = "<%= Const.MESSAGE_RESOURCES_KEY_GROUP %>" 
                          key = "group.add.machine.climb.trail.help"/>',
                        '<%= Const.ATTRIBUTE_REQUEST_HELP_CONTENTS%>',
                        '<%= request.getSession().getId() %>help');
            </util:set>		--%>											    <% // 800WA_WEBCONSOLE292 %><% // 800WA_WEBCONSOLE434 %>
			
<%--		<util:set name = "GroupMachineAddHelp123">                          
			  openHelp('<bean:message bundle = "<%= Const.MESSAGE_RESOURCES_KEY_GROUP %>" 
				             key = "group.add.machine.climb.trail.help" />')
			</util:set>	 				--%>									<% // 800WA_WEBCONSOLE292 %>
<%--			<html:link href = "#" styleClass = "small"                      <% // 800WA_WEBCONSOLE434 %>
			   onclick ='<%=pageContext.getAttribute("GroupMachineAddHelp")
			                                                     .toString()%>'>
			     <bean:message bundle='<%= Const.MESSAGE_RESOURCES_KEY_GROUP %>' 
			                    key="group.add.machine.climb.trail.help"/>
			</html:link>     --%>                                               <% // 800WA_WEBCONSOLE434 %>
<%--		</td>           --%>                                                <% // 800WA_WEBCONSOLE434 %>
<%--  </tr>       --%>                                                          <% // 800WA_WEBCONSOLE434 %>
  <br>                                                                          <% // 800WA_WEBCONSOLE434 %>
  <tr>
<%--  		<td>				--%>											<% // 800WA_WEBCONSOLE284 %>
	   <td class = "small">       												<% // 800WA_WEBCONSOLE284 %>  			 <%= CompletionBean.getCompletionMessage()%>
  		</td>
  </tr>
  <tr>
		<td align = "right">
			<util:set name = "close">
 			   <bean:message bundle = "<%= Const.MESSAGE_RESOURCES_KEY_GROUP %>"
 			                                key = "group.add.machine.close" />
			</util:set>
			<html:button property = "Close" styleClass = "small"
            		value = '<%= pageContext.getAttribute("close").toString()%>' 
    				                    onclick = "closeClick()"/>
    		<util:set name = "continue">
	 		  <bean:message bundle = "<%= Const.MESSAGE_RESOURCES_KEY_INTERNAL %>"
	 		                             key = "internal.common.continue.button"/>
			</util:set>
			<html:button property = "continue" styleClass = "small"
        		 value = '<%= pageContext.getAttribute("continue").toString() %>' 
                						onclick = "continueClick('machineAdd.do');"/>
			<script> Close.focus(); </script>									<% // 800WA_WEBCONSOLE295 %>                						
        </td>
  </tr> 
    <%-- Compeltion screen is displayed for webconsole alert setting functionality --%>

<%
 
	} 
	  else if( comptype == Const.COMPLETION_SCREEN_TYPE_WEBCONSOLE_ALERT_SETTING )
	{ 
%>
  <tr>
<%--  		<td>				--%>											<% // 800WA_WEBCONSOLE284 %>
	   <td class = "small">       												<% // 800WA_WEBCONSOLE284 %>  			<%= CompletionBean.getCompletionMessage()%>
  		</td>
  </tr>
    <%-- Compeltion screen  for manager network setting functionality --%>	

<%

	} 
	  else if( comptype == Const.COMPLETION_SCREEN_TYPE_MANAGER_NETWORK_SETTING )
	{ 
%>
  <tr>
<%--  		<td>				--%>											<% // 800WA_WEBCONSOLE284 %>
	   <td class = "small">       												<% // 800WA_WEBCONSOLE284 %>  			<%= CompletionBean.getCompletionMessage()%>
  		</td>
  </tr>	
 
    <%-- Compeltion screen  for agent network setting functionality --%>
<%
 
	
	}
	 else if( comptype == Const.COMPLETION_SCREEN_TYPE_AGENT_NETWORK_SETTING )
	{ 
%>
  <tr>
<%--  		<td>				--%>											<% // 800WA_WEBCONSOLE284 %>
	   <td class = "small">       												<% // 800WA_WEBCONSOLE284 %>  			<%= CompletionBean.getCompletionMessage()%>
  		</td>
  </tr>	
    <%-- Compeltion screen  for agent alert setting functionality
				    or agent usage rate setting --%>

<%
 
	} 
	else if( comptype == Const.COMPLETION_SCREEN_TYPE_AGENT_ALERT_SETTING ||
             comptype == Const.COMPLETION_SCREEN_TYPE_AGENT_USAGERATE_SETTING )
	{ 
%>
  <tr>
<%--  		<td>				--%>											<% // 800WA_WEBCONSOLE284 %>
	   <td class = "small">       												<% // 800WA_WEBCONSOLE284 %>  			<%= CompletionBean.getCompletionMessage()%>
  		</td>
  </tr>	 
 
  <%-- Compeltion screen  for agent alert attribute setting functionality --%>    

<%

	} 
	  else if( comptype == Const.COMPLETION_SCREEN_TYPE_AGENT_ALERTATTR_SETTING ) 
	{ 
%>
  <tr>
<%--  		<td>				--%>											<% // 800WA_WEBCONSOLE284 %>
	   <td class = "small">       												<% // 800WA_WEBCONSOLE284 %>  			<%= CompletionBean.getCompletionMessage()%>
  		</td>
		<td align = "right">
            <util:set name = "continue">
                 <bean:message
                  bundle = "<%= Const.MESSAGE_RESOURCES_KEY_INTERNAL %>" 
                  key = "internal.common.continue.button" />
            </util:set>
            <util:set name = "AgentAlertAttributeURL">
                 window.open('<util:rewrite 
                 action = "AgentAlertAttributeGetAction"/>?hostName=<%= 
                 request.getParameter("hostName") %>&hdnNodeId=<%= 
                 request.getParameter("hdnNodeId")%>', '_self');
            </util:set>
            <html:button property = "continue" styleClass = "small" 
                 value = "<%= pageContext.getAttribute("continue").toString()%>"
                 onclick = "<%= pageContext
                         .getAttribute("AgentAlertAttributeURL").toString()%>"/>
		</td>
  </tr>
<%-- Compeltion screen  for agent registration functionality --%> 
<%

	}  
	  else 
	{ 
%>
	<script>
	try{                                                                        // 800WA_WEBCONSOLE364
    if(window.parent.opener != null){                                           // 800WA_WEBCONSOLE364
		window.parent.opener.reload();
    }                                                                           // 800WA_WEBCONSOLE364
    }catch(Exception){                                                          // 800WA_WEBCONSOLE364
    }                                                                           // 800WA_WEBCONSOLE364
	</script>

<%--  <tr>   --%>                                                               <% // 800WA_WEBCONSOLE434 %>     
<%--		<td align = "right">   --%>                                         <% // 800WA_WEBCONSOLE434 %>
<%--			<util:set name = "AgentRegistrationHelp">                       <% // 800WA_WEBCONSOLE434 %>
                  openHelp('<util:rewrite action = "help"/>',
                        '<bean:message 
                          bundle = "<%= Const.MESSAGE_RESOURCES_KEY_RGTAGT %>"
                          key = "regist.agent.operation.help"/>',
                        '<%= Const.ATTRIBUTE_REQUEST_HELP_CONTENTS%>',
                        '<%= request.getSession().getId() %>help');
            </util:set>		--%>												<% // 800WA_WEBCONSOLE292 %><% // 800WA_WEBCONSOLE434 %>
<%--		<util:set name = "AgentRegistrationHelp123">
				openHelp('<bean:message bundle = "<%= Const.MESSAGE_RESOURCES_KEY_RGTAGT %>"
				                      key = "regist.agent.operation.help" />')
			</util:set>	 										--%>			<% // 800WA_WEBCONSOLE292 %>
<%--			<html:link href = "#" styleClass = "small"                      <% // 800WA_WEBCONSOLE434 %>
			  onclick = '<%= pageContext.getAttribute("AgentRegistrationHelp")
			                                                   .toString() %>'>
				<bean:message bundle = "<%= Const.MESSAGE_RESOURCES_KEY_RGTAGT %>"
				                          key = "regist.agent.operation.help"/>
			</html:link>     --%>                                               <% // 800WA_WEBCONSOLE434 %>
<%--		</td>      --%>                                                     <% // 800WA_WEBCONSOLE434 %>
<%--  </tr>     --%>                                                            <% // 800WA_WEBCONSOLE434 %>
  <br>                                                                          <% // 800WA_WEBCONSOLE434 %>
  <tr>
<%--  		<td>				--%>											<% // 800WA_WEBCONSOLE284 %>
	   <td class = "small">       												<% // 800WA_WEBCONSOLE284 %>
  			<%= CompletionBean.getCompletionMessage()%>
  		</td>
  </tr>
  <tr>
		<td align = "right">
			<util:set name = "close">
 			   <bean:message bundle = "<%= Const.MESSAGE_RESOURCES_KEY_RGTAGT %>"
 			                                    key = "regist.agent.close" />
			</util:set>
			<html:button property = "Close" styleClass = "small"
            		value ='<%= pageContext.getAttribute("close").toString() %>' 
    				                    onclick ="parent.close()"/>
    		<util:set name = "continue">
	 			<bean:message bundle = "<%= Const.MESSAGE_RESOURCES_KEY_INTERNAL %>" 
	 			                          key = "internal.common.continue.button" />
			</util:set>
			
			<html:button property = "continue" styleClass = "small"
        	  value = '<%= pageContext.getAttribute("continue").toString() %>' 
                						onclick = "continueClick('agentRegist.do');"/>
  			<script> Close.focus(); </script>									<% // 800WA_WEBCONSOLE295 %>    
        </td>
  </tr> 

<%
	}
%>
  </table>
 </td>
</tr>

  </table>
 </body>
</html:html>

<script>
  
	function continueClick(r_varURL)
	{
		window.parent.location.href = r_varURL;
	}
	function closeClick()
	{
	   parent.close();
	}
</script>