Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
fix case sensitive in keyword search
Browse files Browse the repository at this point in the history
  • Loading branch information
yiyione committed Dec 15, 2020
1 parent fe4d7b7 commit 3c2f318
Showing 1 changed file with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,26 @@ class TaskRoleFilter {
containerIp,
containerId,
}) =>
(taskState && capitalize(taskState).indexOf(keyword) > -1) ||
(taskState &&
taskState.toLowerCase().indexOf(keyword.toLowerCase()) > -1) ||
(containerExitSpec &&
containerExitSpec.type &&
containerExitSpec.type.indexOf(keyword) > -1) ||
containerExitSpec.type
.toLowerCase()
.indexOf(keyword.toLowerCase()) > -1) ||
(containerExitSpec &&
containerExitSpec.code !== undefined &&
containerExitSpec.code.toString().indexOf(keyword) > -1) ||
(containerNodeName && containerNodeName.indexOf(keyword) > -1) ||
(containerIp && containerIp.indexOf(keyword) > -1) ||
(containerId && containerId.indexOf(keyword) > -1),
containerExitSpec.code
.toString()
.toLowerCase()
.indexOf(keyword.toLowerCase()) > -1) ||
(containerNodeName &&
containerNodeName.toLowerCase().indexOf(keyword.toLowerCase()) >
-1) ||
(containerIp &&
containerIp.toLowerCase().indexOf(keyword.toLowerCase()) > -1) ||
(containerId &&
containerId.toLowerCase().indexOf(keyword.toLowerCase()) > -1),
);
}
if (!isEmpty(exitType)) {
Expand Down

0 comments on commit 3c2f318

Please sign in to comment.