From fdf43c2b01e79339b789b8035cfd8d9172f3c656 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Sun, 23 Oct 2022 21:14:55 +0100 Subject: [PATCH] add snapshot data passed to template from /danger/manage-snapshots. This data is just a list of the directory names for each snapshot stored in the /snapshots directory -- only deals with HTTP GET here. --- src/web.lisp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/web.lisp b/src/web.lisp index 39e917e..325f837 100644 --- a/src/web.lisp +++ b/src/web.lisp @@ -1667,12 +1667,14 @@ (append (auth:auth-user-data) `(:alert ,alert :system-data ,(nera:system-data) - ;; Snapshot data goes here... - )))) - ;; Not Authorised - (progn - (utils:set-alert "You are not authorised to view this page." "error") - (redirect "/login")))) + :snapshots + ,(reverse + (storage::get-directory-names + (storage::get-raw-directories "snapshots/"))))))) + ;; Not Authorised + (progn + (utils:set-alert "You are not authorised to view this page." "error") + (redirect "/login")))) (defroute ("/danger/take-snapshot" :method :POST) () (destructuring-bind