Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
6b02f7a2
Unverified
Commit
6b02f7a2
authored
Apr 20, 2020
by
Lijiaoa
Committed by
GitHub
Apr 20, 2020
Browse files
add tooltip when there is no data in overview table (#2318)
parent
8c8220e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
src/webui/src/components/overview/SuccessTable.tsx
src/webui/src/components/overview/SuccessTable.tsx
+12
-1
src/webui/src/static/style/succTable.scss
src/webui/src/static/style/succTable.scss
+13
-0
No files found.
src/webui/src/components/overview/SuccessTable.tsx
View file @
6b02f7a2
...
@@ -4,6 +4,7 @@ import DefaultMetric from '../public-child/DefaultMetric';
...
@@ -4,6 +4,7 @@ import DefaultMetric from '../public-child/DefaultMetric';
import
Details
from
'
./Details
'
;
import
Details
from
'
./Details
'
;
import
{
convertDuration
}
from
'
../../static/function
'
;
import
{
convertDuration
}
from
'
../../static/function
'
;
import
{
TRIALS
}
from
'
../../static/datamodel
'
;
import
{
TRIALS
}
from
'
../../static/datamodel
'
;
import
{
DETAILTABS
}
from
'
../stateless-component/NNItabs
'
;
import
'
../../static/style/succTable.scss
'
;
import
'
../../static/style/succTable.scss
'
;
import
'
../../static/style/openRow.scss
'
;
import
'
../../static/style/openRow.scss
'
;
...
@@ -55,6 +56,13 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState>
...
@@ -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
));
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
=
[
columns
=
[
{
{
name
:
'
Trial No.
'
,
name
:
'
Trial No.
'
,
...
@@ -125,9 +133,10 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState>
...
@@ -125,9 +133,10 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState>
render
():
React
.
ReactNode
{
render
():
React
.
ReactNode
{
const
{
columns
,
source
}
=
this
.
state
;
const
{
columns
,
source
}
=
this
.
state
;
const
isNoneData
=
(
source
.
length
===
0
)
?
true
:
false
;
return
(
return
(
<
div
id
=
"succTable"
>
<
div
id
=
"succTable"
>
{
/* TODO: [style] lineHeight question */
}
<
DetailsList
<
DetailsList
columns
=
{
columns
}
columns
=
{
columns
}
items
=
{
source
}
items
=
{
source
}
...
@@ -135,7 +144,9 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState>
...
@@ -135,7 +144,9 @@ class SuccessTable extends React.Component<SuccessTableProps, SuccessTableState>
compact
=
{
true
}
compact
=
{
true
}
onRenderRow
=
{
this
.
onRenderRow
}
onRenderRow
=
{
this
.
onRenderRow
}
selectionMode
=
{
0
}
// close selector function
selectionMode
=
{
0
}
// close selector function
className
=
"succTable"
/>
/>
{
isNoneData
&&
<
div
className
=
"succTable-tooltip"
>
{
this
.
tooltipStr
}
</
div
>
}
</
div
>
</
div
>
);
);
}
}
...
...
src/webui/src/static/style/succTable.scss
View file @
6b02f7a2
#succTable
{
#succTable
{
height
:
404px
;
height
:
404px
;
overflow-y
:
scroll
;
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment