tabbed DNC card, machine-numbered downloads, themed backup history

This commit is contained in:
2026-08-07 15:22:59 -04:00
parent 2487981d91
commit 3ebc1f353a
9 changed files with 233 additions and 50 deletions

View File

@@ -180,10 +180,11 @@ class NtlarsKind(BackupKind):
'title': 'DNC Info',
'assettypes': ['machine'],
'endpoint': '/api/backups/asset/{assetid}/info?kind=ntlars',
# No 'empty' key: the keyvalue renderer decides visibility purely on
# field count and never displays empty text, so a machine with no
# NTLARS revision simply has no DNC Info card at all.
'render': 'keyvalue',
# tabs, not keyvalue: General / eFocas / Serial / NTSHR / MARK are
# one card the tech switches between, rather than a 30-row wall.
# No 'empty' key - the renderer hides a panel with no sections, so
# a machine with no NTLARS revision has no DNC Info card at all.
'render': 'tabs',
# Above the history panels: this answers the question a tech
# arrives with, while history is for the rarer restore case.
'position': 38,
@@ -219,7 +220,11 @@ class PartMarkerKind(BackupKind):
key = 'partmarker'
displayname = 'Part Marker Configuration'
storagebackend = 'share'
assettypes = ['machine', 'measuring_tool']
# NO asset panel. The marker's DNC settings are a tab on the single DNC Info
# card, and a separate card that is empty on 145 of 147 machines earns
# nobody anything. The kind is still fully live - it stores, dedupes and
# serves revisions, which are listed on the backup history page.
assettypes = []
def resolveassetid(self, payload):
from shopdb.api import db, Asset