<!-- Title=Network Map that matches the current AccountID --><!-- Level=7 --><!--#include Virtual=/NetPerfMon/scripts/Resource.asp --><% Dim MapName Dim NetworkMap Dim MapScale Title=Resource.Title SubTitle=Resource.SubTitle HelpPage="NetworkMap" EditButton="/NetPerfMon/Resources/Title.Edit.asp?ResourceID=" & Resource.ResourceID & "&ViewID=" & ViewID & "&NetObject=" & NetObject DoResourceHeader ' Set the name of the Map MapName = Session("AccountID") ' You could also add a prefix to the map instead ' MapName = "ABC-" & Session("AccountID") MapScale = Resource.GetProperty("MapScale") Set NetworkMap = Server.CreateObject("OrionNPMWeb.NetworkMap") NetworkMap.MapScale = MapScale NetworkMap.LoadMap(MapName) If NetworkMap.LastError <> "" Then ' Comment out the following line to hide error messages if the map does not exist Response.Write "<font color=Red><b>" & NetworkMap.LastError & "</b></font>" Else %> <table border=0 cellspacing=0 cellpadding=4 width="100%"> <tr align="center"> <td><%=NetworkMap.HTMLImageMap%></td> </tr> </table> <% End If %>
<!-- Title=Network Map based on the current AccountID --><!-- Level=7 --><!--#include Virtual=/NetPerfMon/scripts/Resource.asp --><% Dim MapName Dim NetworkMap Dim MapScale Title=Resource.Title SubTitle=Resource.SubTitle HelpPage="NetworkMap" EditButton="/NetPerfMon/Resources/Title.Edit.asp?ResourceID=" & Resource.ResourceID & "&ViewID=" & ViewID & "&NetObject=" & NetObject DoResourceHeader ' Set the name of the Map equal to the AccountID ' MapName = Session("AccountID") ' You could also add a prefix to the map instead ' MapName = "ABC-" & Session("AccountID") ' Set the name of the map different than the AccountID ' using If/Else statements ' If Session("AccountID") = "account 1" Then ' MapName = "Map 1" ' Else ' MapName = "Map 2" ' End If ' using Case statements Select Case Session("AccountID") Case "account1" MapName = "Map 1" Case "account2", "account3" MapName = "Map 2" case Else MapName = "Map 0" end select MapScale = Resource.GetProperty("MapScale") Set NetworkMap = Server.CreateObject("OrionNPMWeb.NetworkMap") NetworkMap.MapScale = MapScale NetworkMap.LoadMap(MapName) If NetworkMap.LastError <> "" Then ' Comment out the following line to hide error messages if the map does not exist Response.Write "<font color=Red><b>" & NetworkMap.LastError & "</b></font>" Else %> <table border=0 cellspacing=0 cellpadding=4 width="100%"> <tr align="center"> <td><%=NetworkMap.HTMLImageMap%></td> </tr> </table> <% End If %>
<!-- Title=Network Map based on the current AccountID --><!-- Level=7 --><!--#include Virtual=/NetPerfMon/scripts/Resource.asp --><% Dim MapName Dim NetworkMap Dim MapScale Title=Resource.Title ' Commented out this line ' SubTitle=Resource.SubTitle HelpPage="NetworkMap" EditButton="/NetPerfMon/Resources/Title.Edit.asp?ResourceID=" & Resource.ResourceID & "&ViewID=" & ViewID & "&NetObject=" & NetObject ' Set the name of the Map equal to the AccountID ' MapName = Session("AccountID") ' You could also add a prefix to the map instead ' MapName = "ABC-" & Session("AccountID") ' Set the name of the map different than the AccountID ' using If/Else statements ' If Session("AccountID") = "account 1" Then ' MapName = "Map 1" ' Else ' MapName = "Map 2" ' End If ' using Case statements Select Case Session("AccountID") Case "account1" MapName = "Map 1" Case "account2", "account3" MapName = "Map 2" case Else MapName = "Map 0" end select ' Moved the DoResourceHeader to after the Case statement SubTitle = MapName DoResourceHeader MapScale = Resource.GetProperty("MapScale") Set NetworkMap = Server.CreateObject("OrionNPMWeb.NetworkMap") NetworkMap.MapScale = MapScale NetworkMap.LoadMap(MapName) If NetworkMap.LastError <> "" Then ' Comment out the following line to hide error messages if the map does not exist Response.Write "<font color=Red><b>" & NetworkMap.LastError & "</b></font>" Else %> <table border=0 cellspacing=0 cellpadding=4 width="100%"> <tr align="center"> <td><%=NetworkMap.HTMLImageMap%></td> </tr> </table> <% End If %>