Fix displaypc.asp: Replace IIf() with If-Then-Else, remove badges
- VBScript doesn't have IIf() function - replaced with proper syntax - Removed badge styling per user preference, use plain text - Added FROM DUAL to scalar subquery for compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -749,7 +749,8 @@ End If
|
|||||||
"(SELECT COUNT(*) FROM ednclogs WHERE machineid = ? AND action = 'cleaned') AS total_cleaned, " & _
|
"(SELECT COUNT(*) FROM ednclogs WHERE machineid = ? AND action = 'cleaned') AS total_cleaned, " & _
|
||||||
"(SELECT COUNT(*) FROM ednclogs WHERE machineid = ? AND action IN ('failed', 'error')) AS total_failed, " & _
|
"(SELECT COUNT(*) FROM ednclogs WHERE machineid = ? AND action IN ('failed', 'error')) AS total_failed, " & _
|
||||||
"(SELECT COUNT(*) FROM ednclogs WHERE machineid = ? AND created > DATE_SUB(NOW(), INTERVAL 24 HOUR)) AS events_24h, " & _
|
"(SELECT COUNT(*) FROM ednclogs WHERE machineid = ? AND created > DATE_SUB(NOW(), INTERVAL 24 HOUR)) AS events_24h, " & _
|
||||||
"(SELECT MAX(created) FROM ednclogs WHERE machineid = ? AND action = 'cleaned') AS last_cleaned"
|
"(SELECT MAX(created) FROM ednclogs WHERE machineid = ? AND action = 'cleaned') AS last_cleaned " & _
|
||||||
|
"FROM DUAL"
|
||||||
Set rsEdnc = ExecuteParameterizedQuery(objConn, edncSQL, Array(machineid, machineid, machineid, machineid, machineid, machineid, machineid))
|
Set rsEdnc = ExecuteParameterizedQuery(objConn, edncSQL, Array(machineid, machineid, machineid, machineid, machineid, machineid, machineid))
|
||||||
If Not rsEdnc.EOF And Not IsNull(rsEdnc("first_seen")) Then
|
If Not rsEdnc.EOF And Not IsNull(rsEdnc("first_seen")) Then
|
||||||
hasEdnc = True
|
hasEdnc = True
|
||||||
@@ -772,11 +773,11 @@ End If
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="font-weight-bold">Files Cleaned</td>
|
<td class="font-weight-bold">Files Cleaned</td>
|
||||||
<td><span class="badge badge-success"><%= rsEdnc("total_cleaned") %></span></td>
|
<td><%= rsEdnc("total_cleaned") %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="font-weight-bold">Files Failed</td>
|
<td class="font-weight-bold">Files Failed</td>
|
||||||
<td><span class="badge badge-<%= IIf(CLng(rsEdnc("total_failed") & "0") > 0, "danger", "secondary") %>"><%= rsEdnc("total_failed") %></span></td>
|
<td><%= rsEdnc("total_failed") %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="font-weight-bold">Events (24h)</td>
|
<td class="font-weight-bold">Events (24h)</td>
|
||||||
@@ -848,7 +849,6 @@ End If
|
|||||||
End If
|
End If
|
||||||
rsEdnc.Close
|
rsEdnc.Close
|
||||||
Set rsEdnc = Nothing
|
Set rsEdnc = Nothing
|
||||||
End If
|
|
||||||
%>
|
%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user