Move snapshots to separate page

This commit is contained in:
Tom Wiesing 2023-11-10 18:31:35 +01:00
parent a43ada586d
commit ff92df3a87
No known key found for this signature in database
5 changed files with 109 additions and 36 deletions

View file

@ -74,6 +74,7 @@ var (
menuRebuild = component.DummyMenuItem()
menuGrants = component.DummyMenuItem()
menuPurge = component.DummyMenuItem()
menuSnapshots = component.DummyMenuItem()
)
func (admin *Admin) HandleRoute(ctx context.Context, route string) (handler http.Handler, err error) {
@ -139,6 +140,11 @@ func (admin *Admin) HandleRoute(ctx context.Context, route string) (handler http
router.Handler(http.MethodGet, route+"instance/:slug/purge", purge)
}
{
snapshots := admin.instanceSnapshots(ctx)
router.Handler(http.MethodGet, route+"instance/:slug/snapshots", snapshots)
}
// add a router for the login page
router.Handler(http.MethodPost, route+"login", admin.loginHandler(ctx))