����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 18.116.49.6
Web Server : LiteSpeed
System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : builderbox ( 1072)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/dell/srvadmin/var/lib/openmanage/xslroot/sm/template/common/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/dell/srvadmin/var/lib/openmanage/xslroot/sm/template/common/ctrlprops.xsl
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is the XSL to render the Controller Property  page.  The associated web plugin is the ChangeControllerWebPlugin.java -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<!-- Include some common templates created by SS -->
	<xsl:import href="Utils.xsl"/>
	<xsl:template match="OMA">
		<xsl:call-template name="scripts"/>
		<DataArea backpagetarget="./DataArea?plugin=com.dell.sm.webplugins.ControllerInfoWebPlugin" printable="false" email="false" validate="true" Refresh="false" exportdata="false" onLoad="true">
                  <xsl:attribute name="submit">./SubmitForm?plugin=com.dell.sm.webplugins.ControllerExecWebPlugin&amp;ControllerOID=<xsl:value-of select="ControllerOID"/>&amp;ControllerName=<xsl:value-of select="ControllerName"/>&amp;OrigUrl=<xsl:value-of select="OrigUrl"/>&amp;Action=67108864&amp;help=cnprin&amp;</xsl:attribute>
		  <xsl:attribute name="submitdisplay"><xsl:value-of select="$strApply"/></xsl:attribute>
                  <xsl:attribute name="backpagedisplayfull"><xsl:value-of select="$strPrevPage"/></xsl:attribute>
                  <xsl:attribute name="backpagetarget"><xsl:call-template name="ReturnPage"><xsl:with-param name="BackTo" select="/OMA/BackTo"/></xsl:call-template></xsl:attribute>
 			<PageTitle>
				<xsl:attribute name="display"><xsl:value-of select="$strTitlePart1"/><xsl:value-of select="ControllerName"/><xsl:value-of select="$strTitlePart2"/></xsl:attribute>
			</PageTitle>
                  <xsl:call-template name="ControllerProps"/>
		</DataArea>
	</xsl:template>
	<xsl:variable name="VAR_PersonalityStateForHBA">
            <xsl:choose> 
                  <xsl:when test="//PersonalityState and //PersonalityState='2'">0</xsl:when>
                  <xsl:otherwise>1</xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
       <xsl:template name="ControllerProps">
	         <TableData name="T" display="">
                      <xsl:variable name="showtasks">false</xsl:variable>
                      <xsl:if test="$VAR_PersonalityStateForHBA='1'">
					  	<xsl:if test="substring(//CurrentMethodMask,27,1)!='0'"> 	
                           <Row><Data><xsl:attribute name="value"><xsl:value-of select="$strRbuild"/></xsl:attribute></Data>
                              <Data name="rbldrate" type="editbox" maxlength="3" size="3" align="left" >
					<xsl:attribute name="value"><xsl:value-of select="/OMA/Controllers/DCStorageObject/RebuildRate"/></xsl:attribute>
					<xsl:attribute name="unit">%</xsl:attribute>
			      	</Data>
                           </Row>
						</xsl:if>
                           <Row> <Data><xsl:attribute name="value"><xsl:value-of select="$strBGI"/></xsl:attribute></Data>
                              <Data name="bgirate" type="editbox" maxlength="3" size="3" align="left">
					<xsl:attribute name="value"><xsl:value-of select="/OMA/Controllers/DCStorageObject/BGIRate"/></xsl:attribute>
                              <xsl:attribute name="unit"> %</xsl:attribute>
                			</Data>
                           </Row>
                           <Row><Data><xsl:attribute name="value"><xsl:value-of select="$strConsistency"/></xsl:attribute></Data>
                              <Data name="checkconsistencyrate" type="editbox" maxlength="3" size="3" align="left" >
					<xsl:attribute name="value"><xsl:value-of select="/OMA/Controllers/DCStorageObject/CheckConsistencyRate"/></xsl:attribute>
					<xsl:attribute name="unit"> %</xsl:attribute>
			      	</Data>
                           </Row>
						  <xsl:if test="substring(//CurrentMethodMask,16,1)!='0'"> 	
                          <Row><Data><xsl:attribute name="value"><xsl:value-of select="$strReconstruct"/></xsl:attribute></Data>
                              <Data name="reconstructrate" type="editbox" maxlength="3" size="3" align="left">
					<xsl:attribute name="value"><xsl:value-of select="/OMA/Controllers/DCStorageObject/ReconstructRate"/></xsl:attribute>
					<xsl:attribute name="unit"> %</xsl:attribute>
			            </Data>
                          </Row>
						  </xsl:if>
                 </xsl:if>         
