You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1218 lines
52 KiB
1218 lines
52 KiB
<!--
|
|
Copyright (c) 2000 Microsoft Corporation
|
|
-->
|
|
|
|
<HTML XMLNS:helpcenter>
|
|
|
|
<!--
|
|
Styles used by this web page and the saved web page. Some of these styles are already defined in
|
|
PCHEALTH, but they are included here so the saved web page can inherite these styles.
|
|
-->
|
|
<STYLE id=idStyles>
|
|
.sys-font-body
|
|
{
|
|
font : messagebox;
|
|
}
|
|
.sys-color-body
|
|
{
|
|
color : #000000;
|
|
}
|
|
.sys-color-body-alert
|
|
{
|
|
color : #FF0000;
|
|
}
|
|
.sys-color-body-ok
|
|
{
|
|
color : #009900;
|
|
}
|
|
.sys-toppane-header-color
|
|
{
|
|
color : #FFFFFF;
|
|
}
|
|
.Text-Caption
|
|
{
|
|
color : blue;
|
|
font-family : Tahoma;
|
|
font-size : 8pt;
|
|
align-text : left
|
|
}
|
|
.Text-Comment
|
|
{
|
|
color : blue;
|
|
font-family : Tahoma;
|
|
font-size : 8pt;
|
|
align-text : left
|
|
}
|
|
.Text-Data
|
|
{
|
|
color : black;
|
|
font-family : Tahoma;
|
|
font-size : 7pt;
|
|
align-text : left
|
|
}
|
|
.Text-Loading
|
|
{
|
|
color : green;
|
|
font-family : Tahoma;
|
|
font-size : 8pt;
|
|
align-text : center;
|
|
font-weight : bold;
|
|
}
|
|
.Text-OptionDescription
|
|
{
|
|
color : green;
|
|
font-family : Tahoma;
|
|
font-size : 8pt;
|
|
align-text : center;
|
|
font-style : italic;
|
|
margin-left : 50 px
|
|
}
|
|
.AlignCenter
|
|
{
|
|
text-align:"center"
|
|
}
|
|
|
|
.AlignRight
|
|
{
|
|
text-align:"right"
|
|
}
|
|
|
|
.AlignLeft
|
|
{
|
|
text-align:"Left"
|
|
}
|
|
|
|
|
|
.Text-ErrorMsg
|
|
{
|
|
color : green;
|
|
font-family : Tahoma;
|
|
font-size : 12pt;
|
|
}
|
|
|
|
|
|
</STYLE>
|
|
|
|
<!--
|
|
Include PCHEALTH's style sheets, so we can have the same look
|
|
-->
|
|
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
|
|
<LINK ID=Stylesheet_Ref1 href="hcp://system/css/Behaviors.css" rel=STYLESHEET type=text/css>
|
|
<LINK ID=Stylesheet_Ref2 href="hcp://system/css/Layout.css" rel=STYLESHEET type=text/css>
|
|
<LINK ID=Stylesheet_Ref href="hcp://system/css/Shared.css" rel=STYLESHEET type=text/css>
|
|
|
|
<STYLE>
|
|
BODY
|
|
{
|
|
margin : 16px;
|
|
margin-top : 11px;
|
|
}
|
|
|
|
.layout-description
|
|
{
|
|
margin-top : 3px;
|
|
}
|
|
|
|
.layout-arrow
|
|
{
|
|
position : relative;
|
|
top : 7px;
|
|
margin-right : 4px;
|
|
|
|
width : 20px;
|
|
height : 20px;
|
|
}
|
|
|
|
.LearnMore
|
|
{
|
|
margin-top: 1em
|
|
}
|
|
</STYLE>
|
|
|
|
|
|
<BODY onbeforeunload="OnClose()" class="sys-rhp-color" >
|
|
<TITLE id=idTitelTxt>Network Diagnostics</TITLE>
|
|
<script id=shared_vbs language=VBS>
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' Shared VBS code. Both this page and the saved file uses these functions
|
|
'' to navigate through the tree
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
|
|
' This flag indicates if the results tree should be displayed in text mode (i.e. + and - signs)
|
|
' or in non text mode (with the + and - images). The text mode is used by the saved file
|
|
' so it can be an independent htm file (does not rely on the +/- images)
|
|
g_bTextMode = TRUE
|
|
|
|
' +/- images used by the results tree
|
|
g_ImagePath = "..\images\expando\"
|
|
g_CollapseMouseRest = g_ImagePath & "expanded.gif"
|
|
g_ExpandMouseRest = g_ImagePath & "collapsed.gif"
|
|
g_EmptyMouseRest = g_ImagePath & "endnode.gif"
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' Toggle -
|
|
'' Description - Expand and collapse a branch in the results tree
|
|
'' Arguments - idButton - id of the + / - sign (Text or non text depending on the mode)
|
|
'' divSub - id of the branch to expand or collapse
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function toggle(idButton, divSub)
|
|
select case idButton.value
|
|
case 0
|
|
' Was expanded, now will be collapsed
|
|
divSub.style.display = "none"
|
|
idButton.value = 1
|
|
idButton.innerHTML = GetTreeButtonImage(idButton.value,0)
|
|
case 1
|
|
' Was collapsed, now will be expanded
|
|
divSub.style.display = ""
|
|
idButton.value = 0
|
|
idButton.innerHTML = GetTreeButtonImage(idButton.value,0)
|
|
case 2
|
|
' Does not change. It is a leaf, has nothing to expand of collapse
|
|
idButton.value = 2
|
|
idButton.innerHTML = GetTreeButtonImage(idButton.value,0)
|
|
end select
|
|
window.event.cancelBubble = true
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' Toggle -
|
|
'' Description - Gets HTML code for the +/- sign.
|
|
'' Arguments - bButtonState - State of the button (expanded, collapsed, none)
|
|
'' Return - HTML code with the corresponding +/-
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function GetTreeButtonImage(bButtonState, bMouseState)
|
|
if g_bTextMode then
|
|
' Get the Text mode +/-
|
|
select case bButtonState
|
|
case 0
|
|
strImg = "<SPAN style='font-family:Courier'> - </SPAN>"
|
|
case 1
|
|
strImg = "<SPAN style='font-family:Courier'> + </SPAN>"
|
|
case else
|
|
strImg = "<SPAN style='font-family:Courier'>   </SPAN>"
|
|
end select
|
|
GetTreeButtonImage = strImg
|
|
else
|
|
' Get the non text mode +/-
|
|
select case bButtonState
|
|
case 0
|
|
strImg = g_CollapseMouseRest
|
|
case 1
|
|
strImg = g_ExpandMouseRest
|
|
case else
|
|
strImg = g_EmptyMouseRest
|
|
end select
|
|
GetTreeButtonImage = "<img src='" & strImg & "'> "
|
|
end if
|
|
end function
|
|
</script>
|
|
|
|
<!--
|
|
Display the Network Diagnostics Title and a description of what this page does
|
|
-->
|
|
<DIV id=idTitelTxt class="sys-font-heading3 sys-rhp-color-title">
|
|
Network Diagnostics
|
|
</DIV>
|
|
<BR>
|
|
|
|
<DIV id=idDescription class="sys-font-body sys-color-body">
|
|
Network Diagnostics scans your system to gather information about your hardware, software, and network connections.
|
|
|
|
<DIV class="LearnMore">
|
|
<A TABINDEX=0 class="sys-font-body sys-link-normal" href="" onclick="ShowLearnMore('dglogshelp.htm');return false;" onkeypress="ShowLearnMore('dglogshelp.htm');return false;">
|
|
<ID id=idLeanAboutText>Tell me about Network Diagnostics</ID>
|
|
</A>
|
|
</DIV>
|
|
</DIV>
|
|
|
|
<!--
|
|
Load the Network Diagnostics ActiveX Object (DGLOGS.DLL). This ActiveX object collects all of the computer
|
|
information, performs all the tests and hands the data back to this web page in an XML format
|
|
-->
|
|
<OBJECT id=Dglogs classid=clsid:76FF3452-E474-4032-BED5-BBE4E96B6D2F></OBJECT>
|
|
<OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
|
|
<!--
|
|
Display the Start scan and set options buttons
|
|
-->
|
|
<DIV class="layout-description">
|
|
<A id=idScan class="sys-link-normal sys-font-body sys-color-body" href="" onclick="OnStart();return false;" onkeypress="OnStart();return false;">
|
|
<helpcenter:bitmap class="layout-arrow" SRCNORMAL="hcp://system/images/16x16/arrow_green_normal_shadow.bmp"></helpcenter:bitmap>
|
|
<ID id=idScanTxt> Scan your system </ID>
|
|
</A>
|
|
</DIV>
|
|
|
|
<DIV class="layout-description">
|
|
<A id=idSetOptions class="sys-link-normal sys-font-body sys-color-body" href="" onclick="OnSetOptions();return false;" onkeypress="OnSetOptions();return false;">
|
|
<helpcenter:bitmap class="layout-arrow" SRCNORMAL="hcp://system/images/16x16/arrow_blue_normal_shadow.bmp"></helpcenter:bitmap>
|
|
<ID id=idSetOptionTxt>Set scanning options</ID>
|
|
</A>
|
|
</DIV>
|
|
|
|
<!--
|
|
Displays the progress bar. Above the progress bar is the completion percentage. Below the progres bar
|
|
is the message informing the user of what the program is currently doing.
|
|
-->
|
|
<DIV id=idProgress style='display:none AlignCenter'>
|
|
<CENTER>
|
|
<table width=50% height=60%>
|
|
<tr><td class=AlignCenter>
|
|
<DIV id=idLoadPercent class='text-loading'></DIV>
|
|
<DIV id=idProgressBar></DIV>
|
|
<DIV id=idLoadMsg class='text-loading'></DIV>
|
|
<P>
|
|
<INPUT class='sys-font-body AlignCenter' type="button" value="Cancel" id=idAbort onclick="OnAbort()">
|
|
</td></tr>
|
|
</table>
|
|
</CENTER>
|
|
</DIV>
|
|
|
|
<!--
|
|
Displays the options page.
|
|
-->
|
|
<DIV id=idOptions style='display:none'>
|
|
<table width=100%>
|
|
|
|
<tr><td class=AlignRight>
|
|
<SPAN id=idBackButton><INPUT class=sys-font-body type="button" value="Back to Results Page" id=idBack onclick="OnBack()"></SPAN>
|
|
</td></tr>
|
|
|
|
<tr>
|
|
<td class=AlignLeft bgcolor=darkblue>
|
|
<DIV class="sys-font-body-bold sys-toppane-header-color">
|
|
<ID id=idOptionsText> Options </ID>
|
|
</DIV>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<DIV id=idOptionSet class="sys-font-heading4 sys-rhp-color-title"> Actions </DIV>
|
|
|
|
<SPAN id=idPingDescText title="Ping tries to contact a remote computer on the network. Successfully contacting the computer does not imply that the required network service is running." >
|
|
<INPUT id=idPing CHECKED type=checkbox name=Ping>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Ping
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idConnectDescTxt title="Connect checks whether a remote computer appears to be supporting a networking service. If the remote computer does appear to be supporting a networking service, it does not guarantee that the network service is operating correctly but does imply that it is running." >
|
|
<INPUT id=idConnect CHECKED type=checkbox name=Connect>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Connect
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idShowDescText title="Show gathers basic computer information for certain categories.">
|
|
<INPUT id=idShow CHECKED type=checkbox name=Show>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Show
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idVerboseDescText title="Verbose gathers advanced computer information for certain categories.">
|
|
<INPUT id=idVerbose type=checkbox name=Verbose>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Verbose
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idSaveDesktopDescText title="Save the file to the desktop.">
|
|
<INPUT id=idSaveToDeskTop CHECKED type=checkbox name=SaveToDeskTop >
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Save to Desktop
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
|
|
<DIV class="sys-font-heading4 sys-rhp-color-title"><ID id=idCategoriesText>Categories</ID></DIV>
|
|
|
|
<SPAN id=idMailDescTxt title="Displays the inbound and outbound mail server host name, port number, and mail type. The Actions that apply are Ping and Connect.">
|
|
<INPUT id=idMail CHECKED type=checkbox name=Mail>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Mail Service
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idNewsDescText title="Displays the default Outlook Express news server name and port number. The Actions that apply are Ping and Connect.">
|
|
<INPUT id=idNews CHECKED type=checkbox name=News>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
News Service
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idProxyDescText title="Displays Internet Explorer's server name, port number, and whether the proxy is enabled. The Actions that apply are Ping and Connect.">
|
|
<INPUT id=idProxy CHECKED type=checkbox name=IEProxy>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Internet Proxy Server
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idComputerDescText title="Displays information about your local computer. The Actions that apply are Show and Verbose.">
|
|
<INPUT id=idComputer CHECKED type=checkbox name=Computer>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Computer Information
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idOSDescText title="Displays information about your operating system. The Actions that apply are Show and Verbose.">
|
|
<INPUT id=idOS CHECKED type=checkbox name=OS>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Operating System
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idVersionDescText title="Displays your Windows version information. The Actions that apply are Show and Verbose.">
|
|
<INPUT id=idVersion CHECKED type=checkbox name=Version>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Windows Version
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idModemsDescText title="Displays all modems. The Actions that apply are Show and Verbose.">
|
|
<INPUT id=idModem CHECKED type=checkbox name=Modem>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Modems
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idClientsDescText title="Displays all of your network clients. The Actions that apply are Show and Verbose.">
|
|
<INPUT id=idClient CHECKED type=checkbox name=Client>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Network Clients
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idAdapterDescText title="Displays all active and inactive adapters on your network. The Actions that apply are Ping, Show, and Verbose.">
|
|
<INPUT id=idAdapter CHECKED type=checkbox name=Adapter>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Network Adapters
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idDomainDescText title="Displays the Domain Name Servers for each network adapter. The Action that applies is Ping.">
|
|
<INPUT id=idDns type=checkbox name=DNS>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Domain Name System (DNS)
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idDHCPDescText title="Displays the DHCP servers for each network adapter. The Action that applies is Ping.">
|
|
<INPUT id=idDhcp type=checkbox name=DHCP>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Dynamic Host Configuration Protocol (DHCP)
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idGatewayDescText title="Displays the default gateway server for each network adapter. The Action that applies is Ping.">
|
|
<INPUT id=idGateway type=checkbox name=Gateway>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Default Gateways
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idIPDescText title="Displays the Internet Protocol Address for each network adapter. The Action that applies is Ping.">
|
|
<INPUT id=idIP type=checkbox name=IP>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Internet Protocol Address
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
<SPAN id=idWINSDescText title="Displays the primary and secondary WINS servers for each network adapter. The Action that applies is Ping.">
|
|
<INPUT id=idWins type=checkbox name=Wins>
|
|
<SPAN class="sys-font-body sys-color-body">
|
|
Windows Internet Naming Service (WINS)
|
|
</SPAN>
|
|
</SPAN><BR>
|
|
|
|
</DIV>
|
|
|
|
|
|
<DIV id=idResults style="display:none">
|
|
<table width=100%>
|
|
<TR>
|
|
<TD class=AlignRight>
|
|
|
|
|
|
<span id=idShowSavedFile>
|
|
<A id=idShowSavedFiles href="" target="_blank" class="sys-link-normal sys-font-body sys-color-body">
|
|
<ID id=idShowSavedFileText>Show Saved Files</ID>
|
|
</A>
|
|
</span>
|
|
<INPUT class=sys-font-body type="button" value='Save to file...' id=idSaveToFile onclick='OnSaveToFile()'>
|
|
</TD>
|
|
</TR>
|
|
<tr><td>
|
|
<DIV id=idData style="COLOR: black" ></DIV>
|
|
<DIV id=idDataTxt style="display:none"></DIV>
|
|
</td></tr>
|
|
</table>
|
|
</DIV>
|
|
|
|
<!--
|
|
Blank ID. Do not delete. Branches that are empty refrence this id. They need an id to refernce.
|
|
-->
|
|
<DIV id=idBlank></DIV>
|
|
|
|
<SCRIPT Language=javascript>
|
|
/* Make the dialog variable global and initialize it to null so you can test for its existence before calling showModelessDialog. e.g. when it exists it is not null. However, it must be set back to null when the dialog closes (see below). This ensures that only one instance of the Tell me dialog can exist at one time... */
|
|
|
|
var g_oLearnMoreDlg = null;
|
|
var sDlgFeatures = "help:no;status:no;resizable:no;dialogWidth:385px;dialogHeight:440px"
|
|
|
|
function ShowLearnMore( sTopicURL )
|
|
{
|
|
if( null == g_oLearnMoreDlg )
|
|
{
|
|
//pass in a reference to this window so that script in the dialog can communicate with this page...
|
|
g_oLearnMoreDlg = window.showModelessDialog( sTopicURL, window, sDlgFeatures );
|
|
}
|
|
}
|
|
|
|
</SCRIPT>
|
|
|
|
<SCRIPT LANGUAGE=VBS>
|
|
|
|
' The begining and end of the saved web page
|
|
SavedFile_Head = "<BODY><HTML><SCRIPT Language=javascript></"
|
|
SavedFile_Head = SavedFile_Head + "SCRIPT><DIV id=idBlank style='display:none'></DIV>"
|
|
SavedFile_Tail = "</BODY></HTML>"
|
|
|
|
' Text that is displayed by the web page. Done so it can be localized.
|
|
L_NetDiagSave_FileName = "Netdiag "
|
|
L_NetDiagPath_FolderName = "\pchealth\helpctr\system\netdiag"
|
|
L_Canceling_Text = "Canceling, please wait ..."
|
|
L_DgnetLoadError_Text = "Unable to load ActiveX Control Dgnet.dll"
|
|
L_Fail_Text = "FAILED"
|
|
L_Pass_Text = "PASSED"
|
|
L_FileSaved_Text = "File Saved:"
|
|
L_DgnetOtherInstance_Text = "Another instance of this program is already running."
|
|
L_FormatingResults_Text = "Formatting Results"
|
|
L_NoFileSaved_Text = "File not saved. Select the save to desktop option, to save the file to the desktop."
|
|
L_SaveToDesktop_Text = "To your desktop: "
|
|
L_AndTo_Text = "and to "
|
|
L_InvalidOptionSelection_Text = "Please ensure that at least one of the following options is checked: Ping, Connect, Show"
|
|
L_NoData_Text = "No data to display"
|
|
|
|
' Constant values
|
|
const FLAG_VERBOSE_LOW = 1
|
|
const FLAG_VERBOSE_MEDIUM = 2
|
|
const FLAG_VERBOSE_HIGH = 4
|
|
const FLAG_CMD_PING = 8
|
|
const FLAG_CMD_SHOW = 16
|
|
const FLAG_CMD_CONNECT = 32
|
|
|
|
' Global variables
|
|
g_bRunning = FALSE ' Indicates that the program is collecting data
|
|
g_bTextMode = FALSE ' Indicates that the results tree should be displayed with images rather than +/- text
|
|
g_FormatingData = FALSE ' Indicates that e program has finished collecting data and is now formating the results tree with the data
|
|
g_strLastCategory = ""
|
|
g_iIDCount = 0
|
|
g_fso = NULL
|
|
g_xmlDoc = NULL
|
|
g_WshShell = NULL
|
|
|
|
' Initialize the web page
|
|
call Initialize()
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' Initialize
|
|
'' Description - Initialize the wbe page. Load the settings, Set the PCHEALTH link, create
|
|
'' the filesystem and XML objects
|
|
'' Arguments - void
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function Initialize
|
|
|
|
|
|
if pchealth.UserSettings.IsAdmin then
|
|
' Get the PCHEALTH path and the Show Saved files link
|
|
Set g_fso = CreateObject("Scripting.FileSystemObject")
|
|
fname = g_fso.GetSpecialFolder(WindowsFolder) & L_NetDiagPath_FolderName
|
|
idShowSavedFile.style.display = ""
|
|
idShowSavedFiles.href = fname
|
|
idSaveDesktopDescText.style.display = ""
|
|
else
|
|
idShowSavedFile.style.display = "none"
|
|
idSaveDesktopDescText.style.display = "none"
|
|
idSaveToDeskTop.Checked = TRUE
|
|
end if
|
|
|
|
' Create the wshell object so we can get the desktop dir
|
|
set g_WshShell = CreateObject("WScript.Shell")
|
|
|
|
' Create the XML parser object
|
|
Set g_xmlDoc = CreateObject("microsoft.xmldom")
|
|
g_xmlDoc.async = False
|
|
|
|
' Display the into page. i.e. nothing
|
|
call SetDisplay(0)
|
|
|
|
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' OnShowSavedFiles
|
|
'' Description - Opens a new window to display the saved files
|
|
'' Arguments - void
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function OnShowSavedFiles
|
|
document.links
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' OnBack
|
|
'' Description - Switches from the options page to the result page
|
|
'' Arguments - void
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function OnBack()
|
|
if idData.innerHTML <> "" and not g_FormatingData then
|
|
' Only switch to the results view if the data has already been collected
|
|
SetDisplay(3)
|
|
end if
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' OnBack
|
|
'' Description - Switches to the specified view
|
|
'' 0 - Intro page (blank page)
|
|
'' 1 - Options page
|
|
'' 2 - Progress bar page
|
|
'' 3 - Results page
|
|
'' Arguments - iType - Page to switch to
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function SetDisplay(iType)
|
|
select case iType
|
|
case 0 ' Intro
|
|
idOptions.style.display = "none"
|
|
idProgress.style.display = "none"
|
|
idResults.style.display = "none"
|
|
idScan.style.display = ""
|
|
idSetOptions.style.display = ""
|
|
|
|
case 1 'Options Display
|
|
idOptions.style.display = ""
|
|
idProgress.style.display = "none"
|
|
idResults.style.display = "none"
|
|
idScan.style.display = ""
|
|
idSetOptions.style.display = "none"
|
|
|
|
case 2 ' Progress display
|
|
idOptions.style.display = "none"
|
|
idProgress.style.display = ""
|
|
idResults.style.display = "none"
|
|
idScan.style.display = "none"
|
|
idSetOptions.style.display = "none"
|
|
|
|
case 3 ' Data display
|
|
idOptions.style.display = "none"
|
|
idProgress.style.display = "none"
|
|
idResults.style.display = ""
|
|
idScan.style.display = ""
|
|
idSetOptions.style.display = ""
|
|
|
|
end select
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' OnBack
|
|
'' Description - Stops the dglogs query, and goes back to the results page
|
|
'' Arguments - void
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function OnClose()
|
|
if g_bRunning = TRUE then
|
|
idLoadMsg.innerHTML = L_Canceling_Text
|
|
Dglogs.StopQuery
|
|
g_bRunning = false
|
|
SetDisplay(0)
|
|
end if
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' OnAbort
|
|
'' Description - If the web page is collecting data and the Cancel button
|
|
'' is pressed, this function stops the query and tries to restore the old
|
|
'' results. If the web page was formatting the results and the users press
|
|
'' the cancel button, the old results can not be restored.
|
|
'' Arguments - void
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function OnAbort()
|
|
call OnClose
|
|
if idData.innerHTML <> "" and not g_FormatingData then
|
|
' We are able to restore the old results
|
|
SetDisplay(3)
|
|
end if
|
|
end function
|
|
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' GetSettings
|
|
'' Description - Gets the options/settings that are checked
|
|
'' Arguments - void
|
|
'' Return - strCategory - list of the categories that are checked
|
|
'' bFlag - the actions that are checked
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function GetSettings(byref strCategory, byref bFlag)
|
|
bFlag = 0
|
|
strCategory = ""
|
|
set Options = idOptions.all.tags("INPUT")
|
|
for each id in Options
|
|
if id.checked then
|
|
select case id.name
|
|
case "Verbose"
|
|
bFlag = bFlag OR FLAG_VERBOSE_HIGH
|
|
case "Ping"
|
|
bFlag = bFlag OR FLAG_CMD_PING
|
|
case "Connect"
|
|
bFlag = bFlag OR FLAG_CMD_CONNECT
|
|
case "Show"
|
|
bFlag = bFlag OR FLAG_CMD_SHOW
|
|
case else
|
|
' Get the selected categories
|
|
strCategory = strCategory + id.name + ";"
|
|
end select
|
|
end if
|
|
next
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' OnSetOptions
|
|
'' Description - Displays the options page. If the user already collected data, the options
|
|
'' page displays a button that enables the user to get back to the results page
|
|
'' Arguments - void
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function OnSetOptions
|
|
if idData.innerHTML = "" then
|
|
' No data has been collected yet, do not display the back button
|
|
idBackButton.style.display = "none"
|
|
else
|
|
' The user collected data, display the back button
|
|
idBackButton.style.display = ""
|
|
end if
|
|
|
|
' Display the options page
|
|
SetDisplay(1)
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' CStr2
|
|
'' Description - Makes sure that a number is at least two digits i.e. 1 => 01
|
|
'' Arguments - num = number to check
|
|
'' Return - two digit number
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
public function CStr2(num)
|
|
s = CStr(num)
|
|
if num < 10 then
|
|
CStr2 = "0" + s
|
|
else
|
|
CStr2 = s
|
|
end if
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' SaveFile
|
|
'' Description - Creates the saved file.
|
|
'' Arguments - Object indicating where to save the file too
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function CreateFile(FileName)
|
|
Dim Fso
|
|
Dim File
|
|
set fso = createobject("scripting.filesystemobject")
|
|
set File = fso.createTextfile(Filename,true,true)
|
|
File.WriteLine(SavedFile_Head)
|
|
File.WriteLine(shared_vbs.outerHTML)
|
|
File.WriteLine(idStyles.outerHTML)
|
|
File.WriteLine(idDataTxt.innerHtml)
|
|
File.WriteLine(SavedFile_Tail)
|
|
File.Close
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' OnSaveToFile
|
|
'' Description - Saves the results to a file. The +/- images are converted into
|
|
'' +/- text signs so the saved file does not depend on these images.
|
|
'' its a pain to find them
|
|
'' Arguments - void
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function OnSaveToFile
|
|
On Error Resume Next
|
|
Dim MyFile
|
|
Dim currentDate
|
|
Dim MyFile2
|
|
|
|
bFileSaved = false
|
|
|
|
' Convert the results into a texted based tree by changing the +/- images to text +/-
|
|
' The text tree is stored in idDataTxt so we do not alter the original results
|
|
MakeTextTree()
|
|
|
|
' Create the filename (based on the date)
|
|
currentDate = now()
|
|
sDate = CStr2(day(currentDate)) + CStr2(month(currentDate)) + CStr2(year(currentDate)) + " " + CStr2(hour(currentDate)) + CStr2(minute(currentDate)) + CStr2(second(currentDate))
|
|
fname = L_NetDiagSave_FileName + sDate + ".htm"
|
|
|
|
' strSavedTo tells the user where we saved the file
|
|
strSavedTo = L_FileSaved_Text
|
|
if idSaveToDeskTop.checked OR not pchealth.UserSettings.IsAdmin then
|
|
' Save the file to the desktop. (the user selected this option)
|
|
strDesktop = g_WshShell.SpecialFolders("Desktop")
|
|
CreateFile(strDesktop & "\" & fname)
|
|
strSavedTo = strSavedTo & vbNewLine & L_SaveToDesktop_Text & fname
|
|
bFileSaved = true
|
|
end if
|
|
|
|
if pchealth.UserSettings.IsAdmin then
|
|
'Save the file in the PC health dir
|
|
strWindowDir = g_fso.GetSpecialFolder(WindowsFolder)
|
|
fname = strWindowDir & L_NetDiagPath_FolderName & "\" & fname
|
|
CreateFile(fname)
|
|
if bFileSaved then
|
|
strSavedTo = strSavedTo & vbNewLine & L_AndTo_Text & fname
|
|
else
|
|
strSavedTo = strSavedTo & vbNewLine & fname
|
|
end if
|
|
bFileSaved = true
|
|
end if
|
|
|
|
if bFileSaved = false then
|
|
strSavedTo = L_NoFileSaved_Text
|
|
end if
|
|
|
|
' Clear the temp saved results so the ids do not conflict with each other
|
|
idDataTxt.innerHTML = ""
|
|
|
|
'Let the user know that there information has been saved
|
|
MsgBox strSavedTo
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' OnStart
|
|
'' Description - Querys dgnet.dll (dglogs) for the specified data (the categories the user
|
|
'' selected)
|
|
'' Arguments - void
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function OnStart
|
|
if idShow.Checked = false and idPing.Checked = false and idConnect.Checked = false then
|
|
MsgBox L_InvalidOptionSelection_Text
|
|
OnSetOptions
|
|
exit function
|
|
end if
|
|
if Dglogs is nothing then
|
|
' The dglogs object failed to be created
|
|
Msgbox L_DgnetLoadError_Text
|
|
else
|
|
g_bRunning = TRUE
|
|
' Initialize the progress bar and set to the progress bar view
|
|
call DrawProgressBar(idProgressBar,0,"")
|
|
SetDisplay(2)
|
|
' Get the settings/options
|
|
call GetSettings(strCategory,bFlag)
|
|
|
|
' Last category indicates which category was last displayed. Categories begin Internet Service, Network Adapters and
|
|
' Modems etc. g_iIDCount is the IDs
|
|
g_strLastCategory = ""
|
|
g_iIDCount = 0
|
|
strRetVal = Dglogs.ExecQuery(strCategory, bFlag)
|
|
if strRetVal = L_Fail_Text then
|
|
Msgbox L_DgnetOtherInstance_Text
|
|
g_bRunning = FALSE
|
|
SetDisplay(3)
|
|
end if
|
|
end if
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' Dglogs_ProgressReport
|
|
'' Description - Increments the progress bar and displays the messages dgnet.dll is
|
|
'' reporting.
|
|
'' Arguments - strMsg - The message reported by dgnet.dll
|
|
'' n - the percentage completed.
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function Dglogs_ProgressReport(strMsg,n)
|
|
if n = -1 then
|
|
' Dgnet.dll is done. strMsg is the XML text containing the results
|
|
' g_FormatingData means that we are converting the data from XML to HTML
|
|
' we can not go back to the old results (i.e. cancel)
|
|
g_FormatingData = TRUE
|
|
' Convert the XML text to HTML text
|
|
call ConvertXMLToHtml(strMsg)
|
|
' Done formating data, display it
|
|
g_FormatingData = FALSE
|
|
SetDisplay(3)
|
|
else
|
|
' Display the progress
|
|
if n = 100 then
|
|
' The last % is for formatting the data
|
|
call DrawProgressBar(idProgressBar,99,L_FormatingResults_Text)
|
|
else
|
|
' display the status report
|
|
call DrawProgressBar(idProgressBar,n,strMsg)
|
|
end if
|
|
end if
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' DrawProgressBar
|
|
'' Description - Increments the progress bar and displays the messages dgnet.dll is
|
|
'' reporting. The progress bar is a table with 2 columns.
|
|
'' Arguments - strMsg - The message reported by dgnet.dll
|
|
'' n - the percentage completed.
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function DrawProgressBar(idTag, bCount, strMsg)
|
|
if bCount <> -1 then
|
|
idLoadPercent.innerHTML = bCount & "%"
|
|
idLoadMsg.innerHTML = strMsg
|
|
idTag.innerHtml = "<TABLE width=100% height='25' border=0>" & _
|
|
"<TD width='" & bCount & "%' bgcolor=blue align=center></TD>" & _
|
|
"<TD width='" & (100 - bCount) & "%'></TD>" & _
|
|
"</TABLE>"
|
|
end if
|
|
window.status = strMsg
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' GetTreeButton
|
|
'' Description - Get the +/- sign for the tree
|
|
'' Arguments - strID - Button ID
|
|
'' bType - Button state (expanded, collapsed, empty)
|
|
'' Return - HTML code for the button
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function GetTreeButton(strID, bType)
|
|
GetTreeButton = "<SPAN value=" & bType & " id=tag" & strID & ">" & GetTreeButtonImage(bType,0) & "</SPAN>"
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' MakeTextTree
|
|
'' Description - Convert the +/- images into +/- text. The idDataTxt stores the text tree
|
|
'' Arguments - void
|
|
'' Return - void
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function MakeTextTree()
|
|
g_bTextMode = TRUE
|
|
' Copy the tree
|
|
idDataTxt.innerhtml = idData.innerhtml
|
|
' Get all the branches
|
|
set Branches=idDataTxt.all.tags("SPAN")
|
|
for each idBranch in Branches
|
|
if "tag" = Left(idBranch.id,len("tag")) then
|
|
' Found a brach, convert it into a text +/-
|
|
idBranch.innerHTML = GetTreeButtonImage(idBranch.value,0)
|
|
end if
|
|
next
|
|
g_bTextMode = FALSE
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' GetNextID
|
|
'' Description - Each branch needs a unique ID. This creates the id
|
|
'' Arguments - void
|
|
'' Return - unique ID
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function GetNextID()
|
|
GetNextID = g_iIDCount
|
|
g_iIDCount = g_iIDCount + 1
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' ConvertXMLToHtml
|
|
'' Description - Convert the XML text to HTML text
|
|
'' Arguments - str - XML text
|
|
'' Return - HTML Text
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function ConvertXMLToHtml(str)
|
|
g_xmlDoc.loadXML(str)
|
|
'strText = "<table width=100% border=0 valign='top'>"
|
|
strText = ""
|
|
' Extract the containers form the XML string
|
|
Set ContainerList = g_xmlDoc.selectNodes("/Netdiag/Container")
|
|
for each Container in ContainerList
|
|
strText = strText + FormatContainer(Container)
|
|
next
|
|
if strText = "" then
|
|
strText = "<table width=100%><tr><TD class='Text-ErrorMsg AlignCenter'><p>" & L_NoData_Text & "</P></td></tr></table>"
|
|
idSaveToFile.disabled = TRUE
|
|
else
|
|
|
|
strText = "<table width=100% border=0 valign='top'>" & strText & "</table>"
|
|
idSaveToFile.disabled = FALSE
|
|
end if
|
|
idData.innerHTML = strText
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' GetStatusClass
|
|
'' Description - Gets the style of the status
|
|
'' Arguments - strStatus - Status Text
|
|
'' Return - Status Style
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function GetStatusClass(strStatus)
|
|
select case strStatus
|
|
case L_Pass_Text
|
|
GetStatusClass = "sys-color-body-ok sys-font-body"
|
|
case L_Fail_Text
|
|
GetStatusClass = "sys-color-body-alert sys-font-body"
|
|
case else
|
|
GetStatusClass = "sys-color-body sys-font-body"
|
|
end select
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' CreateBranch
|
|
'' Description - Creates a branch in the tree. With +/-
|
|
'' Arguments - bBranchIsEmpty - Indicates if the branch contains any data
|
|
'' strStyle - Text Format
|
|
'' strText - Branch text
|
|
'' strLeaf - Contents of branch
|
|
'' Return - Branch
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function CreateBranch(bBranchIsEmpty, strStyle, strText, byref strLeaf)
|
|
|
|
iID = GetNextID()
|
|
strDivButtonId = "TreeButton" & iID
|
|
|
|
if bBranchIsEmpty then
|
|
' Branch is empty, empty bitmap blank ID
|
|
iImageType = 2
|
|
strDivBranchId = "idBlank"
|
|
else
|
|
' Branch is not empty, + image and create a new ID
|
|
iImageType = 1
|
|
strDivBranchId = "TreeBranch" & iID
|
|
end if
|
|
|
|
' Create the branch
|
|
CreateBranch = "<DIV " & strStyle & ">" & _
|
|
"<SPAN " & _
|
|
"onclick='toggle(tag" & strDivButtonId & "," & strDivBranchId & ");' " & _
|
|
"onkeypress='toggle(tag" & strDivButtonId & "," & strDivBranchId & ");'>" & _
|
|
GetTreeButton(strDivButtonId,iImageType) & _
|
|
strText & "</SPAN>"
|
|
|
|
' Create the leaf
|
|
strLeaf = "<DIV id=" & strDivBranchId & " style='MARGIN-LEFT: 50px; display:none'>"
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' FormatContainer
|
|
'' Description - Extract the container information and format it.
|
|
'' Arguments - Container - Contains the name (i.e. IE Proxy, OE Mail, OE News etc)
|
|
'' Caption summary property of the caption (i.e. IE Proxy server name)
|
|
'' Category the group it belongs to (i.e. Internet Settings, Adapter and Network etc)
|
|
'' Status of the tests
|
|
'' Return - HTML formated container
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function FormatContainer(Container)
|
|
' Extarct the values from the container
|
|
strHeader = Container.attributes.getNamedItem("Name").nodeValue
|
|
strCaption = Container.attributes.getNamedItem("Caption").nodeValue
|
|
strCategory = Container.attributes.getNamedItem("Category").nodeValue
|
|
Set Stat = Container.selectSingleNode("Status")
|
|
strStatus = Stat.attributes.getNamedItem("Value").nodeValue
|
|
Set ClassObjectEnumList = Container.selectNodes("ClassObjectEnum")
|
|
|
|
if strCategory <> g_strLastCategory then
|
|
' We found a new category, create a new heading
|
|
FormatContainer = "<tr>" & _
|
|
"<td align=left bgcolor=darkblue colspan=3>" & _
|
|
"<DIV class='sys-font-body-bold sys-toppane-header-color'>" & strCategory & "</DIV>" &_
|
|
"</td></tr>"
|
|
' Memorize the last category we created
|
|
g_strLastCategory = strCategory
|
|
end if
|
|
|
|
if ClassObjectEnumList.length > 0 then
|
|
' Container is empty
|
|
iImageType = FALSE
|
|
else
|
|
' Container is not empty
|
|
iImageType = TRUE
|
|
end if
|
|
|
|
' Create the Container HTML text
|
|
strHeader = "<SPAN TABINDEX=0>" & strHeader & "</SPAN>"
|
|
FormatContainer = FormatContainer & _
|
|
"<tr>" & _
|
|
"<td width=30%>" & CreateBranch(iImageType,"class='sys-font-body sys-color-body'",strHeader,strLeaf) & _
|
|
"</td>" & _
|
|
"<td width=50%><DIV class='Text-Caption'>" & strCaption & "</DIV></td>" & _
|
|
"<td width=20%><DIV class='" & GetStatusClass(strStatus) & "'>" & strStatus & "</DIV></td>" & _
|
|
"</tr>"
|
|
|
|
if ClassObjectEnumList.length > 0 then
|
|
' Extract the container properties
|
|
FormatContainer = FormatContainer & _
|
|
"<tr><td colspan=3 width=100%>" & strLeaf
|
|
Set ClassObjectEnumList = Container.selectNodes("ClassObjectEnum")
|
|
for each ClassObjectEnum in ClassObjectEnumList
|
|
FormatContainer = FormatContainer + FormatClassObjectEnum(ClassObjectEnum)
|
|
next
|
|
FormatContainer = FormatContainer + "</DIV>"
|
|
end if
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' FormatStatusText
|
|
'' Description - Format the status. If the status is not empty put () around it
|
|
'' Arguments - strStatus - Status
|
|
'' Return - HTML formated status
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function FormatStatusText(strStatus)
|
|
if strStatus <> "" then
|
|
strStatusTxt = "(" & strStatus & ")"
|
|
else
|
|
strStatusTxt = strStatus
|
|
end if
|
|
FormatStatusText = "<SPAN class='" & GetStatusClass(strStatus) & "'> " & strStatusTxt & "</SPAN>"
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' FormatClassObjectEnum
|
|
'' Description - Extract the instances from the container
|
|
'' Not all containers have instances.
|
|
'' Arguments - ClassObjectEnum - Contains name of the instance and status
|
|
'' Return - HTML formated instance
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function FormatClassObjectEnum(ClassObjectEnum)
|
|
' Extarct the instance name and status
|
|
strCaption = ClassObjectEnum.attributes.getNamedItem("Name").nodeValue
|
|
Set Stat = ClassObjectEnum.selectSingleNode("Status")
|
|
StrStatus = Stat.attributes.getNamedItem("Value").nodeValue
|
|
|
|
if strCaption <> "" then
|
|
' Create an instance branch
|
|
strCaption = "<SPAN class='sys-font-body sys-color-body'>" & strCaption & "</SPAN>"
|
|
strText = "<SPAN TABINDEX=0>" & strCaption & FormatStatusText(strStatus) & "</SPAN>"
|
|
FormatClassObjectEnum = CreateBranch(FALSE,"",strText,strLeaf)
|
|
FormatClassObjectEnum = FormatClassObjectEnum & strLeaf
|
|
end if
|
|
|
|
' Extact the properties from the instance
|
|
Set PropertyList = ClassObjectEnum.selectNodes("Property")
|
|
for each Prop in PropertyList
|
|
FormatClassObjectEnum = FormatClassObjectEnum & FormatProperty(Prop)
|
|
next
|
|
|
|
if strCaption <> "" then
|
|
' Close the instance branch if it was opened.
|
|
FormatClassObjectEnum = FormatClassObjectEnum & "</DIV></DIV>"
|
|
end if
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' FormatProperty
|
|
'' Description - Fromat the property
|
|
'' Arguments - Prop - Property
|
|
'' Return - HTML formated property
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function FormatProperty(Prop)
|
|
' Extract the values
|
|
strFieldName = Prop.attributes.getNamedItem("Name").nodeValue
|
|
Set PropStatus = Prop.selectSingleNode("Status")
|
|
strStatus = PropStatus.attributes.getNamedItem("Value").nodeValue
|
|
Set ValueList = Prop.selectNodes("PropertyValue")
|
|
|
|
if ValueList.length > 1 then
|
|
' Property has an arrary of values
|
|
strFieldName = "<SPAN TABINDEX=0 class='sys-font-body sys-color-body'>" & strFieldName & "</SPAN>"
|
|
strText = strFieldName & FormatStatusText(strStatus)
|
|
FormatProperty = CreateBranch(FALSE,"",strText,strLeaf)
|
|
FormatProperty = FormatProperty & strLeaf
|
|
' Extract the values
|
|
for each Value in ValueList
|
|
call GetPropertyValue(Value,strValue,strData,strComment,strStatus)
|
|
FormatProperty = FormatProperty & FormatProp("",strValue,strComment,strStatus,strData)
|
|
next
|
|
|
|
FormatProperty = FormatProperty & "</DIV></DIV>"
|
|
elseif ValueList.length <> 0 then
|
|
' Property only has one value, extract it
|
|
Set Value = ValueList.Item(0)
|
|
call GetPropertyValue(Value,strValue,strData,strComment,strStatus)
|
|
FormatProperty = FormatProperty & FormatProp(strFieldName,strValue,strComment,strStatus,strData)
|
|
end if
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' FormatProp
|
|
'' Description - Format the value
|
|
'' Arguments - strFieldName - Name of the property
|
|
'' strValue - Value of the property
|
|
'' strComment - value comment
|
|
'' strStatus - Status
|
|
'' strData - Data associated with value
|
|
'' Return - HTML formated property and value
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function FormatProp(strFieldName, strValue, strComment, strStatus, strData)
|
|
' Format field name
|
|
if strFieldName<>"" then
|
|
if strValue <> "" then
|
|
' If there is a value add =
|
|
strFieldName = strFieldName & " = "
|
|
end if
|
|
strFieldName = "<SPAN class='sys-font-body sys-color-body'>" & strFieldName & " </SPAN>"
|
|
end if
|
|
|
|
' Format the value, comment, status and data
|
|
strValue = "<SPAN class='sys-font-body sys-color-body'>" & strValue & "</SPAN>"
|
|
|
|
if strComment <>""then
|
|
strComment = "<SPAN class='Text-Comment'>(" & strComment & ")</SPAN>"
|
|
end if
|
|
|
|
if strData<>"" then
|
|
strData = "<SPAN class='Text-Data'>" & strData & "</SPAN>"
|
|
end if
|
|
|
|
strText = "<SPAN TABINDEX=0>" & strFieldName & strValue & strComment & FormatStatusText(strStatus) & "</SPAN>"
|
|
|
|
if strData<>"" then
|
|
' No data
|
|
iImageType = FALSE
|
|
else
|
|
' Has data
|
|
iImageType = TRUE
|
|
end if
|
|
|
|
FormatProp = CreateBranch(iImageType,"",strText,strLeaf)
|
|
|
|
if strData<>"" then
|
|
' Close the data
|
|
FormatProp = FormatProp & strLeaf & strData & "</DIV>"
|
|
end if
|
|
|
|
FormatProp = FormatProp & "</DIV>"
|
|
end function
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
'' FormatProp
|
|
'' Description - Extract the property values
|
|
'' Arguments - strFieldName - Name of the property
|
|
'' strValue - Value of the property
|
|
'' strComment - value comment
|
|
'' strStatus - Status
|
|
'' strData - Data associated with value
|
|
'' Return - HTML formated property and value
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
|
function GetPropertyValue(Value, byref strValue, byref strData, byref strComment, byref strStatus)
|
|
strValue = Value.attributes.getNamedItem("Value").nodeValue
|
|
strData = Value.attributes.getNamedItem("Data").nodeValue
|
|
strComment = Value.attributes.getNamedItem("Comment").nodeValue
|
|
strStatus = Value.text
|
|
strData = Replace(strData,"|","<BR>")
|
|
end function
|
|
|
|
</SCRIPT>
|
|
</BODY>
|
|
</HTML>
|