update env vars with geneic splash screen
This commit is contained in:
parent
c2b7c6f388
commit
2bd6ff627a
|
@ -1,21 +1,17 @@
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
Layout,
|
Layout,
|
||||||
Heading,
|
|
||||||
Body,
|
|
||||||
Button,
|
Button,
|
||||||
Divider,
|
|
||||||
Modal,
|
Modal,
|
||||||
Table,
|
Table,
|
||||||
Tags,
|
|
||||||
Tag,
|
|
||||||
InlineAlert,
|
InlineAlert,
|
||||||
notifications,
|
notifications,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { environment, licensing, auth, admin } from "stores/portal"
|
import { environment, licensing } from "stores/portal"
|
||||||
import { onMount } from "svelte"
|
import { onMount } from "svelte"
|
||||||
import CreateEditVariableModal from "components/portal/environment/CreateEditVariableModal.svelte"
|
import CreateEditVariableModal from "components/portal/environment/CreateEditVariableModal.svelte"
|
||||||
import EditVariableColumn from "./_components/EditVariableColumn.svelte"
|
import EditVariableColumn from "./_components/EditVariableColumn.svelte"
|
||||||
|
import LockedFeature from "../../_components/LockedFeature.svelte"
|
||||||
|
|
||||||
let modal
|
let modal
|
||||||
|
|
||||||
|
@ -61,91 +57,43 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Layout noPadding>
|
<LockedFeature
|
||||||
<Layout gap="XS" noPadding>
|
title={"Environment Variables"}
|
||||||
<div class="title">
|
planType={"Business plan"}
|
||||||
<Heading size="M">Environment Variables</Heading>
|
description={"Add and manage environment variables for development and production"}
|
||||||
{#if !$licensing.environmentVariablesEnabled}
|
enabled={$licensing.environmentVariablesEnabled}
|
||||||
<Tags>
|
upgradeButtonClick={async () => {
|
||||||
<Tag icon="LockClosed">Business plan</Tag>
|
await environment.upgradePanelOpened()
|
||||||
</Tags>
|
$licensing.goToUpgradePage()
|
||||||
{/if}
|
}}
|
||||||
</div>
|
>
|
||||||
<Body
|
{#if noEncryptionKey}
|
||||||
>Add and manage environment variables for development and production</Body
|
<InlineAlert
|
||||||
>
|
message="Your Budibase installation does not have a key for encryption, please update your app service's environment variables to contain an 'ENCRYPTION_KEY' value."
|
||||||
</Layout>
|
header="No encryption key found"
|
||||||
<Divider size="S" />
|
type="error"
|
||||||
|
/>
|
||||||
{#if $licensing.environmentVariablesEnabled}
|
|
||||||
{#if noEncryptionKey}
|
|
||||||
<InlineAlert
|
|
||||||
message="Your Budibase installation does not have a key for encryption, please update your app service's environment variables to contain an 'ENCRYPTION_KEY' value."
|
|
||||||
header="No encryption key found"
|
|
||||||
type="error"
|
|
||||||
/>
|
|
||||||
{/if}
|
|
||||||
<div>
|
|
||||||
<Button on:click={modal.show} cta disabled={noEncryptionKey}
|
|
||||||
>Add Variable</Button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Layout noPadding>
|
|
||||||
<Table
|
|
||||||
{schema}
|
|
||||||
data={$environment.variables}
|
|
||||||
allowEditColumns={false}
|
|
||||||
allowEditRows={false}
|
|
||||||
allowSelectRows={false}
|
|
||||||
{customRenderers}
|
|
||||||
/>
|
|
||||||
</Layout>
|
|
||||||
{:else}
|
|
||||||
<div class="buttons">
|
|
||||||
<Button
|
|
||||||
primary
|
|
||||||
disabled={!$auth.accountPortalAccess && $admin.cloud}
|
|
||||||
on:click={async () => {
|
|
||||||
await environment.upgradePanelOpened()
|
|
||||||
$licensing.goToUpgradePage()
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Upgrade
|
|
||||||
</Button>
|
|
||||||
<!--Show the view plans button-->
|
|
||||||
<Button
|
|
||||||
secondary
|
|
||||||
on:click={() => {
|
|
||||||
window.open("https://budibase.com/pricing/", "_blank")
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
View Plans
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
</Layout>
|
<div>
|
||||||
|
<Button on:click={modal.show} cta disabled={noEncryptionKey}
|
||||||
|
>Add Variable</Button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<Layout noPadding>
|
||||||
|
<Table
|
||||||
|
{schema}
|
||||||
|
data={$environment.variables}
|
||||||
|
allowEditColumns={false}
|
||||||
|
allowEditRows={false}
|
||||||
|
allowSelectRows={false}
|
||||||
|
{customRenderers}
|
||||||
|
/>
|
||||||
|
</Layout>
|
||||||
|
</LockedFeature>
|
||||||
|
|
||||||
<Modal bind:this={modal}>
|
<Modal bind:this={modal}>
|
||||||
<CreateEditVariableModal {save} />
|
<CreateEditVariableModal {save} />
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.buttons {
|
|
||||||
display: flex;
|
|
||||||
gap: var(--spacing-l);
|
|
||||||
}
|
|
||||||
.title {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-start;
|
|
||||||
gap: var(--spacing-m);
|
|
||||||
}
|
|
||||||
|
|
||||||
.buttons {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
gap: var(--spacing-m);
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue