diff --git a/dinky-web/src/pages/AuthCenter/User/components/PasswordModal/PasswordForm/index.tsx b/dinky-web/src/pages/AuthCenter/User/components/PasswordModal/PasswordForm/index.tsx index 0be26b2eb0..7d1c034b6b 100644 --- a/dinky-web/src/pages/AuthCenter/User/components/PasswordModal/PasswordForm/index.tsx +++ b/dinky-web/src/pages/AuthCenter/User/components/PasswordModal/PasswordForm/index.tsx @@ -108,7 +108,6 @@ const PasswordModal: React.FC = (props) => { { diff --git a/dinky-web/src/pages/DataStudio/DvaFunction.tsx b/dinky-web/src/pages/DataStudio/DvaFunction.tsx index cc8796b06a..d81cba39a4 100644 --- a/dinky-web/src/pages/DataStudio/DvaFunction.tsx +++ b/dinky-web/src/pages/DataStudio/DvaFunction.tsx @@ -119,6 +119,11 @@ export const mapDispatchToProps = (dispatch: Dispatch) => { dispatch({ type: CONFIG_MODEL_ASYNC.queryTaskOwnerLockingStrategy, payload: params + }), + queryDsConfig: (params: string) => + dispatch({ + type: CONFIG_MODEL_ASYNC.queryDsConfig, + payload: params }) }; }; diff --git a/dinky-web/src/pages/DataStudio/index.tsx b/dinky-web/src/pages/DataStudio/index.tsx index 33dffa9b53..572db6c86b 100644 --- a/dinky-web/src/pages/DataStudio/index.tsx +++ b/dinky-web/src/pages/DataStudio/index.tsx @@ -74,7 +74,9 @@ const DataStudio: React.FC = (props: any) => { queryFlinkUdfOptions, queryDataSourceDataList, querySuggestions, - queryUserData + queryUserData, + queryDsConfig, + queryTaskOwnerLockingStrategy } = props; const [_, token] = useToken(); @@ -133,6 +135,8 @@ const DataStudio: React.FC = (props: any) => { await queryDataSourceDataList(); await querySuggestions(); await queryUserData({ id: getTenantByLocalStorage() }); + await queryDsConfig(); + await queryTaskOwnerLockingStrategy(); }, []); useEffect(() => { const { actionType, params } = dataStudioState.action; diff --git a/dinky-web/src/pages/DevOps/JobList/index.tsx b/dinky-web/src/pages/DevOps/JobList/index.tsx index 45350db20a..6a58905cf6 100644 --- a/dinky-web/src/pages/DevOps/JobList/index.tsx +++ b/dinky-web/src/pages/DevOps/JobList/index.tsx @@ -182,7 +182,7 @@ const JobList = (props: connect) => { useEffect(() => { setInterval(() => tableRef.current?.reload(false), 5 * 1000); queryUserData({ id: getTenantByLocalStorage() }); - queryTaskOwnerLockingStrategy(SettingConfigKeyEnum.ENV.toLowerCase()); + queryTaskOwnerLockingStrategy(); }, []); const onChangeSearch = (e: any) => { diff --git a/dinky-web/src/pages/SettingCenter/GlobalSetting/model.ts b/dinky-web/src/pages/SettingCenter/GlobalSetting/model.ts index 66fa6f33ac..8f297cb0a6 100644 --- a/dinky-web/src/pages/SettingCenter/GlobalSetting/model.ts +++ b/dinky-web/src/pages/SettingCenter/GlobalSetting/model.ts @@ -69,8 +69,8 @@ const ConfigModel: ConfigModelType = { }, effects: { - *queryTaskOwnerLockingStrategy({ payload }, { call, put }) { - const response: BaseConfigProperties[] = yield call(queryTaskOwnerLockingStrategy, payload); + *queryTaskOwnerLockingStrategy({}, { call, put }) { + const response: BaseConfigProperties[] = yield call(queryTaskOwnerLockingStrategy); if (response && response.length > 0) { const taskOwnerLockingStrategy = response.find( (item) => item.key === GLOBAL_SETTING_KEYS.SYS_ENV_SETTINGS_TASK_OWNER_LOCK_STRATEGY @@ -84,8 +84,8 @@ const ConfigModel: ConfigModelType = { }); } }, - *queryDsConfig({ payload }, { call, put }) { - const response: BaseConfigProperties[] = yield call(queryDsConfig, payload); + *queryDsConfig({}, { call, put }) { + const response: BaseConfigProperties[] = yield call(queryDsConfig); yield put({ type: 'saveDsConfig', payload: response || [] diff --git a/dinky-web/src/pages/SettingCenter/GlobalSetting/service.ts b/dinky-web/src/pages/SettingCenter/GlobalSetting/service.ts index 60e64aef7e..679443b584 100644 --- a/dinky-web/src/pages/SettingCenter/GlobalSetting/service.ts +++ b/dinky-web/src/pages/SettingCenter/GlobalSetting/service.ts @@ -19,15 +19,20 @@ import { queryDataByParams } from '@/services/BusinessCrud'; import { API_CONSTANTS } from '@/services/endpoints'; +import { SettingConfigKeyEnum } from '@/pages/SettingCenter/GlobalSetting/SettingOverView/constants'; -export async function queryDsConfig(keyword: string) { - return await queryDataByParams(API_CONSTANTS.SYSTEM_GET_ONE_TYPE_CONFIG, { type: keyword }); +export async function queryDsConfig() { + return await queryDataByParams(API_CONSTANTS.SYSTEM_GET_ONE_TYPE_CONFIG, { + type: SettingConfigKeyEnum.DOLPHIN_SCHEDULER.toLowerCase() + }); } export async function queryResourceConfig(keyword: string) { return await queryDataByParams(API_CONSTANTS.SYSTEM_GET_ONE_TYPE_CONFIG, { type: keyword }); } -export async function queryTaskOwnerLockingStrategy(keyword: string) { - return await queryDataByParams(API_CONSTANTS.SYSTEM_GET_ONE_TYPE_CONFIG, { type: keyword }); +export async function queryTaskOwnerLockingStrategy() { + return await queryDataByParams(API_CONSTANTS.SYSTEM_GET_ONE_TYPE_CONFIG, { + type: SettingConfigKeyEnum.ENV.toLowerCase() + }); }