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
a7278d2d
Unverified
Commit
a7278d2d
authored
Jul 15, 2021
by
Lijiaoa
Committed by
GitHub
Jul 15, 2021
Browse files
fix search broken bug with incomplete filter (#3935)
parent
5eb43ea7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
57 deletions
+71
-57
ts/webui/src/components/trial-detail/search/Search.tsx
ts/webui/src/components/trial-detail/search/Search.tsx
+71
-57
No files found.
ts/webui/src/components/trial-detail/search/Search.tsx
View file @
a7278d2d
...
...
@@ -154,6 +154,15 @@ function Search(props): any {
}
allFilterConditions
.
forEach
(
eachFilterConditionStr
=>
{
// input content looks like that: `Trial id:`
if
(
eachFilterConditionStr
.
endsWith
(
'
:
'
)
||
eachFilterConditionStr
.
endsWith
(
'
<
'
)
||
eachFilterConditionStr
.
endsWith
(
'
>
'
)
||
eachFilterConditionStr
.
endsWith
(
'
≠
'
)
)
{
return
;
}
else
{
let
eachFilterConditionArr
:
string
[]
=
[];
// EXPERIMENT.searchSpace[parameter]._type === 'choice'
...
...
@@ -181,13 +190,15 @@ function Search(props): any {
choice
:
isChoicesType
?
convertStringArrToList
(
eachFilterConditionArr
[
1
])
:
[],
isChoice
:
isChoicesType
?
true
:
false
});
}
else
{
}
else
if
(
eachFilterConditionStr
.
includes
(
'
:
'
))
{
// = : conv_size:[1,2,3,4]; Trial id:3; hidden_size:[1,2], status:[val1,val2,val3]
eachFilterConditionArr
=
eachFilterConditionStr
.
trim
().
split
(
'
:
'
);
const
filterName
=
eachFilterConditionArr
[
0
]
===
'
Status
'
?
'
StatusNNI
'
:
eachFilterConditionArr
[
0
];
const
isChoicesType
=
isChoiceType
(
filterName
);
const
isArray
=
eachFilterConditionArr
.
length
>
1
&&
eachFilterConditionArr
[
1
].
includes
(
'
[
'
||
'
]
'
)
?
true
:
false
;
eachFilterConditionArr
.
length
>
1
&&
eachFilterConditionArr
[
1
].
includes
(
'
[
'
||
'
]
'
)
?
true
:
false
;
if
(
isArray
===
true
)
{
if
(
isChoicesType
===
true
)
{
// status:[SUCCEEDED]
...
...
@@ -220,9 +231,12 @@ function Search(props): any {
isChoice
:
false
});
}
}
else
{
// user input: Trial id
return
;
}
}
});
changeTableListPage
(
newSearchFilter
);
}
...
...
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