Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
345684d5
Unverified
Commit
345684d5
authored
Jun 08, 2020
by
Lijiaoa
Committed by
GitHub
Jun 08, 2020
Browse files
[WebUI] fix issue#1489: Enhancement to trial duration display (#2523)
parent
2dfbf91d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
6 deletions
+18
-6
src/webui/src/App.scss
src/webui/src/App.scss
+2
-0
src/webui/src/components/trial-detail/Duration.tsx
src/webui/src/components/trial-detail/Duration.tsx
+15
-3
src/webui/src/static/function.ts
src/webui/src/static/function.ts
+1
-1
src/webui/src/static/model/experiment.ts
src/webui/src/static/model/experiment.ts
+0
-1
src/webui/src/static/model/trialmanager.ts
src/webui/src/static/model/trialmanager.ts
+0
-1
No files found.
src/webui/src/App.scss
View file @
345684d5
...
@@ -20,9 +20,11 @@
...
@@ -20,9 +20,11 @@
width
:
90%
;
width
:
90%
;
margin
:
0
auto
;
margin
:
0
auto
;
}
}
.contentBox
{
.contentBox
{
width
:
100%
;
width
:
100%
;
}
}
.content
{
.content
{
width
:
89%
;
width
:
89%
;
min-width
:
1024px
;
min-width
:
1024px
;
...
...
src/webui/src/components/trial-detail/Duration.tsx
View file @
345684d5
import
*
as
React
from
'
react
'
;
import
*
as
React
from
'
react
'
;
import
ReactEcharts
from
'
echarts-for-react
'
;
import
ReactEcharts
from
'
echarts-for-react
'
;
import
{
TableObj
,
EventMap
}
from
'
../../static/interface
'
;
// eslint-disable-line no-unused-vars
import
{
TableObj
,
EventMap
}
from
'
../../static/interface
'
;
// eslint-disable-line no-unused-vars
import
{
filterDuration
}
from
'
../../static/function
'
;
import
{
filterDuration
,
convertDuration
}
from
'
../../static/function
'
;
import
'
echarts/lib/chart/bar
'
;
import
'
echarts/lib/chart/bar
'
;
import
'
echarts/lib/component/tooltip
'
;
import
'
echarts/lib/component/tooltip
'
;
import
'
echarts/lib/component/title
'
;
import
'
echarts/lib/component/title
'
;
...
@@ -49,7 +49,13 @@ class Duration extends React.Component<DurationProps, DurationState> {
...
@@ -49,7 +49,13 @@ class Duration extends React.Component<DurationProps, DurationState> {
trigger
:
'
axis
'
,
trigger
:
'
axis
'
,
axisPointer
:
{
axisPointer
:
{
type
:
'
shadow
'
type
:
'
shadow
'
}
},
formatter
:
(
data
:
any
):
React
.
ReactNode
=>
(
'
<div>
'
+
'
<div>Trial No.:
'
+
data
[
0
].
dataIndex
+
'
</div>
'
+
'
<div>Duration:
'
+
convertDuration
(
data
[
0
].
data
)
+
'
</div>
'
+
'
</div>
'
),
},
},
grid
:
{
grid
:
{
bottom
:
'
3%
'
,
bottom
:
'
3%
'
,
...
@@ -93,7 +99,13 @@ class Duration extends React.Component<DurationProps, DurationState> {
...
@@ -93,7 +99,13 @@ class Duration extends React.Component<DurationProps, DurationState> {
trigger
:
'
axis
'
,
trigger
:
'
axis
'
,
axisPointer
:
{
axisPointer
:
{
type
:
'
shadow
'
type
:
'
shadow
'
}
},
formatter
:
(
data
:
any
):
React
.
ReactNode
=>
(
'
<div>
'
+
'
<div>Trial No.:
'
+
data
[
0
].
dataIndex
+
'
</div>
'
+
'
<div>Duration:
'
+
convertDuration
(
data
[
0
].
data
)
+
'
</div>
'
+
'
</div>
'
),
},
},
grid
:
{
grid
:
{
bottom
:
'
3%
'
,
bottom
:
'
3%
'
,
...
...
src/webui/src/static/function.ts
View file @
345684d5
...
@@ -3,7 +3,7 @@ import axios from 'axios';
...
@@ -3,7 +3,7 @@ import axios from 'axios';
import
{
MANAGER_IP
}
from
'
./const
'
;
import
{
MANAGER_IP
}
from
'
./const
'
;
import
{
MetricDataRecord
,
FinalType
,
TableObj
}
from
'
./interface
'
;
import
{
MetricDataRecord
,
FinalType
,
TableObj
}
from
'
./interface
'
;
async
function
requestAxios
(
url
:
string
)
{
async
function
requestAxios
(
url
:
string
)
:
Promise
<
any
>
{
const
response
=
await
axios
.
get
(
url
);
const
response
=
await
axios
.
get
(
url
);
if
(
response
.
status
===
200
)
{
if
(
response
.
status
===
200
)
{
if
(
response
.
data
.
error
!==
undefined
)
{
if
(
response
.
data
.
error
!==
undefined
)
{
...
...
src/webui/src/static/model/experiment.ts
View file @
345684d5
import
axios
from
'
axios
'
;
import
{
MANAGER_IP
}
from
'
../const
'
;
import
{
MANAGER_IP
}
from
'
../const
'
;
import
{
ExperimentProfile
,
NNIManagerStatus
}
from
'
../interface
'
;
import
{
ExperimentProfile
,
NNIManagerStatus
}
from
'
../interface
'
;
import
{
requestAxios
}
from
'
../function
'
;
import
{
requestAxios
}
from
'
../function
'
;
...
...
src/webui/src/static/model/trialmanager.ts
View file @
345684d5
import
axios
from
'
axios
'
;
import
{
MANAGER_IP
,
METRIC_GROUP_UPDATE_THRESHOLD
,
METRIC_GROUP_UPDATE_SIZE
}
from
'
../const
'
;
import
{
MANAGER_IP
,
METRIC_GROUP_UPDATE_THRESHOLD
,
METRIC_GROUP_UPDATE_SIZE
}
from
'
../const
'
;
import
{
MetricDataRecord
,
TableRecord
,
TrialJobInfo
}
from
'
../interface
'
;
import
{
MetricDataRecord
,
TableRecord
,
TrialJobInfo
}
from
'
../interface
'
;
import
{
Trial
}
from
'
./trial
'
;
import
{
Trial
}
from
'
./trial
'
;
...
...
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