openshift / troubleshooting-panel-console-plugin

Console Plugin to add a troubleshooting side panel to display Korrel8r data
Apache License 2.0
0 stars 7 forks source link

OU-537: Persist Query Information between closing and opening #80

Closed PeterYurkovich closed 4 weeks ago

PeterYurkovich commented 1 month ago

This PR looks to persist the korrel8r query information in the store to allow users to close and open the panel without losing track of where their old query was.

Of note, because the store is reinstantiated each time a tab is opened, this won't persist the query when refreshing or opening the console at a later time. I think this is a fine tradeoff which clears away the issue of stale queries. If we want persistence through new tabs and refreshing, we will need to store in the browser storage instead.

The swap of query to an object does lead to a decent amount of spreading the old object out then overriding only one of the fields, but it feels to the point and expressive so I think its fine.

openshift-ci-robot commented 1 month ago

@PeterYurkovich: This pull request references OU-537 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.18.0" version, but no target version was set.

In response to [this](https://github.com/openshift/troubleshooting-panel-console-plugin/pull/80): >This PR looks to persist the korrel8r query information in the store to allow users to close and open the panel without losing track of where their old query was. > >Of note, because the store is reinstantiated each time a tab is opened, this won't persist the query when refreshing or opening the console at a later time. I think this is a fine tradeoff which clears away the issue of stale queries. If we want persistence through new tabs and refreshing, we will need to store in the browser storage instead. > >The swap of query to an object does lead to a decent amount of spreading the old object out then overriding only one of the fields, but it feels to the point and expressive so I think its fine. Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Ftroubleshooting-panel-console-plugin). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alanconway, PeterYurkovich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift/troubleshooting-panel-console-plugin/blob/main/OWNERS)~~ [PeterYurkovich,alanconway] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci[bot] commented 4 weeks ago

@PeterYurkovich: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).