Commit 2653f2d6 authored by Lijiao's avatar Lijiao Committed by xuehui
Browse files

delete loading in the table and rename intermediate result x and y name (#1132)

parent b6dca3e0
...@@ -27,7 +27,6 @@ interface TrialDetailState { ...@@ -27,7 +27,6 @@ interface TrialDetailState {
entriesInSelect: string; entriesInSelect: string;
searchSpace: string; searchSpace: string;
isMultiPhase: boolean; isMultiPhase: boolean;
isTableLoading: boolean;
whichGraph: string; whichGraph: string;
hyperCounts: number; // user click the hyper-parameter counts hyperCounts: number; // user click the hyper-parameter counts
durationCounts: number; durationCounts: number;
...@@ -79,7 +78,6 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> { ...@@ -79,7 +78,6 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
whichGraph: '1', whichGraph: '1',
isHasSearch: false, isHasSearch: false,
isMultiPhase: false, isMultiPhase: false,
isTableLoading: false,
hyperCounts: 0, hyperCounts: 0,
durationCounts: 0, durationCounts: 0,
intermediateCounts: 0 intermediateCounts: 0
...@@ -95,9 +93,6 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> { ...@@ -95,9 +93,6 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
]) ])
.then(axios.spread((res, res1) => { .then(axios.spread((res, res1) => {
if (res.status === 200 && res1.status === 200) { if (res.status === 200 && res1.status === 200) {
if (this._isMounted === true) {
this.setState(() => ({ isTableLoading: true }));
}
const trialJobs = res.data; const trialJobs = res.data;
const metricSource = res1.data; const metricSource = res1.data;
const trialTable: Array<TableObj> = []; const trialTable: Array<TableObj> = [];
...@@ -187,10 +182,7 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> { ...@@ -187,10 +182,7 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
} }
} }
if (this._isMounted) { if (this._isMounted) {
this.setState(() => ({ this.setState(() => ({ tableListSource: trialTable }));
isTableLoading: false,
tableListSource: trialTable
}));
} }
if (entriesInSelect === 'all' && this._isMounted) { if (entriesInSelect === 'all' && this._isMounted) {
this.setState(() => ({ this.setState(() => ({
...@@ -330,7 +322,7 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> { ...@@ -330,7 +322,7 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
const { const {
tableListSource, searchResultSource, isHasSearch, isMultiPhase, tableListSource, searchResultSource, isHasSearch, isMultiPhase,
entriesTable, experimentPlatform, searchSpace, experimentLogCollection, entriesTable, experimentPlatform, searchSpace, experimentLogCollection,
whichGraph, isTableLoading whichGraph
} = this.state; } = this.state;
const source = isHasSearch ? searchResultSource : tableListSource; const source = isHasSearch ? searchResultSource : tableListSource;
return ( return (
...@@ -407,7 +399,6 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> { ...@@ -407,7 +399,6 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
<TableList <TableList
entries={entriesTable} entries={entriesTable}
tableSource={source} tableSource={source}
isTableLoading={isTableLoading}
isMultiPhase={isMultiPhase} isMultiPhase={isMultiPhase}
platform={experimentPlatform} platform={experimentPlatform}
updateList={this.getDetailSource} updateList={this.getDetailSource}
......
...@@ -115,13 +115,13 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState> ...@@ -115,13 +115,13 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState>
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
name: 'Scape', name: 'Step',
boundaryGap: false, boundaryGap: false,
data: xAxis data: xAxis
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
name: 'Intermediate' name: 'metric'
}, },
series: trialIntermediate series: trialIntermediate
}; };
......
...@@ -30,7 +30,6 @@ interface TableListProps { ...@@ -30,7 +30,6 @@ interface TableListProps {
platform: string; platform: string;
logCollection: boolean; logCollection: boolean;
isMultiPhase: boolean; isMultiPhase: boolean;
isTableLoading: boolean;
} }
interface TableListState { interface TableListState {
...@@ -195,7 +194,7 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -195,7 +194,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
render() { render() {
const { entries, tableSource, updateList, isTableLoading } = this.props; const { entries, tableSource, updateList } = this.props;
const { intermediateOption, modalVisible, isShowColumn, columnSelected } = this.state; const { intermediateOption, modalVisible, isShowColumn, columnSelected } = this.state;
let showTitle = COLUMN; let showTitle = COLUMN;
let bgColor = ''; let bgColor = '';
...@@ -418,7 +417,6 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -418,7 +417,6 @@ class TableList extends React.Component<TableListProps, TableListState> {
dataSource={tableSource} dataSource={tableSource}
className="commonTableStyle" className="commonTableStyle"
pagination={{ pageSize: entries }} pagination={{ pageSize: entries }}
loading={isTableLoading}
/> />
{/* Intermediate Result Modal */} {/* Intermediate Result Modal */}
<Modal <Modal
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment