PR Feedback
This commit is contained in:
parent
601a855f13
commit
6b36b8824e
|
@ -31,16 +31,9 @@
|
|||
config: get(configStore).config,
|
||||
name: get(nameStore).name,
|
||||
})
|
||||
} else {
|
||||
notifications.send("Invalid fields", {
|
||||
type: "error",
|
||||
icon: "Alert",
|
||||
autoDismiss: true,
|
||||
})
|
||||
|
||||
// Prevent modal closing
|
||||
return false
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
let createVariableModal
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
})
|
||||
store.setDatasource(datasource)
|
||||
|
||||
notifications.success("Datasource created successfully.")
|
||||
notifications.success("Datasource created successfully")
|
||||
} catch (e) {
|
||||
notifications.error(`Error creating datasource: ${e.message}`)
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import { Modal, notifications } from "@budibase/bbui"
|
||||
import { integrationForDatasource } from "stores/selectors"
|
||||
import { datasources, integrations, tables } from "stores/backend"
|
||||
import { datasources, integrations } from "stores/backend"
|
||||
import DatasourceConfigEditor from "components/backend/Datasources/ConfigEditor/index.svelte"
|
||||
import EditDatasourceConfigButton from "./EditDatasourceConfigButton.svelte"
|
||||
|
||||
|
@ -18,14 +18,8 @@
|
|||
datasource: { ...datasource, config, name },
|
||||
})
|
||||
|
||||
if (datasource?.plus) {
|
||||
await tables.fetch()
|
||||
}
|
||||
|
||||
await datasources.fetch()
|
||||
|
||||
notifications.success(
|
||||
`Datasource ${datasource.name} updated successfully.`
|
||||
`Datasource ${datasource.name} updated successfully`
|
||||
)
|
||||
} catch (err) {
|
||||
notifications.error(err?.message ?? "Error saving datasource")
|
||||
|
|
|
@ -92,7 +92,6 @@ export function createDatasourcesStore() {
|
|||
const isDatasourceInvalid = async (integration, datasource) => {
|
||||
if (integration.features?.[DatasourceFeature.CONNECTION_CHECKING]) {
|
||||
const { connected } = await API.validateDatasource(datasource)
|
||||
console.log(connected)
|
||||
if (!connected) return true
|
||||
}
|
||||
|
||||
|
@ -122,7 +121,6 @@ export function createDatasourcesStore() {
|
|||
}
|
||||
|
||||
const update = async ({ integration, datasource }) => {
|
||||
console.log(integration, datasource)
|
||||
if (await isDatasourceInvalid(integration, datasource)) {
|
||||
throw new Error("Unable to connect")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue