<%@ Language=VBScript %> <% '================================================== ' Microsoft Server Appliance ' ' Alert Viewer for Async Task Failure ' Alert Log: svrapp ' Alert ID: ' ' Copyright (c) 1999 - 2000 Microsoft Corporation. All rights reserved. '================================================== %> <% Option Explicit %> <% Dim strCookie Dim rc Dim mstrLinkURL Dim mstrMethod Dim mstrReturnURL On Error Resume Next Set objLocMgr = Server.CreateObject("ServerAppliance.LocalizationManager") strSourceName = "sakitmsg.dll" if Err.number <> 0 then Response.Write "Error in localizing the web content " Response.End end if '----------------------------------------------------- 'START of localization content Dim L_ALERTLBL_TEXT Dim L_CLEARALERT_TEXT Dim L_CLEARDESC_TEXT L_ALERTLBL_TEXT = objLocMgr.GetString(strSourceName, "&H40010029",varReplacementStrings) L_CLEARALERT_TEXT = objLocMgr.GetString(strSourceName, "&H4001002A",varReplacementStrings) L_CLEARDESC_TEXT = objLocMgr.GetString(strSourceName, "&H4001002B",varReplacementStrings) 'End of localization content '----------------------------------------------------- mstrMethod = Request.Form("Method") 'framework variable mstrReturnURL = Request("ReturnURL") 'framework variable, used in Redirect() mstrLinkURL = Request.Form("LinkURL") strCookie = Request("Cookie") If strCookie = "" Then ServeClose Select Case mstrMethod Case "CLEAR" rc = ClearAlert(strCookie) response.Redirect mstrReturnURL Case "LAUNCH" rc = ClearAlert(strCookie) response.Redirect mstrLinkURL Case "CLOSE" response.Redirect mstrReturnURL Case Else ServePage(strCookie) End Select '---------------------------------------------------------------------------- ' ' Function : ServePage ' ' Synopsis : Serves alert information for async tasks ' ' Arguments: Cookie - the alert cookie ' ' Returns : Nothing ' '+---------------------------------------------------------------------------- Sub ServePage(Cookie) Dim objAlert Dim objElementCol Dim objElement Dim objLocMgr Dim strAlertSrc Dim intAlertID Dim intAlertType Dim intCaptionID Dim intDescriptionID Dim strCaption Dim strDescription Dim strElementID Dim varReplacementStrings Dim varReplacementStringsNone Dim strFailedTaskName Dim strFailedTaskURL Dim objElements Dim objItem Dim arrTitle Dim arrURL Dim arrHelpText Dim blnEnabled Dim i On Error Resume Next Set objAlert = GetObject("WINMGMTS:{impersonationLevel=impersonate}!\\" & GetServerName & "\root\cimv2:Microsoft_SA_Alert.Cookie=" & Cookie ) strAlertSrc = objAlert.AlertLog intAlertID = objAlert.AlertID intAlertType = objAlert.AlertType strElementID = strAlertSrc & Hex(intAlertID) Set objElementCol = GetElements("AlertDefinitions") Set objElement = objElementCol.Item(strElementID) If Err.Number <> 0 Then response.Redirect mstrReturnURL End If intCaptionID = "&H" & objElement.GetProperty("CaptionRID") intDescriptionID = "&H" & objElement.GetProperty("DescriptionRID") varReplacementStrings = objAlert.ReplacementStrings ' extract values and clear the second element to eliminate problems with LocMgr strFailedTaskName = varReplacementStrings(0) strFailedTaskURL = varReplacementStrings(1) varReplacementStrings(1) = "" mstrLinkURL = m_VirtualRoot & strFailedTaskURL & "?Cookie=" & strCookie & "&ReturnURL=/" & GetFirstTabURL() Set objLocMgr = Server.CreateObject("ServerAppliance.LocalizationManager") strCaption = objLocMgr.GetString(strAlertSrc, intCaptionID, varReplacementStrings) strDescription = objLocMgr.GetString(strAlertSrc, intDescriptionID, varReplacementStrings) Set objLocMgr = Nothing Set objAlert = Nothing Set objElementCol = Nothing Set objElement = Nothing %> Alert viewer <%ServePageWaterMarkNavIE%> <%ServeTabBar%> <%ServHelpMenu%>
<% ServeAreaLabelBar(L_ALERTLBL_TEXT) %>
     

<% =strCaption %>

<% =strDescription %>

<% =strFailedTaskName %>
 
     <% Response.Write "

" & L_CLEARDESC_TEXT & "

" %>       <% =L_CLEARALERT_TEXT %>
<% Select Case intAlertType Case 0 call ServePageWaterMarkEndNavIE(m_VirtualRoot & "util/images/alert_water.gif", m_VirtualRoot & "images/oem_logo.gif", true) Case 1 call ServePageWaterMarkEndNavIE(m_VirtualRoot & "util/images/critical_water.gif", m_VirtualRoot & "images/oem_logo.gif", true) Case 2 call ServePageWaterMarkEndNavIE(m_VirtualRoot & "util/images/info_water.gif", m_VirtualRoot & "images/oem_logo.gif", true) Case Else call ServePageWaterMarkEndNavIE(m_VirtualRoot & "util/images/alert_water.gif", m_VirtualRoot & "images/oem_logo.gif", true) End Select %>
<% End Sub %>