Skip to content
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

feat(products): Add query builder to the Products Datasource #116

Merged

Conversation

richie-ni
Copy link
Collaborator

@richie-ni richie-ni commented Jan 20, 2025

Pull Request

🤨 Rationale

As part of User Story 2996007: FE | Add Query builder to the Products Datasource and Update the Helm chart, this PR contains the query builder integration and the required constants and templates required for the query builder

👩‍💻 Implementation

  • integrated the query builder component
  • added additional operators and fields to the queryBuilderConstants.ts in core
  • created and integrated callbacks for query builder expression templates in order to handle computed field queries UpdatedAt field
  • added an expression template and methods to display key value pair for the Properties field

🧪 Testing

Added unit tests

🖥️ Screenshot

image

✅ Checklist

… and async assertions

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…for user interactions
…tion in runQuery
…chie/grafana/products-datsource/add-query-builder
@richie-ni richie-ni changed the base branch from main to users/richie/grafana/products-datasource January 20, 2025 04:48
@richie-ni richie-ni changed the title feat(Products) : Add query builder to the Products Datasource feat(products) : Add query builder to the Products Datasource Jan 20, 2025
@richie-ni richie-ni requested a review from ranjgith-ni January 21, 2025 19:55
Base automatically changed from users/richie/grafana/products-datasource to main January 24, 2025 06:29
…query-builder
…rce with metricFindQuery
…sDataSource with metricFindQuery"

This reverts commit 33ad95d.
…g in ProductsDataSource
@richie-ni richie-ni marked this pull request as ready for review January 30, 2025 07:11
@richie-ni
Copy link
Collaborator Author

richie-ni commented Jan 30, 2025

Note:
There is an issue in the query builder. When a user selects properties in the property fields with a numeric operator, and only if the expected value is a single-digit number or a single alphabet, the query builder resets itself.

Query.Builder.issue.-.Numeric.Property.mp4

This issue is likely caused by the query builder wrapper, which incorrectly validates a single-digit number as having no value.

@richie-ni richie-ni merged commit 388a74f into main Feb 3, 2025
1 check passed
@richie-ni richie-ni deleted the users/richie/grafana/products-datsource/add-query-builder branch February 3, 2025 06:17
@richie-ni richie-ni changed the title feat(products) : Add query builder to the Products Datasource feat(products): Add query builder to the Products Datasource Feb 3, 2025
@mure
Copy link
Contributor

mure commented Feb 3, 2025

🎉 This PR is included in version 3.44.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mure mure added the released label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants