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
Bug 1827753: autoselect query from metric dropdown #5184
Conversation
/retitle Bug 1827753: autoselect query from metric dropdown |
@vikram-raj: This pull request references Bugzilla bug 1827753, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
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 kubernetes/test-infra repository. |
'CPU Usage': 'CPU Usage', | ||
'Memory Usage': 'Memory Usage', | ||
'Filesystem Usage': 'Filesystem Usage', | ||
'Receive Bandwidth': 'Receive Bandwidth', | ||
'Transmit Bandwidth': 'Transmit Bandwidth', |
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.
In my opinion the Idea of having enum/const variables is that you can change the value (string) in one place and those variables used elsewhere should receive the changed string. But here in this case you need to change both Key and Value, which is not very useful.
const [title, setTitle] = React.useState('Select Query'); | ||
const [selectedKey, setselectedKey] = React.useState(''); |
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.
const [selectedKey, setselectedKey] = React.useState(''); | |
const [selectedKey, setSelectedKey] = React.useState(''); |
8b5b61c
to
d6ab61d
Compare
The graph takes some time to load. |
cc: @openshift/team-devconsole-ux |
/assign @invincibleJai |
if (query) { | ||
removeQueryArgument('query0'); | ||
} |
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.
what's the use of this , i see one in onChange
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 removes query params from the URL. If the user starts editing the promql or changes the query using the query dropdown.
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.
can we handle both scenarios in hook itself
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.
Quick question on this @vikram-raj
Our Out of the Box CPU Usage query is per project, correct?
I'm assuming that's why when clicking on the CPU Usage card from the dashboard, it defaults to CPU Usage, but when clicking on CPU Usage from the side panel in topology, it defaults to Custom Query
Correct, out of box CPU Usage query is per project. and CPU Usage from the side panel is per workload. |
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.
LGTM! Approved by UX. Thanks @vikram-raj
5b98f0d
to
a5eda15
Compare
/retest |
verified locally and works fine |
@vikram-raj it works fine in other scenarios however i see issue ns change if came from topology to metrics see GIF attached. |
@invincibleJai We have this issue in master and we can handle it separately. It is happening because the workload query is not under the pre-canned query that we define for the metrics dropdown. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: invincibleJai, karthikjeeyar, serenamarie125, vikram-raj 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 |
@vikram-raj: All pull requests linked via external trackers have merged: openshift/console#5184. Bugzilla bug 1827753 has been moved to the MODIFIED state. 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 kubernetes/test-infra repository. |
/cherry-pick release-4.4 |
@vikram-raj: new pull request created: #5383 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 kubernetes/test-infra repository. |
Fixes:
https://issues.redhat.com/browse/ODC-3064
Analysis / Root cause:
When clicking on any metrics graph in the dashboard or sidebar in topology view takes you to metrics in the monitoring tab but the query field remains unchanged
Solution Description:
autoselect query from the metric dropdown if it matches.
Screen shots / Gifs for design review:
Browser conformance: