Skip to content

Commit 43ee03c

Browse files
committed
fix filter handling in nodes and groups
1 parent 1738d8c commit 43ee03c

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

ydb/core/viewer/storage_groups.h

+2-9
Original file line numberDiff line numberDiff line change
@@ -1046,19 +1046,12 @@ class TStorageGroups : public TViewerPipeClient {
10461046
TVector<TString> filterWords = SplitString(Filter, " ");
10471047
TGroupView groupView;
10481048
for (TGroup* group : GroupView) {
1049-
bool match = false;
10501049
for (const TString& word : filterWords) {
1051-
if (group->PoolName.Contains(word)) {
1052-
match = true;
1053-
break;
1054-
} else if (::ToString(group->GroupId).Contains(word)) {
1055-
match = true;
1050+
if (group->PoolName.Contains(word) || ::ToString(group->GroupId).Contains(word)) {
1051+
groupView.push_back(group);
10561052
break;
10571053
}
10581054
}
1059-
if (match) {
1060-
groupView.push_back(group);
1061-
}
10621055
}
10631056
GroupView.swap(groupView);
10641057
Filter.clear();

ydb/core/viewer/viewer_nodes.h

+1
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,7 @@ class TJsonNodes : public TViewerPipeClient {
10301030
for (const TString& word : filterWords) {
10311031
if (node->GetHostName().Contains(word) || ::ToString(node->GetNodeId()).Contains(word)) {
10321032
nodeView.push_back(node);
1033+
break;
10331034
}
10341035
}
10351036
}

0 commit comments

Comments
 (0)