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

@@ -17,7 +17,7 @@
<div class="page">
<%
' Get and validate all inputs
Dim machineid, modelid, businessunitid, alias, machinenotes, mapleft, maptop
Dim machineid, modelid, businessunitid, alias, machinenotes, mapleft, maptop, fqdn
machineid = Trim(Request.Form("machineid"))
modelid = Trim(Request.Form("modelid"))
businessunitid = Trim(Request.Form("businessunitid"))
@@ -25,6 +25,7 @@
machinenotes = Trim(Request.Form("machinenotes"))
mapleft = Trim(Request.Form("mapleft"))
maptop = Trim(Request.Form("maptop"))
fqdn = Trim(Request.Form("fqdn"))
' Get form inputs for new business unit
Dim newbusinessunit
@@ -388,13 +389,14 @@
'=============================================================================
' UPDATE MACHINES TABLE
'=============================================================================
Dim strSQL, cmdMachine, serialnumberVal, hostnameVal, aliasVal, machinenotesVal
Dim strSQL, cmdMachine, serialnumberVal, hostnameVal, aliasVal, machinenotesVal, fqdnVal
If Trim(Request.Form("serialnumber") & "") <> "" Then serialnumberVal = Trim(Request.Form("serialnumber") & "") Else serialnumberVal = Null
If Trim(Request.Form("hostname") & "") <> "" Then hostnameVal = Trim(Request.Form("hostname") & "") Else hostnameVal = Null
If alias <> "" Then aliasVal = alias Else aliasVal = Null
If machinenotes <> "" Then machinenotesVal = machinenotes Else machinenotesVal = Null
If fqdn <> "" Then fqdnVal = fqdn Else fqdnVal = Null
strSQL = "UPDATE machines SET serialnumber = ?, hostname = ?, modelnumberid = ?, businessunitid = ?, alias = ?, machinenotes = ?, mapleft = ?, maptop = ? WHERE machineid = ?"
strSQL = "UPDATE machines SET serialnumber = ?, hostname = ?, fqdn = ?, modelnumberid = ?, businessunitid = ?, alias = ?, machinenotes = ?, mapleft = ?, maptop = ? WHERE machineid = ?"
Set cmdMachine = Server.CreateObject("ADODB.Command")
cmdMachine.ActiveConnection = objConn
@@ -402,6 +404,7 @@
cmdMachine.CommandType = 1
cmdMachine.Parameters.Append cmdMachine.CreateParameter("@serialnumber", 200, 1, 100, serialnumberVal)
cmdMachine.Parameters.Append cmdMachine.CreateParameter("@hostname", 200, 1, 255, hostnameVal)
cmdMachine.Parameters.Append cmdMachine.CreateParameter("@fqdn", 200, 1, 255, fqdnVal)
cmdMachine.Parameters.Append cmdMachine.CreateParameter("@modelnumberid", 3, 1, , CLng(modelid))
cmdMachine.Parameters.Append cmdMachine.CreateParameter("@businessunitid", 3, 1, , CLng(businessunitid))
cmdMachine.Parameters.Append cmdMachine.CreateParameter("@alias", 200, 1, 50, aliasVal)