<xsl:if test="//ChangeControllerPropertyMask">
 <Row>
       <Data><xsl:attribute name="value"><xsl:value-of select="$strAbortCConError"/></xsl:attribute></Data>
       <Data name="abortcc" type="select">
	<Choice>
	  <xsl:attribute name="value">
           <xsl:call-template name="GetControllerProperty">
                 <xsl:with-param name="PropertyMode">
                     <xsl:choose>
                           <xsl:when test="substring(//ChangeControllerPropertyMask,20,1)='1'">4096</xsl:when>
                            <xsl:when test="substring(//ChangeControllerPropertyMask,12,1)='1'">1048576</xsl:when>
                            
                     </xsl:choose>
                  </xsl:with-param>
             </xsl:call-template>
          </xsl:attribute>
                 <xsl:attribute name="returnvalue">
                    <xsl:choose>
                         <xsl:when test="substring(//ChangeControllerPropertyMask,20,1)='1'">1</xsl:when>
                         <xsl:when test="substring(//ChangeControllerPropertyMask,12,1)='1'">2</xsl:when>
                         
                    </xsl:choose>
                  </xsl:attribute>
       </Choice>
					      
         <xsl:call-template name="for-loop-list-box">
		<xsl:with-param name="Mask" select="//ChangeControllerPropertyMask"/>
                  <xsl:with-param name="currPolicy">
                     <xsl:choose>
                          <xsl:when test="substring(//ChangeControllerPropertyMask,20,1)='1'">4096</xsl:when>
                          <xsl:when test="substring(//ChangeControllerPropertyMask,12,1)='1'">1048576</xsl:when>
                          
                    </xsl:choose>
                 </xsl:with-param> 
                 <xsl:with-param name="templateName" select="19"/>
	 </xsl:call-template>
</Data>
</Row>
</xsl:if>

<xsl:if test="//ChangeControllerPropertyMask and substring(//ChangeControllerPropertyMask,16,1)='0' and (not(//PersonalityState) or (//PersonalityState and (//PersonalityState='1' or //PersonalityState='8')))">
	
 <Row>
       <Data><xsl:attribute name="value" ><xsl:value-of select="$strCopyback"/></xsl:attribute></Data>
       <Data name="copyback" type="select" handler="javascript:Onselect()" event="onChange">
	<Choice>
	  <xsl:attribute name="value">
           <xsl:call-template name="GetControllerProperty">
                 <xsl:with-param name="PropertyMode">
                     <xsl:choose>
                           <xsl:when test="substring(//ChangeControllerPropertyMask,17,1)='1'">32768</xsl:when>
                           <xsl:when test="substring(//ChangeControllerPropertyMask,15,1)='1'">131072</xsl:when>
                     </xsl:choose>
                  </xsl:with-param>
             </xsl:call-template>
          </xsl:attribute>
                 <xsl:attribute name="returnvalue">
                    <xsl:choose>
                         <xsl:when test="substring(//ChangeControllerPropertyMask,17,1)='1'">1</xsl:when>
                          
                         <xsl:when test="substring(//ChangeControllerPropertyMask,15,1)='1'">2</xsl:when>
                    </xsl:choose>
                  </xsl:attribute>
          </Choice>
	   <xsl:call-template name="for-loop-list-box">
		<xsl:with-param name="Mask" select="//ChangeControllerPropertyMask"/>
                  <xsl:with-param name="currPolicy">
                     <xsl:choose>
                          <xsl:when test="substring(//ChangeControllerPropertyMask,17,1)='1'">32768</xsl:when>
                          <xsl:when test="substring(//ChangeControllerPropertyMask,15,1)='1'">131072</xsl:when>
                    </xsl:choose>
                 </xsl:with-param> 
                 <xsl:with-param name="templateName" select="16"/>
	 </xsl:call-template>

</Data>
</Row>
</xsl:if>


