|
|
@ -1,5 +1,13 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
<script setup lang="ts"> |
|
|
|
|
|
|
|
import { ClientType, SSLUsage } from 'nocodb-sdk' |
|
|
|
import { Action } from '../../../composables/useAccountSetupStore' |
|
|
|
import { Action } from '../../../composables/useAccountSetupStore' |
|
|
|
|
|
|
|
import type { |
|
|
|
|
|
|
|
CertTypes, |
|
|
|
|
|
|
|
DatabricksConnection, |
|
|
|
|
|
|
|
DefaultConnection, |
|
|
|
|
|
|
|
SQLiteConnection, |
|
|
|
|
|
|
|
SnowflakeConnection, |
|
|
|
|
|
|
|
} from '../../../utils/baseCreateUtils' |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{ |
|
|
|
const props = defineProps<{ |
|
|
|
id: string |
|
|
|
id: string |
|
|
@ -29,7 +37,7 @@ const pluginTypeMap = { |
|
|
|
Password: FormBuilderInputType.Password, |
|
|
|
Password: FormBuilderInputType.Password, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const { formState, validate } = useProvideFormBuilderHelper({ |
|
|
|
const { formState, validate, validateInfos } = useProvideFormBuilderHelper({ |
|
|
|
formSchema: [ |
|
|
|
formSchema: [ |
|
|
|
...plugin.value.formDetails.items.map((item) => ({ |
|
|
|
...plugin.value.formDetails.items.map((item) => ({ |
|
|
|
type: pluginTypeMap[item.type] || FormBuilderInputType.Input, |
|
|
|
type: pluginTypeMap[item.type] || FormBuilderInputType.Input, |
|
|
@ -64,10 +72,14 @@ const doAction = async (action: Action) => { |
|
|
|
loadingAction.value = null |
|
|
|
loadingAction.value = null |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isValid = computed(() => { |
|
|
|
|
|
|
|
return Object.values(validateInfos || {}).every((info) => info.validateStatus !== 'error') |
|
|
|
|
|
|
|
}) |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="flex flex-col" data-test-id="nc-setup"> |
|
|
|
<div class="flex flex-col h-full h-[calc(100vh_-_40px)]" data-test-id="nc-setup"> |
|
|
|
<NcPageHeader> |
|
|
|
<NcPageHeader> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
<span data-rec="true"> |
|
|
|
<span data-rec="true"> |
|
|
@ -75,10 +87,9 @@ const doAction = async (action: Action) => { |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</NcPageHeader> |
|
|
|
</NcPageHeader> |
|
|
|
<div class="flex gap-30"> |
|
|
|
<div class="h-full flex h-[calc(100%_-_48px)]"> |
|
|
|
<div class="flex-grow" /> |
|
|
|
<div class="nc-config-left-panel nc-scrollbar-thin relative h-full flex flex-col"> |
|
|
|
<div> |
|
|
|
<div class="w-full flex items-center gap-3 border-b-1 border-gray-200 h-12 py-2 px-3"> |
|
|
|
<div class="mt-4 pb-4 w-150 mx-auto flex items-center gap-3 border-b-1 border-gray-200"> |
|
|
|
|
|
|
|
<div |
|
|
|
<div |
|
|
|
v-if="plugin.logo" |
|
|
|
v-if="plugin.logo" |
|
|
|
class="mr-1 flex items-center justify-center" |
|
|
|
class="mr-1 flex items-center justify-center" |
|
|
@ -98,14 +109,14 @@ const doAction = async (action: Action) => { |
|
|
|
:loading="loadingAction === action.key" |
|
|
|
:loading="loadingAction === action.key" |
|
|
|
:type="action.key === Action.Save ? 'primary' : 'default'" |
|
|
|
:type="action.key === Action.Save ? 'primary' : 'default'" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
:disabled="!!loadingAction" |
|
|
|
:disabled="!!loadingAction || !isValid" |
|
|
|
@click="doAction(action.key)" |
|
|
|
@click="doAction(action.key)" |
|
|
|
> |
|
|
|
> |
|
|
|
{{ action.label === 'Save' ? 'Save configuration' : action.label }} |
|
|
|
{{ action.label === 'Save' ? 'Save configuration' : action.label }} |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="h-[calc(100%_-_58px)] flex py-4 flex-col"> |
|
|
|
<div class="h-[calc(100%_-_48px)] flex py-4 flex-col p-6 overflow-auto"> |
|
|
|
<div v-if="isLoading || !plugin" class="flex flex-row w-full justify-center items-center h-52"> |
|
|
|
<div v-if="isLoading || !plugin" class="flex flex-row w-full justify-center items-center h-52"> |
|
|
|
<a-spin size="large" /> |
|
|
|
<a-spin size="large" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -115,18 +126,29 @@ const doAction = async (action: Action) => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex-grow mt-15 flex flex-col gap-3"> |
|
|
|
<div class="nc-config-right-panel"> |
|
|
|
<div class="text-gray-500 text-capitalize">Documentation</div> |
|
|
|
<div class="flex-grow flex flex-col gap-3"> |
|
|
|
|
|
|
|
<div class="text-gray-500 text-capitalize">Documentation</div> |
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<GeneralIcon icon="bookOpen" class="text-gray-500" /> |
|
|
|
<GeneralIcon icon="bookOpen" class="text-gray-500" /> |
|
|
|
Workspace Setup |
|
|
|
Workspace Setup |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<GeneralIcon icon="bookOpen" class="text-gray-500" /> |
|
|
|
<GeneralIcon icon="bookOpen" class="text-gray-500" /> |
|
|
|
Setting up SMTP as email service |
|
|
|
Setting up SMTP as email service |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
.nc-config-left-panel { |
|
|
|
|
|
|
|
@apply w-full flex-1 flex justify-stretch; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.nc-config-right-panel { |
|
|
|
|
|
|
|
@apply p-5 w-[320px] border-l-1 border-gray-200 flex flex-col gap-4 bg-gray-50 rounded-br-2xl; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|