diff --git a/api.asp b/api.asp
index 01f5766..cea3c21 100644
--- a/api.asp
+++ b/api.asp
@@ -607,7 +607,7 @@ Sub UpdateInstalledApps()
' Insert new app mappings
Dim appCount, i, appName, appVersion, appid, appversionid, cmdInsert, appidStr, insertSQL
- Dim debugLoopError, safeVer, verSQL, rsVer
+ Dim debugLoopError, safeVer, verSQL, rsVer, isActiveStr, isActive
debugLoopError = ""
appCount = 0
Err.Clear
@@ -622,7 +622,12 @@ Sub UpdateInstalledApps()
appVersion = Trim(GetJSONValue(appsArray(i), "version") & "")
appName = Trim(GetJSONValue(appsArray(i), "appname") & "")
- LogToFile "App " & i & ": appid=" & appid & ", appname='" & appName & "', version='" & appVersion & "'"
+ ' Get isactive status (for UDC/CLM process detection)
+ isActive = 1 ' Default to active
+ isActiveStr = Trim(GetJSONValue(appsArray(i), "isactive") & "")
+ If isActiveStr <> "" And IsNumeric(isActiveStr) Then isActive = CLng(isActiveStr)
+
+ LogToFile "App " & i & ": appid=" & appid & ", appname='" & appName & "', version='" & appVersion & "', isactive=" & isActive
If appid > 0 Then
appversionid = 0
@@ -658,11 +663,11 @@ Sub UpdateInstalledApps()
If rs.State = 1 Then rs.Close
End If
- ' Insert app
+ ' Insert app with isactive status
If appversionid > 0 Then
- insertSQL = "INSERT INTO installedapps (machineid, appid, appversionid) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ", " & CLng(appversionid) & ")"
+ insertSQL = "INSERT INTO installedapps (machineid, appid, appversionid, isactive) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ", " & CLng(appversionid) & ", " & isActive & ")"
Else
- insertSQL = "INSERT INTO installedapps (machineid, appid) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ")"
+ insertSQL = "INSERT INTO installedapps (machineid, appid, isactive) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ", " & isActive & ")"
End If
objConn.Execute insertSQL
@@ -726,7 +731,7 @@ Function SaveInstalledApps(machineid, installedAppsJson)
' Insert new app mappings
Dim appCount, i, appName, appVersion, appid, appversionid, appidStr, insertSQL
- Dim safeVer, verSQL, rsVer
+ Dim safeVer, verSQL, rsVer, isActiveStr, isActive
appCount = 0
Err.Clear
@@ -740,6 +745,11 @@ Function SaveInstalledApps(machineid, installedAppsJson)
appVersion = Trim(GetJSONValue(appsArray(i), "version") & "")
appName = Trim(GetJSONValue(appsArray(i), "appname") & "")
+ ' Get isactive status (for UDC/CLM process detection)
+ isActive = 1 ' Default to active
+ isActiveStr = Trim(GetJSONValue(appsArray(i), "isactive") & "")
+ If isActiveStr <> "" And IsNumeric(isActiveStr) Then isActive = CLng(isActiveStr)
+
If appid > 0 Then
appversionid = 0
Err.Clear
@@ -772,11 +782,11 @@ Function SaveInstalledApps(machineid, installedAppsJson)
If rs.State = 1 Then rs.Close
End If
- ' Insert app
+ ' Insert app with isactive status
If appversionid > 0 Then
- insertSQL = "INSERT INTO installedapps (machineid, appid, appversionid) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ", " & CLng(appversionid) & ")"
+ insertSQL = "INSERT INTO installedapps (machineid, appid, appversionid, isactive) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ", " & CLng(appversionid) & ", " & isActive & ")"
Else
- insertSQL = "INSERT INTO installedapps (machineid, appid) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ")"
+ insertSQL = "INSERT INTO installedapps (machineid, appid, isactive) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ", " & isActive & ")"
End If
objConn.Execute insertSQL
diff --git a/displaymachines.asp b/displaymachines.asp
index d862596..136cc6c 100644
--- a/displaymachines.asp
+++ b/displaymachines.asp
@@ -82,14 +82,14 @@
<%
' Build WHERE clause with optional BU filter
- ' NOTE: pctypeid IS NULL filters out PCs; also exclude LocationOnly (1) and network devices (16-20)
+ ' NOTE: Exclude LocationOnly (1), network devices (16-20), and PC types (33+)
Dim whereClause
whereClause = "models.machinetypeid = machinetypes.machinetypeid AND " &_
"machines.modelnumberid = models.modelnumberid AND " &_
"models.vendorid = vendors.vendorid AND " &_
"machines.businessunitid = businessunits.businessunitID AND " &_
- "machines.isactive = 1 AND islocationonly=0 AND machines.pctypeid IS NULL AND " &_
- "models.machinetypeid NOT IN (1, 16, 17, 18, 19, 20)"
+ "machines.isactive = 1 AND islocationonly=0 AND " &_
+ "models.machinetypeid NOT IN (1, 16, 17, 18, 19, 20) AND models.machinetypeid < 33"
' Add BU filter if specified
If filterBU <> "" And IsNumeric(filterBU) Then
diff --git a/displaypc.asp b/displaypc.asp
index 6398c39..2ff3ab8 100644
--- a/displaypc.asp
+++ b/displaypc.asp
@@ -372,10 +372,13 @@ End If
If hasVncEnabled And vncHostname <> "" Then
Response.Write("
" & Server.HTMLEncode(vncHostname) & "
")
+ElseIf hasVncEnabled And primaryIP <> "" Then
+ ' Fallback to IP address if no hostname
+ Response.Write("" & Server.HTMLEncode(primaryIP) & "
")
ElseIf hasVncEnabled Then
- Response.Write("VNC Enabled (No hostname)
")
+ Response.Write("VNC Enabled (No hostname or IP)
")
Else
- Response.Write("VNC: N/A
")
+ Response.Write("N/A
")
End If
' Display WinRM status (text instead of badge)
diff --git a/displaypcs.asp b/displaypcs.asp
index a1c1a83..1035e05 100644
--- a/displaypcs.asp
+++ b/displaypcs.asp
@@ -39,9 +39,9 @@
<%
-Dim currentPCStatus, recentFilter, deviceTypeFilter, pcTypeFilter, uptimeFilter, sel
+Dim currentPCStatus, winrmFilter, deviceTypeFilter, pcTypeFilter, uptimeFilter, sel
currentPCStatus = Request.QueryString("pcstatus")
-recentFilter = Request.QueryString("recent")
+winrmFilter = Request.QueryString("winrm")
deviceTypeFilter = Request.QueryString("devicetype")
pcTypeFilter = Request.QueryString("pctype")
uptimeFilter = Request.QueryString("uptime")
@@ -107,9 +107,11 @@ rsStatus.Close
Set rsStatus = Nothing
%>
-