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
a87517cf
Commit
a87517cf
authored
Nov 07, 2018
by
Lijiao
Committed by
fishyds
Nov 07, 2018
Browse files
Add download button (#332)
parent
8f7dfc88
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
66 additions
and
48 deletions
+66
-48
src/webui/src/components/Overview.tsx
src/webui/src/components/Overview.tsx
+27
-5
src/webui/src/components/overview/BasicInfo.tsx
src/webui/src/components/overview/BasicInfo.tsx
+1
-1
src/webui/src/components/overview/TrialProfile.tsx
src/webui/src/components/overview/TrialProfile.tsx
+1
-1
src/webui/src/index.css
src/webui/src/index.css
+0
-3
src/webui/src/static/img/icon/download.png
src/webui/src/static/img/icon/download.png
+0
-0
src/webui/src/static/style/logPath.scss
src/webui/src/static/style/logPath.scss
+0
-1
src/webui/src/static/style/overview.scss
src/webui/src/static/style/overview.scss
+33
-0
src/webui/src/static/style/progress.scss
src/webui/src/static/style/progress.scss
+2
-2
src/webui/src/static/style/table.scss
src/webui/src/static/style/table.scss
+2
-0
src/webui/src/static/style/tableStatus.css
src/webui/src/static/style/tableStatus.css
+0
-35
No files found.
src/webui/src/components/Overview.tsx
View file @
a87517cf
import
*
as
React
from
'
react
'
;
import
*
as
React
from
'
react
'
;
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
import
{
Row
,
Col
}
from
'
antd
'
;
import
{
Row
,
Col
,
Button
}
from
'
antd
'
;
import
{
MANAGER_IP
}
from
'
../static/const
'
;
import
{
MANAGER_IP
}
from
'
../static/const
'
;
import
{
import
{
Experiment
,
TableObj
,
Experiment
,
TableObj
,
...
@@ -31,6 +31,7 @@ interface SessionState {
...
@@ -31,6 +31,7 @@ interface SessionState {
bestAccuracy
:
string
;
bestAccuracy
:
string
;
accNodata
:
string
;
accNodata
:
string
;
trialNumber
:
TrialNumber
;
trialNumber
:
TrialNumber
;
downBool
:
boolean
;
}
}
class
Overview
extends
React
.
Component
<
{},
SessionState
>
{
class
Overview
extends
React
.
Component
<
{},
SessionState
>
{
...
@@ -81,7 +82,8 @@ class Overview extends React.Component<{}, SessionState> {
...
@@ -81,7 +82,8 @@ class Overview extends React.Component<{}, SessionState> {
runTrial
:
0
,
runTrial
:
0
,
unknowTrial
:
0
,
unknowTrial
:
0
,
totalCurrentTrial
:
0
totalCurrentTrial
:
0
}
},
downBool
:
false
};
};
}
}
...
@@ -263,6 +265,9 @@ class Overview extends React.Component<{}, SessionState> {
...
@@ -263,6 +265,9 @@ class Overview extends React.Component<{}, SessionState> {
}
}
downExperimentContent
=
()
=>
{
downExperimentContent
=
()
=>
{
this
.
setState
(()
=>
({
downBool
:
true
}));
axios
axios
.
all
([
.
all
([
axios
.
get
(
`
${
MANAGER_IP
}
/experiment`
),
axios
.
get
(
`
${
MANAGER_IP
}
/experiment`
),
...
@@ -307,6 +312,9 @@ class Overview extends React.Component<{}, SessionState> {
...
@@ -307,6 +312,9 @@ class Overview extends React.Component<{}, SessionState> {
eventMouse
.
initEvent
(
'
click
'
,
false
,
false
);
eventMouse
.
initEvent
(
'
click
'
,
false
,
false
);
downTag
.
dispatchEvent
(
eventMouse
);
downTag
.
dispatchEvent
(
eventMouse
);
}
}
this
.
setState
(()
=>
({
downBool
:
false
}));
}
}
}));
}));
}
}
...
@@ -389,14 +397,28 @@ class Overview extends React.Component<{}, SessionState> {
...
@@ -389,14 +397,28 @@ class Overview extends React.Component<{}, SessionState> {
accNodata
,
accNodata
,
status
,
status
,
trialNumber
,
trialNumber
,
bestAccuracy
bestAccuracy
,
downBool
}
=
this
.
state
;
}
=
this
.
state
;
return
(
return
(
<
div
className
=
"overview"
>
<
div
className
=
"overview"
>
{
/* status and experiment block */
}
{
/* status and experiment block */
}
<
Row
className
=
"basicExperiment"
>
<
Row
>
<
Title1
text
=
"Experiment"
icon
=
"11.png"
/>
<
Row
className
=
"exbgcolor"
>
<
Col
span
=
{
4
}
><
Title1
text
=
"Experiment"
icon
=
"11.png"
/></
Col
>
<
Col
span
=
{
4
}
>
<
Button
type
=
"primary"
className
=
"changeBtu download"
onClick
=
{
this
.
downExperimentContent
}
disabled
=
{
downBool
}
>
<
span
>
Download
</
span
>
<
img
src
=
{
require
(
'
../static/img/icon/download.png
'
)
}
alt
=
"icon"
/>
</
Button
>
</
Col
>
</
Row
>
<
BasicInfo
trialProfile
=
{
trialProfile
}
status
=
{
status
}
/>
<
BasicInfo
trialProfile
=
{
trialProfile
}
status
=
{
status
}
/>
</
Row
>
</
Row
>
<
Row
className
=
"overMessage"
>
<
Row
className
=
"overMessage"
>
...
...
src/webui/src/components/overview/BasicInfo.tsx
View file @
a87517cf
...
@@ -52,7 +52,7 @@ class BasicInfo extends React.Component<BasicInfoProps, {}> {
...
@@ -52,7 +52,7 @@ class BasicInfo extends React.Component<BasicInfoProps, {}> {
</
Col
>
</
Col
>
<
Col
span
=
{
8
}
className
=
"padItem basic"
>
<
Col
span
=
{
8
}
className
=
"padItem basic"
>
<
p
>
LogPath
</
p
>
<
p
>
LogPath
</
p
>
<
div
className
=
"
logPath
"
>
<
div
className
=
"
nowrap
"
>
<
Tooltip
placement
=
"top"
title
=
{
trialProfile
.
logDir
}
>
<
Tooltip
placement
=
"top"
title
=
{
trialProfile
.
logDir
}
>
{
trialProfile
.
logDir
}
{
trialProfile
.
logDir
}
</
Tooltip
>
</
Tooltip
>
...
...
src/webui/src/components/overview/TrialProfile.tsx
View file @
a87517cf
...
@@ -23,7 +23,7 @@ class TrialInfo extends React.Component<TrialInfoProps, {}> {
...
@@ -23,7 +23,7 @@ class TrialInfo extends React.Component<TrialInfoProps, {}> {
clusterMetaData
:
tiralProInfo
.
clusterMetaData
?
tiralProInfo
.
clusterMetaData
:
undefined
clusterMetaData
:
tiralProInfo
.
clusterMetaData
?
tiralProInfo
.
clusterMetaData
:
undefined
});
});
return
(
return
(
<
div
style
=
{
{
paddingLeft
:
20
}
}
>
<
div
className
=
"profile"
>
<
pre
>
<
pre
>
{
JSON
.
stringify
(
showProInfo
[
0
],
null
,
4
)
}
{
JSON
.
stringify
(
showProInfo
[
0
],
null
,
4
)
}
</
pre
>
</
pre
>
...
...
src/webui/src/index.css
View file @
a87517cf
...
@@ -49,9 +49,6 @@ table {
...
@@ -49,9 +49,6 @@ table {
border-collapse
:
collapse
;
border-collapse
:
collapse
;
border-spacing
:
0
;
border-spacing
:
0
;
}
}
pre
{
overflow
:
hidden
;
}
@font-face
{
@font-face
{
font-family
:
'Segoe'
;
font-family
:
'Segoe'
;
src
:
url('./static/font/SegoePro-Regular.ttf')
;
src
:
url('./static/font/SegoePro-Regular.ttf')
;
...
...
src/webui/src/static/img/icon/download.png
0 → 100644
View file @
a87517cf
376 Bytes
src/webui/src/static/style/logPath.scss
View file @
a87517cf
.logpath
{
.logpath
{
margin-bottom
:
10px
;
margin-left
:
10px
;
margin-left
:
10px
;
.logName
{
.logName
{
...
...
src/webui/src/static/style/overview.scss
View file @
a87517cf
...
@@ -44,3 +44,36 @@
...
@@ -44,3 +44,36 @@
.main
{
.main
{
margin
:
9px
0
;
margin
:
9px
0
;
}
}
.profile
{
padding
:
0
20px
;
pre
{
overflow
:
inherit
;
}
}
.exbgcolor
{
background
:
#b3b3b3
;
.download
{
height
:
30px
;
border
:
1px
solid
#fff
;
border-radius
:
0
;
margin-top
:
4px
;
span
{
font-family
:
'Segoe'
;
font-size
:
16px
;
line-height
:
30px
;
}
img
{
height
:
16px
;
margin-left
:
10px
;
margin-top
:
-6px
;
}
}
}
.exbgcolor
.download
:hover
{
border
:
1px
solid
#fff
;
}
\ No newline at end of file
src/webui/src/static/style/progress.scss
View file @
a87517cf
...
@@ -74,9 +74,9 @@
...
@@ -74,9 +74,9 @@
.mess
{
.mess
{
margin
:
10px
0
;
margin
:
10px
0
;
}
}
/*
.ant-tooltip-inner{
.ant-tooltip-inner{
white-space
:
nowrap
;
min-width: 300px;
min-width: 300px;
}
}
*/
src/webui/src/static/style/table.scss
View file @
a87517cf
...
@@ -89,6 +89,8 @@ pre.hyperpar{
...
@@ -89,6 +89,8 @@ pre.hyperpar{
text-align
:
left
;
text-align
:
left
;
line-height
:
18px
;
line-height
:
18px
;
font-size
:
14px
;
font-size
:
14px
;
overflow
:
hidden
;
margin-bottom
:
10px
;
}
}
/* the position of the pagination */
/* the position of the pagination */
...
...
src/webui/src/static/style/tableStatus.css
View file @
a87517cf
/* status bgcolor */
/*
.commonStyle{
border-radius: 3px;
color: white;
}
.RUNNING{
padding: 3px 8px;
background: #3c8dbc;
}
.FAILED{
padding: 3px 24px;
background: #dd4b39;
}
.USER_CANCELED{
padding: 3px 8px;
background: #FF4500;
}
.SUCCEEDED{
padding: 3px 6px;
background: #00a65a;
}
.UNKNOWN{
padding: 3px 15px;
background: #FF8C00;
}
.SYS_CANCELED{
padding: 3px 24px;
background: red;
}
.WAITING{
padding: 3px 24px;
background: #008B8B;
}
*/
.RUNNING
{
.RUNNING
{
color
:
#3c8dbc
;
color
:
#3c8dbc
;
}
}
...
...
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