Add encrypt option
This commit is contained in:
parent
57c5facc6e
commit
e6455d005b
|
@ -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}>
|
||||||
<InlineAlert
|
<Body>
|
||||||
header="Do not share your budibase application exports publicly as they may contain sensitive information such as database credentials or secret keys."
|
<Toggle
|
||||||
/>
|
text="Export rows from internal tables"
|
||||||
<Body
|
bind:value={includeInternalTablesRows}
|
||||||
>Apps can be exported with or without data that is within internal tables -
|
/>
|
||||||
select this below.</Body
|
<Toggle text="Encrypt my export" bind:value={encypt} />
|
||||||
>
|
</Body>
|
||||||
<Toggle text="Exclude Rows" bind:value={excludeRows} />
|
{#if !encypt}
|
||||||
|
<InlineAlert
|
||||||
|
header="Do not share your budibase application exports publicly as they may contain sensitive information such as database credentials or secret keys."
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
|
|
Loading…
Reference in New Issue