Skip to content

Commit

Permalink
restore Error submission
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoyan1998 committed Dec 13, 2023
1 parent 1766827 commit eb20412
Showing 1 changed file with 49 additions and 44 deletions.
93 changes: 49 additions & 44 deletions dinky-web/src/pages/Metrics/Job/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@
*/

import { ChartData, JobMetrics, MetricsLayout, SubTask, Task } from '@/pages/Metrics/Job/data';
import {
buildMetricsList,
buildRunningJobList,
buildSubTaskList
} from '@/pages/Metrics/Job/function';
import { getFlinkRunTask, saveFlinkMetrics } from '@/pages/Metrics/Job/service';
import { getData } from '@/services/api';
import { API_CONSTANTS } from '@/services/endpoints';
import { l } from '@/utils/intl';
import { ProCard } from '@ant-design/pro-components';
import { ProCard, ProFormSelect } from '@ant-design/pro-components';
import { Button, Input, Row } from 'antd';
import { useEffect, useState } from 'react';
import FlinkChart from "@/components/Flink/FlinkChart";

const getJobMetrics = async (job: JobMetrics) => {
const url =
Expand Down Expand Up @@ -196,22 +202,21 @@ const Job = () => {
return (
<>
<Row gutter={[8, 16]}>
{/*{metricsList.map((j) => {*/}
{/* return (*/}
{/* <FlinkChart*/}
{/* key={j.taskId + j.subTaskId + j.metrics}*/}
{/* chartSize={j.showSize}*/}
{/* chartType={j.showType}*/}
{/* onChangeJobState={(chartSize, chartType) => {*/}
{/* j.showSize = chartSize;*/}
{/* j.showType = chartType;*/}
{/* }}*/}
{/* data={chartData[j.taskId + j.subTaskId + j.metrics]}*/}
{/* title={j.metrics}*/}
{/* extraType={'size'}*/}
{/* />*/}
{/* );*/}
{/*})}*/}
{metricsList.map((j) => {
return (
<FlinkChart
key={j.taskId + j.subTaskId + j.metrics}
chartSize={j.showSize}
chartType={j.showType}
onChangeJobState={(chartSize, chartType) => {
j.showSize = chartSize;
j.showType = chartType;
}}
data={chartData[j.taskId + j.subTaskId + j.metrics]}
title={j.metrics}
/>
);
})}
</Row>
</>
);
Expand Down Expand Up @@ -264,34 +269,34 @@ const Job = () => {
</Button>
}
>
{/*<ProFormSelect*/}
{/* name='job'*/}
{/* label={l('metrics.flink.job.name')}*/}
{/* placeholder={l('metrics.flink.job.placeholder')}*/}
{/* options={buildRunningJobList(taskData)}*/}
{/* fieldProps={{ onChange: (value) => handleRunningJobChange(value as number) }}*/}
{/*/>*/}
{/*{metricsData.selectTaskId !== 0 && (*/}
{/* <ProFormSelect*/}
{/* name='vertices'*/}
{/* label={l('metrics.flink.subTask')}*/}
{/* placeholder={l('metrics.flink.subTask.placeholder')}*/}
{/* options={buildSubTaskList(subTaskList)}*/}
{/* fieldProps={{ onChange: (value) => handleSubTaskChange(value as string) }}*/}
{/* />*/}
{/*)}*/}
{/*{metricsData.selectSubTask !== '' && (*/}
{/* <ProFormSelect*/}
{/* name='metrics'*/}
{/* label={l('metrics.flink.metrics.name')}*/}
{/* placeholder={l('metrics.flink.metrics.placeholder')}*/}
{/* options={buildMetricsList(metrics)}*/}
{/* mode='multiple'*/}
{/* fieldProps={{ onChange: (value) => handleMetricsChange(value as string[]) }}*/}
{/* />*/}
{/*)}*/}
<ProFormSelect
name='job'
label={l('metrics.flink.job.name')}
placeholder={l('metrics.flink.job.placeholder')}
options={buildRunningJobList(taskData)}
fieldProps={{ onChange: (value) => handleRunningJobChange(value as number) }}
/>
{metricsData.selectTaskId !== 0 && (
<ProFormSelect
name='vertices'
label={l('metrics.flink.subTask')}
placeholder={l('metrics.flink.subTask.placeholder')}
options={buildSubTaskList(subTaskList)}
fieldProps={{ onChange: (value) => handleSubTaskChange(value as string) }}
/>
)}
{metricsData.selectSubTask !== '' && (
<ProFormSelect
name='metrics'
label={l('metrics.flink.metrics.name')}
placeholder={l('metrics.flink.metrics.placeholder')}
options={buildMetricsList(metrics)}
mode='multiple'
fieldProps={{ onChange: (value) => handleMetricsChange(value as string[]) }}
/>
)}
{/* render metrics list */}
{/*{jobMetricsList.length > 0 && renderMetricsCardList(jobMetricsList)}*/}
{jobMetricsList.length > 0 && renderMetricsCardList(jobMetricsList)}
</ProCard>
</>
);
Expand Down

0 comments on commit eb20412

Please sign in to comment.