2022-05-25 20:26:10 +12:00
< script >
2023-01-17 23:51:26 +13:00
import { ModalContent , Toggle , Body , InlineAlert } from "@budibase/bbui"
2022-05-25 20:26:10 +12:00
export let app
2022-09-10 07:06:29 +12:00
export let published
2022-06-07 02:17:14 +12:00
let excludeRows = false
2022-05-25 20:26:10 +12:00
2022-09-10 07:06:29 +12:00
$: title = published ? "Export published app" : "Export latest app"
$: confirmText = published ? "Export published" : "Export latest"
2022-05-25 20:26:10 +12:00
const exportApp = () => {
2022-09-10 07:06:29 +12:00
const id = published ? app.prodId : app.devId
2022-05-25 20:26:10 +12:00
const appName = encodeURIComponent(app.name)
2022-06-07 02:17:14 +12:00
window.location = `/api/backups/export?appId=${ id } & appname=${ appName } & excludeRows=${ excludeRows } `
2022-05-25 20:26:10 +12:00
}
< / script >
2022-09-10 07:06:29 +12:00
< ModalContent { title } { confirmText } onConfirm = { exportApp } >
2023-02-02 03:44:53 +13:00
< InlineAlert
header="Do not share your budibase application exports publicly as they may contain sensitive information such as database credentials or secret keys."
/>
2022-09-10 07:06:29 +12:00
< Body
>Apps can be exported with or without data that is within internal tables -
select this below.< /Body
>
2022-06-07 02:17:14 +12:00
< Toggle text = "Exclude Rows" bind:value = { excludeRows } / >
2022-05-25 20:26:10 +12:00
< / ModalContent >