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

Commit

Permalink
Add Trial No. message in compare modal and add a button to link webui…
Browse files Browse the repository at this point in the history
… document (#1538)
  • Loading branch information
lvybriage authored and chicm-ms committed Sep 11, 2019
1 parent 330e1e1 commit 1595287
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
12 changes: 11 additions & 1 deletion src/webui/src/components/Modal/Compare.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class Compare extends React.Component<CompareProps, {}> {
initColumn = () => {
const { compareRows } = this.props;
const idList: Array<string> = [];
const sequenceIdList: Array<number> = [];
const durationList: Array<number> = [];

const parameterList: Array<object> = [];
Expand All @@ -117,20 +118,29 @@ class Compare extends React.Component<CompareProps, {}> {
Object.keys(compareRows).map(item => {
const temp = compareRows[item];
idList.push(temp.id);
sequenceIdList.push(temp.sequenceId);
durationList.push(temp.duration);
parameterList.push(temp.description.parameters);
});
return (
<table className="compare">
<tbody>
<tr>
<td />
<td className="column">Id</td>
{Object.keys(idList).map(key => {
return (
<td className="value idList" key={key}>{idList[key]}</td>
);
})}
</tr>
<tr>
<td className="column">Trial No.</td>
{Object.keys(sequenceIdList).map(key => {
return (
<td className="value idList" key={key}>{sequenceIdList[key]}</td>
);
})}
</tr>
<tr>
<td className="column">Default metric</td>
{Object.keys(compareRows).map(index => {
Expand Down
18 changes: 14 additions & 4 deletions src/webui/src/components/SlideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,16 @@ class SlideBar extends React.Component<SliderProps, SliderState> {
<span>{DETAILTABS}</span>
</Col>
<Col span={16} className="desktop-right">
<span>
<Button
className="fresh"
type="ghost"
>
<a target="_blank" href="https://nni.readthedocs.io/en/latest/Tutorial/WebUI.html">
<Icon type="question" /><span>Help</span>
</a>
</Button>
</span>
<span>{this.select()}</span>
<span>
<Dropdown
Expand All @@ -237,10 +247,10 @@ class SlideBar extends React.Component<SliderProps, SliderState> {
<span>View</span>
{
menuVisible
?
<Icon type="up" className="margin-icon"/>
:
<Icon type="down" className="margin-icon"/>
?
<Icon type="up" className="margin-icon" />
:
<Icon type="down" className="margin-icon" />
}
</a>
</Dropdown>
Expand Down
3 changes: 2 additions & 1 deletion src/webui/src/static/style/slideBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ $drowHoverBgColor: #e2e2e2;
border: none;
color: #fff;
font-size: 16px;
padding: 0;
padding: 0 8px;
}
.fresh:hover{
color: #fff;
background-color: #006cb5;
}

.dropdown{
Expand Down

0 comments on commit 1595287

Please sign in to comment.