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: add support for Unit conversion on Custom Time Series Queries #319

Merged
merged 20 commits into from
Feb 7, 2024

Conversation

evertoncolling
Copy link
Contributor

Problem / User story
This PR adds support for performing unit conversion on custom time series queries

Solution

  • Added support for passing targetUnit and targetUnitSystem in custom time series queries
  • Added support for filtering by unitExternalId and unitQuantity
  • Added unitExternalId to time series and datapoints response types
  • Small styling changes on input fields width
  • Refactor query input field with new grafana component that expands beyond width 30 -> https://atchison.dev/non-legacy-form-data-source-plugin-grafana/

Affected Resource types
Time series

Changes to datasource JSON model
N/A

Has documentation been updated
Yes

Have tests been updated?
No

Screenshots and examples
image

@polomani polomani changed the title Add support for Unit coversion on Custom Time Series Queries feat: add support for Unit conversion on Custom Time Series Queries Feb 5, 2024
@@ -104,7 +104,7 @@
"@grafana/schema": "^10.1.2",
"@grafana/ui": "^10.1.2",
"deepdash": "^4.5.4",
"eslint-plugin-jsdoc": "^40.1.1",
"eslint-plugin-jsdoc": "48.0.4",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks good (with some limitations, that we discussed), but we need to bump the version and add a changelog.MD entry

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Updated the help text for the custom query button mentioning the fact that we expose the unit and unitExternalId of the original data in the label
  • Bumped the package version
  • Added a changelog -> let me know if there are other things to mention there

@polomani polomani added auto-merge automatically merge prs auto-update automatically update prs labels Feb 7, 2024
Copy link
Contributor

@polomani polomani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cognite-bulldozer cognite-bulldozer bot merged commit 7c1b1c6 into master Feb 7, 2024
3 checks passed
@cognite-bulldozer cognite-bulldozer bot deleted the unit-coversion branch February 7, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge automatically merge prs auto-update automatically update prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants