1
0
Fork 0
mirror of synced 2024-06-22 16:10:40 +12:00

fix feedback notification panel, prevent MinIO bucket from being deleted

This commit is contained in:
Martin McKeaveney 2021-06-10 12:07:39 +01:00
parent 6255dadb43
commit 2877648df5
3 changed files with 18 additions and 5 deletions

View file

@ -31,9 +31,9 @@
notifications.success(`Application published successfully`) notifications.success(`Application published successfully`)
} }
if (analytics.requestFeedbackOnDeploy()) { // if (analytics.requestFeedbackOnDeploy()) {
feedbackModal.show() feedbackModal.show()
} // }
} catch (err) { } catch (err) {
analytics.captureException(err) analytics.captureException(err)
notifications.error(`Error publishing app: ${err}`) notifications.error(`Error publishing app: ${err}`)
@ -98,6 +98,16 @@
</script> </script>
<Button secondary on:click={publishModal.show}>Publish</Button> <Button secondary on:click={publishModal.show}>Publish</Button>
<Modal bind:this={feedbackModal}>
<ModalContent
title="Enjoying Budibase?"
size="L"
showConfirmButton={false}
showCancelButton={false}
>
<FeedbackIframe on:finished={feedbackModal.hide} />
</ModalContent>
</Modal>
<Modal bind:this={publishModal}> <Modal bind:this={publishModal}>
<ModalContent <ModalContent
title="Publish to Production" title="Publish to Production"

View file

@ -127,7 +127,9 @@
return return
} }
try { try {
const response = await del(`/api/applications/${selectedApp.prodId}`) const response = await del(
`/api/applications/${selectedApp.prodId}?unpublish=1`
)
if (response.status !== 200) { if (response.status !== 200) {
const json = await response.json() const json = await response.json()
throw json.message throw json.message

View file

@ -245,9 +245,10 @@ exports.update = async function (ctx) {
exports.delete = async function (ctx) { exports.delete = async function (ctx) {
const db = new CouchDB(ctx.params.appId) const db = new CouchDB(ctx.params.appId)
const result = await db.destroy() const result = await db.destroy()
/* istanbul ignore next */ /* istanbul ignore next */
if (!env.isTest()) { if (!env.isTest() && !ctx.query.unpublish) {
await deleteApp(ctx.params.appId) await deleteApp(ctx.params.appId)
} }
// make sure the app/role doesn't stick around after the app has been deleted // make sure the app/role doesn't stick around after the app has been deleted