Merge branch 'feature/environment-variables' of github.com:Budibase/budibase into feature/environment-variables
This commit is contained in:
commit
2373ad016a
|
@ -9,6 +9,7 @@
|
|||
Modal,
|
||||
EnvDropdown,
|
||||
Accordion,
|
||||
notifications,
|
||||
} from "@budibase/bbui"
|
||||
import KeyValueBuilder from "components/integration/KeyValueBuilder.svelte"
|
||||
import { capitalise } from "helpers"
|
||||
|
@ -80,9 +81,13 @@
|
|||
}
|
||||
|
||||
async function save(data) {
|
||||
await environment.createVariable(data)
|
||||
config[selectedKey] = `{{ env.${data.name} }}`
|
||||
createVariableModal.hide()
|
||||
try {
|
||||
await environment.createVariable(data)
|
||||
config[selectedKey] = `{{ env.${data.name} }}`
|
||||
createVariableModal.hide()
|
||||
} catch (err) {
|
||||
notifications.error(`Failed to create variable: ${err.message}`)
|
||||
}
|
||||
}
|
||||
|
||||
function showModal(configKey) {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
Input,
|
||||
EnvDropdown,
|
||||
Modal,
|
||||
notifications,
|
||||
} from "@budibase/bbui"
|
||||
import { AUTH_TYPE_LABELS, AUTH_TYPES } from "./authTypes"
|
||||
import BindableCombobox from "components/common/bindings/BindableCombobox.svelte"
|
||||
|
@ -172,9 +173,13 @@
|
|||
}
|
||||
|
||||
const save = async data => {
|
||||
await environment.createVariable(data)
|
||||
form.basic[formFieldkey] = `{{ env.${data.name} }}`
|
||||
createVariableModal.hide()
|
||||
try {
|
||||
await environment.createVariable(data)
|
||||
form.basic[formFieldkey] = `{{ env.${data.name} }}`
|
||||
createVariableModal.hide()
|
||||
} catch (err) {
|
||||
notifications.error(`Failed to create variable: ${err.message}`)
|
||||
}
|
||||
}
|
||||
|
||||
const onFieldChange = () => {
|
||||
|
|
Loading…
Reference in New Issue