Give the backups plugin a settings page, and show where a snapshot is
This commit is contained in:
@@ -133,6 +133,31 @@ class BackupsPlugin(BasePlugin):
|
||||
panels.append(panel)
|
||||
return panels
|
||||
|
||||
def get_settings_cards(self) -> List[Dict]:
|
||||
"""ADR-010: contribute the Backups settings card.
|
||||
|
||||
The core settings catalog (settingsNav.js) is a hardcoded list a plugin
|
||||
cannot extend, so this plugin shipped five settings and no page for any
|
||||
of them - backups_shareroot and the collection interval were reachable
|
||||
only through the API or a shell on the server, which is not a
|
||||
configurable setting in any useful sense.
|
||||
|
||||
Filed under Machines because that is where the assets these back up
|
||||
live, and it puts the card next to Machine Types rather than in a
|
||||
platform group nobody visits.
|
||||
"""
|
||||
return [
|
||||
{
|
||||
'group': 'Machines',
|
||||
'to': '/settings/backups',
|
||||
'icon': 'package',
|
||||
'title': 'Backups',
|
||||
'description': 'Collection interval, share root for part-marker '
|
||||
'snapshots, staleness threshold and revision retention',
|
||||
'position': 21,
|
||||
},
|
||||
]
|
||||
|
||||
def get_settings_defaults(self) -> List[Dict]:
|
||||
"""Schedule + retention, read by the collector and the prune job.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user