<xsl:if test="(//AttributesMask1 and substring(//AttributesMask1,29,1)!='1') and (//ChangeControllerPropertyMask and (substring(//ChangeControllerPropertyMask,14,1) = '1' or substring(//ChangeControllerPropertyMask,13,1) = '1'))">
 <Row>
       <Data><xsl:attribute name="value"><xsl:value-of select="$strLoadBalancing"/></xsl:attribute></Data>
       <Data name="loadbalance" type="select">
	<Choice>
	  <xsl:attribute name="value">
           <xsl:call-template name="GetControllerProperty">
                 <xsl:with-param name="PropertyMode">
                     <xsl:choose>
                           <xsl:when test="substring(//ChangeControllerPropertyMask,14,1)='1'">262144</xsl:when>
                           <xsl:when test="substring(//ChangeControllerPropertyMask,13,1)='1'">524288</xsl:when>
                     </xsl:choose>
                  </xsl:with-param>
             </xsl:call-template>

          </xsl:attribute>
                 <xsl:attribute name="returnvalue">
                    <xsl:choose>
                         <xsl:when test="substring(//ChangeControllerPropertyMask,14,1)='1'">1</xsl:when>
                         <xsl:when test="substring(//ChangeControllerPropertyMask,13,1)='1'">2</xsl:when>
                    </xsl:choose>
                  </xsl:attribute>
       </Choice>
					      
         <xsl:call-template name="for-loop-list-box">
		<xsl:with-param name="Mask" select="//ChangeControllerPropertyMask"/>
                  <xsl:with-param name="currPolicy">
                     <xsl:choose>
                          <xsl:when test="substring(//ChangeControllerPropertyMask,14,1)='1'">262144</xsl:when>
                          <xsl:when test="substring(//ChangeControllerPropertyMask,13,1)='1'">524288</xsl:when>
                    </xsl:choose>
                 </xsl:with-param> 
                 <xsl:with-param name="templateName" select="17"/>
	 </xsl:call-template>

</Data>
</Row>
</xsl:if>

<xsl:if test="//ChangeControllerPropertyMask and substring(//ChangeControllerPropertyMask,11,1)='0' and (not(//PersonalityState) or (//PersonalityState and (//PersonalityState='1' or //PersonalityState='8')))">
 <Row>
       <Data><xsl:attribute name="value"><xsl:value-of select="$strSmarterErrorDisk"/></xsl:attribute></Data>
       <Data name="smarterrordisk" type="select">
	<Choice>
	  <xsl:attribute name="value">
           <xsl:call-template name="GetControllerProperty">
                 <xsl:with-param name="PropertyMode">
                     <xsl:choose>
                           <xsl:when test="substring(//ChangeControllerPropertyMask,30,1)='1'">4</xsl:when>
                           <xsl:when test="substring(//ChangeControllerPropertyMask,29,1)='1'">8</xsl:when>
                     </xsl:choose>
                  </xsl:with-param>
             </xsl:call-template>

          </xsl:attribute>
                 <xsl:attribute name="returnvalue">
                    <xsl:choose>
                         <xsl:when test="substring(//ChangeControllerPropertyMask,30,1)='1'">1</xsl:when>
                         <xsl:when test="substring(//ChangeControllerPropertyMask,29,1)='1'">2</xsl:when>
                    </xsl:choose>
                  </xsl:attribute>
       </Choice>
					      
         <xsl:call-template name="for-loop-list-box">
		<xsl:with-param name="Mask" select="//ChangeControllerPropertyMask"/>
                  <xsl:with-param name="currPolicy">
                     <xsl:choose>
                          <xsl:when test="substring(//ChangeControllerPropertyMask,30,1)='1'">4</xsl:when>
                          <xsl:when test="substring(//ChangeControllerPropertyMask,29,1)='1'">8</xsl:when>
                    </xsl:choose>
                 </xsl:with-param> 
                 <xsl:with-param name="templateName" select="18"/>
	 </xsl:call-template>

</Data>
</Row>
</xsl:if>

