Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
delete loading in the table and rename intermediate result x and y na…
Browse files Browse the repository at this point in the history
…me (#1132)
  • Loading branch information
lvybriage authored and xuehui1991 committed Jun 3, 2019
1 parent b6dca3e commit 2653f2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
13 changes: 2 additions & 11 deletions src/webui/src/components/TrialsDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ interface TrialDetailState {
entriesInSelect: string;
searchSpace: string;
isMultiPhase: boolean;
isTableLoading: boolean;
whichGraph: string;
hyperCounts: number; // user click the hyper-parameter counts
durationCounts: number;
Expand Down Expand Up @@ -79,7 +78,6 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
whichGraph: '1',
isHasSearch: false,
isMultiPhase: false,
isTableLoading: false,
hyperCounts: 0,
durationCounts: 0,
intermediateCounts: 0
Expand All @@ -95,9 +93,6 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
])
.then(axios.spread((res, res1) => {
if (res.status === 200 && res1.status === 200) {
if (this._isMounted === true) {
this.setState(() => ({ isTableLoading: true }));
}
const trialJobs = res.data;
const metricSource = res1.data;
const trialTable: Array<TableObj> = [];
Expand Down Expand Up @@ -187,10 +182,7 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
}
}
if (this._isMounted) {
this.setState(() => ({
isTableLoading: false,
tableListSource: trialTable
}));
this.setState(() => ({ tableListSource: trialTable }));
}
if (entriesInSelect === 'all' && this._isMounted) {
this.setState(() => ({
Expand Down Expand Up @@ -330,7 +322,7 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
const {
tableListSource, searchResultSource, isHasSearch, isMultiPhase,
entriesTable, experimentPlatform, searchSpace, experimentLogCollection,
whichGraph, isTableLoading
whichGraph
} = this.state;
const source = isHasSearch ? searchResultSource : tableListSource;
return (
Expand Down Expand Up @@ -407,7 +399,6 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
<TableList
entries={entriesTable}
tableSource={source}
isTableLoading={isTableLoading}
isMultiPhase={isMultiPhase}
platform={experimentPlatform}
updateList={this.getDetailSource}
Expand Down
4 changes: 2 additions & 2 deletions src/webui/src/components/trial-detail/Intermeidate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState>
},
xAxis: {
type: 'category',
name: 'Scape',
name: 'Step',
boundaryGap: false,
data: xAxis
},
yAxis: {
type: 'value',
name: 'Intermediate'
name: 'metric'
},
series: trialIntermediate
};
Expand Down
4 changes: 1 addition & 3 deletions src/webui/src/components/trial-detail/TableList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ interface TableListProps {
platform: string;
logCollection: boolean;
isMultiPhase: boolean;
isTableLoading: boolean;
}

interface TableListState {
Expand Down Expand Up @@ -195,7 +194,7 @@ class TableList extends React.Component<TableListProps, TableListState> {

render() {

const { entries, tableSource, updateList, isTableLoading } = this.props;
const { entries, tableSource, updateList } = this.props;
const { intermediateOption, modalVisible, isShowColumn, columnSelected } = this.state;
let showTitle = COLUMN;
let bgColor = '';
Expand Down Expand Up @@ -418,7 +417,6 @@ class TableList extends React.Component<TableListProps, TableListState> {
dataSource={tableSource}
className="commonTableStyle"
pagination={{ pageSize: entries }}
loading={isTableLoading}
/>
{/* Intermediate Result Modal */}
<Modal
Expand Down

0 comments on commit 2653f2d

Please sign in to comment.