-
Notifications
You must be signed in to change notification settings - Fork 4
feat(alarms): Support filtering alarms by source #432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Ahalya-ni
wants to merge
13
commits into
users/ahalya/refactor/ahalya/move-reusable-to-utils
Choose a base branch
from
users/ahalya/feat/alarms/source-filter-final-2.0
base: users/ahalya/refactor/ahalya/move-reusable-to-utils
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat(alarms): Support filtering alarms by source #432
Ahalya-ni
wants to merge
13
commits into
users/ahalya/refactor/ahalya/move-reusable-to-utils
from
users/ahalya/feat/alarms/source-filter-final-2.0
+161
−19
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8a0c1e1
to
0825cd9
Compare
b285e8d
to
6781f63
Compare
manisha-ni
requested changes
Oct 13, 2025
6781f63
to
471fba2
Compare
manisha-ni
approved these changes
Oct 14, 2025
src/datasources/alarms/constants/AlarmsQueryBuilder.constants.ts
Outdated
Show resolved
Hide resolved
9420e47
to
78647b7
Compare
78647b7
to
4965de4
Compare
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
4965de4
to
6630743
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
🤨 Rationale
User Story 3283281: FE | Handle filter transformation in Query builder
Task 3249469: Add source filter support to alarms query builder
This PR adds support for source filtering in the alarms query builder component.
👩💻 Implementation
AlarmsQueryBuilderFields
, including its data field, label, and supported filtering operators.properties.system <operator> <value> || properties.minionId <operator> <value>
.SourceProperties.constant
to store the custom properties for reusability.utils.ts
previously namedgetLogicalOperator
to be used for combining system and minionId expressions.getLogicalOperator
belowmultipleValuesQuery
since it is now a public method; this file is organized with public methods at the top and private methods below.getLogicalOperator
togetFilterConcatOperator
to better reflect its purpose, as it is used for combining multi-value expressions (e.g., {value1, value2}) as well as conditions like those used for source (system and minionId expressions).getFilterConcatOperator
to return logical OR forisnotblank
operator as its transformation logic is already in place.Another approach
Another approach I considered was introducing separate query builder operators to handle source-related transformations directly within the expression builder callback of the query builder. This alternative did work, but it has a drawback: the resulting source expressions (such as
(properties.system = "test-source" || properties.minionId = "test-source")
) are not parsed by the query builder, which leads to an empty expression in the reader callback. For more details, refer to the prototype and the relevant branch.🧪 Testing
Added unit tests
✅ Checklist