[Fix][UI] Fix hive datasource doesn't show principal bug (#10876)

* fix hive datasource doesn't show principal bug

* delete IDataBase

* restore DataSourceController.java
This commit is contained in:
Devosend 2022-07-12 09:18:10 +08:00 committed by caishunfeng
parent 7b7ec0f20f
commit 00393be7c6
2 changed files with 8 additions and 2 deletions

View File

@ -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]
)
}
)

View File

@ -169,7 +169,7 @@ export function useForm(id?: number) {
}
}
const datasourceType: IDataBaseOptionKeys = {
export const datasourceType: IDataBaseOptionKeys = {
MYSQL: {
value: 'MYSQL',
label: 'MYSQL',