From 1b4a809081ada3b4f6810e8574b27bbfae3709e8 Mon Sep 17 00:00:00 2001 From: Colin Slater Date: Fri, 18 Oct 2024 15:13:27 -0700 Subject: [PATCH] Display improvements, link to other tools. --- app/layout.js | 9 ++++++++- app/page.js | 35 +++++++++++++++++++++++------------ 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/app/layout.js b/app/layout.js index 1ea31dc..820bbe2 100644 --- a/app/layout.js +++ b/app/layout.js @@ -16,7 +16,14 @@ export default function RootLayout({ children }) { return ( -
Rubin Plot Navigator
+
+
Rubin Plot Navigator
+ +
{children} diff --git a/app/page.js b/app/page.js index 924994d..da959da 100644 --- a/app/page.js +++ b/app/page.js @@ -11,55 +11,66 @@ export default async function Collections() { const summaryRefs = await ListSummaries() summaryRefs.sort((a,b) => (b.lastModified - a.lastModified)) + const officialSummaryRefs = summaryRefs.filter((ref) => ! ref.collection.startsWith("u")) + const userSummaryRefs = summaryRefs.filter((ref) => ref.collection.startsWith("u")) + + officialSummaryRefs.sort((a,b) => (b.lastModified - a.lastModified)) + userSummaryRefs.sort((a,b) => (b.lastModified - a.lastModified)) const decodeReportFilename = (filename) => { const uriEncodedCollection = filename.match("report_(.*).json.gz")[1] return decodeURIComponent(uriEncodedCollection) } + + /* const reportFilenames = await ListReports() const reports = reportFilenames.map(decodeReportFilename) + */ const cellClassNames = "px-2 py-3" return (
-

Collections

-
+

Official Collections

+
+ - {summaryRefs.map((summary, n) => + {officialSummaryRefs.map((summary, n) => ( + ))}
CollectionRepo Last Updated
{summary.collection}{summary.repo} {summary.lastModified.toDateString()}
-

Reports

-
+

User Collections

+
- - - + + + - {reports.map((collection, n) => - ( - - + {userSummaryRefs.map((summary, n) => + ( + + ))}
ReportPlotsLast UpdatedCollectionRepoLast Updated
{collection}43212024-05-06
{summary.collection}{summary.repo}{summary.lastModified.toDateString()}
+
)