Unverified Commit 6b02f7a2 authored by Lijiaoa's avatar Lijiaoa Committed by GitHub
Browse files

add tooltip when there is no data in overview table (#2318)

parent 8c8220e5
......@@ -4,6 +4,7 @@ import DefaultMetric from '../public-child/DefaultMetric';
import Details from './Details';
import { convertDuration } from '../../static/function';
import { TRIALS } from '../../static/datamodel';
import { DETAILTABS } from '../stateless-component/NNItabs';
import '../../static/style/succTable.scss';
import '../../static/style/openRow.scss';
......@@ -55,6 +56,13 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState>
return items.slice(0).sort((a: T, b: T) => ((isSortedDescending ? a[key] < b[key] : a[key] > b[key]) ? 1 : -1));
}
tooltipStr = (
<div>
<p>The experiment is running, please wait for the final metric patiently.</p>
<div className="link">You could also find status of trial job with <span>{DETAILTABS}</span> button.</div>
</div>
);
columns = [
{
name: 'Trial No.',
......@@ -125,9 +133,10 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState>
render(): React.ReactNode {
const { columns, source } = this.state;
const isNoneData = (source.length === 0) ? true : false;
return (
<div id="succTable">
{/* TODO: [style] lineHeight question */}
<DetailsList
columns={columns}
items={source}
......@@ -135,7 +144,9 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState>
compact={true}
onRenderRow={this.onRenderRow}
selectionMode={0} // close selector function
className="succTable"
/>
{isNoneData && <div className="succTable-tooltip">{this.tooltipStr}</div>}
</div>
);
}
......
#succTable{
height: 404px;
overflow-y: scroll;
position: relative;
.succTable-tooltip{
position: absolute;
top: 40%;
left: 17%;
.link{
margin-left: 15px;
a{
font-weight: 500;
color: blue;
}
}
}
}
\ No newline at end of file
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