-
Notifications
You must be signed in to change notification settings - Fork 21
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
OU-432: Merge Perses dashboards with current dashboards list #266
OU-432: Merge Perses dashboards with current dashboards list #266
Conversation
As discussed in the tech sync, I don't think we need the proxy here as this will be handled by the proxy created in the ConsolePlugin CR |
8c02ce8
to
6e49fb2
Compare
@zhuje: This pull request references OU-432 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 task to target the "4.19.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
@zhuje: This pull request references OU-432 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 task to target the "4.19.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
cc @fkargbo |
Looks good to me! |
7a1b9f0
to
0f2956c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to leave the perses-client to abstract the perses API as functions. See:
https://github.com/openshift/logging-view-plugin/blob/main/web/src/loki-client.ts
And then build in another file a usePerses
hook that consumes this client. This hook should expose functions and probably a state so the consumers can decide when to query or reuse a persistent state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the files in the latest push.
- Added cancellable-fetch.ts ported from logging-view-plugin
- perses-client.ts modified to follow loki-client.ts from logging-view-plugin
- usePerses.ts created to follow useLogs.ts from logging-view-plugin
- ...dashboards/index.ts modified to utilize usePerses() hook
c61c40d
to
a92a8e7
Compare
/lgtm |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jgbernalp, PeterYurkovich, zhuje 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:
Approvers can indicate their approval by writing |
@zhuje: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
[ART PR BUILD NOTIFIER] Distgit: monitoring-plugin |
Description
On the dashboard page, list Perses dashboards in the dropdown.
This PR only lists the dashboards in the dropdown; the dashboard is not rendered when you click on the dropdown item.
Figure 1. Perses dashboards are listed in the dashboard page dropdown (e.g., "testproject / dashboard1" and "testproject / dashboard2"). The dashboards are displayed as <"project name"> / <"dashboard name">. The tag, by default, is "perses."
Related Issue
https://issues.redhat.com/browse/OU-432
Testing
This PR was only tested locally during development. To setup the test:
docker run --name perses -d -p 127.0.0.1:8080:8080 persesdev/perses
. See https://github.com/perses/perses?tab=readme-ov-file#docker-images for information.http://localhost:8080
, which will take you to the local Perses instance. Create a project and a dashboard for it.make start-frontend
and in a separate terminalmake start-console
).make start-console
is proxying localhost:8080 (our local perses instance).http://localhost:9000
(our local OCP instance). Go to Observe > Dashboards > Dropdown, the dashboards you created in the local perses instance should now be listed in the dropdown.https://github.com/user-attachments/assets/7f6258e8-62de-46dc-8bd1-c7c598d628ea
Figure 2. Video demo of testing (~1:45 minutes). Shows perses dashboards are listed in the Dashboard page dropdown.