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

Commit

Permalink
Remove final val in the intermediate result graph and fix layout styl…
Browse files Browse the repository at this point in the history
…e bug(table | search space | config) on desktop (#2111)
  • Loading branch information
Lijiaoa authored Mar 4, 2020
1 parent cdeafa6 commit 933b3e4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 22 deletions.
6 changes: 3 additions & 3 deletions src/webui/src/components/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> {

<Stack horizontal className="overMessage">
{/* status block */}
<Stack.Item styles={{ root: { maxWidth: 440 } }} className="prograph overviewBoder cc">
<Stack.Item grow className="prograph overviewBoder cc">
<Title1 text="Status" icon="5.png" />
<Progressed
bestAccuracy={bestAccuracy}
Expand All @@ -84,13 +84,13 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
/>
</Stack.Item>
{/* experiment parameters search space tuner assessor... */}
<Stack.Item styles={{root: {width: 400}}} className="overviewBoder">
<Stack.Item grow styles={{root: {width: 450}}} className="overviewBoder">
<Title1 text="Search space" icon="10.png" />
<Stack className="experiment">
<SearchSpace searchSpace={searchSpace} />
</Stack>
</Stack.Item>
<Stack.Item styles={{root: {width: 400}}}>
<Stack.Item grow styles={{root: {width: 450}}}>
<Title1 text="Config" icon="4.png" />
<Stack className="experiment">
{/* the scroll bar all the trial profile in the searchSpace div*/}
Expand Down
19 changes: 12 additions & 7 deletions src/webui/src/components/overview/SuccessTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,26 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState>
key: 'sequenceId',
fieldName: 'sequenceId', // required!
minWidth: 60,
maxWidth: 80,
maxWidth: 120,
isResizable: true,
data: 'number',
onColumnClick: this.onColumnClick
}, {
name: 'ID',
key: 'id',
fieldName: 'id',
minWidth: 80,
maxWidth: 150,
maxWidth: 100,
isResizable: true,
className: 'tableHead leftTitle',
data: 'string',
onColumnClick: this.onColumnClick
}, {
name: 'Duration',
key: 'duration',
minWidth: 100,
maxWidth: 150,
maxWidth: 210,
isResizable: true,
fieldName: 'duration',
data: 'number',
onColumnClick: this.onColumnClick,
Expand All @@ -89,8 +92,9 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState>
}, {
name: 'Status',
key: 'status',
minWidth: 100,
maxWidth: 150,
minWidth: 140,
maxWidth: 210,
isResizable: true,
fieldName: 'status',
onRender: (item: any): React.ReactNode => {
return (
Expand All @@ -101,8 +105,9 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState>
name: 'Default metric',
key: 'accuracy',
fieldName: 'accuracy',
minWidth: 100,
maxWidth: 150,
minWidth: 120,
maxWidth: 360,
isResizable: true,
data: 'number',
onColumnClick: this.onColumnClick,
onRender: (item: any): React.ReactNode => {
Expand Down
25 changes: 13 additions & 12 deletions src/webui/src/components/trial-detail/TableList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ echarts.registerTheme('my_theme', {
color: '#3c8dbc'
});


interface TableListProps {
pageSize: number;
tableSource: Array<TableRecord>;
Expand Down Expand Up @@ -142,7 +141,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
key: 'sequenceId',
fieldName: 'sequenceId',
minWidth: 80,
maxWidth: 120,
maxWidth: 240,
className: 'tableHead',
data: 'string',
onColumnClick: this.onColumnClick,
Expand All @@ -166,7 +165,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
key: 'startTime',
fieldName: 'startTime',
minWidth: 150,
maxWidth: 200,
maxWidth: 400,
isResizable: true,
data: 'number',
onColumnClick: this.onColumnClick,
Expand All @@ -179,8 +178,8 @@ class TableList extends React.Component<TableListProps, TableListState> {
name: 'End Time',
key: 'endTime',
fieldName: 'endTime',
minWidth: 150,
maxWidth: 200,
minWidth: 200,
maxWidth: 400,
isResizable: true,
data: 'number',
onColumnClick: this.onColumnClick,
Expand All @@ -194,7 +193,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
key: 'duration',
fieldName: 'duration',
minWidth: 150,
maxWidth: 200,
maxWidth: 300,
isResizable: true,
data: 'number',
onColumnClick: this.onColumnClick,
Expand All @@ -209,7 +208,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
fieldName: 'status',
className: 'tableStatus',
minWidth: 150,
maxWidth: 200,
maxWidth: 250,
isResizable: true,
data: 'string',
onColumnClick: this.onColumnClick,
Expand Down Expand Up @@ -248,11 +247,13 @@ class TableList extends React.Component<TableListProps, TableListState> {
}
// intermediateArr just store default val
Object.keys(res.data).map(item => {
const temp = parseMetrics(res.data[item].data);
if (typeof temp === 'object') {
intermediateArr.push(temp[intermediateKey]);
} else {
intermediateArr.push(temp);
if(res.data[item].type === 'PERIODICAL'){
const temp = parseMetrics(res.data[item].data);
if (typeof temp === 'object') {
intermediateArr.push(temp[intermediateKey]);
} else {
intermediateArr.push(temp);
}
}
});
const intermediate = intermediateGraphOption(intermediateArr, id);
Expand Down

0 comments on commit 933b3e4

Please sign in to comment.