From f7e8e6ff65e5cdabae798f1048589e6c9853baa4 Mon Sep 17 00:00:00 2001 From: "A. Diamond" Date: Tue, 28 Nov 2023 16:12:11 -0500 Subject: [PATCH] APTrust reports now show in Dashboard if repo is correctly configured --- core/aptrust_client_v3.go | 6 ++++-- core/aptrust_client_v3_test.go | 12 ++++++++++-- server/views/dashboard/show.html | 33 ++++++++++++++++++++++++++++++-- 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/core/aptrust_client_v3.go b/core/aptrust_client_v3.go index f8196ca..0e54d23 100644 --- a/core/aptrust_client_v3.go +++ b/core/aptrust_client_v3.go @@ -219,13 +219,13 @@ func (client *APTrustClientV3) repoBaseUrl() string { } var workItemsTemplate = ` -

Recent Work Items

+ @@ -235,6 +235,7 @@ var workItemsTemplate = ` + {{ end }} @@ -242,12 +243,12 @@ var workItemsTemplate = ` ` var intellectualObjectsTemplate = ` -

Recently Ingested Objects

Name Stage StatusLast Updated
{{ $item.Name }} {{ $item.Stage }} {{ $item.Status }}{{ $item.UpdatedAt.Format "2006-01-02" }}
+ @@ -256,6 +257,7 @@ var intellectualObjectsTemplate = ` + {{ end }} diff --git a/core/aptrust_client_v3_test.go b/core/aptrust_client_v3_test.go index 114eb0e..c180f8d 100644 --- a/core/aptrust_client_v3_test.go +++ b/core/aptrust_client_v3_test.go @@ -397,13 +397,13 @@ var objectResponseJson = ` }` var expectedWorkItemHTML = ` -

Recent Work Items

Identifier Storage OptionLast Updated
{{ $item.Identifier }} {{ $item.StorageOption }}{{ $item.UpdatedAt.Format "2006-01-02" }}
+ @@ -413,36 +413,40 @@ var expectedWorkItemHTML = ` + + + +
Name Stage StatusLast Updated
KNOX_007565.tar Cleanup Success2023-11-21
KNOX_007564.tar Cleanup Success2023-11-21
KNOX_007563.tar Cleanup Success2023-11-21
KNOX_007562.tar Cleanup Success2023-11-21
` var expectedObjectListHTML = ` -

Recently Ingested Objects

+ @@ -451,21 +455,25 @@ var expectedObjectListHTML = ` + + + + diff --git a/server/views/dashboard/show.html b/server/views/dashboard/show.html index 8e45c39..bf31c59 100644 --- a/server/views/dashboard/show.html +++ b/server/views/dashboard/show.html @@ -3,7 +3,7 @@ {{ template "partials/page_header.html" .}} -
+
Recent Jobs
@@ -38,8 +38,37 @@
Identifier Storage OptionLast Updated
knox.edu/KNOX_000089 Glacier-Deep-OH2023-11-21
knox.edu/KNOX_000088 Glacier-Deep-OH2023-11-21
knox.edu/KNOX_000080 Glacier-Deep-OH2023-11-21
knox.edu/KNOX_000087 Glacier-Deep-OH2023-11-21