Add FQDN support for network devices and fix printer installer map
## Printer Installer Map Fixes - Fixed printer_installer_map.asp to pass printer IDs instead of generated names - Fixed install_printer.asp dictionary key collision by using printerid ## Network Device FQDN Support - Added fqdn column to machines table (migration script included) - Updated device edit pages: deviceaccesspoint.asp, deviceserver.asp, deviceswitch.asp, devicecamera.asp - Updated save_network_device.asp to handle FQDN in INSERT/UPDATE - Updated network_devices.asp to display FQDN for Server, Switch, Camera - Updated vw_network_devices view to include FQDN from machines table - Added FQDN field to machine_edit.asp Network tab - Updated savemachineedit.asp to save FQDN ## Printer Install Path Edit - Added installpath field to displayprinter.asp Edit tab - Updated editprinter.asp to save installpath changes ## Documentation - Added IIS log location to CLAUDE.md ## Production Migration - sql/add_fqdn_to_machines.sql - Run on production to add column and update view 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -103,16 +103,17 @@ If filterType = "IDF" Then
|
||||
Response.Write("<th scope='col'>Name</th>")
|
||||
Response.Write("<th scope='col'>Description</th>")
|
||||
ElseIf filterType = "Server" Or filterType = "Switch" Then
|
||||
' Server/Switch columns: Location, Name, Vendor, Model, Serial, IP Address, Description
|
||||
' Server/Switch columns: Location, Name, Vendor, Model, Serial, IP Address, FQDN, Description
|
||||
Response.Write("<th scope='col'><i class='zmdi zmdi-pin'></i></th>")
|
||||
Response.Write("<th scope='col'>Name</th>")
|
||||
Response.Write("<th scope='col'>Vendor</th>")
|
||||
Response.Write("<th scope='col'>Model</th>")
|
||||
Response.Write("<th scope='col'>Serial</th>")
|
||||
Response.Write("<th scope='col'>IP Address</th>")
|
||||
Response.Write("<th scope='col'>FQDN</th>")
|
||||
Response.Write("<th scope='col'>Description</th>")
|
||||
ElseIf filterType = "Camera" Then
|
||||
' Camera columns: Location, Name, IDF, Vendor, Model, MAC Address, IP Address
|
||||
' Camera columns: Location, Name, IDF, Vendor, Model, MAC Address, IP Address, FQDN
|
||||
Response.Write("<th scope='col'><i class='zmdi zmdi-pin'></i></th>")
|
||||
Response.Write("<th scope='col'>Name</th>")
|
||||
Response.Write("<th scope='col'>IDF</th>")
|
||||
@@ -120,6 +121,7 @@ ElseIf filterType = "Camera" Then
|
||||
Response.Write("<th scope='col'>Model</th>")
|
||||
Response.Write("<th scope='col'>MAC Address</th>")
|
||||
Response.Write("<th scope='col'>IP Address</th>")
|
||||
Response.Write("<th scope='col'>FQDN</th>")
|
||||
ElseIf filterType = "Access Point" Or filterType = "Printer" Then
|
||||
' Access Point/Printer columns: Location, Name, Vendor, Model, IP Address, FQDN
|
||||
Response.Write("<th scope='col'><i class='zmdi zmdi-pin'></i></th>")
|
||||
@@ -238,9 +240,11 @@ End If
|
||||
If filterType = "IDF" Then
|
||||
' Description, Actions
|
||||
Response.Write("<td>")
|
||||
If Not IsNull(rs("description")) And rs("description") <> "" Then
|
||||
Dim descValue
|
||||
descValue = rs("description") & ""
|
||||
If Len(Trim(descValue)) > 0 Then
|
||||
Dim desc
|
||||
desc = Server.HTMLEncode(rs("description"))
|
||||
desc = Server.HTMLEncode(Trim(descValue))
|
||||
If Len(desc) > 100 Then
|
||||
Response.Write(Left(desc, 100) & "...")
|
||||
Else
|
||||
@@ -252,7 +256,7 @@ End If
|
||||
Response.Write("</td>")
|
||||
|
||||
ElseIf filterType = "Server" Or filterType = "Switch" Then
|
||||
' Vendor, Model, Serial, IP Address, Description, Actions
|
||||
' Vendor, Model, Serial, IP Address, FQDN, Description, Actions
|
||||
Response.Write("<td>")
|
||||
If Not IsNull(rs("vendor")) Then
|
||||
Response.Write(Server.HTMLEncode(rs("vendor")))
|
||||
@@ -288,9 +292,19 @@ End If
|
||||
Response.Write("</td>")
|
||||
|
||||
Response.Write("<td>")
|
||||
If Not IsNull(rs("description")) And rs("description") <> "" Then
|
||||
If Not IsNull(rs("fqdn")) And rs("fqdn") <> "" Then
|
||||
Response.Write(Server.HTMLEncode(rs("fqdn")))
|
||||
Else
|
||||
Response.Write("<span class='text-muted'>-</span>")
|
||||
End If
|
||||
Response.Write("</td>")
|
||||
|
||||
Response.Write("<td>")
|
||||
Dim descSvrValue
|
||||
descSvrValue = rs("description") & ""
|
||||
If Len(Trim(descSvrValue)) > 0 Then
|
||||
Dim descSvr
|
||||
descSvr = Server.HTMLEncode(rs("description"))
|
||||
descSvr = Server.HTMLEncode(Trim(descSvrValue))
|
||||
If Len(descSvr) > 50 Then
|
||||
Response.Write(Left(descSvr, 50) & "...")
|
||||
Else
|
||||
@@ -302,7 +316,7 @@ End If
|
||||
Response.Write("</td>")
|
||||
|
||||
ElseIf filterType = "Camera" Then
|
||||
' IDF, Vendor, Model, MAC Address, IP Address, Actions
|
||||
' IDF, Vendor, Model, MAC Address, IP Address, FQDN, Actions
|
||||
Response.Write("<td>")
|
||||
If Not IsNull(rs("idfname")) Then
|
||||
Response.Write("<a href='deviceidf.asp?id=" & rs("idfid") & "'>")
|
||||
@@ -347,6 +361,14 @@ End If
|
||||
End If
|
||||
Response.Write("</td>")
|
||||
|
||||
Response.Write("<td>")
|
||||
If Not IsNull(rs("fqdn")) And rs("fqdn") <> "" Then
|
||||
Response.Write(Server.HTMLEncode(rs("fqdn")))
|
||||
Else
|
||||
Response.Write("<span class='text-muted'>-</span>")
|
||||
End If
|
||||
Response.Write("</td>")
|
||||
|
||||
ElseIf filterType = "Access Point" Or filterType = "Printer" Then
|
||||
' Access Point/Printer - Name (already shown), Vendor, Model, IP Address, FQDN, Actions
|
||||
Response.Write("<td>")
|
||||
@@ -420,9 +442,11 @@ End If
|
||||
Response.Write("</td>")
|
||||
|
||||
Response.Write("<td>")
|
||||
If Not IsNull(rs("description")) And rs("description") <> "" Then
|
||||
Dim descAllValue
|
||||
descAllValue = rs("description") & ""
|
||||
If Len(Trim(descAllValue)) > 0 Then
|
||||
Dim descAll
|
||||
descAll = Server.HTMLEncode(rs("description"))
|
||||
descAll = Server.HTMLEncode(Trim(descAllValue))
|
||||
If Len(descAll) > 50 Then
|
||||
Response.Write(Left(descAll, 50) & "...")
|
||||
Else
|
||||
@@ -447,13 +471,13 @@ End If
|
||||
colspanCount = "3"
|
||||
Case "Server":
|
||||
noDataMessage = "No servers found."
|
||||
colspanCount = "7"
|
||||
colspanCount = "8"
|
||||
Case "Switch":
|
||||
noDataMessage = "No switches found."
|
||||
colspanCount = "7"
|
||||
colspanCount = "8"
|
||||
Case "Camera":
|
||||
noDataMessage = "No cameras found."
|
||||
colspanCount = "7"
|
||||
colspanCount = "8"
|
||||
Case "Access Point":
|
||||
noDataMessage = "No access points found."
|
||||
colspanCount = "6"
|
||||
|
||||
Reference in New Issue
Block a user