Fix compliance table column names (snake_case to camelCase)
Renamed columns in compliance and compliancescans tables: - scan_date -> scandate - deployment_notes -> deploymentnotes - is_third_party_managed -> isthirdpartymanaged - third_party_manager -> thirdpartymanager - ot_asset_* -> otasset* - is_compliant -> iscompliant - compliance_notes -> compliancenotes - scan_name -> scanname - scan_result -> scanresult - scan_details -> scandetails Updated ASP files: - displaymachine.asp, displaypc.asp - fixed column reads - editmachine.asp, editpc.asp, editdevice.asp, machine_edit.asp - fixed column reads - savemachineedit.asp, savemachine_direct.asp, updatedevice_direct.asp - fixed SQL Updated production migration guide with new Step 4 for compliance columns. Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -655,7 +655,7 @@ End If
|
||||
thirdPartyManaged = rs2("isthirdpartymanaged") & ""
|
||||
thirdPartyManager = rs2("thirdpartymanager") & ""
|
||||
otAssetSystem = rs2("otenvironment") & ""
|
||||
dodAssetDeviceType = rs2("dodassettype") & ""
|
||||
dodAssetDeviceType = rs2("otassetdevicetype") & ""
|
||||
isCompliant = rs2("ischangerestricted") & ""
|
||||
|
||||
' Third party managed badge
|
||||
@@ -705,7 +705,7 @@ End If
|
||||
Set rs2 = Nothing
|
||||
|
||||
' Query security scans
|
||||
strSQL2 = "SELECT * FROM compliancescans WHERE machineid = ? ORDER BY scan_date DESC LIMIT 10"
|
||||
strSQL2 = "SELECT * FROM compliancescans WHERE machineid = ? ORDER BY scandate DESC LIMIT 10"
|
||||
Set rs2 = ExecuteParameterizedQuery(objConn, strSQL2, Array(machineid))
|
||||
|
||||
If rs2.EOF Then
|
||||
@@ -713,10 +713,10 @@ End If
|
||||
Else
|
||||
Do While Not rs2.EOF
|
||||
Dim scanName, scanDate, scanResult, scanDetails, resultBadge
|
||||
scanName = rs2("scan_name") & ""
|
||||
scanDate = rs2("scan_date") & ""
|
||||
scanResult = rs2("scan_result") & ""
|
||||
scanDetails = rs2("scan_details") & ""
|
||||
scanName = rs2("scanname") & ""
|
||||
scanDate = rs2("scandate") & ""
|
||||
scanResult = rs2("scanresult") & ""
|
||||
scanDetails = rs2("scandetails") & ""
|
||||
|
||||
If scanName = "" Then scanName = "Security Scan"
|
||||
If scanDetails = "" Then scanDetails = "<span class='text-muted'>No details</span>"
|
||||
|
||||
Reference in New Issue
Block a user