1
0
Fork 0
mirror of synced 2024-09-02 18:51:36 +12:00

Add encrypt option

This commit is contained in:
Adria Navarro 2023-06-13 10:00:01 +01:00
parent 57c5facc6e
commit e6455d005b

View file

@ -1,9 +1,16 @@
<script> <script>
import { ModalContent, Toggle, Body, InlineAlert } from "@budibase/bbui" import {
ModalContent,
Toggle,
Body,
InlineAlert,
Divider,
} from "@budibase/bbui"
export let app export let app
export let published export let published
let excludeRows = false let includeInternalTablesRows = true
let encypt = true
$: title = published ? "Export published app" : "Export latest app" $: title = published ? "Export published app" : "Export latest app"
$: confirmText = published ? "Export published" : "Export latest" $: confirmText = published ? "Export published" : "Export latest"
@ -11,17 +18,21 @@
const exportApp = () => { const exportApp = () => {
const id = published ? app.prodId : app.devId const id = published ? app.prodId : app.devId
const appName = encodeURIComponent(app.name) const appName = encodeURIComponent(app.name)
window.location = `/api/backups/export?appId=${id}&appname=${appName}&excludeRows=${excludeRows}` window.location = `/api/backups/export?appId=${id}&appname=${appName}&excludeRows=${!includeInternalTablesRows}`
} }
</script> </script>
<ModalContent {title} {confirmText} onConfirm={exportApp}> <ModalContent {title} {confirmText} onConfirm={exportApp}>
<Body>
<Toggle
text="Export rows from internal tables"
bind:value={includeInternalTablesRows}
/>
<Toggle text="Encrypt my export" bind:value={encypt} />
</Body>
{#if !encypt}
<InlineAlert <InlineAlert
header="Do not share your budibase application exports publicly as they may contain sensitive information such as database credentials or secret keys." header="Do not share your budibase application exports publicly as they may contain sensitive information such as database credentials or secret keys."
/> />
<Body {/if}
>Apps can be exported with or without data that is within internal tables -
select this below.</Body
>
<Toggle text="Exclude Rows" bind:value={excludeRows} />
</ModalContent> </ModalContent>