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
c2e69672
Unverified
Commit
c2e69672
authored
Oct 20, 2020
by
Lijiaoa
Committed by
GitHub
Oct 20, 2020
Browse files
[webui v1.9 bug bash] fix bugs in v1.9 (#2982)
parent
f1105409
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
188 additions
and
128 deletions
+188
-128
src/webui/src/static/function.ts
src/webui/src/static/function.ts
+13
-22
src/webui/src/static/style/overview/command.scss
src/webui/src/static/style/overview/command.scss
+4
-25
src/webui/src/static/style/overview/config.scss
src/webui/src/static/style/overview/config.scss
+1
-1
src/webui/src/static/style/overview/count.scss
src/webui/src/static/style/overview/count.scss
+71
-11
src/webui/src/static/style/overview/overview.scss
src/webui/src/static/style/overview/overview.scss
+51
-21
src/webui/src/static/style/progress/probar.scss
src/webui/src/static/style/progress/probar.scss
+28
-6
src/webui/src/static/style/succTable.scss
src/webui/src/static/style/succTable.scss
+5
-0
src/webui/src/static/style/tableStatus.css
src/webui/src/static/style/tableStatus.css
+3
-3
src/webui/yarn.lock
src/webui/yarn.lock
+12
-39
No files found.
src/webui/src/static/function.ts
View file @
c2e69672
...
...
@@ -29,27 +29,6 @@ const convertTime = (num: number): string => {
}
};
const
convertTimeToSecond
=
(
str
:
string
):
number
=>
{
let
seconds
=
0
;
let
d
,
h
,
m
;
if
(
str
.
includes
(
'
d
'
))
{
[
d
,
str
]
=
str
.
split
(
'
d
'
);
seconds
+=
parseInt
(
d
)
*
24
*
3600
;
}
if
(
str
.
includes
(
'
h
'
))
{
[
h
,
str
]
=
str
.
split
(
'
h
'
);
seconds
+=
parseInt
(
h
)
*
3600
;
}
if
(
str
.
includes
(
'
m
'
))
{
[
m
,
str
]
=
str
.
split
(
'
m
'
);
seconds
+=
parseInt
(
m
)
*
60
;
}
if
(
str
)
{
seconds
+=
parseInt
(
str
.
split
(
'
s
'
)[
0
]);
}
return
seconds
;
};
// trial's duration, accurate to seconds for example 10min 30s
const
convertDuration
=
(
seconds
:
number
):
string
=>
{
let
str
=
''
;
...
...
@@ -78,6 +57,18 @@ const convertDuration = (seconds: number): string => {
return
str
?
str
:
'
0s
'
;
};
// according the unit(d,h,m) to convert duration
function
convertTimeAsUnit
(
unit
:
string
,
value
:
number
):
number
{
let
divisor
=
1
;
if
(
unit
===
'
h
'
)
{
divisor
=
3600
;
}
else
if
(
unit
===
'
m
'
)
{
divisor
=
60
;
}
else
{
divisor
=
24
*
3600
;
}
return
value
/
divisor
;
}
function
parseMetrics
(
metricData
:
string
):
any
{
if
(
metricData
.
includes
(
'
NaN
'
)
||
metricData
.
includes
(
'
Infinity
'
))
{
return
JSON5
.
parse
(
JSON5
.
parse
(
metricData
));
...
...
@@ -274,7 +265,7 @@ function formatComplexTypeValue(value: any): string | number {
export
{
convertTime
,
convertDuration
,
convertTime
ToSecond
,
convertTime
AsUnit
,
getFinalResult
,
getFinal
,
downFile
,
...
...
src/webui/src/static/style/overview/command.scss
View file @
c2e69672
.command
{
width
:
100%
;
>
div
{
display
:
inline-block
;
}
.command1
{
width
:
46%
;
p
{
margin-top
:
0
;
}
}
.command2
{
width
:
54%
;
p
{
margin-top
:
0
;
}
p
{
margin-top
:
0
;
}
.command1
,
.command2
{
.lineMargin
{
margin-top
:
20px
;
}
.lineMargin
{
margin-top
:
20px
;
}
}
src/webui/src/static/style/overview/config.scss
View file @
c2e69672
...
...
@@ -12,7 +12,7 @@
}
.ms-Button--default
:hover
{
background-color
:
orangered
;
background-color
:
#0071bc
;
color
:
#fff
;
}
}
...
...
src/webui/src/static/style/overview/count.scss
View file @
c2e69672
$seriesIconMargin
:
13
px
;
$seriesIconMargin
:
8
px
;
.ExpDuration
{
margin-top
:
28px
;
...
...
@@ -6,23 +6,74 @@ $seriesIconMargin: 13px;
span
:hover
{
cursor
:
pointer
;
}
.maxTrialNum
{
margin-bottom
:
10px
;
}
}
.durationInput
{
width
:
42px
;
height
:
32px
;
padding-right
:
5px
;
text-align
:
right
;
outline
:
none
;
border
:
none
;
border-bottom
:
1px
solid
#ccc
;
.exp-progress
{
margin-top
:
10px
;
.bold
{
font-weight
:
500
;
}
.joiner
{
padding
:
0
3px
;
}
}
.maxTrialNum
{
.editparam
{
position
:
relative
;
top
:
-7px
;
}
}
.noEditDuration
{
position
:
relative
;
top
:
-7px
;
}
.editDuration
{
position
:
relative
;
top
:
-17px
;
}
.maxExecDuration
{
width
:
74px
;
.editparam
{
&
-Input
{
width
:
42px
;
height
:
32px
;
padding-right
:
5px
;
text-align
:
right
;
outline
:
none
;
border
:
none
;
border-bottom
:
1px
solid
#ccc
;
}
.maxExecDuration
{
width
:
36px
;
}
&
-dropdown
{
width
:
51px
;
display
:
inline-block
;
position
:
relative
;
top
:
13px
;
left
:
4px
;
margin-right
:
3px
;
}
}
.ExpDuration
.series
.confirm
{
margin
:
0
6px
;
}
.series
{
position
:
relative
;
top
:
5px
;
i
{
font-size
:
20px
;
font-weight
:
700
;
...
...
@@ -39,6 +90,7 @@ $seriesIconMargin: 13px;
.cancel
i
{
color
:
red
;
font-size
:
16px
;
}
.edit
i
{
...
...
@@ -55,3 +107,11 @@ $seriesIconMargin: 13px;
z-index
:
999
;
left
:
0
;
}
.mess
{
margin-top
:
20px
;
.basic
p
{
margin-top
:
0
;
}
}
src/webui/src/static/style/overview/overview.scss
View file @
c2e69672
$boxPadding
:
20px
42px
;
$boxPadding
:
20px
;
$boxBorderRadius
:
5px
;
$boxGapPadding
:
10px
;
.wrapper
{
display
:
grid
;
grid-template-columns
:
repeat
(
8
,
1fr
);
grid-auto-rows
:
82px
;
grid-gap
:
18px
;
grid-template-columns
:
repeat
(
9
,
1fr
);
grid-auto-rows
:
97px
;
>
div
{
>
div
{
background
:
#fff
;
padding
:
$boxPadding
;
border-radius
:
20px
;
border-radius
:
$boxBorderRadius
;
box-sizing
:
border-box
;
}
.overviewProgress
{
grid-column
:
2
/
5
;
grid-column
:
2
/
6
;
grid-row
:
1
/
5
;
display
:
grid
;
grid-auto-rows
:
70px
;
margin
:
0
$boxGapPadding
;
padding
:
0
;
background
:
transparent
;
...
...
@@ -25,7 +27,7 @@ $boxPadding: 20px 42px;
.trialCount
{
background
:
#fff
;
padding
:
$boxPadding
;
border-radius
:
20px
;
border-radius
:
$boxBorderRadius
;
box-sizing
:
border-box
;
/* for alert message tooltip position */
...
...
@@ -34,14 +36,31 @@ $boxPadding: 20px 42px;
.duration
{
// grid-row: 1 / 3;
height
:
13
6
px
;
height
:
13
9
px
;
}
.trialCount
{
margin-top
:
14
px
;
height
:
2
28
px
;
margin-top
:
79
px
;
height
:
2
39
px
;
}
}
.overviewCommand1
,
.overviewCommand2
{
border-radius
:
0
;
}
.overviewCommand1
{
grid-column-start
:
1
;
border-radius
:
$boxBorderRadius
0
0
$boxBorderRadius
;
}
.overviewCommand2
{
grid-column
:
2
/
6
;
margin-right
:
10px
;
padding-left
:
30px
;
border-radius
:
0
$boxBorderRadius
$boxBorderRadius
0
;
}
}
.overviewBasicInfo
{
...
...
@@ -58,10 +77,15 @@ $boxPadding: 20px 42px;
font-size
:
14px
;
color
:
#8f8f8f
;
margin-top
:
20px
;
span
{
color
:
#484848
;
}
}
div
{
font-size
:
16px
;
font-weight
:
500
;
color
:
#484848
;
}
...
...
@@ -73,8 +97,8 @@ $boxPadding: 20px 42px;
}
.overviewTable
{
grid-column
:
5
/
9
;
grid-row
:
1
/
1
0
;
grid-column
:
6
/
10
;
grid-row
:
1
/
1
1
;
overflow
:
hidden
;
.topTrialTitle
{
...
...
@@ -82,7 +106,7 @@ $boxPadding: 20px 42px;
}
.active
{
background
:
#
f3f2f1
;
background
:
#
d2d0ce
;
}
.max
{
...
...
@@ -99,21 +123,21 @@ $boxPadding: 20px 42px;
}
}
.overviewCommand
,
.overviewChart
{
grid-column
:
1
/
5
;
}
.overviewCommand
{
.overviewCommand1
,
.overviewCommand2
{
height
:
144px
;
overflow
:
hidden
;
margin-top
:
10px
;
}
$circle
:
10px
;
$bgblue
:
#0071bc
;
.overviewChart
{
grid-column
:
1
/
6
;
grid-row
:
7
/
11
;
margin-top
:
-38px
;
margin-right
:
$boxGapPadding
;
margin-top
:
-29px
;
.circle
{
width
:
$circle
;
...
...
@@ -124,3 +148,9 @@ $bgblue: #0071bc;
margin-right
:
18px
;
}
}
.showMess
{
position
:
absolute
;
top
:
42%
;
left
:
48%
;
}
src/webui/src/static/style/progress/probar.scss
View file @
c2e69672
/* status: 'INITIALIZED' | 'RUNNING' | 'ERROR' | 'STOPPING' | 'STOPPED' | 'DONE' */
$running
:
#0071bc
;
$done
:
#00ad56
;
$error
:
#a4262c
;
/* status: 'TUNER_NO_MORE_TRIAL' | 'NO_MORE_TRIAL' */
.RUNNING
,
...
...
@@ -7,27 +10,46 @@
.NO_MORE_TRIAL
,
.TUNER_NO_MORE_TRIAL
{
/* specific status color */
color
:
#0071bc
;
color
:
$running
;
/* progress- duration & trial numbers span */
.ms-ProgressIndicator-progressBar
{
background-color
:
#0071bc
;
background-color
:
$running
;
}
}
.DONE
,
.STOPPED
{
color
:
#009245
;
color
:
$done
;
.ms-ProgressIndicator-progressBar
{
background-color
:
#009245
;
background-color
:
$done
;
}
}
.ERROR
{
color
:
#eb0716
;
color
:
$error
;
.ms-ProgressIndicator-progressBar
{
background-color
:
#eb0716
;
background-color
:
$error
;
}
}
.bestMetric
{
.DONE
,
.STOPPED
{
color
:
$done
;
}
.ERROR
{
color
:
$error
;
}
.RUNNING
,
.STOPPING
,
.INITIALIZED
,
.NO_MORE_TRIAL
,
.TUNER_NO_MORE_TRIAL
{
color
:
$running
;
}
}
src/webui/src/static/style/succTable.scss
View file @
c2e69672
...
...
@@ -18,4 +18,9 @@
}
}
}
.succeed-padding
{
padding-left
:
6px
;
box-sizing
:
border-box
;
}
}
src/webui/src/static/style/tableStatus.css
View file @
c2e69672
...
...
@@ -5,11 +5,11 @@
}
.FAILED
{
color
:
#
dd4b39
;
color
:
#
a4262c
;
}
.SUCCEEDED
{
color
:
#00a
445
;
color
:
#00a
d56
;
}
.UNKNOWN
{
...
...
@@ -21,7 +21,7 @@
}
.WAITING
{
color
:
#
fdc401
;
color
:
#
d29200
;
}
.EARLY_STOPPED
{
...
...
src/webui/yarn.lock
View file @
c2e69672
...
...
@@ -4551,7 +4551,7 @@ debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
dependencies:
ms "2.1.2"
debuglog@*,
debuglog@^1.0.1:
debuglog@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
...
...
@@ -5106,6 +5106,11 @@ es6-promisify@^5.0.0:
dependencies:
es6-promise "^4.0.3"
escalade@^3.0.2:
version "3.1.1"
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
escalade@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.0.tgz#e8e2d7c7a8b76f6ee64c2181d6b8151441602d4e"
...
...
@@ -6692,7 +6697,7 @@ import-local@^2.0.0:
pkg-dir "^3.0.0"
resolve-cwd "^2.0.0"
imurmurhash@*,
imurmurhash@^0.1.4:
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
...
...
@@ -8267,11 +8272,6 @@ lockfile@^1.0.4:
dependencies:
signal-exit "^3.0.2"
lodash._baseindexof@*:
version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=
lodash._baseuniq@~4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
...
...
@@ -8280,33 +8280,11 @@ lodash._baseuniq@~4.6.0:
lodash._createset "~4.0.0"
lodash._root "~3.0.0"
lodash._bindcallback@*:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4=
lodash._cacheindexof@*:
version "3.0.2"
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=
lodash._createcache@*:
version "3.1.2"
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=
dependencies:
lodash._getnative "^3.0.0"
lodash._createset@~4.0.0:
version "4.0.3"
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=
lodash._getnative@*, lodash._getnative@^3.0.0:
version "3.9.1"
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=
lodash._reinterpolate@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
...
...
@@ -8337,11 +8315,6 @@ lodash.memoize@^4.1.2:
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=
lodash.restparam@*:
version "3.6.1"
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=
lodash.sortby@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
...
...
@@ -8940,10 +8913,10 @@ node-fetch-npm@^2.0.2:
json-parse-better-errors "^1.0.0"
safe-buffer "^5.1.1"
node-forge@
^
0.
10
.0:
version "0.
10
.0"
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.
10
.0.tgz#
32dea2afb3e9926f02ee5ce8794902691a676bf3
"
integrity sha512-
PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA
==
node-forge@0.
9
.0:
version "0.
9
.0"
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.
9
.0.tgz#
d624050edbb44874adca12bb9a52ec63cb782579
"
integrity sha512-
7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ
==
node-gyp@^3.8.0:
version "3.8.0"
...
...
@@ -11919,7 +11892,7 @@ selfsigned@^1.9.1:
resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.8.tgz#0d17208b7d12c33f8eac85c41835f27fc3d81a30"
integrity sha512-2P4PtieJeEwVgTU9QEcwIRDQ/mXJLX8/+I3ur+Pg16nS8oNbrGxEso9NyYWy8NAmXiNl4dlAp5MwoNeCWzON4w==
dependencies:
node-forge "0.
9
.0"
node-forge "
^
0.
10
.0"
semver-diff@^2.0.0:
version "2.1.0"
...
...
Prev
1
2
Next
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