Fix network device description/machinenotes display and edit

- Fix ADO cursor issue where reading rs("description") twice caused
  empty values (IsNull check consumed the field value)
- Change all device pages to read description field once using
  `description = rs("description") & ""` pattern
- Add deviceDescription variable in displaydevice.asp
- Fix machinetypeid mapping: IDF=17, Camera=18 (was swapped)
- Add model dropdown fix to include currently assigned model
- Add server application tracking feature
- Various other improvements and fixes

Files affected:
- displaydevice.asp, displaylocationdevice.asp
- deviceaccesspoint.asp, deviceserver.asp, deviceswitch.asp
- devicecamera.asp, deviceidf.asp
- savenetworkdevice.asp, networkdevices.asp

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2025-12-17 13:47:56 -05:00
parent a5b4013949
commit a4096ace94
25 changed files with 1744 additions and 355 deletions

View File

@@ -245,6 +245,9 @@ Else
hasData = False
' Declare loop variables outside the loop to avoid "Name redefined" error
Dim numericValue, progressClass, displayValue, isWaste
' Find all items with "Level" in the name (toner, ink, drums, maintenance kits, etc.)
currentPos = 1
Do While currentPos > 0
@@ -280,7 +283,6 @@ Else
' Try to convert to numeric
On Error Resume Next
Dim numericValue, progressClass, displayValue, isWaste
numericValue = CDbl(itemValue)
If Err.Number = 0 Then
' Check if this is a waste cartridge (invert the logic)
@@ -462,13 +464,13 @@ End If
<div class="form-group row">
<label class="col-lg-3 col-form-label form-control-label">IP:</label>
<div class="col-lg-9">
<input class="form-control" type="text" name="ipaddress" value="<%=Server.HTMLEncode(rs("ipaddress") & "")%>" placeholder="<%=Server.HTMLEncode(rs("serialnumber") & "")%>">
<input class="form-control" type="text" id="ipaddress" name="ipaddress" value="<%=Server.HTMLEncode(rs("ipaddress") & "")%>" placeholder="<%=Server.HTMLEncode(rs("serialnumber") & "")%>" onchange="updateFQDN()">
</div>
</div>
<div class="form-group row">
<label class="col-lg-3 col-form-label form-control-label">FQDN:</label>
<div class="col-lg-9">
<input class="form-control" type="text" name="fqdn" value="<%=Server.HTMLEncode(rs("fqdn") & "")%>" placeholder="<%=Server.HTMLEncode(rs("fqdn") & "")%>">
<input class="form-control" type="text" id="fqdn" name="fqdn" value="<%=Server.HTMLEncode(rs("fqdn") & "")%>" placeholder="<%=Server.HTMLEncode(rs("fqdn") & "")%>">
</div>
</div>
<div class="form-group row">
@@ -1261,6 +1263,17 @@ End If
});
</script>
<script>
// Auto-update FQDN when IP address changes
function updateFQDN() {
var ip = document.getElementById('ipaddress').value.trim();
if (ip) {
var fqdn = 'Printer-' + ip.replace(/\./g, '-') + '.printer.geaerospace.net';
document.getElementById('fqdn').value = fqdn;
}
}
</script>
</body>
</html>
<%