diff --git a/web/app/metalakes/CreateCatalogDialog.js b/web/app/metalakes/CreateCatalogDialog.js index 2db4916055d..e2d9243854d 100644 --- a/web/app/metalakes/CreateCatalogDialog.js +++ b/web/app/metalakes/CreateCatalogDialog.js @@ -172,12 +172,31 @@ const CreateCatalogDialog = props => { schema .validate(validData) .then(() => { - const properties = innerProps.reduce((acc, item) => { + let properties = {} + + const prevProperties = innerProps.reduce((acc, item) => { acc[item.key] = item.value return acc }, {}) + const { + 'catalog-backend': catalogBackend, + 'jdbc-driver': jdbcDriver, + 'jdbc-user': jdbcUser, + 'jdbc-password': jdbcPwd, + ...others + } = prevProperties + + if (catalogBackend && catalogBackend === 'hive') { + properties = { + 'catalog-backend': catalogBackend, + ...others + } + } else { + properties = prevProperties + } + const catalogData = { ...mainData, properties diff --git a/web/lib/provider/session.js b/web/lib/provider/session.js index d60fdf0ee09..6c88623e3e9 100644 --- a/web/lib/provider/session.js +++ b/web/lib/provider/session.js @@ -58,7 +58,6 @@ const AuthProvider = ({ children }) => { if (authType === 'simple') { dispatch(initialVersion()) - router.replace('/') } else { if (token) { dispatch(setIntervalId()) diff --git a/web/lib/utils/axios/index.ts b/web/lib/utils/axios/index.ts index 4c27ce63659..a9d91abb597 100644 --- a/web/lib/utils/axios/index.ts +++ b/web/lib/utils/axios/index.ts @@ -240,7 +240,10 @@ function createAxios(opt?: Partial) { // ** authentication schemes, e.g: Bearer authenticationScheme: 'Bearer', timeout: 0, - headers: { 'Content-Type': ContentTypeEnum.JSON }, + headers: { + 'Content-Type': ContentTypeEnum.JSON, + Accept: 'application/vnd.gravitino.v1+json' + }, transform: clone(transform), // ** request configuration settings