|
|
|
@ -139,16 +139,10 @@ const validators = computed(() => {
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const { validate, validateInfos } = useForm(formState.value, validators) |
|
|
|
|
|
|
|
|
|
const populateName = (v: string) => { |
|
|
|
|
if (selectedIntegration.value) return |
|
|
|
|
formState.value.dataSource.connection.database = `${v.trim()}_noco` |
|
|
|
|
} |
|
|
|
|
const { validate, validateInfos, clearValidate } = useForm(formState.value, validators) |
|
|
|
|
|
|
|
|
|
const onClientChange = () => { |
|
|
|
|
formState.value.dataSource = { ...getDefaultConnectionConfig(formState.value.dataSource.client) } |
|
|
|
|
populateName(formState.value.title) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const inflectionTypes = ['camelize', 'none'] |
|
|
|
@ -322,7 +316,6 @@ watch(
|
|
|
|
|
onMounted(async () => { |
|
|
|
|
await loadIntegrations(true, base.value?.id) |
|
|
|
|
formState.value.title = await generateUniqueName() |
|
|
|
|
populateName(formState.value.title) |
|
|
|
|
|
|
|
|
|
nextTick(() => { |
|
|
|
|
// todo: replace setTimeout and follow better approach |
|
|
|
@ -497,7 +490,7 @@ const filterIntegrationCategory = (c: IntegrationCategoryItemType) => [Integrati
|
|
|
|
|
<a-row :gutter="24"> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="Data Source Name" v-bind="validateInfos.title"> |
|
|
|
|
<a-input v-model:value="formState.title" @input="populateName(formState.title)" /> |
|
|
|
|
<a-input v-model:value="formState.title" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|