tabbed DNC card, machine-numbered downloads, themed backup history
This commit is contained in:
@@ -46,6 +46,11 @@ class BackupRevision(db.Model):
|
||||
index=True,
|
||||
)
|
||||
|
||||
# Read-only view of the owning asset, so a revision can name its own
|
||||
# download <machinenumber>.reg. No cascade or backref: the asset side must
|
||||
# not gain a dependency on this plugin (ADR-014 lean builds).
|
||||
asset = db.relationship('Asset', lazy='joined', viewonly=True)
|
||||
|
||||
backupkind = db.Column(db.String(50), nullable=False, index=True)
|
||||
storagebackend = db.Column(db.String(20), nullable=False, default='shopdb')
|
||||
|
||||
@@ -114,6 +119,9 @@ class BackupRevision(db.Model):
|
||||
'sharepath': self.sharepath,
|
||||
'sourcefilename': self.sourcefilename,
|
||||
'bytesize': self.bytesize,
|
||||
# The machine number. Carried on the revision so the UI can name a
|
||||
# download <machinenumber>.reg without a second round trip.
|
||||
'assetnumber': self.asset.assetnumber if self.asset else None,
|
||||
'sourcehostname': self.sourcehostname,
|
||||
'collectedat': self.collectedat.isoformat() if self.collectedat else None,
|
||||
'createdat': self.createdat.isoformat() if self.createdat else None,
|
||||
|
||||
Reference in New Issue
Block a user