From 3b219dc4ef777b1dda77e8bf73441245bee17331 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 18 Jan 2023 17:29:56 +0000 Subject: [PATCH] Adding a warning for missing ENCRYPTION_KEY variable to the portal. --- .../portal/settings/environment/index.svelte | 21 +++++++++-- .../builder/src/stores/portal/environment.js | 36 +++++++++++++++---- .../src/api/environmentVariables.js | 6 ++++ packages/types/src/api/web/app/backup.ts | 5 +++ .../api/web/global/environmentVariables.ts | 4 +++ 5 files changed, 63 insertions(+), 9 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/settings/environment/index.svelte b/packages/builder/src/pages/builder/portal/settings/environment/index.svelte index bb9df4a946..f31f5dba69 100644 --- a/packages/builder/src/pages/builder/portal/settings/environment/index.svelte +++ b/packages/builder/src/pages/builder/portal/settings/environment/index.svelte @@ -9,6 +9,7 @@ Table, Tags, Tag, + InlineAlert, } from "@budibase/bbui" import { environment, licensing, auth, admin } from "stores/portal" import { onMount } from "svelte" @@ -30,7 +31,10 @@ const customRenderers = [{ column: "edit", component: EditVariableColumn }] + $: encryptionKeyAvailable = $environment.status?.encryptionKeyAvailable + onMount(async () => { + await environment.checkStatus() await environment.loadVariables() }) @@ -55,11 +59,18 @@ > {#if $licensing.environmentVariablesEnabled} + {#if encryptionKeyAvailable === false} + + {/if} Add Variable {:else} -
+