ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzall_5.4.0.1/rzalladvqos26.htm

406 lines
10 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Integrated service application</title>
<meta name="Copyright" content="Copyright (c) 2004 by IBM Corporation">
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!--
----------------------------------------------------------------------------
START_DESCRIPTION
Page Function: Customer defines integrated service application for this policy. Tells customer thye must write their own RSVP enabled applications on the server. All applications are assumed to be 'R' - meaning RSVP enabled. This note will show up on planning worksheet.
Stored Values:
[newappname](parent.hidden.intservapps[clientNum][pos][0])[alpha characters]
[port](parent.hidden.intservapps[clientNum][pos][1])[positive integer]
['R'](parent.hidden.intservapps[clientNum][pos][2])[R]
Next and Back:
[Next]: rzalladvqos30.htm
[Back]: rzalladvqos13.htm
END_DESCRIPTION
----------------------------------------------------------------------------
-->
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
<script language = "Javascript" src = "../rzahg/iccommon.js"></script>
<script language="Javascript" type="text/javascript">
var ports = new Array()
var pos
error2 = "You cannot add an application on a port that you have already defined."
error3 = "You must define at least one application"
error4 = "To add an application, you must define both an application name and port number."
error5 = "You cannot define multiple applications with the same name."
error6 = "A port must be a numeric value between 1 and 65535."
//START NON-TRANSLATABLE
clientNum = parent.hidden.retClientNumber()
customStart = parent.hidden.clientInfo[clientNum][13];
var app_name
function onNext(nextURL,direction) {
//intservapps
//clearApps();
var pos = 0
selectlength = document.otherapps.newapplist.length
//if ( selectlength != 0 && !isNaN(customStart) ) {
if ( selectlength != 0 && !isNaN(customStart) ) {
//find end of applist
//need to intercept if custom apps have been defined
app_length = parent.hidden.retintservappsLength(clientNum)
for ( var i=0; i<selectlength; i++ ) {
appname = document.otherapps.newapplist.options[i].text
start = appname.indexOf("(")
newappname = appname.substring(0,start)
end = appname.length
port = appname.substring(start+1,end-1)
//storing values now
parent.hidden.intservapps[clientNum][pos][0] = newappname //stores app name
parent.hidden.intservapps[clientNum][pos][1] = port //stores port num
parent.hidden.intservapps[clientNum][pos][2] = 'R'
pos ++;
}
combineIt();
window.location = nextURL;
}
else if ( selectlength == 0 && direction =='back' ) {
window.location = nextURL;
}
else {
alert(error3)
}
}
function addapp() {
appname = document.otherapps.addappname.value
portnum = document.otherapps.addappport.value
myInteger = document.otherapps.addappport.value;
var isOK = true;
listlength = document.otherapps.newapplist.length
isOK = checkcomplete()
//positive = isPosInteger(myInteger) //added by ljs in response to review comment on 1/30
positive = parent.hidden.isPosInteger(myInteger);
if ( !positive ) {
alert(error6)
document.otherapps.addappport.focus()
return false;
}
if (isOK){ //checking for duplicate user defined ports
isOK = checkuserdefinedports(portnum,appname)
}
if ( isOK ) {
isOK = checkuserdefinedapps(portnum,appname)
}
if ( isOK ) {
document.otherapps.newapplist.options[listlength] = new Option(appname + "(" + portnum + ")",portnum)
document.otherapps.addappname.value = ""
document.otherapps.addappport.value = ""
document.otherapps.addappname.focus();
}
}
function checkcomplete() {
if ( document.otherapps.addappport.value == '' || document.otherapps.addappname.value == '' ) {
alert(error4)
return false;
}
else {return true;}
}
function checkuserdefinedports(portnum,appname) {
//myInteger = document.otherapps.addappport.value;
listlength = document.otherapps.newapplist.length
for ( var i=0; i<listlength; i++ ) {
if ( document.otherapps.newapplist.options[i].value == portnum ) {
alert(error2);
document.otherapps.addappport.focus()
return false;
break;
}
}
return true;
}
function isPosInteger(myInteger) { //checking for positive integer //added by ljs in response to review comment on 1/30
myInteger = myInteger.toString();
for ( var i=0; i<myInteger.length; i++ ) {
var onechar = myInteger.charAt(i)
if ( onechar < "0" || onechar > "9" ) {
return false;
}
}
return true;
}
function checkuserdefinedapps(portnum,appname){
listlength = document.otherapps.newapplist.length
for ( var i=0; i<listlength; i++ ) {
testApp = document.otherapps.newapplist.options[i].text
end = testApp.indexOf('(')
newAppName = testApp.substring(0,end)
if ( appname == newAppName ) {
alert(error5);
document.otherapps.addappname.focus()
return false;
break;
}
}
return true;
}
function removeapp() {
selected = document.otherapps.newapplist.options[document.otherapps.newapplist.selectedIndex].value
remove_pos = 0
for ( var i=0; i<document.otherapps.newapplist.length; i++ ) {
if ( document.otherapps.newapplist.options[i].value == selected ) {
remove_pos = i
}
}
document.otherapps.newapplist.options[remove_pos] = null;
}
function removeit() {
document.otherapps.newapplist.options[0] = null;
document.otherapps.addappname.focus();
}
//Obtain name of HTML file in parent frame.
var parentDir = parent.window.location.href.substring(0,location.href.lastIndexOf('/')+1);
var parentUrl = parent.window.location.href.substring(parentDir.length,parent.window.location.href.length+1);
if (parentUrl.indexOf("#") >= 0) { parentUrl = parentUrl.substring(0,parentUrl.indexOf("#"));}
function fillin() {
//Is the hidden frame already loaded with the correct html?
if (parentUrl != "rzalladvqoswelcome.htm") {
window.location = "rzalladvqoswelcome.htm"; //load advisor frameset
return;
} else {
//Obtain name of HTML file in hidden frame.
var hiddenDir = parent.hidden.window.location.href.substring(0,location.href.lastIndexOf('/')+1);
var hiddenUrl = parent.hidden.window.location.href.substring(hiddenDir.length,parent.hidden.window.location.href.length+1);
if (hiddenUrl.indexOf("#") >= 0) { hiddenUrl = hiddenUrl.substring(0,hiddenUrl.indexOf("#"));}
if (hiddenUrl != "rzalladvqoshidden.htm") {
//Correct HTML not loaded, load it
parent.hidden.window.location = "rzalladvqoshidden.htm";
} else { //already loaded
fillin2();
}
}
}
function fillin2() {
if ( parent.hidden.intservapps[clientNum][0][0] == '' ) {
removeit()
}
else { // adding previously defined application
removeit();
app_length = parent.hidden.retintservappsLength(clientNum)
mypos = 0;
for ( var i=0; i<app_length; i++ ) {
appname = parent.hidden.intservapps[clientNum][i][0]
if ( appname == null || appname == "" ) {
break;
}
else {
portnum = parent.hidden.intservapps[clientNum][i][1]
document.otherapps.newapplist.options[mypos] = new Option(appname + "(" + portnum + ")",portnum)
mypos++;
}
}
}
clearCustomApps();
}
function clearCustomApps() {
app_length = parent.hidden.retintservappsLength(clientNum)
for ( var i=0; i<app_length; i++ ) {
if ( parent.hidden.intservapps[clientNum][i][0] != '') {
parent.hidden.intservapps[clientNum][i][0] = '' //stores app name
parent.hidden.intservapps[clientNum][i][1] = ''
parent.hidden.intservapps[clientNum][i][2] = ''
}
else {
break;
}
}
}
function clearApps() {
app_length = parent.hidden.retAppLength(clientNum)
for ( var i=customStart; i<app_length; i++ ) {
parent.hidden.clientapps[clientNum][i][0] = ''
parent.hidden.clientapps[clientNum][i][1] = ''
parent.hidden.clientapps[clientNum][i][2] = ''
}
}
function combineIt() { //this function combines the two arrays if there are custom apps
//intservapps
//if ( customStart != null) {
app_length = parent.hidden.retintservappsLength(clientNum)
/*myPos = parent.hidden.clientInfo[clientNum][13]
if (myPos == "" || myPos == null){
myPos = parent.hidden.clientInfo[clientNum][3];
} */
for ( var i=0; i<app_length; i++ ) {
appname = parent.hidden.intservapps[clientNum][i][0]
port = parent.hidden.intservapps[clientNum][i][1]
rsvpAnswer = parent.hidden.intservapps[clientNum][i][2]
if ( appname == '' || appname == null ) {
break;
}
else {
parent.hidden.clientapps[clientNum][i][0] = appname //stores app name
parent.hidden.clientapps[clientNum][i][1] = port //stores port num
parent.hidden.clientapps[clientNum][i][2] = rsvpAnswer // stores R or N
// myPos ++;
}
}
//}
}
function onBack() {
window.location = "rzalladvqos13.htm";
}
//END NON-TRANSLATABLE
</script>
</head>
<BODY onload="fillin()">
<h2>QoS planning advisor: Integrated service applications</h2>
<P>
If you want to reserve resources for a specific connection to this client, you will need to write your own RSVP-enabled application. To give dedicated delivery to a connection, you create an integrated service policy which uses the RSVP protocol. Because there are no RSVP-enabled applications on your server, use the <A HREF="../rzak8/rzak8rsvp.htm" TARGET="_blank">RAPI APIs or QoS Socket APIs</a> to enable your own applications. </P>
<P>What are the applications that you intend to write on the server?</P>
<p></p>
<form name="otherapps">
<label for="application">Application:</label>
<INPUT TYPE="text" SIZE=25 MAXLENGTH=25 NAME="addappname" id="application">
<label for="port">Port:</label>
<INPUT TYPE="text" SIZE=5 MAXLENGTH=5 NAME="addappport" id="port">
<INPUT TYPE="button" NAME="Add" VALUE="&nbsp;&nbsp;&nbsp;Add&nbsp;&nbsp;&nbsp;" onClick="addapp()">
<p></p>
<table>
<tr><td>
<label for="myapps3">My Applications:</label><br>
<SELECT NAME="newapplist" SIZE=10 onClick = "displayit()" id="myapps3">
<OPTION VALUE="first">xxxxxxxxxxxxxxxxxxxxxxxx
</SELECT>
</td><td><center>
<br><INPUT TYPE="button" NAME="Remove" VALUE="Remove" onClick="removeapp()">
</td></tr>
</center>
</table>
<p></p>
<center>
<input name=submit type="button" value="&lt;&lt;&nbsp;Back&nbsp" onClick="onNext('rzalladvqos13.htm','back')">
<input name=submit type="button" value="&nbsp;Next&nbsp&gt;&gt;" onClick="onNext('rzalladvqos30.htm','forward')">
</CENTER>
</form>
</BODY>
</html>