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
59b76c2e
Unverified
Commit
59b76c2e
authored
Aug 11, 2020
by
Lijiaoa
Committed by
GitHub
Aug 11, 2020
Browse files
Some little style (#2762)
Co-authored-by:
Lijiao
<
15910218274@163.com
>
parent
995f6259
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
23 deletions
+38
-23
src/webui/src/components/Modals/Compare.tsx
src/webui/src/components/Modals/Compare.tsx
+12
-3
src/webui/src/components/Overview.tsx
src/webui/src/components/Overview.tsx
+14
-13
src/webui/src/components/trial-detail/TableList.tsx
src/webui/src/components/trial-detail/TableList.tsx
+1
-0
src/webui/src/static/function.ts
src/webui/src/static/function.ts
+2
-1
src/webui/src/static/style/compare.scss
src/webui/src/static/style/compare.scss
+5
-2
src/webui/src/static/style/overview.scss
src/webui/src/static/style/overview.scss
+1
-1
src/webui/src/static/style/succTable.scss
src/webui/src/static/style/succTable.scss
+1
-1
src/webui/src/static/style/table.scss
src/webui/src/static/style/table.scss
+2
-2
No files found.
src/webui/src/components/Modals/Compare.tsx
View file @
59b76c2e
import
*
as
React
from
'
react
'
;
import
*
as
React
from
'
react
'
;
import
{
Stack
,
Modal
,
IconButton
}
from
'
office-ui-fabric-react
'
;
import
{
Stack
,
Modal
,
IconButton
,
IDragOptions
,
ContextualMenu
}
from
'
office-ui-fabric-react
'
;
import
ReactEcharts
from
'
echarts-for-react
'
;
import
ReactEcharts
from
'
echarts-for-react
'
;
import
IntermediateVal
from
'
../public-child/IntermediateVal
'
;
import
IntermediateVal
from
'
../public-child/IntermediateVal
'
;
import
{
TRIALS
}
from
'
../../static/datamodel
'
;
import
{
TRIALS
}
from
'
../../static/datamodel
'
;
import
{
TableRecord
,
Intermedia
,
TooltipForIntermediate
}
from
'
../../static/interface
'
;
import
{
contentStyles
,
iconButtonStyles
}
from
'
../Buttons/ModalTheme
'
;
import
{
contentStyles
,
iconButtonStyles
}
from
'
../Buttons/ModalTheme
'
;
import
'
../../static/style/compare.scss
'
;
import
'
../../static/style/compare.scss
'
;
import
{
TableRecord
,
Intermedia
,
TooltipForIntermediate
}
from
'
../../static/interface
'
;
const
dragOptions
:
IDragOptions
=
{
moveMenuItemText
:
'
Move
'
,
closeMenuItemText
:
'
Close
'
,
menu
:
ContextualMenu
};
// the modal of trial compare
// the modal of trial compare
interface
CompareProps
{
interface
CompareProps
{
...
@@ -79,7 +85,8 @@ class Compare extends React.Component<CompareProps, {}> {
...
@@ -79,7 +85,8 @@ class Compare extends React.Component<CompareProps, {}> {
containLabel
:
true
containLabel
:
true
},
},
legend
:
{
legend
:
{
data
:
idsList
// more than 10 trials will hide legend
data
:
idsList
.
length
>
10
?
null
:
idsList
},
},
xAxis
:
{
xAxis
:
{
type
:
'
category
'
,
type
:
'
category
'
,
...
@@ -209,6 +216,8 @@ class Compare extends React.Component<CompareProps, {}> {
...
@@ -209,6 +216,8 @@ class Compare extends React.Component<CompareProps, {}> {
isOpen
=
{
true
}
isOpen
=
{
true
}
containerClassName
=
{
contentStyles
.
container
}
containerClassName
=
{
contentStyles
.
container
}
className
=
"compare-modal"
className
=
"compare-modal"
allowTouchBodyScroll
=
{
true
}
dragOptions
=
{
dragOptions
}
>
>
<
div
>
<
div
>
<
div
className
=
{
contentStyles
.
header
}
>
<
div
className
=
{
contentStyles
.
header
}
>
...
...
src/webui/src/components/Overview.tsx
View file @
59b76c2e
...
@@ -12,6 +12,18 @@ import TrialInfo from './overview/TrialProfile';
...
@@ -12,6 +12,18 @@ import TrialInfo from './overview/TrialProfile';
import
'
../static/style/overview.scss
'
;
import
'
../static/style/overview.scss
'
;
import
'
../static/style/logPath.scss
'
;
import
'
../static/style/logPath.scss
'
;
const
stackTokens
:
IStackTokens
=
{
childrenGap
:
30
,
};
const
entriesOption
=
[
{
key
:
'
10
'
,
text
:
'
Display top 10 trials
'
},
{
key
:
'
20
'
,
text
:
'
Display top 20 trials
'
},
{
key
:
'
30
'
,
text
:
'
Display top 30 trials
'
},
{
key
:
'
50
'
,
text
:
'
Display top 50 trials
'
},
{
key
:
'
100
'
,
text
:
'
Display top 100 trials
'
}
];
interface
OverviewProps
{
interface
OverviewProps
{
experimentUpdateBroadcast
:
number
;
experimentUpdateBroadcast
:
number
;
trialsUpdateBroadcast
:
number
;
trialsUpdateBroadcast
:
number
;
...
@@ -70,17 +82,6 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
...
@@ -70,17 +82,6 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
const
titleMaxbgcolor
=
(
metricGraphMode
===
'
max
'
?
'
#333
'
:
'
#b3b3b3
'
);
const
titleMaxbgcolor
=
(
metricGraphMode
===
'
max
'
?
'
#333
'
:
'
#b3b3b3
'
);
const
titleMinbgcolor
=
(
metricGraphMode
===
'
min
'
?
'
#333
'
:
'
#b3b3b3
'
);
const
titleMinbgcolor
=
(
metricGraphMode
===
'
min
'
?
'
#333
'
:
'
#b3b3b3
'
);
const
stackTokens
:
IStackTokens
=
{
childrenGap
:
30
,
};
const
entriesOption
=
[
{
key
:
'
10
'
,
text
:
'
Display top 10 trials
'
},
{
key
:
'
20
'
,
text
:
'
Display top 20 trials
'
},
{
key
:
'
30
'
,
text
:
'
Display top 30 trials
'
},
{
key
:
'
50
'
,
text
:
'
Display top 50 trials
'
},
{
key
:
'
100
'
,
text
:
'
Display top 100 trials
'
}
];
return
(
return
(
<
div
className
=
"overview"
>
<
div
className
=
"overview"
>
{
/* status and experiment block */
}
{
/* status and experiment block */
}
...
@@ -123,7 +124,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
...
@@ -123,7 +124,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
</
Stack
>
</
Stack
>
<
Stack
style
=
{
{
backgroundColor
:
'
#fff
'
}
}
>
<
Stack
style
=
{
{
backgroundColor
:
'
#fff
'
}
}
>
<
Stack
horizontal
className
=
"top10bg"
style
=
{
{
position
:
'
relative
'
}
}
>
<
Stack
horizontal
className
=
"top10bg"
style
=
{
{
position
:
'
relative
'
,
height
:
42
}
}
>
<
div
<
div
className
=
"title"
className
=
"title"
onClick
=
{
this
.
clickMaxTop
}
onClick
=
{
this
.
clickMaxTop
}
...
@@ -136,7 +137,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
...
@@ -136,7 +137,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
>
>
<
Title1
text
=
"Top minimal trials"
icon
=
"min.png"
fontColor
=
{
titleMinbgcolor
}
/>
<
Title1
text
=
"Top minimal trials"
icon
=
"min.png"
fontColor
=
{
titleMinbgcolor
}
/>
</
div
>
</
div
>
<
div
style
=
{
{
position
:
'
absolute
'
,
right
:
52
,
top
:
6
}
}
>
<
div
style
=
{
{
position
:
'
absolute
'
,
right
:
'
2%
'
,
top
:
8
}
}
>
<
Dropdown
<
Dropdown
selectedKey
=
{
bestTrialEntries
}
selectedKey
=
{
bestTrialEntries
}
options
=
{
entriesOption
}
options
=
{
entriesOption
}
...
...
src/webui/src/components/trial-detail/TableList.tsx
View file @
59b76c2e
...
@@ -723,6 +723,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
...
@@ -723,6 +723,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
style
=
{
{
style
=
{
{
width
:
0.5
*
modalIntermediateWidth
,
width
:
0.5
*
modalIntermediateWidth
,
height
:
0.7
*
modalIntermediateHeight
,
height
:
0.7
*
modalIntermediateHeight
,
maxHeight
:
534
,
padding
:
20
padding
:
20
}
}
}
}
theme
=
"my_theme"
theme
=
"my_theme"
...
...
src/webui/src/static/function.ts
View file @
59b76c2e
...
@@ -131,7 +131,8 @@ const intermediateGraphOption = (intermediateArr: number[], id: string): any =>
...
@@ -131,7 +131,8 @@ const intermediateGraphOption = (intermediateArr: number[], id: string): any =>
yAxis
:
{
yAxis
:
{
name
:
'
Default metric
'
,
name
:
'
Default metric
'
,
type
:
'
value
'
,
type
:
'
value
'
,
data
:
intermediateArr
data
:
intermediateArr
,
scale
:
true
},
},
series
:
[{
series
:
[{
symbolSize
:
6
,
symbolSize
:
6
,
...
...
src/webui/src/static/style/compare.scss
View file @
59b76c2e
.compare-modal
{
.compare-modal
{
/* decide modal size */
/* decide modal size */
.ms-Dialog-main
{
.ms-Dialog-main
{
max-width
:
70%
;
width
:
50%
;
overflow
:
hidden
;
}
}
/* compare-md: table style */
/* compare-md: table style */
&
-table
{
&
-table
{
width
:
92%
;
width
:
92%
;
table-layout
:
fixed
;
margin
:
0
auto
;
margin
:
0
auto
;
margin-bottom
:
20px
;
border
:
1px
solid
transparent
;
overflow
:
auto
;
color
:
#333
;
color
:
#333
;
tr
{
tr
{
line-height
:
30px
;
line-height
:
30px
;
...
...
src/webui/src/static/style/overview.scss
View file @
59b76c2e
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
padding
:
15px
20px
;
padding
:
15px
20px
;
height
:
100%
;
height
:
100%
;
min-width
:
500px
;
min-width
:
500px
;
overflow-y
:
scroll
;
overflow-y
:
auto
;
}
}
.padItem
{
.padItem
{
...
...
src/webui/src/static/style/succTable.scss
View file @
59b76c2e
#succTable
{
#succTable
{
height
:
404px
;
height
:
404px
;
overflow
-y
:
scroll
;
overflow
:
auto
;
position
:
relative
;
position
:
relative
;
.succTable-tooltip
{
.succTable-tooltip
{
position
:
absolute
;
position
:
absolute
;
...
...
src/webui/src/static/style/table.scss
View file @
59b76c2e
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
height
:
324px
;
height
:
324px
;
overflow
:
hidden
;
overflow
:
hidden
;
#succeTable
.commonTableStyle
{
#succeTable
.commonTableStyle
{
overflow-y
:
scroll
;
overflow-y
:
auto
;
}
}
}
}
...
@@ -55,5 +55,5 @@
...
@@ -55,5 +55,5 @@
}
}
.columns-height
{
.columns-height
{
max-height
:
335px
;
max-height
:
335px
;
overflow-y
:
scroll
;
overflow-y
:
auto
;
}
}
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