<!-- including multipath in change Controller Properties--><!-- NGM: checking this mask to see if it is H745MX controller and disabling the Multipath view-->
<xsl:if test="substring(/OMA/Channels/DCStorageObject[1]/AttributesMask,26,1)='1' and substring(/OMA/Controllers/DCStorageObject/AttributesMask,17,1)!='1'">
 <Row>
       <Data><xsl:attribute name="value"><xsl:value-of select="$strClearMultipath"/></xsl:attribute></Data>
       <Data name="clearmultipath" type="select">
	<Choice>
	  <xsl:attribute name="value">
           <xsl:call-template name="GetControllerProperty">
                 <xsl:with-param name="PropertyMode">
                     <xsl:choose>
                           <xsl:when test="substring(//ChangeControllerPropertyMask,32,1)='1'">1</xsl:when>
                           <xsl:when test="substring(//ChangeControllerPropertyMask,31,1)='1'">2</xsl:when>
                     </xsl:choose>
                  </xsl:with-param>
             </xsl:call-template>

          </xsl:attribute>
                 <xsl:attribute name="returnvalue">
                    <xsl:choose>
                         <xsl:when test="substring(//ChangeControllerPropertyMask,32,1)='1'">1</xsl:when>
                         <xsl:when test="substring(//ChangeControllerPropertyMask,31,1)='1'">2</xsl:when>
                    </xsl:choose>
                  </xsl:attribute>
       </Choice>
					      
         <xsl:call-template name="for-loop-list-box">
		<xsl:with-param name="Mask" select="//ChangeControllerPropertyMask"/>
                  <xsl:with-param name="currPolicy">
                     <xsl:choose>
                          <xsl:when test="substring(//ChangeControllerPropertyMask,32,1)='1'">1</xsl:when>
                          <xsl:when test="substring(//ChangeControllerPropertyMask,31,1)='1'">2</xsl:when>
                    </xsl:choose>
                 </xsl:with-param> 
                 <xsl:with-param name="templateName" select="21"/>
	 </xsl:call-template>

</Data>
</Row>
</xsl:if>

<xsl:if test="//ChangeControllerPropertyMask and (substring(//ChangeControllerPropertyMask,1,1)='1') and (not(//PersonalityState) or (//PersonalityState and (//PersonalityState='1' or //PersonalityState='8')))">
 <Row>
       <Data><xsl:attribute name="value"><xsl:value-of select="$PersistentHotSpare"/></xsl:attribute></Data>
       <Data name="persistenths" type="select">
	<Choice>
	  <xsl:attribute name="value">
           <xsl:call-template name="GetControllerProperty">
                 <xsl:with-param name="PropertyMode">
                     <xsl:choose>
                           <xsl:when test="substring(//ChangeControllerPropertyMask,2,1)='1'">1073741824</xsl:when>
                           <xsl:when test="substring(//ChangeControllerPropertyMask,3,1)='1'">536870912</xsl:when>
                     </xsl:choose>
                  </xsl:with-param>
             </xsl:call-template>

          </xsl:attribute>
                 <xsl:attribute name="returnvalue">
                    <xsl:choose>
                         <xsl:when test="substring(//ChangeControllerPropertyMask,2,1)='1'">1</xsl:when>
                         <xsl:when test="substring(//ChangeControllerPropertyMask,3,1)='1'">2</xsl:when>
                    </xsl:choose>
                  </xsl:attribute>
       </Choice>
					      
         <xsl:call-template name="for-loop-list-box">
		<xsl:with-param name="Mask" select="//ChangeControllerPropertyMask"/>
                  <xsl:with-param name="currPolicy">
                     <xsl:choose>
                          <xsl:when test="substring(//ChangeControllerPropertyMask,2,1)='1'">1073741824</xsl:when>
                          <xsl:when test="substring(//ChangeControllerPropertyMask,3,1)='1'">536870912</xsl:when>
                    </xsl:choose>
                 </xsl:with-param> 
                 <xsl:with-param name="templateName" select="23"/>
	 </xsl:call-template>

    </Data>
