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

@@ -22,18 +22,18 @@
End If
' If editing, fetch existing data
Dim rs, servername, modelid, serialnumber, ipaddress, description, maptop, mapleft, isactive
Dim rs, servername, modelid, serialnumber, ipaddress, fqdn, description, maptop, mapleft, isactive
Dim vendorname, modelnumber
If Not isNewRecord Then
Dim strSQL
strSQL = "SELECT mac.machineid, mac.alias AS servername, mac.modelnumberid AS modelid, " & _
"mac.serialnumber, mac.machinenotes AS description, mac.maptop, mac.mapleft, mac.isactive, " & _
"mac.serialnumber, mac.fqdn, mac.machinenotes AS description, mac.maptop, mac.mapleft, mac.isactive, " & _
"m.modelnumber, v.vendor, c.address AS ipaddress " & _
"FROM machines mac " & _
"LEFT JOIN models m ON mac.modelnumberid = m.modelnumberid " & _
"LEFT JOIN vendors v ON m.vendorid = v.vendorid " & _
"LEFT JOIN communications c ON mac.machineid = c.machineid AND c.isprimary = 1 AND c.comstypeid = 1 " & _
"WHERE mac.machineid = " & serverid & " AND mac.machinetypeid = 30"
"WHERE mac.machineid = " & serverid & " AND mac.machinetypeid = 20"
Set rs = objConn.Execute(strSQL)
If rs.EOF Then
@@ -45,6 +45,7 @@
If Not IsNull(rs("modelid")) Then modelid = rs("modelid") Else modelid = ""
If Not IsNull(rs("serialnumber")) Then serialnumber = rs("serialnumber") Else serialnumber = ""
If Not IsNull(rs("ipaddress")) Then ipaddress = rs("ipaddress") Else ipaddress = ""
If Not IsNull(rs("fqdn")) Then fqdn = rs("fqdn") Else fqdn = ""
If Not IsNull(rs("description")) Then description = rs("description") Else description = ""
If Not IsNull(rs("maptop")) Then maptop = rs("maptop") Else maptop = ""
If Not IsNull(rs("mapleft")) Then mapleft = rs("mapleft") Else mapleft = ""
@@ -60,6 +61,7 @@
modelid = ""
serialnumber = ""
ipaddress = ""
fqdn = ""
description = ""
maptop = ""
mapleft = ""
@@ -266,6 +268,19 @@
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">FQDN</label>
<div class="col-sm-9">
<input type="text" name="fqdn" class="form-control"
value="<%=Server.HTMLEncode(fqdn)%>"
maxlength="255"
placeholder="e.g., server01.domain.company.com">
<small class="form-text text-muted">
Fully Qualified Domain Name (optional)
</small>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Description</label>
<div class="col-sm-9">