Security hardening, multi-site portability, and a documentation and API-surface sweep
This commit is contained in:
@@ -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}>"
|
||||
|
||||
Reference in New Issue
Block a user