<%--
  /**
   * Copyright (c) 2003 by Sun Microsystems, Inc. All rights reserved.
   * Use is subject to license terms.
   *
   * "@(#)sm_fc_configuration.jsp    1.5    03/07/31     SMI"
   * 
   */
 --%>
<%@ include file="/layout/toptags.jsp"%>
<%@ page import="com.sun.netstorage.array.mgmt.cfg.ui.forms.T4Form"%>
<!-- locale stuff -->
<html:html locale="true">
<!-- end locale -->

<!-- Place Java Script Here -->

<!-- HTML -->
<head>
<%@include file="/layout/page_head_section.jsp"%>
    <title>
        <bean:message  key="storage.mgmt.fc.title"/>
    </title>
</head>

<%@include file="/layout/bodytag.jsp"%>
<%@include file="/layout/top.jsp"%>
<%@include file="/layout/breadcrumb.jsp"%>
<%@include file="/layout/spacer.jsp"%>



<html:form action="root.menu.item0.item1fcconfig.do">


<!-- hidden element which specifies the action for this form -->
<input type="hidden" name="request_action" value="<%=request.getAttribute("request_action")%>">


<div class="content-layout">
  <%@ include file="/layout/user_messages.jsp"%>
  
  <!-- FC DETAILS Section -->    
  
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td nowrap>
              <div class="major-category-text">
                <bean:message key="storage.mgmt.fc.title"/>
              </div>
            </td>
           
            <td valign="bottom" width="99%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td class="property-separator" valign="bottom"><img alt border="0" height="2" src="/images/general/dot.gif" width="1"></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td><img alt border="0" height="5" src="/images/general/dot.gif" width="1"></td>
    </tr>
  </table>

<!-- spacer between two sections -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><img alt border="0" height="8" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>

  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td nowrap>
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>
              <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td>
                    <table>
                      <tr>
                        <td>
                          <table>
                            <tr>
                              <td >
                                <component:button text="button.save" href="javascript:submitForm('save');" title="button.save" isEnabled="<%=!readOnly%>" /> 
                              </td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                    </table>
                  </td>                  
                </tr>
              </table>
            </td>            
          
            <td width="10"><img alt width="10" height="1" border="0" src="images/general/dot.gif"></td>
        
            <td align="left" valign="middle">
              <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td>
                    <table>
                      <tr>
                        <td>
                          <table>
                            <tr>
                              <td align="center" valign="middle" nowrap>
                                <%
                                   // set the cancel link to be the current page by default
				                   //  this should be overwritten unless an exception occurs
				                   //   or if the crumb is not found
                                   String cancelLink = "root.menu.item0.item1fcconfig.do";
				                   try {
                                    if(crumbs != null) {
                                      // get the cancel button link from the previous breadcrumb
                                      //  so it's the second to the last link (-2)
                                      crumb = 
                                       (com.sun.netstorage.array.mgmt.cfg.ui.core.action.Crumb)crumbs.get(
                                         crumbs.size() - 2);
                                      if(crumb != null) {
                                          cancelLink = crumb.getLink();
                                      }
                                    }
                                  } catch(Exception ex) {} 
                                 %>

                                <component:button text="button.cancel" href="<%=cancelLink%>" title="button.cancel" isEnabled="true" />
                              </td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                    </table>
                  </td>
                  <td width="10"><img alt width="10" height="1" border="0" src="images/general/dot.gif"></td>
                 </tr>
              </table>
            </td>
          
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td><img alt border="0" src="images/general/dot.gif" width="1" height="5"></td>
          </tr>
          <tr>            
            <td nowrap>
              <table class="back-table" border="0" cellspacing="0" cellpadding="1" width="100%">
                <tr>
                  <td align="left" valign="middle">
                    <table class="front-table" border="0" cellspacing="0" cellpadding="0" width="100%">
                      <tr class="header-row">                        
                        <td align="left">
                          <div class="table-header-text">
                            <bean:message key="detail.property"/>
                          </div>
                        </td>                                                
                        <td align="left">
                          <div class="table-header-text">
                            <bean:message key="detail.value"/>
                          </div>
                        </td>                        
                      </tr>
                      <%
                          T4Form form = (T4Form)session.getAttribute("t4Form");
                      %>
                      <logic:present name="t4Form"> 
                      <tr>
                        <td align="left" nowrap>
                          <div class="table-normal-text">
                            <bean:message key="menu.selected.array" />
                          </div>
                        </td>
                        <td align="left" nowrap>
                          <div class="table-normal-text">
                            <bean:write name="t4Form" property="name"/>                           
                          </div>
                        </td>
                      </tr>
                      <tr>
                        <td align="left" nowrap>
                          <div class="table-normal-text">
                            <bean:message key="storage.mgmt.fc.current.speed" />
                          </div>
                        </td>
                        <td align="left" nowrap>
                          <div class="table-normal-text">
                            <% String speed = "fc.speed." + form.getPreferredSpeed();%>
                            <bean:message key="<%= speed %>"/>
                          </div>
                        </td>
                      </tr>                     
                      <tr>
                        <td align="left" nowrap>
                          <div class="table-normal-text">
                            <bean:message key="storage.mgmt.fc.speed" />
                          </div>
                        </td>
                        <td align="left" nowrap>
                          <div class="table-normal-text">           
                            <html:select name="t4Form" property="preferredSpeed" disabled="<%=readOnly%>">
                    		  <html:option key="fc.speed.0" value='<%="" + Constants.FiberChannelProperties.SPEED_AUTO%>'/>
                    		  <html:option key="fc.speed.1" value='<%="" + Constants.FiberChannelProperties.SPEED_ONE_GIGABYTE%>'/>
                    		  <html:option key="fc.speed.2" value='<%="" + Constants.FiberChannelProperties.SPEED_TWO_GIGABYTES%>'/>
                    	     </html:select>
                          </div>
                        </td>
                      </tr>
                      <tr>
                        <td align="left" nowrap>
                          <div class="table-normal-text">
                            <bean:message key="storage.mgmt.fc.current.topology" />
                          </div>
                        </td>
                        <td align="left" nowrap>
                         <div class="table-normal-text">  
                            <% String top = "topology." + form.getTopology();%>
                            <bean:message key="<%= top %>"/>
                    	 </div>
                        </td>                        
                      </tr> 
                      <tr>
                        <td align="left" nowrap>
                          <div class="table-normal-text">
                            <bean:message key="storage.mgmt.fc.topology" />
                          </div>
                        </td>
                        <td align="left" nowrap>
                          <div class="table-normal-text">
                            <html:select name="t4Form" property="topology" disabled="<%=readOnly%>">
                    		  <html:option key="topology.11" value='<%="" + Constants.FiberChannelProperties.TOPOLOGY_LOOP%>'/>
                    		  <html:option key="topology.12" value='<%="" + Constants.FiberChannelProperties.TOPOLOGY_FABRIC_LOOP%>'/>
                    		  <html:option key="topology.10" value='<%="" + Constants.FiberChannelProperties.TOPOLOGY_FABRIC_P2P%>'/>
                    		  <html:option key="topology.16001" value='<%="" + Constants.FiberChannelProperties.TOPOLOGY_AUTO%>'/>
                    		  <html:option key="topology.0" value='<%="" + Constants.FiberChannelProperties.TOPOLOGY_NO_CONNECTION%>'/>
                    	    </html:select>                            
                          </div>
                        </td>
                      </tr>
                      </logic:present>                                
                    </table>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>

</div>

</html:form>



</body>
</html:html> 
