Space banner This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

Code Example for a JWS Agent Interface page


The following code example launches a web page in which you need to enter the required login information, such as login name, password, master and port, etc. The following line will provide a row of button via which the specific functionalities are accessed for the required device.



<INCLUDE htmlfile="../common/scripts/defs.hchl" onceonly>

<SCRIPT>
    // Get keywords translations

    TranslationInfo TranslationList[]
    string szKeywords[]
    string szLine
    int i, iSize

    szKeywords <<= "_TITLE_CONSOLE_"
    szKeywords <<= "_NOTE_CONSOLE_"
    szKeywords <<= "_CONSOLE_DESC_"
    szKeywords <<= "_JRE_LINKNOTE_"
    szKeywords <<= "_JRE_LINKOTHEROS_"
    szKeywords <<= "_CONSOLE_ONECLICKINSTALL_"

    TranslationList = Translation (szKeywords)
    iSize = ArrayGetSize (TranslationList)

    szLine = "<SCRIPT language='Javascript'>" + ENDLINE
    szLine += "a = new Array (" + iSize + ");" + ENDLINE

    for (i = 0; i < iSize; i += 1)
        szLine += "a[" + i + "]=new Array (2);" + ENDLINE
        szLine += "a[" + i + "][0]=/"" + TranslationList[i+1].szKeyword + "/";" + ENDLINE
        szLine += "a[" + i + "][1]=/"" + TranslationList[i+1].szTranslation + "/";" + ENDLINE
    endfor

    szLine += "</"+"SCRIPT>" + ENDLINE

    Print (szLine)
</SCRIPT>

<SCRIPT language='Javascript'>
    function Popup (link)
    {
        window.open (link, "BmcClientManagement", "height=400, width=650, toolbar=no, menubar=no,
                    scrollbars=no, resizable=no, location=no, directories=no, status=no");
    }
</SCRIPT>
<FORM name='console'>
<INPUT type='hidden' name=URL>
 <TABLE>

    <TR>
        <TD class='COLUMN_TEXT1'><SCRIPT language='Javascript'>document.write ('Login');
            </SCRIPT>:&nbsp;&nbsp;</TD>
        <TD class='COLUMN_TEXT1'><INPUT type='text' name='login' size='20'>
        </TD>
     </TR>
    <TR>
        <TD class='COLUMN_TEXT1'><SCRIPT language='Javascript'>document.write ('Password');
            </SCRIPT>:&nbsp;&nbsp;</TD>
        <TD class='COLUMN_TEXT1'><INPUT type='text' name='password' size='20'>
        </TD>
     </TR>
     <TR>
        <TD class='COLUMN_TEXT1'><SCRIPT language='Javascript'>document.write ('Server:Port');
            </SCRIPT>:&nbsp;&nbsp;</TD>
        <TD class='COLUMN_TEXT1'><INPUT type='text' name='serverport' size='20'>
        </TD>
     </TR>
      <TR>
        <TD class='COLUMN_TEXT1'><SCRIPT language='Javascript'>document.write ('SSL');
            </SCRIPT>:&nbsp;&nbsp;</TD>
        <TD class='COLUMN_TEXT1'><INPUT type='text' name='ssl' size='20' value='0'>
        </TD>
     </TR>
    <TR>
        <TD class='COLUMN_TEXT1'><SCRIPT language='Javascript'>document.write ('DeviceName');
            </SCRIPT>:&nbsp;&nbsp;</TD>
        <TD class='COLUMN_TEXT1'><INPUT type='text' name='devicename' size='20'>
        </TD>
    </TR>
    <TR>
        <TD class='COLUMN_TEXT1'><SCRIPT language='Javascript'>document.write ('MiniConsole');
            </SCRIPT>:&nbsp;&nbsp;</TD>
        <TD><INPUT type='checkbox' name='checkmini' size='20'></TD>
    </TR>
    <TR>
        <TD class='COLUMN_TEXT1'><SCRIPT language='Javascript'>document.write ('Choose one
            context:');</SCRIPT>:&nbsp;&nbsp;</TD>
    </TR>
</TABLE>
</FORM>
<SCRIPT LANGUAGE='Javascript'>
   function RefreshURL ()
   {
        if (console.checkmini.checked)
            console.URL.value="jwsconsole.hchl?u=" + console.login.value +"&p=" +
            console.password.value + "&n=" + console.devicename.value + "&s=" +
            console.serverport.value + "&ssl=" + console.ssl.value +"&Limited"
        else
            console.URL.value="jwsconsole.hchl?u=" + console.login.value +"&p=" +
            console.password.value + "&n=" + console.devicename.value + "&s=" +
            console.serverport.value + "&ssl=" + console.ssl.value
   }
</SCRIPT>

    <INPUT type='button' Value='Operational Rules' OnClick='RefreshURL ();Popup
        (console.URL.value +"&context=op");'>
    <INPUT type='button' Value='Inventory' OnClick='RefreshURL ();Popup (console.URL.value +
        "&context=inv");'>
    <INPUT type='button' Value='Ping' OnClick='RefreshURL ();Popup (console.URL.value +
        "&context=Ping&Limited");'>
    <INPUT type='button' Value='Remote Control' OnClick='RefreshURL ();Popup (console.URL.value +
        "&context=rc");'>
    <INPUT type='button' Value='Registry Limited' OnClick='RefreshURL ();Popup (console.URL.value +
        "&context=Registry&Limited");'>
    <INPUT type='button' Value='Processes' OnClick='RefreshURL ();Popup (console.URL.value +
        "&context=Processes");'>
    <INPUT type='button' Value='Events' OnClick='RefreshURL ();Popup (console.URL.value +
        "&context=Events");'>
    <INPUT type='button' Value='Services' OnClick='RefreshURL ();Popup (console.URL.value +
        "&context=Services");'>
    <INPUT type='button' Value='Direct Access' OnClick='RefreshURL ();Popup (console.URL.value +
        "&context=da");'>
    <INPUT type='button' Value='File Transfer' OnClick='RefreshURL ();Popup (console.URL.value +
        "&context=FileTransfer");'>
            

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*