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
cfda8c36
Unverified
Commit
cfda8c36
authored
Jul 31, 2020
by
Lijiaoa
Committed by
GitHub
Jul 31, 2020
Browse files
[webui] word format (such as Experiment summary, Log files) (#2737)
Co-authored-by:
Lijiao
<
15910218274@163.com
>
parent
d6186284
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
22 deletions
+22
-22
src/webui/src/components/Modals/ExperimentDrawer.tsx
src/webui/src/components/Modals/ExperimentDrawer.tsx
+1
-1
src/webui/src/components/Modals/LogDrawer.tsx
src/webui/src/components/Modals/LogDrawer.tsx
+4
-4
src/webui/src/components/NavCon.tsx
src/webui/src/components/NavCon.tsx
+2
-2
src/webui/src/components/Overview.tsx
src/webui/src/components/Overview.tsx
+2
-2
src/webui/src/components/TrialsDetail.tsx
src/webui/src/components/TrialsDetail.tsx
+8
-8
src/webui/src/components/trial-detail/TableList.tsx
src/webui/src/components/trial-detail/TableList.tsx
+4
-4
src/webui/src/static/const.ts
src/webui/src/static/const.ts
+1
-1
No files found.
src/webui/src/components/Modals/ExperimentDrawer.tsx
View file @
cfda8c36
...
@@ -106,7 +106,7 @@ class ExperimentDrawer extends React.Component<ExpDrawerProps, ExpDrawerState> {
...
@@ -106,7 +106,7 @@ class ExperimentDrawer extends React.Component<ExpDrawerProps, ExpDrawerState> {
styles
=
{
{
root
:
{
height
:
expDrawerHeight
,
paddingTop
:
15
}
}
}
styles
=
{
{
root
:
{
height
:
expDrawerHeight
,
paddingTop
:
15
}
}
}
>
>
<
Pivot
style
=
{
{
minHeight
:
190
}
}
className
=
"log-tab-body"
>
<
Pivot
style
=
{
{
minHeight
:
190
}
}
className
=
"log-tab-body"
>
<
PivotItem
headerText
=
"Experiment
P
arameters"
>
<
PivotItem
headerText
=
"Experiment
p
arameters"
>
<
div
className
=
"just-for-log"
>
<
div
className
=
"just-for-log"
>
<
MonacoEditor
<
MonacoEditor
width
=
"100%"
width
=
"100%"
...
...
src/webui/src/components/Modals/LogDrawer.tsx
View file @
cfda8c36
...
@@ -51,7 +51,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> {
...
@@ -51,7 +51,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> {
dispatcherHTML
=
():
React
.
ReactNode
=>
{
dispatcherHTML
=
():
React
.
ReactNode
=>
{
return
(
return
(
<
div
>
<
div
>
<
span
>
Dispatcher
L
og
</
span
>
<
span
>
Dispatcher
l
og
</
span
>
<
span
className
=
"refresh"
onClick
=
{
this
.
manualRefresh
}
>
<
span
className
=
"refresh"
onClick
=
{
this
.
manualRefresh
}
>
{
infoIcon
}
{
infoIcon
}
</
span
>
</
span
>
...
@@ -62,7 +62,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> {
...
@@ -62,7 +62,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> {
nnimanagerHTML
=
():
React
.
ReactNode
=>
{
nnimanagerHTML
=
():
React
.
ReactNode
=>
{
return
(
return
(
<
div
>
<
div
>
<
span
>
NNImanager
L
og
</
span
>
<
span
>
NNImanager
l
og
</
span
>
<
span
className
=
"refresh"
onClick
=
{
this
.
manualRefresh
}
>
{
infoIcon
}
</
span
>
<
span
className
=
"refresh"
onClick
=
{
this
.
manualRefresh
}
>
{
infoIcon
}
</
span
>
</
div
>
</
div
>
);
);
...
@@ -99,7 +99,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> {
...
@@ -99,7 +99,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> {
style
=
{
{
minHeight
:
190
,
paddingTop
:
'
16px
'
}
}
style
=
{
{
minHeight
:
190
,
paddingTop
:
'
16px
'
}
}
>
>
{
/* <PivotItem headerText={this.dispatcherHTML()} key="dispatcher" onLinkClick> */
}
{
/* <PivotItem headerText={this.dispatcherHTML()} key="dispatcher" onLinkClick> */
}
<
PivotItem
headerText
=
"Dispatcher
L
og"
key
=
"dispatcher"
>
<
PivotItem
headerText
=
"Dispatcher
l
og"
key
=
"dispatcher"
>
<
MonacoHTML
<
MonacoHTML
content
=
{
dispatcherLogStr
||
'
Loading...
'
}
content
=
{
dispatcherLogStr
||
'
Loading...
'
}
loading
=
{
isLoading
}
loading
=
{
isLoading
}
...
@@ -115,7 +115,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> {
...
@@ -115,7 +115,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> {
</
StackItem
>
</
StackItem
>
</
Stack
>
</
Stack
>
</
PivotItem
>
</
PivotItem
>
<
PivotItem
headerText
=
"NNIManager
L
og"
key
=
"nnimanager"
>
<
PivotItem
headerText
=
"NNIManager
l
og"
key
=
"nnimanager"
>
{
/* <TabPane tab="NNImanager Log" key="nnimanager"> */
}
{
/* <TabPane tab="NNImanager Log" key="nnimanager"> */
}
<
MonacoHTML
<
MonacoHTML
content
=
{
nniManagerLogStr
||
'
Loading...
'
}
content
=
{
nniManagerLogStr
||
'
Loading...
'
}
...
...
src/webui/src/components/NavCon.tsx
View file @
cfda8c36
...
@@ -189,13 +189,13 @@ class NavCon extends React.Component<NavProps, NavState> {
...
@@ -189,13 +189,13 @@ class NavCon extends React.Component<NavProps, NavState> {
items
:
[
items
:
[
{
{
key
:
'
experiment
'
,
key
:
'
experiment
'
,
text
:
'
Experiment
S
ummary
'
,
text
:
'
Experiment
s
ummary
'
,
iconProps
:
{
iconName
:
'
ShowResults
'
},
iconProps
:
{
iconName
:
'
ShowResults
'
},
onClick
:
this
.
showExpcontent
onClick
:
this
.
showExpcontent
},
},
{
{
key
:
'
logfiles
'
,
key
:
'
logfiles
'
,
text
:
'
Logfiles
'
,
text
:
'
Log
files
'
,
iconProps
:
{
iconName
:
'
FilePDB
'
},
iconProps
:
{
iconName
:
'
FilePDB
'
},
onClick
:
this
.
showDispatcherLog
onClick
:
this
.
showDispatcherLog
}
}
...
...
src/webui/src/components/Overview.tsx
View file @
cfda8c36
...
@@ -128,13 +128,13 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
...
@@ -128,13 +128,13 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
className
=
"title"
className
=
"title"
onClick
=
{
this
.
clickMaxTop
}
onClick
=
{
this
.
clickMaxTop
}
>
>
<
Title1
text
=
"Top
M
aximal trials"
icon
=
"max.png"
fontColor
=
{
titleMaxbgcolor
}
/>
<
Title1
text
=
"Top
m
aximal trials"
icon
=
"max.png"
fontColor
=
{
titleMaxbgcolor
}
/>
</
div
>
</
div
>
<
div
<
div
className
=
"title minTitle"
className
=
"title minTitle"
onClick
=
{
this
.
clickMinTop
}
onClick
=
{
this
.
clickMinTop
}
>
>
<
Title1
text
=
"Top
M
inimal trials"
icon
=
"min.png"
fontColor
=
{
titleMinbgcolor
}
/>
<
Title1
text
=
"Top
m
inimal trials"
icon
=
"min.png"
fontColor
=
{
titleMinbgcolor
}
/>
</
div
>
</
div
>
<
div
style
=
{
{
position
:
'
absolute
'
,
right
:
52
,
top
:
6
}
}
>
<
div
style
=
{
{
position
:
'
absolute
'
,
right
:
52
,
top
:
6
}
}
>
<
Dropdown
<
Dropdown
...
...
src/webui/src/components/TrialsDetail.tsx
View file @
cfda8c36
...
@@ -40,7 +40,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
...
@@ -40,7 +40,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
this
.
state
=
{
this
.
state
=
{
tablePageSize
:
20
,
tablePageSize
:
20
,
whichChart
:
'
Default metric
'
,
whichChart
:
'
Default metric
'
,
searchType
:
'
I
d
'
,
searchType
:
'
i
d
'
,
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/explicit-function-return-type
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/explicit-function-return-type
searchFilter
:
trial
=>
true
searchFilter
:
trial
=>
true
};
};
...
@@ -56,16 +56,16 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
...
@@ -56,16 +56,16 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
return
;
return
;
}
}
switch
(
this
.
state
.
searchType
)
{
switch
(
this
.
state
.
searchType
)
{
case
'
I
d
'
:
case
'
i
d
'
:
filter
=
(
trial
):
boolean
=>
trial
.
info
.
id
.
toUpperCase
().
includes
(
targetValue
.
toUpperCase
());
filter
=
(
trial
):
boolean
=>
trial
.
info
.
id
.
toUpperCase
().
includes
(
targetValue
.
toUpperCase
());
break
;
break
;
case
'
Trial No.
'
:
case
'
Trial No.
'
:
filter
=
(
trial
):
boolean
=>
trial
.
info
.
sequenceId
.
toString
()
===
targetValue
;
filter
=
(
trial
):
boolean
=>
trial
.
info
.
sequenceId
.
toString
()
===
targetValue
;
break
;
break
;
case
'
S
tatus
'
:
case
'
s
tatus
'
:
filter
=
(
trial
):
boolean
=>
trial
.
info
.
status
.
toUpperCase
().
includes
(
targetValue
.
toUpperCase
());
filter
=
(
trial
):
boolean
=>
trial
.
info
.
status
.
toUpperCase
().
includes
(
targetValue
.
toUpperCase
());
break
;
break
;
case
'
P
arameters
'
:
case
'
p
arameters
'
:
// TODO: support filters like `x: 2` (instead of `"x": 2`)
// TODO: support filters like `x: 2` (instead of `"x": 2`)
filter
=
(
trial
):
boolean
=>
JSON
.
stringify
(
trial
.
info
.
hyperParameters
,
null
,
4
).
includes
(
targetValue
);
filter
=
(
trial
):
boolean
=>
JSON
.
stringify
(
trial
.
info
.
hyperParameters
,
null
,
4
).
includes
(
targetValue
);
break
;
break
;
...
@@ -91,7 +91,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
...
@@ -91,7 +91,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
if
(
this
.
searchInput
!==
null
)
{
if
(
this
.
searchInput
!==
null
)
{
this
.
searchInput
.
value
=
''
;
this
.
searchInput
.
value
=
''
;
}
}
this
.
setState
(()
=>
({
searchType
:
item
.
text
}));
this
.
setState
(()
=>
({
searchType
:
item
.
key
.
toString
()
}));
}
}
}
}
...
@@ -101,10 +101,10 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
...
@@ -101,10 +101,10 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
const
source
=
TRIALS
.
filter
(
this
.
state
.
searchFilter
);
const
source
=
TRIALS
.
filter
(
this
.
state
.
searchFilter
);
const
trialIds
=
TRIALS
.
filter
(
this
.
state
.
searchFilter
).
map
(
trial
=>
trial
.
id
);
const
trialIds
=
TRIALS
.
filter
(
this
.
state
.
searchFilter
).
map
(
trial
=>
trial
.
id
);
const
searchOptions
=
[
const
searchOptions
=
[
{
key
:
'
I
d
'
,
text
:
'
Id
'
},
{
key
:
'
i
d
'
,
text
:
'
Id
'
},
{
key
:
'
Trial No.
'
,
text
:
'
Trial No.
'
},
{
key
:
'
Trial No.
'
,
text
:
'
Trial No.
'
},
{
key
:
'
S
tatus
'
,
text
:
'
Status
'
},
{
key
:
'
s
tatus
'
,
text
:
'
Status
'
},
{
key
:
'
P
arameters
'
,
text
:
'
Parameters
'
},
{
key
:
'
p
arameters
'
,
text
:
'
Parameters
'
},
];
];
return
(
return
(
<
div
>
<
div
>
...
...
src/webui/src/components/trial-detail/TableList.tsx
View file @
cfda8c36
...
@@ -196,7 +196,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
...
@@ -196,7 +196,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
StartTimeColumnConfig
:
any
=
{
StartTimeColumnConfig
:
any
=
{
name
:
'
Start
T
ime
'
,
name
:
'
Start
t
ime
'
,
key
:
'
startTime
'
,
key
:
'
startTime
'
,
fieldName
:
'
startTime
'
,
fieldName
:
'
startTime
'
,
minWidth
:
150
,
minWidth
:
150
,
...
@@ -210,7 +210,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
...
@@ -210,7 +210,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
};
};
EndTimeColumnConfig
:
any
=
{
EndTimeColumnConfig
:
any
=
{
name
:
'
End
T
ime
'
,
name
:
'
End
t
ime
'
,
key
:
'
endTime
'
,
key
:
'
endTime
'
,
fieldName
:
'
endTime
'
,
fieldName
:
'
endTime
'
,
minWidth
:
200
,
minWidth
:
200
,
...
@@ -465,10 +465,10 @@ class TableList extends React.Component<TableListProps, TableListState> {
...
@@ -465,10 +465,10 @@ class TableList extends React.Component<TableListProps, TableListState> {
case
'
ID
'
:
case
'
ID
'
:
showColumn
.
push
(
this
.
IdColumnConfig
);
showColumn
.
push
(
this
.
IdColumnConfig
);
break
;
break
;
case
'
Start
T
ime
'
:
case
'
Start
t
ime
'
:
showColumn
.
push
(
this
.
StartTimeColumnConfig
);
showColumn
.
push
(
this
.
StartTimeColumnConfig
);
break
;
break
;
case
'
End
T
ime
'
:
case
'
End
t
ime
'
:
showColumn
.
push
(
this
.
EndTimeColumnConfig
);
showColumn
.
push
(
this
.
EndTimeColumnConfig
);
break
;
break
;
case
'
Duration
'
:
case
'
Duration
'
:
...
...
src/webui/src/static/const.ts
View file @
cfda8c36
...
@@ -34,7 +34,7 @@ const OPERATION = 'Operation';
...
@@ -34,7 +34,7 @@ const OPERATION = 'Operation';
// defatult selected column
// defatult selected column
const
COLUMN
=
[
'
Trial No.
'
,
'
ID
'
,
'
Duration
'
,
'
Status
'
,
'
Default
'
,
OPERATION
];
const
COLUMN
=
[
'
Trial No.
'
,
'
ID
'
,
'
Duration
'
,
'
Status
'
,
'
Default
'
,
OPERATION
];
// all choice column !dictory final
// all choice column !dictory final
const
COLUMNPro
=
[
'
Trial No.
'
,
'
ID
'
,
'
Start
T
ime
'
,
'
End
T
ime
'
,
'
Duration
'
,
'
Status
'
,
const
COLUMNPro
=
[
'
Trial No.
'
,
'
ID
'
,
'
Start
t
ime
'
,
'
End
t
ime
'
,
'
Duration
'
,
'
Status
'
,
'
Intermediate result
'
,
'
Default
'
,
OPERATION
];
'
Intermediate result
'
,
'
Default
'
,
OPERATION
];
const
CONCURRENCYTOOLTIP
=
'
Trial concurrency is the number of trials running concurrently.
'
;
const
CONCURRENCYTOOLTIP
=
'
Trial concurrency is the number of trials running concurrently.
'
;
const
SUPPORTED_SEARCH_SPACE_TYPE
=
[
const
SUPPORTED_SEARCH_SPACE_TYPE
=
[
...
...
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