From ee604b4427b2b2adefb9006dfd9bfc6723d85f86 Mon Sep 17 00:00:00 2001 From: Jakob Frank Date: Tue, 4 Jun 2024 18:30:39 +0200 Subject: [PATCH 1/2] #463: Show build-info in the footer --- .github/workflows/test-build-push.yml | 3 ++ openapi/StudyManagerAPI.yaml | 30 ++++++++++++++++++- src/components/shared/Footer.vue | 43 +++++++++++++++++++++++++-- src/env.d.ts | 4 +++ src/main.ts | 30 ++++++++++++++++++- vite.config.ts | 6 ++++ 6 files changed, 112 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-build-push.yml b/.github/workflows/test-build-push.yml index 18d98fdd..0f0b733a 100644 --- a/.github/workflows/test-build-push.yml +++ b/.github/workflows/test-build-push.yml @@ -73,6 +73,9 @@ jobs: - name: Run build run: npm run package + env: + VITE_GIT_BRANCH: '${{ github.ref_name }}' + VITE_GIT_REVISION: '${{ github.sha }}' build-and-push-image: name: Build and Push Docker Image diff --git a/openapi/StudyManagerAPI.yaml b/openapi/StudyManagerAPI.yaml index 803496af..2a96a457 100644 --- a/openapi/StudyManagerAPI.yaml +++ b/openapi/StudyManagerAPI.yaml @@ -1283,7 +1283,19 @@ paths: application/json: schema: $ref: '#/components/schemas/FrontendConfiguration' - + /config/buildInfo: + get: + tags: + - configuration + description: retrieve the build info + operationId: getBuildInfo + responses: + 200: + description: the build-info + content: + application/json: + schema: + $ref: '#/components/schemas/BuildInfo' components: schemas: @@ -1980,6 +1992,22 @@ components: required: - auth readOnly: true + BuildInfo: + type: object + properties: + version: + type: string + default: '0.0.0' + date: + type: string + format: date-time + branch: + type: string + rev: + type: string + required: + - version + - date parameters: StudyId: diff --git a/src/components/shared/Footer.vue b/src/components/shared/Footer.vue index f6e85afd..80bcb165 100644 --- a/src/components/shared/Footer.vue +++ b/src/components/shared/Footer.vue @@ -4,16 +4,45 @@ Prevention -- A research institute of the Ludwig Boltzmann Gesellschaft, Oesterreichische Vereinigung zur Foerderung der wissenschaftlichen Forschung). Licensed under the Elastic License 2.0. */