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:
cproudlock
2025-12-01 08:50:45 -05:00
parent 996705b4fd
commit 5413b20bba
14 changed files with 404 additions and 46 deletions

View File

@@ -19,7 +19,7 @@
END IF
' Get and validate all inputs
Dim printerid, modelid, serialnumber, ipaddress, fqdn, printercsfname, printerwindowsname, machineid, maptop, mapleft
Dim printerid, modelid, serialnumber, ipaddress, fqdn, printercsfname, printerwindowsname, installpath, machineid, maptop, mapleft
printerid = Trim(Request.Querystring("printerid"))
modelid = Trim(Request.Form("modelid"))
serialnumber = Trim(Request.Form("serialnumber"))
@@ -27,6 +27,7 @@
fqdn = Trim(Request.Form("fqdn"))
printercsfname = Trim(Request.Form("printercsfname"))
printerwindowsname = Trim(Request.Form("printerwindowsname"))
installpath = Trim(Request.Form("installpath"))
machineid = Trim(Request.Form("machineid"))
maptop = Trim(Request.Form("maptop"))
mapleft = Trim(Request.Form("mapleft"))
@@ -62,7 +63,7 @@
End If
' Validate field lengths
If Len(serialnumber) > 100 Or Len(fqdn) > 255 Or Len(printercsfname) > 50 Or Len(printerwindowsname) > 255 Then
If Len(serialnumber) > 100 Or Len(fqdn) > 255 Or Len(printercsfname) > 50 Or Len(printerwindowsname) > 255 Or Len(installpath) > 100 Then
objConn.Close
Response.Redirect("displayprinter.asp?printerid=" & printerid & "&error=FIELD_LENGTH_EXCEEDED")
Response.End
@@ -190,7 +191,7 @@
' Update printer using parameterized query
Dim strSQL
strSQL = "UPDATE printers SET modelid = ?, serialnumber = ?, ipaddress = ?, fqdn = ?, " & _
"printercsfname = ?, printerwindowsname = ?, machineid = ?, maptop = ?, mapleft = ? " & _
"printercsfname = ?, printerwindowsname = ?, installpath = ?, machineid = ?, maptop = ?, mapleft = ? " & _
"WHERE printerid = ?"
On Error Resume Next
@@ -207,6 +208,7 @@
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@fqdn", 200, 1, 255, fqdn)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@printercsfname", 200, 1, 50, printercsfname)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@printerwindowsname", 200, 1, 255, printerwindowsname)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@installpath", 200, 1, 100, installpath)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@machineid", 3, 1, , CLng(machineid))
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@maptop", 3, 1, , maptopValue)
cmdUpdate.Parameters.Append cmdUpdate.CreateParameter("@mapleft", 3, 1, , mapleftValue)