ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaly_5.4.0.1/rzalbcalcspace1.htm

197 lines
6.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
<title>Disk space calculator</title>
<script language="Javascript" type="text/javascript" src="../rzahg/synch.js"></script>
<script language="Javascript" type="text/javascript" src="../rzahg/iccommon.js"></script>
<script language="Javascript" type="text/javascript">
<!-- //////////
//START NON-TRANSLATABLE
function getCookieData(label) {
var labelLen = label.length;
var cLen = document.cookie.length;
var i=0;
var cEnd;
var noVal = "zzzz";
while (i < cLen) {
var j = i + labelLen;
if (document.cookie.substring(i,j) == label) {
cEnd = document.cookie.indexOf(";",j);
if (cEnd == -1) {
cEnd = document.cookie.length;
}
return unescape(document.cookie.substring(j+1,cEnd));
}
i++
}
//if they reach this point, no cookie data was found
return(noVal);
}
function detectenter(e) {
var charCode = (navigator.appName == "Netscape") ? e.which : e.keyCode;
if (charCode == 13) {
onCont();
return false;
}
}
//END NON-TRANSLATABLE
function onCont() {
message1 = "You must enter both the free and used space, and they both must be zero or greater.";
message2 = "One of the values you entered is not a valid number. Valid numbers are zero or greater.";
message3 = "The threshold must be a number between 1 and 99";
message4 = "The total of the free and used space must be greater than zero.";
message5 = "You must enter a value for the used space.";
message6 = "You must enter a value for the free space.";
cookieMess = "This calculator uses cookies to function. Ensure that you have are using a browser that supports cookies and that cookies are enabled.";
//START NON-TRANSLATABLE
a = document.form1.used.value;
b = document.form1.free.value;
c = document.form1.thresh.value;
if (!isNaN(a) && !isNaN(b) && a != "" && b != "" && a != null && b != null) {
a = eval(a);
b = eval(b);
if ((b >= 0) && (a >= 0) && (a + b > 0)) {
if ((c != "") && (c != null)) {
c = parseInt(c);
if (isNaN(c) || c >= 100 || c < 1) {
alert(message3);
return;
}
}
//Store the values and move to the next page
var exp = new Date();
var exp1 = new Date();
var oneDayFromNow = exp.getTime() + (24 * 60 * 60 * 1000);
exp.setTime(oneDayFromNow);
document.cookie = "diskcalcused=" + a + ";expires=" + exp.toGMTString();
document.cookie = "diskcalcfree=" + b + ";expires=" + exp.toGMTString();
if ((c != "") && (c != null)) {
document.cookie = "threshold=" + c + ";expires=" + exp.toGMTString();
} else {
c = "zzzz";
document.cookie = "threshold=" + c + ";expires=" + exp1.toGMTString();
}
input = getCookieData("diskcalcused"); //load stored data
if (input == "zzzz") { //cookie did not work, probably disabled
alert(cookieMess);
return;
}
window.location="rzalbcalcspace2.htm";
} else {
if (a + b > 0) {
alert(message1);
} else {
alert(message4);
}
return;
}
} else {
if (a == "" || a == null) {
alert(message5);
} else {
if (b == "" || b == null) {
alert(message6);
} else {
alert(message2);
}
}
return;
}
//END NON-TRANSLATABLE
}
//////////-->
</script>
</head>
<body>
<!-- Java sync-link -->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js"></script>
<h2>Disk space calculator</h2>
<NOSCRIPT>
<strong>Important: This finder uses JavaScript<sup>(TM)</sup>, but JavaScript is either not available or enabled in your browser.<br><br></strong>
</NOSCRIPT>
<p>Enter the existing amounts of used and free space, along with the threshold of the disk pool if you desire, and click <strong>Calculate</strong>.
If you do not know these values, use iSeries Navigator to <a href="../rzaly/rzalycalcspace.htm">look up the free space, used space, and threshold</a> on the disk pool.</p>
<form name="form1">
<table cellpadding="4" border="1" cellspacing="0">
<tr>
<td>
<table width="100%" border="0">
<tr>
<td>
<table width="100%" border="0">
<tr>
<td nowrap=""><label for="usedspace">Used space:</label></td>
<td nowrap=""><INPUT TYPE="number" NAME="used" SIZE="6" id="usedspace" onKeyPress="return detectenter(event)"> GB</td>
</tr>
<tr>
<td nowrap=""><br></td>
<td nowrap=""><br></td>
</tr>
<tr>
<td nowrap=""><label for="freespace">Free space:</label></td>
<td nowrap=""><INPUT TYPE="number" NAME="free" SIZE="6" id="freespace" onKeyPress="return detectenter(event)"> GB</td>
</tr>
<tr>
<td nowrap=""><br></td>
<td nowrap=""><br></td>
</tr>
<tr>
<td nowrap=""><label for="thresh"><a href="../rzaly/rzalypoolthreshold.htm">Threshold</a>:</label></td>
<td nowrap=""><INPUT TYPE="number" NAME="thresh" SIZE="6" maxlength="2" id="thresh" onKeyPress="return detectenter(event)"> % (optional)</td>
</tr>
<tr>
<td nowrap=""><br></td>
<td nowrap=""><br></td>
</tr>
<tr>
<td nowrap=""><br></td>
<td nowrap=""><br></td>
</tr>
<tr>
<td nowrap=""><br></td>
<td nowrap=""><br></td>
</tr>
<tr>
<td nowrap=""><br></td>
<td nowrap=""><br></td>
</tr>
</table>
</td>
<td align="center" nowrap=""><img src="none.gif" border="0" alt="Enter the free and used space on your disk pool">
<table width="100%" border="0">
<tr>
<td width="20%"></td>
<td nowrap=""><img src="pink.gif" border="0" alt=""> Free
<br><img src="blue.gif" border="0" alt=""> Used
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</table>
<br><br>
<CENTER>
<input name="submit" type="button" value="&nbsp;Next&nbsp;&gt;&gt;" onClick="onCont()">
</CENTER>
</form>
</body>
</html>