</Row>
</xsl:if>
<!-- Disk Cache Policy option added for OM 8.3 dt: 09/21/2015-->	
<xsl:if test="//ChangeControllerPropertyMask1 and (substring(//ChangeControllerPropertyMask1 ,32,1)='1'))">
 <Row>
       <Data><xsl:attribute name="value"><xsl:value-of select="$strNonRaidDiskCachePolicy"/></xsl:attribute></Data>
       <Data name="diskcachepolicy" type="select">
	<Choice>
	  <xsl:attribute name="value">
           <xsl:call-template name="GetControllerProperty1">
                 <xsl:with-param name="PropertyMode">
                     <xsl:choose>
                           <xsl:when test="substring(//ChangeControllerPropertyMask1,31,1)='1'">2</xsl:when>
                           <xsl:when test="substring(//ChangeControllerPropertyMask1,30,1)='1'">4</xsl:when>
						   <xsl:when test="substring(//ChangeControllerPropertyMask1,29,1)='1'">8</xsl:when>
                     </xsl:choose>
                  </xsl:with-param>
             </xsl:call-template>

          </xsl:attribute>
                 <xsl:attribute name="returnvalue">
                    <xsl:choose>
                          <xsl:when test="substring(//ChangeControllerPropertyMask1,31,1)='1'">0</xsl:when>
                          <xsl:when test="substring(//ChangeControllerPropertyMask1,30,1)='1'">1</xsl:when>
						  <xsl:when test="substring(//ChangeControllerPropertyMask1,29,1)='1'">2</xsl:when>
                    </xsl:choose>
                  </xsl:attribute>
       </Choice>
					      
         <xsl:call-template name="for-loop-list-box">
		<xsl:with-param name="Mask" select="//ChangeControllerPropertyMask1"/>
                  <xsl:with-param name="currPolicy">
                     <xsl:choose>
                          <xsl:when test="substring(//ChangeControllerPropertyMask1,31,1)='1'">2</xsl:when>
                           <xsl:when test="substring(//ChangeControllerPropertyMask1,30,1)='1'">4</xsl:when>
						   <xsl:when test="substring(//ChangeControllerPropertyMask1,29,1)='1'">8</xsl:when>
                    </xsl:choose>
                 </xsl:with-param> 
                 <xsl:with-param name="templateName" select="30"/>
	 </xsl:call-template>

    </Data>
