This is an automated email from the ASF dual-hosted git repository.

liudongkai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 56fe11ecf9 [Fix][UI] Fix hive datasource doesn't show principal bug 
(#10876)
56fe11ecf9 is described below

commit 56fe11ecf9e50bdd984920a065b8ba0680e741f1
Author: Devosend <[email protected]>
AuthorDate: Tue Jul 12 09:18:10 2022 +0800

    [Fix][UI] Fix hive datasource doesn't show principal bug (#10876)
    
    * fix hive datasource doesn't show principal bug
    
    * delete IDataBase
    
    * restore DataSourceController.java
---
 dolphinscheduler-ui/src/views/datasource/list/detail.tsx  | 8 +++++++-
 dolphinscheduler-ui/src/views/datasource/list/use-form.ts | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dolphinscheduler-ui/src/views/datasource/list/detail.tsx 
b/dolphinscheduler-ui/src/views/datasource/list/detail.tsx
index 294e042dc3..cd521e3e54 100644
--- a/dolphinscheduler-ui/src/views/datasource/list/detail.tsx
+++ b/dolphinscheduler-ui/src/views/datasource/list/detail.tsx
@@ -30,7 +30,7 @@ import {
 } from 'naive-ui'
 import Modal from '@/components/modal'
 import { useI18n } from 'vue-i18n'
-import { useForm, datasourceTypeList } from './use-form'
+import { useForm, datasourceType, datasourceTypeList } from './use-form'
 import { useDetail } from './use-detail'
 
 const props = {
@@ -88,6 +88,12 @@ const DetailModal = defineComponent({
       () => props.show,
       async () => {
         props.show && props.id && setFieldsValue(await queryById(props.id))
+        props.show &&
+          state.detailForm.type &&
+          changeType(
+            state.detailForm.type,
+            datasourceType[state.detailForm.type]
+          )
       }
     )
 
diff --git a/dolphinscheduler-ui/src/views/datasource/list/use-form.ts 
b/dolphinscheduler-ui/src/views/datasource/list/use-form.ts
index e1c427875f..beca7d226a 100644
--- a/dolphinscheduler-ui/src/views/datasource/list/use-form.ts
+++ b/dolphinscheduler-ui/src/views/datasource/list/use-form.ts
@@ -169,7 +169,7 @@ export function useForm(id?: number) {
   }
 }
 
-const datasourceType: IDataBaseOptionKeys = {
+export const datasourceType: IDataBaseOptionKeys = {
   MYSQL: {
     value: 'MYSQL',
     label: 'MYSQL',

Reply via email to