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

Add Variable Query editor #113

Closed
tracy-french opened this issue Mar 1, 2022 · 7 comments
Closed

Add Variable Query editor #113

tracy-french opened this issue Mar 1, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request prio/high
Milestone

Comments

@tracy-french
Copy link
Collaborator

There are no query types available for IoT SiteWise when defining a variable based on a query. Can we support querying by asset using the ListAssets API?

@tracy-french
Copy link
Collaborator Author

Screen Shot 2022-03-01 at 8 24 23 AM

@tracy-french
Copy link
Collaborator Author

Desired UX: We want users to be able to pick an active asset (based on a query) or select from a list of currently running processes.

Preferred Solution: Define a variable in Grafana using a sitewise query. The result needs to be comma-separated name:value pairs with the name being the asset name and the value the asset ID.

@taleena
Copy link
Collaborator

taleena commented Mar 10, 2022

Existing workaround:
Query the data (batches, assets) from a different data source (e.g. Athena) while populating a dashboard variable. Alternatively, hard code the asset IDs. This makes the deployment process more complex.

Of the recently reported issues, this is the 1st priority.

@taleena taleena added enhancement New feature or request prio/high labels Mar 10, 2022
@taleena taleena changed the title Support defining variables using queries Global variables with SiteWise as a source, support defining variables using queries Mar 10, 2022
@taleena
Copy link
Collaborator

taleena commented Mar 15, 2022

Customer does not consider the workarounds as feasible, so we need to provide an estimated timeline.

lean257 pushed a commit that referenced this issue May 2, 2022
lean257 pushed a commit that referenced this issue May 3, 2022
* #113: WIP: add variable query editor

* set up query editor inside variable template

* fix onrunquery error

* fix lint errors

* add test

* add test

* add util tests

* fix utils to only push 1 result

* fix width to be consistent

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
@lean257
Copy link
Contributor

lean257 commented May 3, 2022

Hi @tracfren @taleena I just merged a change to this issue, would you be able to check and verify to close the issue? Thanks!

@toddtreece toddtreece changed the title Global variables with SiteWise as a source, support defining variables using queries Add Variable Query editor May 6, 2022
@toddtreece toddtreece added this to the v1.3.0 milestone May 6, 2022
@taleena
Copy link
Collaborator

taleena commented May 6, 2022

I've sent a heads up to the requestor, haven't heard anything back yet but please feel free to proceed!

@toddtreece
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prio/high
Projects
None yet
Development

No branches or pull requests

4 participants