Security hardening, multi-site portability, and a documentation and API-surface sweep

This commit is contained in:
2026-08-14 16:28:34 -04:00
parent 72f8da0e58
commit 265ca2eb01
76 changed files with 3684 additions and 811 deletions

View File

@@ -16,6 +16,16 @@ class NetworkDeviceType(BaseModel):
description = db.Column(db.Text)
icon = db.Column(db.String(50), comment='Icon name for UI')
color = db.Column(db.String(20), comment='CSS color for UI/map markers')
# Asset-number prefix for devices of this type: AP-<name>, SW-<name>.
# NULLABLE on purpose - a type with no prefix generates the bare name, so
# nobody has to invent one for a type that does not want it.
#
# It cannot be derived from the type NAME: 'Access Point' and 'Access Panel'
# both initialise to AP, and assetnumber is unique, so the second type would
# collide with the first on every device.
prefix = db.Column(
db.String(12),
comment='Asset-number prefix for this type (AP, SW, SVR). Blank = none')
def __repr__(self):
return f"<NetworkDeviceType {self.networkdevicetype}>"