文件操作 - rrwethreshold.xsl
返回文件管理
返回主菜单
删除本文件
文件: /opt/dell/srvadmin/var/lib/openmanage/xslroot/sm/template/common/rrwethreshold.xsl
编辑文件内容
<?xml version="1.0" encoding="UTF-8"?> <!-- This is the XSL to render the remaining rated write endurance threshold setting page. The associated web plugin is the SetRemainingRatedWriteEnduranceWebPlugin.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 validate="true" Refresh="false" exportdata="false" onLoad="true"> <xsl:attribute name="submit">./SubmitForm?plugin=com.dell.sm.webplugins.SubmitRemainingRatedWriteEnduranceWebPlugin&OrigURL=<xsl:value-of select="/OMA/BackTo"/></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="$strSetRRWEThreshold"/></xsl:attribute> </PageTitle> <xsl:call-template name="RRWEThreshold"/> </DataArea> </xsl:template> <xsl:template name="RRWEThreshold"> <TableData name="T" display=""> <Row> <Data><xsl:attribute name="value"><xsl:value-of select="$strPCIeSSDThreshold"/></xsl:attribute></Data> <Data name="pciethreshold" type="editbox" maxlength="3" size="3" align="left" > <xsl:attribute name="value"><xsl:value-of select="RRWEThresholdInfo/DCStorageObject/RRWEThresholdPCIe"/></xsl:attribute> <xsl:attribute name="unit">%</xsl:attribute> </Data> </Row> <Row> <Data><xsl:attribute name="value"><xsl:value-of select="$strSasSataSSDThreshold"/></xsl:attribute></Data> <Data name="sassatathreshold" type="editbox" maxlength="3" size="3" align="left" > <xsl:attribute name="value"><xsl:value-of select="RRWEThresholdInfo/DCStorageObject/RRWEThresholdSasSata"/></xsl:attribute> <xsl:attribute name="unit">%</xsl:attribute> </Data> </Row> </TableData> <script language="javascript"> function initializationRoutine() { document.getElementById("pciethreshold").focus(); return; } function validate() { var i,errormessage; var oldval=new Array(); oldval[0]='<xsl:value-of select="RRWEThresholdInfo/DCStorageObject/RRWEThresholdPCIe"/>'; oldval[1]='<xsl:value-of select="RRWEThresholdInfo/DCStorageObject/RRWEThresholdSasSata"/>'; var text= new Array(); text[0]=document.getElementById("pciethreshold").value; text[1]=document.getElementById("sassatathreshold").value; var inputval=new Array(); inputval[0]=document.dataarea.pciethreshold.value;inputval[0] = removeLeadingZeros(inputval[0]); inputval[1]=document.dataarea.sassatathreshold.value;inputval[1] = removeLeadingZeros(inputval[1]); var i; var elements=new Array(); elements[0]="pciethreshold"; elements[1]="sassatathreshold"; if(oldval[0]==inputval[0] && oldval[1]==inputval[1] ) { alert("<xsl:value-of select="$strNoChangeInValue"/>"); return false; } else { for(i=0; i <2; i++)// there are 2 operations which needs to be validated { if(!check(text[i],inputval[i],oldval[i],i)) { return false; } } } return true; }//end of function validate function check(text,inputval,oldval,i) { var operation,displayoperation; switch(i) { case 0:operation="pciethreshold"; displayoperation='<xsl:value-of select="$strPCIeMsg"/>'; break; case 1:operation="sassatathreshold"; displayoperation="<xsl:value-of select="$strSasSataMsg"/>"; break; } // check that this isn't zero. if (text.length < 1) { alert("<xsl:value-of select="$strError"/>" + displayoperation + "<xsl:value-of select="$strvalidrange"/>"); 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="$strvalidrange"/>"); 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="$strvalidrange"/>"); document.getElementById(operation).value = ""; document.getElementById(operation).focus(); return false; } }//end of function check </script> </xsl:template> </xsl:stylesheet>
修改文件时间
将文件时间修改为当前时间的前一年
删除文件