Skip to content

Commit ccda836

Browse files
authored
[Feature][web] Add resource management to the datastudio page (#3986)
Co-authored-by: zackyoungh <zackyoungh@users.noreply.github.com>
1 parent 0ee8278 commit ccda836

File tree

8 files changed

+464
-40
lines changed

8 files changed

+464
-40
lines changed

dinky-web/src/pages/DataStudio/CenterTabContent/SqlTask/index.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,6 @@ export const SqlTask = memo((props: FlinkSqlProps & any) => {
188188
if (taskDetail) {
189189
const statement = params.statement ?? taskDetail.statement;
190190
const newParams = { ...taskDetail, taskId: params.taskId, statement, mockSinkFunction: true };
191-
// @ts-ignore
192-
setCurrentState(newParams);
193-
updateCenterTab({ ...props.tabData, params: newParams });
194-
195191
if (taskDetail.dialect.toLowerCase() === DIALECT.FLINKJAR) {
196192
const sqlConvertForm = await flinkJarSqlConvertForm(taskDetail.statement);
197193
setSqlForm({ enable: true, ...sqlConvertForm });
@@ -213,6 +209,9 @@ export const SqlTask = memo((props: FlinkSqlProps & any) => {
213209
}
214210
} else {
215211
setOriginStatementValue(statement);
212+
// @ts-ignore
213+
setCurrentState(newParams);
214+
updateCenterTab({ ...props.tabData, params: newParams });
216215
if (params?.statement && params?.statement !== taskDetail.statement) {
217216
setDiff([{ key: 'statement', server: taskDetail.statement, cache: params.statement }]);
218217
setOpenDiffModal(true);
@@ -909,7 +908,10 @@ export const SqlTask = memo((props: FlinkSqlProps & any) => {
909908
}));
910909
}}
911910
>
912-
<ProFormCheckbox.Group name='manualInput' options={[l('datastudio.sqlTask.flinkJar.manualInput')]} />
911+
<ProFormCheckbox.Group
912+
name='manualInput'
913+
options={[l('datastudio.sqlTask.flinkJar.manualInput')]}
914+
/>
913915

914916
<ProFormDependency name={['manualInput']}>
915917
{({ manualInput }) => {

dinky-web/src/pages/DataStudio/DvaFunction.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ export const mapDispatchToProps = (dispatch: Dispatch) => {
125125
type: CONFIG_MODEL_ASYNC.queryDsConfig,
126126
payload: params
127127
}),
128+
queryResourceConfig: (params: string) =>
129+
dispatch({
130+
type: CONFIG_MODEL_ASYNC.queryResourceConfig,
131+
payload: params
132+
}),
128133
queryResource: () =>
129134
dispatch({
130135
type: STUDIO_MODEL_ASYNC.queryResource

0 commit comments

Comments
 (0)