</Row>
</xsl:if>
</TableData>

    
    <script language="javascript">	
        function initializationRoutine()
        {
            if(document.getElementById("copyback") != null &amp;&amp; document.getElementById("copyback").value=='2')
            {
                if(document.getElementById("smarterrordisk") != null)
                {
                    document.getElementById("smarterrordisk").disabled=true;
                }
            }
            if(document.getElementById("rbldrate") != null)
            {
                document.getElementById("rbldrate").focus();
             }
            return;
        }
            

        function Onselect()
        {

            if(document.getElementById("copyback").value=='2' &amp;&amp; document.getElementById("smarterrordisk").value=='1')
            { 
                if(confirm("<xsl:value-of select="$strsmarterdisableoncopybackdisable"/>")==true)
                { 
                    document.getElementById("smarterrordisk").value=2;
                    document.getElementById("smarterrordisk").disabled=true;
                }
                else
                { 
                    document.getElementById("copyback").value=1;
                }
            }
            if(document.getElementById("copyback").value=='1')
            {
                document.getElementById("smarterrordisk").disabled=false;
            }
            if(document.getElementById("copyback").value=='2')
            {
                document.getElementById("smarterrordisk").disabled=true;    
            }
        }
        function validate() 
        {
            var i,errormessage,isreconstructrate,vaild=true;


            var oldval=new Array();
            oldval[0]='<xsl:value-of select="/OMA/Controllers/DCStorageObject/RebuildRate"/>';                                           
            oldval[1]='<xsl:value-of select="/OMA/Controllers/DCStorageObject/BGIRate"/>';
            oldval[2]='<xsl:value-of select="/OMA/Controllers/DCStorageObject/CheckConsistencyRate"/>';
            oldval[3]='<xsl:value-of select="/OMA/Controllers/DCStorageObject/ReconstructRate"/>';
            oldval[4]='<xsl:choose><xsl:when test="substring(//ChangeControllerPropertyMask,20,1)='1'">1</xsl:when><xsl:when test="substring(//ChangeControllerPropertyMask,12,1)='1'">2</xsl:when></xsl:choose>';
            oldval[5]='<xsl:choose><xsl:when test="substring(//ChangeControllerPropertyMask,17,1)='1'">1</xsl:when><xsl:when test="substring(//ChangeControllerPropertyMask,15,1)='1'">2</xsl:when></xsl:choose>';
            oldval[6]='<xsl:choose><xsl:when test="substring(//ChangeControllerPropertyMask,14,1)='1'">1</xsl:when><xsl:when test="substring(//ChangeControllerPropertyMask,13,1)='1'">2</xsl:when></xsl:choose>';
            oldval[7]='<xsl:choose><xsl:when test="substring(//ChangeControllerPropertyMask,30,1)='1'">1</xsl:when><xsl:when test="substring(//ChangeControllerPropertyMask,29,1)='1'">2</xsl:when></xsl:choose>';
            oldval[8]='<xsl:choose><xsl:when test="substring(//ChangeControllerPropertyMask,32,1)='1'">1</xsl:when><xsl:when test="substring(//ChangeControllerPropertyMask,31,1)='1'">2</xsl:when></xsl:choose>';
            oldval[9]='<xsl:choose><xsl:when test="substring(//ChangeControllerPropertyMask,2,1)='1'">1</xsl:when><xsl:when test="substring(//ChangeControllerPropertyMask,3,1)='1'">2</xsl:when></xsl:choose>';
			oldval[10]='<xsl:choose><xsl:when test="substring(//ChangeControllerPropertyMask1,31,1)='1'">0</xsl:when><xsl:when test="substring(//ChangeControllerPropertyMask1,30,1)='1'">1</xsl:when><xsl:when test="substring(//ChangeControllerPropertyMask1,29,1)='1'">2</xsl:when></xsl:choose>';
			
			isreconstructrate='<xsl:choose><xsl:when test="substring(//CurrentMethodMask,16,1)!='0'">1</xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose>';

            var text= new Array();
            if(document.getElementById("rbldrate") != null)
            {
                text[0]=document.getElementById("rbldrate").value;   
            }
            else
            {
                text[0]=null;
            }
            if(document.getElementById("bgirate") != null)
            {
                text[1]=document.getElementById("bgirate").value;   
            }
            else
            {
                text[1]=null;
            }
            if(document.getElementById("checkconsistencyrate") != null)
            {
                text[2]=document.getElementById("checkconsistencyrate").value;   
            }
            else
            {
                text[2]=null;
            }
            if(document.getElementById("reconstructrate") != null)
            {
                text[3]=document.getElementById("reconstructrate").value;   
            }
            else
            {
                text[3]=null;
            }
            var inputval=new Array(); 
            
            if(document.getElementById("rbldrate") != null)
            {
                inputval[0]=document.dataarea.rbldrate.value;inputval[0] = removeLeadingZeros(inputval[0]);	
            }
            else
            {
                inputval[0]=oldval[0];
            }            
            
            if(document.getElementById("bgirate") != null)
            {
                inputval[1]=document.dataarea.bgirate.value;inputval[1] = removeLeadingZeros(inputval[1]);
            }
            else
            {
                inputval[1]=oldval[1];
            }
            
            if(document.getElementById("checkconsistencyrate") != null)
            {
                inputval[2]=document.dataarea.checkconsistencyrate.value;inputval[2] = removeLeadingZeros(inputval[2]);
            }
            else
            {
                inputval[2]=oldval[2];
            }            
             if(document.getElementById("reconstructrate") != null)
            {
                inputval[3]=document.dataarea.reconstructrate.value;inputval[3] = removeLeadingZeros(inputval[3]);
            }
            else
            {
                inputval[3]=oldval[3];
            }
            if(document.getElementById("abortcc") != null)
            {
                inputval[4]=document.dataarea.abortcc.value;inputval[4] = removeLeadingZeros(inputval[4]);
            }
            else
            {
                inputval[4]=oldval[4];
            }
            
            if(document.getElementById("copyback") != null)
            {
                inputval[5]=document.dataarea.copyback.value;inputval[5] = removeLeadingZeros(inputval[5]);
            }
            else
            {
                inputval[5]=oldval[5];
            }
            if (document.getElementById("loadbalance")!= null)
            {
                inputval[6]=document.dataarea.loadbalance.value;inputval[6] = removeLeadingZeros(inputval[6]);
            }
            else
            {
                inputval[6]=oldval[6];
            }
            if(document.getElementById("smarterrordisk") != null)
            {
                inputval[7]=document.dataarea.smarterrordisk.value;inputval[7] = removeLeadingZeros(inputval[7]);
            }
            else
            {
                inputval[7]=oldval[7];
            }
            if(document.getElementById("clearmultipath")!=null)
            { 
                inputval[8]=document.dataarea.clearmultipath.value;inputval[8] = removeLeadingZeros(inputval[8]);
            }
            else
            {
                inputval[8]=oldval[8];
            }

            if(document.getElementById("persistenths")!=null)
            { 
                inputval[9]=document.dataarea.persistenths.value;inputval[9] = removeLeadingZeros(inputval[9]);
            }
            else
            {
                inputval[9]=oldval[9];
            }
			
	    if(document.getElementById("diskcachepolicy")!=null)
            { 
                inputval[10]=document.dataarea.diskcachepolicy.value;inputval[10] = removeLeadingZeros(inputval[10]);
            }
            else
            {
                inputval[10]=oldval[10];
            }
            var i; 
            var j; 			
            var elements=new Array();
            elements[0]="rbldrate";
            elements[1]="bgirate";
            elements[2]="checkconsistencyrate";
            elements[3]="reconstructrate";
            if(oldval[0]==inputval[0] &amp;&amp; oldval[1]==inputval[1] &amp;&amp; oldval[2]==inputval[2] &amp;&amp;  oldval[3]==inputval[3] &amp;&amp;  oldval[4]==inputval[4]  &amp;&amp;  oldval[5]==inputval[5] &amp;&amp;  oldval[6]==inputval[6] &amp;&amp;  oldval[7]==inputval[7]  &amp;&amp;  oldval[8]==inputval[8] &amp;&amp;  oldval[9]==inputval[9] &amp;&amp;  oldval[10]==inputval[10])
            {
                alert("<xsl:value-of select="$strNoChangeInValue"/>");
                return false;
            }
            else
            {   
                if(oldval[10] != inputval[10])
                {
                    if( inputval[10] == 1)
                    {
                        if (!confirm ("<xsl:value-of select="$strAlrtDiskCachePolicy"/>"))
                        {
                            return false;
                        }
                    }
                }
                
				if(isreconstructrate == '1'){
					j=4;// there are four operations which needs to be validated; includes reconstruction rate
				}
				else{
					j=3;// there are three operations which needs to be validated 
				}
				
				for(i=0; i &lt;j; i++)
                {  
                    if("<xsl:value-of select="$VAR_PersonalityStateForHBA"/>" == '1')
                    {
                        if(!check(text[i],inputval[i],oldval[i],i))
                        { 
                            return false;
                        }
                     }
                    if(i==j-1)
                    {
                        if(document.getElementById("copyback") != null)
                        {
                            document.getElementById("copyback").disabled=false;
                        }
                        if(document.getElementById("smarterrordisk") != null)
                        {
                            document.getElementById("smarterrordisk").disabled=false;
                        }
                        return true;
                    }

                }
                
            }
                  

		 }//end of function validate	
                   
                 function check(text,inputval,oldval,i) 			
		         {  
                            var operation,displayoperation;
                             switch(i)
                               {
                                   case 0:operation="rbldrate";
                                          displayoperation='<xsl:value-of select="$strRebuildRateMsg"/>';
                                          break;
                                   case 1:operation="bgirate";
                                          displayoperation="<xsl:value-of select="$strBGIRateMsg"/>";
                                          break;
                                   case 2:operation="checkconsistencyrate";
                                          displayoperation="<xsl:value-of select="$strCCRateMsg"/>";
                                          break;
                                   case 3:operation="reconstructrate";
                                          displayoperation="<xsl:value-of select="$strReconstructRateMsg"/>";
                                          break;
                               }  
                             

                          // check that this isn't zero.
                          if (text.length &lt; 1)
			       {
					alert("<xsl:value-of select="$strError"/>" + displayoperation + "<xsl:value-of select="$strvalidrange2"/>");
                                        return false;
			       }
			
			  if( /^[0-9]*$/.test(text))
			      {  //make sure it's a number you are dealing with	
				if( text > 100 || 1 > text )
				    {  //make sure the # is not greater than 100 or less than 1
					alert("<xsl:value-of select="$strError"/>" + displayoperation + "<xsl:value-of select="$strvalidrange2"/>");
					document.getElementById(operation).value = "";
					document.getElementById(operation).focus();
					return false;
				    } 
				  else 
				    {
	              			return true;
				    }
			        } 
			      else 
			        {
					alert("<xsl:value-of select="$strError"/>" + displayoperation + "<xsl:value-of select="$strvalidrange2"/>");
					document.getElementById(operation).value = "";
					document.getElementById(operation).focus();
					return false;
			         }
                     
                      }//end for function check

	</script>

	</xsl:template>
</xsl:stylesheet>



Youez - 2016 - github.com/yon3zu
LinuXploit