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(tag): visualize history of multiple tags #60

Merged
merged 5 commits into from
Sep 11, 2024

Conversation

TigranVardanyan
Copy link
Collaborator

@TigranVardanyan TigranVardanyan commented May 15, 2024

Pull Request

🀨 Rationale

The "history" query type currently visualizes data only for the first matched tag. Need to visualize data from all matched tags.

πŸ‘©β€πŸ’» Implementation

Implemented functions to retrieve tag history in chunks and merge responses into a single dataframe. Since it is impossible to have properties of multiple tags in one dataframe with those historical values, "Properties" option in now available only for query type "Current".

πŸ§ͺ Testing

Added a test to check if the history of multiple tags is processed correctly. Added a test to ensure the properties switch button is hidden when the query type is "History".

βœ… Checklist

update descriptions
minor changes
@TigranVardanyan TigranVardanyan changed the title feat(asset): visualize history of multiple tags feat(tag): visualize history of multiple tags May 16, 2024
add workspace column for current query
Copy link
Collaborator

@mure mure left a comment

Choose a reason for hiding this comment

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

Screenshot 2024-08-30 170232

I tested this out locally and the data isn't looking like how I would expect. Even when the timestamps match up, the columns alternate missing values, which seems to create gaps in the chart.

Screenshot 2024-08-30 173523

It gets weirder when your tags aren't updating at the same frequency.
There's not any way to guarantee that the tag history returned by the query will have uniform timestamps, so I think what we should do is return each tag in a separate data frame/series (the second example in these docs).

This is the first time we've needed to do this in a plugin, so we'll need to make the runQuery method support returning a list of data frames: DataFrameDTO[]

One advantage of this approach is that we can continue to have the Properties toggle for the history query instead of hiding it.

Copy link
Collaborator

@cameronwaterman cameronwaterman left a comment

Choose a reason for hiding this comment

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

Moving to "Request changes" in order to review open conversations

@cameronwaterman
Copy link
Collaborator

@markacamps @TigranVardanyan - Carson left a comment yesterday related to the return type of the runQuery function. Please take a look as it doesn't appear that comment has been resolved.

@mure
Copy link
Collaborator

mure commented Sep 4, 2024

@cameronwaterman

Carson left a comment yesterday related to the return type of the runQuery function. Please take a look as it doesn't appear that comment has been resolved

We won't need to do this if we're only returning one data frame, as was the outcome of the other conversation

@markacamps
Copy link

@mure is this clear to merge?

@mure mure merged commit 5826522 into main Sep 11, 2024
1 check passed
@mure
Copy link
Collaborator

mure commented Sep 11, 2024

@mure is this clear to merge?

Done

@mure mure deleted the users/tvardany/historical-values-of-multiple-tags branch September 11, 2024 15:14
mure pushed a commit that referenced this pull request Sep 11, 2024
## [3.13.0](v3.12.1...v3.13.0) (2024-09-11)

### Features

* **tag:** visualize history of multiple tags ([#60](#60)) ([5826522](5826522))
@mure
Copy link
Collaborator

mure commented Sep 11, 2024

πŸŽ‰ This PR is included in version 3.13.0 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

@mure mure added the released label Sep 11, 2024
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.

6 participants