|
|
@@ -302,16 +302,18 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
|
|
|
}, SCHEDULE_POLL_TIMEOUT);
|
|
|
}
|
|
|
|
|
|
- searchText(item: ReplicaItem, text?: string | null) {
|
|
|
+ searchText(item: ReplicaItem, text: string) {
|
|
|
let result = false;
|
|
|
- if (item.instances[0].toLowerCase().indexOf(text || "") > -1) {
|
|
|
+ if (item.instances[0].toLowerCase().indexOf(text) > -1) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (item.notes.toLowerCase().indexOf(text) > -1) {
|
|
|
return true;
|
|
|
}
|
|
|
if (item.destination_environment) {
|
|
|
Object.keys(item.destination_environment).forEach(prop => {
|
|
|
if (
|
|
|
- item.destination_environment[prop] &&
|
|
|
- item.destination_environment[prop].toLowerCase &&
|
|
|
+ item.destination_environment[prop]?.toLowerCase &&
|
|
|
item.destination_environment[prop].toLowerCase().indexOf(text) > -1
|
|
|
) {
|
|
|
result = true;
|
|
|
@@ -328,7 +330,10 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
|
|
|
) {
|
|
|
if (
|
|
|
(filterStatus !== "all" && item.last_execution_status !== filterStatus) ||
|
|
|
- !this.searchText(item, filterText)
|
|
|
+ !this.searchText(
|
|
|
+ item,
|
|
|
+ (filterText?.toLowerCase && filterText.toLowerCase()) || ""
|
|
|
+ )
|
|
|
) {
|
|
|
return false;
|
|
|
}
|