forked from DataLinkDC/dinky
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
1,005 additions
and
1,072 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export const DataStudioBottomState: string = 'DataStudioBottomState'; | ||
|
||
|
||
export type DataStudioBottomStateType = {} | ||
export type DataStudioBottomStateType = { | ||
console: string | ''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
import {BaseConfigProperties} from "@/types/SettingCenter/data.d"; | ||
|
||
export const DataStudioHeaderState: string = 'DataStudioHeaderState'; | ||
|
||
|
||
export type DataStudioHeaderStateType = {} | ||
export type DataStudioHeaderStateType = { | ||
dolphinSchedulerConfig : { | ||
isEnable: boolean; | ||
configList: BaseConfigProperties[]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,75 @@ | ||
import {createModelTypes} from "@/utils/modelUtils"; | ||
|
||
|
||
import {DataStudioHeaderState, DataStudioHeaderStateType} from "@/model/DataStudio/HeaderContainer/data.d"; | ||
import { Effect, Reducer } from "@umijs/max"; | ||
|
||
import { DataStudioHeaderState,DataStudioHeaderStateType } from '@/model/DataStudio/HeaderContainer/data.d'; | ||
import { queryDsConfig } from "@/pages/SettingCenter/GlobalSetting/service"; | ||
import { BaseConfigProperties } from "@/types/SettingCenter/data.d"; | ||
import { createModelTypes } from "@/utils/modelUtils"; | ||
import { Effect,Reducer } from '@umijs/max'; | ||
|
||
export type DataStudioHeaderModelType = { | ||
namespace: string; // 命名空间 | ||
state: DataStudioHeaderStateType; // state 数据| 数据类型 | ||
effects: {}; | ||
reducers: {}; | ||
} | ||
|
||
effects: { | ||
fetchDolphinSchedulerConfig: Effect; | ||
}; | ||
reducers: { | ||
updateDolphinSchedulerConfig: Reducer<DataStudioHeaderStateType>; | ||
updateDolphinSchedulerEnable: Reducer<DataStudioHeaderStateType>; | ||
updateDolphinSchedulerConfigList: Reducer<DataStudioHeaderStateType>; | ||
}; | ||
}; | ||
|
||
const DataStudioHeaderModel: DataStudioHeaderModelType = { | ||
namespace: DataStudioHeaderState, | ||
state: { | ||
dolphinSchedulerConfig: { | ||
isEnable: false, | ||
configList: [] | ||
} | ||
}, | ||
effects: {}, | ||
reducers: {} | ||
} | ||
effects: { | ||
*fetchDolphinSchedulerConfig({ payload }, { call, put }) { | ||
const response: BaseConfigProperties[] = yield call(queryDsConfig, payload); | ||
|
||
yield put({ | ||
type: 'updateDolphinSchedulerConfigList', | ||
payload: response | ||
}); | ||
// 找出是否启用, 更新状态 | ||
const isEnable = response.find(item => item.key === 'dolphinscheduler.settings.enable')?.value === 'true'; | ||
yield put({ | ||
type: 'updateDolphinSchedulerEnable', | ||
payload: isEnable | ||
}); | ||
} | ||
}, | ||
reducers: { | ||
updateDolphinSchedulerConfig(state, { payload }) { | ||
return { | ||
...state, | ||
dolphinSchedulerConfig: payload | ||
}; | ||
}, | ||
updateDolphinSchedulerEnable(state, { payload }) { | ||
return { | ||
...state, | ||
dolphinSchedulerConfig: { | ||
...state.dolphinSchedulerConfig, | ||
isEnable: payload | ||
} | ||
}; | ||
}, | ||
updateDolphinSchedulerConfigList(state, { payload }) { | ||
return { | ||
...state, | ||
dolphinSchedulerConfig: { | ||
...state.dolphinSchedulerConfig, | ||
configList: payload | ||
} | ||
}; | ||
} | ||
} | ||
}; | ||
|
||
export const [DataStudioHeaderStateModel, DataStudioHeaderStateModelAsync] = createModelTypes(DataStudioHeaderModel); | ||
export const [DataStudioHeaderStateModel, DataStudioHeaderStateModelAsync] = | ||
createModelTypes(DataStudioHeaderModel); | ||
|
||
export default DataStudioHeaderModel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
export enum DATA_STUDIO_SLIDER_ROUTER_ROOT_KEY { | ||
// 左侧顶部菜单 路由 key 一级 | ||
PROJECT = 'menu.datastudio.project', | ||
CATALOG = 'menu.datastudio.catalog', | ||
DATASOURCE = 'menu.datastudio.datasource', | ||
|
||
// 右侧顶部菜单 路由 key 一级 | ||
JOB_CONFIG = 'menu.datastudio.jobConfig', | ||
PREVIEW_CONFIG = 'menu.datastudio.previewConfig', | ||
SAVE_POINT = 'menu.datastudio.savePoint', | ||
HISTORY_VISION = 'menu.datastudio.historyVision', | ||
JOB_INFO = 'menu.datastudio.jobInfo', | ||
|
||
// 右侧底部菜单 路由 key 一级 | ||
CONSOLE = 'menu.datastudio.console', | ||
RESULT= 'menu.datastudio.result', | ||
BI ='menu.datastudio.bi', | ||
LINEAGE = 'menu.datastudio.lineage', | ||
PROCESS = 'menu.datastudio.process', | ||
HISTORY = 'menu.datastudio.history', | ||
TABLE_DATA = 'menu.datastudio.table-data', | ||
TOOLS = 'menu.datastudio.tool', | ||
TOOLS_TEXT_COMPARE = 'menu.datastudio.tool.text-comparison', | ||
TOOLS_JSON_TO_SQL_DDL ='menu.datastudio.tool.jsonToSql', | ||
} | ||
|
||
|
||
/** | ||
* 初始化各个容器的 高度和宽度 等样式信息 | ||
*/ | ||
export const VIEW_STYLE = { | ||
headerHeight: 32, | ||
headerNavHeight: 56, | ||
footerHeight: 25, | ||
sideWidth: 40, | ||
leftToolWidth: 180, | ||
marginTop: 84, | ||
topHeight: 35.6, | ||
bottomHeight: 100, | ||
rightMargin: 32, | ||
leftMargin: 36, | ||
midMargin: 44, | ||
otherHeight: 0, | ||
paddingInline: 50 | ||
}; |
Oops, something went wrong.