<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="com.novell.webaccess.common.JSPConduit, com.novell.emframe.dev.eMFrameUtils" %>
<%@ taglib uri="/WEB-INF/iman.tld" prefix="iman" %>
<%   JSPConduit c = JSPConduit.getJSPConduit(request);
   c.stringTable("DevResources"); 
   c.stringTable("FwResources"); 
   c.stringTable("BaseResources"); %>
<HTML>
<HEAD>
<TITLE><%= c.toHTML(c.string("PartitionReplica.ReplicaAdministration")) %></TITLE>
<link   rel='stylesheet'
        href='<%= c.getModulesUrl() + "/dev/css/hf_style.css" %>'>
        
<iman:eMFrameScripts />

<script language="JavaScript">
 
    /*******************
     * FUNCTION HEADER *
     *******************/   
    function closeSelected()
    {
        <% if (session.getAttribute("DeviceType").equals("default")) { %>
            var form = document.ReplicaInformationForm;
            
            form.elements["merge"].value="base.partition.ReplicaTable";
            form.elements["nextState"].value="cancelReplicaOperation";
            
            form.submit();
        <% } else { %>
            window.close();
        <% } %>
    }
   
    
</SCRIPT>
</HEAD>

<BODY   TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000" bgcolor="#FFFFFF">
<form   name="ReplicaInformationForm"
        method="post"
        action="webacc"
        onSubmit="return(closeSelected())">
        
        <input  type=hidden
                name="taskId"
                value="<%= c.var("taskId") %>">
            
        <input  type=hidden
                name="merge"
                value="">
            
        <input  type=hidden
                name="error"
                value="dev.GenErr">
            
        <input  type=hidden
                name="User.context"
                value="<%= c.var("User.context") %>">
            
        <input  type=hidden
                name="nextState"
                value="">
            
	<!-- ************ -->
	<!-- HEADER TABLE -->
	<!-- ************ -->
   <% c.set("TaskHeader.title", c.string("PartitionReplica.ReplicaInformation")); 
      c.set("TaskHeader.helpFile", "base/replicainfo.html"); %>
   <jsp:include page='<%= c.getPath("dev/TaskHeader_inc.jsp") %>' flush="true" /><BR>
                
    <!-- ************* -->
    <!-- CONTENT TABLE -->
    <!-- ************* -->
    <TABLE>
        <TR> 
            <TD height="10" colspan="2">
            </TD> 
        </TR> 
        <TR> 
            <TD class="mediumtext" width="0*">
                <%= c.toHTML(c.string("PartitionReplica.InfoPartition")) %>
            </TD> 
            <TD class="mediumtext">
                <%= c.var("ReplicaInfo.Partition") %>     
            </TD> 
        </TR> 
        <TR> 
            <TD class="mediumtext">
                <%= c.toHTML(c.string("PartitionReplica.InfoServerStored")) %>
            </TD> 
            <TD class="mediumtext">
                <%= c.var("ReplicaInfo.ServerStored") %>     
            </TD> 
        </TR> 
        <TR> 
            <TD class="mediumtext">
                <%= c.toHTML(c.string("PartitionReplica.InfoServerRead")) %>
            </TD> 
            <TD class="mediumtext">
                <%= c.var("ReplicaInfo.ServerRead") %>     
            </TD> 
        </TR> 
        <TR> 
            <TD class="mediumtext">
                <%= c.toHTML(c.string("PartitionReplica.InfoReplicaNumber")) %>
            </TD> 
            <TD class="mediumtext">
                <%= c.var("ReplicaInfo.ReplicaNumber") %>
            </TD> 
        </TR> 
        <TR> 
            <TD class="mediumtext">
                <%= c.toHTML(c.string("PartitionReplica.InfoReplicaType")) %>
            </TD> 
            <TD class="mediumtext">
                <%= c.var("ReplicaInfo.ReplicaType") %>
            </TD> 
        </TR> 
        <TR> 
            <TD class="mediumtext">
                <%= c.toHTML(c.string("PartitionReplica.InfoReplicaState")) %>
            </TD> 
            <TD class="mediumtext">
                <%= c.var("ReplicaInfo.ReplicaState") %>
            </TD> 
        </TR> 
        <TR> 
            <TD class="mediumtext">
                <%= c.toHTML(c.string("PartitionReplica.InfoLastSyncTime")) %>
            </TD> 
            <TD class="mediumtext">
                <%= c.var("ReplicaInfo.LastSync") %>
            </TD> 
        </TR> 
        <% c.set("count", "0"); 
           while (c.lt(c.var("count"), c.var("ReplicaInfo.ReferralAddress.Count"))) { 
               if (c.var("count").equals("0")) { %>
                <TR> 
                    <TD class="mediumtext">
                        <%= c.toHTML(c.string("PartitionReplica.InfoReferralAddress")) %>
                    </TD> 
                    <TD class="mediumtext">
                        <%= c.var("ReplicaInfo.ReferralAddress."+c.var("count")) %>
                    </TD> 
                </TR> 
            <% } else { %>
                <TR> 
                    <TD class="mediumtext">
                    </TD> 
                    <TD class="mediumtext">
                        <%= c.var("ReplicaInfo.ReferralAddress."+c.var("count")) %>
                    </TD> 
                </TR> 
            <% } 
   		       c.inc("count"); 
           } %>
        <TR> 
            <TD class="mediumtext" valign="top">
                <%= c.toHTML(c.string("PartitionReplica.InfoCurrentSyncError")) %>
            </TD> 
            <TD class="mediumtext" width="350">
                <%= c.var("ReplicaInfo.SyncError") %>
            </TD> 
        </TR> 
        <TR> 
            <TD height="10" colspan="2"> 
            </TD> 
        </TR> 
        <tr>
            <td>&nbsp;</td>
        </tr>
    </TABLE>
	
	<!-- ************ -->
	<!-- BUTTON TABLE -->
	<!-- ************ -->
    <jsp:include page='<%= c.getPath("dev/Bar_inc.jsp") %>' flush="true" />

    <a href="#" onClick="javascript:closeSelected();return false">
        <IMG    src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.Close.image") %>"
                alt="<%= c.string("Button.Close.alt") %>"
                title="<%= c.string("Button.Close.alt") %>"
                border=0></a>
</form>
</BODY></HTML>
