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:
@@ -22,12 +22,12 @@
|
||||
End If
|
||||
|
||||
' If editing, fetch existing data
|
||||
Dim rs, cameraname, modelid, idfid, serialnumber, macaddress, ipaddress, description, maptop, mapleft, isactive
|
||||
Dim rs, cameraname, modelid, idfid, serialnumber, macaddress, ipaddress, fqdn, description, maptop, mapleft, isactive
|
||||
Dim vendorname, modelnumber, idfname
|
||||
If Not isNewRecord Then
|
||||
Dim strSQL
|
||||
strSQL = "SELECT mac.machineid, mac.alias AS cameraname, 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, c.macaddress, " & _
|
||||
"mr.related_machineid AS idfid, idf.alias AS idfname " & _
|
||||
"FROM machines mac " & _
|
||||
@@ -36,8 +36,8 @@
|
||||
"LEFT JOIN communications c ON mac.machineid = c.machineid AND c.isprimary = 1 AND c.comstypeid = 1 " & _
|
||||
"LEFT JOIN machinerelationships mr ON mac.machineid = mr.machineid AND mr.relationshiptypeid = " & _
|
||||
"(SELECT relationshiptypeid FROM relationshiptypes WHERE relationshiptype = 'Connected To' LIMIT 1) " & _
|
||||
"LEFT JOIN machines idf ON mr.related_machineid = idf.machineid AND idf.machinetypeid = 34 " & _
|
||||
"WHERE mac.machineid = " & cameraid & " AND mac.machinetypeid = 32"
|
||||
"LEFT JOIN machines idf ON mr.related_machineid = idf.machineid AND idf.machinetypeid = 17 " & _
|
||||
"WHERE mac.machineid = " & cameraid & " AND mac.machinetypeid = 18"
|
||||
Set rs = objConn.Execute(strSQL)
|
||||
|
||||
If rs.EOF Then
|
||||
@@ -63,6 +63,7 @@
|
||||
Else
|
||||
ipaddress = ""
|
||||
End If
|
||||
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 = ""
|
||||
@@ -85,6 +86,7 @@
|
||||
serialnumber = ""
|
||||
macaddress = ""
|
||||
ipaddress = ""
|
||||
fqdn = ""
|
||||
description = ""
|
||||
maptop = ""
|
||||
mapleft = ""
|
||||
@@ -376,6 +378,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., cam01.security.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">
|
||||
|
||||
Reference in New Issue
Block a user