From ce6f5d4ff84074ad9041db95e3a32910eb1090ab Mon Sep 17 00:00:00 2001 From: uly55e5 Date: Wed, 10 May 2023 23:23:57 +0200 Subject: [PATCH] #21 add automatic update for results --- Dockerfile-svelte-debug | 2 +- docker/docker-compose.yaml | 2 +- pkg/database/postgres.go | 5 +++++ web-frontend/src/routes/contents/+page.svelte | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile-svelte-debug b/Dockerfile-svelte-debug index a8b9c02..f8fd4a9 100644 --- a/Dockerfile-svelte-debug +++ b/Dockerfile-svelte-debug @@ -1,4 +1,4 @@ -FROM node:19-alpine AS build +FROM docker.io/node:19-alpine AS build WORKDIR /app diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 85a4a88..47fd378 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -9,7 +9,7 @@ services: MONGO_INITDB_ROOT_USERNAME: ${MONGODB_USER} MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PWD} healthcheck: - test: ["CMD","mongosh", "--eval", "db.adminCommand('ping')"] + test: ["CMD","mongosh", "--eval", "\"db.adminCommand('ping')\""] interval: 30s timeout: 60s retries: 5 diff --git a/pkg/database/postgres.go b/pkg/database/postgres.go index 28bae82..1afc5e4 100644 --- a/pkg/database/postgres.go +++ b/pkg/database/postgres.go @@ -25,6 +25,11 @@ type PostgresSQLDB struct { database *sql.DB } +func (p *PostgresSQLDB) GetMetaData() (*MB3MetaData, error) { + //TODO implement me + panic("implement me") +} + // NewPostgresSQLDb creates a postgres database handle implementing [MB3Database] from the configuration. // It does test the connection or connect to the database. This should be done by [Connect()]. // diff --git a/web-frontend/src/routes/contents/+page.svelte b/web-frontend/src/routes/contents/+page.svelte index 45aa4e2..4d69c58 100644 --- a/web-frontend/src/routes/contents/+page.svelte +++ b/web-frontend/src/routes/contents/+page.svelte @@ -72,6 +72,7 @@

Results

+ {#key ionMode,msType,contribuors,instrumentType} {#await getResults(page)}
Loading results...
{:then records} @@ -83,6 +84,7 @@ {:catch error}
Error while loading results
{/await} + {/key}