Skip to content

Commit

Permalink
[Fix-16783][Datasource] Fix switching multiple data sources, displayi…
Browse files Browse the repository at this point in the history
…ng field errors (#16784)

* Switching multiple data sources, displaying field errors

* fix

---------

Co-authored-by: xiangzihao <[email protected]>
  • Loading branch information
sdhzwc and SbloodyS authored Nov 11, 2024
1 parent a68c2a6 commit 5e2abd7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions dolphinscheduler-ui/src/views/datasource/list/use-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ export function useForm(id?: number) {
} else {
state.showPrincipal = false
}

if (
type === 'SSH' ||
type === 'ZEPPELIN' ||
Expand All @@ -287,6 +288,8 @@ export function useForm(id?: number) {
state.showHost = false
state.showPort = false
state.showRestEndpoint = true
} else {
state.showRestEndpoint = false
}
if (
type === 'SAGEMAKER' ||
Expand All @@ -299,18 +302,33 @@ export function useForm(id?: number) {
if (type === 'K8S') {
state.showNamespace = true
state.showKubeConfig = true
} else {
state.showNamespace = false
state.showKubeConfig = false
}
if (type === 'ALIYUN_SERVERLESS_SPARK') {
state.showAccessKeyId = true
state.showAccessKeySecret = true
state.showRegionId = true
state.showEndpoint = true
} else {
state.showAccessKeyId = false
state.showAccessKeySecret = false
state.showRegionId = false
state.showEndpoint = false
}
} else {
state.showDataBaseName = true
state.requiredDataBase = true
state.showJDBCConnectParameters = true
state.showPublicKey = false
state.showRestEndpoint = false
state.showNamespace = false
state.showKubeConfig = false
state.showAccessKeyId = false
state.showAccessKeySecret = false
state.showRegionId = false
state.showEndpoint = false
}
}

Expand Down

0 comments on commit 5e2abd7

Please sign in to comment.