-
Notifications
You must be signed in to change notification settings - Fork 667
Adds PromQL Editor to monitoring metrics #3955
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
Adds PromQL Editor to monitoring metrics #3955
Conversation
|
/kind feature |
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.
Actually Show PromQL button is not shown in design mock up when no query is selected. If possible its good to hide otherwise we can set isPromQlDisabled default value to true
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's there Show PromQL button in the mockup
.../packages/dev-console/src/components/monitoring/metrics/__tests__/MetricsQueryInput.spec.tsx
Outdated
Show resolved
Hide resolved
.../packages/dev-console/src/components/monitoring/metrics/__tests__/MetricsQueryInput.spec.tsx
Outdated
Show resolved
Hide resolved
c6f6219 to
966bf49
Compare
af4da3d to
c9bc935
Compare
serenamarie125
left a comment
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.
@invincibleJai this is looking good! Couple of things I see which would be good to address:
- When the graph comes up, the legend is viewed before the chart. Is there a way to display it at the same time ( picky I know, so if this is difficult, don't worry )
- Is it still possible to get the hints when creating the PromQL query as it was in the metrics page?
- in your animated gif, some tooltip shows up very quickly. Is that associated with the top line in the graph? Curious if we should have a bit of a delay (similar to the timing we do with the pipeline visualization) so that tooltips aren't showing up immediately.
c9bc935 to
c6e28c2
Compare
|
FYI @sichvoge |
a1320d1 to
8106741
Compare
|
@serenamarie125 Thanks for inputs, have updated the gif PTAL and added comments below.
we are rendering the components at the same time, on the first load graph rendering takes more than legend
have updated the gif with hints.
Graph component is reused from the console and internally it makes use of the Pf line chart. We can take this as an issue in separate PR if needed. |
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.
nit:
| const autocompleteFilter = (strtext, item) => fuzzy(strtext, item); | |
| const autocompleteFilter = (strText, item) => fuzzy(strText, item); |
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.
nit: This way it is more readable.
| if (selVal && selVal === ADD_NEW_QUERY) { | |
| if (selectedValue && selectedValue === ADD_NEW_QUERY) { |
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.
nit:
| {showPromQl ? `Hide PromQL` : `Show PromQL`} | |
| {showPromQl ? 'Hide PromQL' : 'Show PromQL'} |
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 directly pass setShowPromQl to onClick as we are not doing anything else in togglePromQl?
8106741 to
9826b53
Compare
serenamarie125
left a comment
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.
@invincibleJai thanks for the updates and responses to my comments. From a UX perspective, this PR is approved.
vikram-raj
left a comment
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
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.
You should probably omit this entire row if there is no content to show.
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.
Combine these two conditions into one.
9826b53 to
87f8786
Compare
d8d3463 to
3d103fc
Compare
|
/approve |
frontend/packages/dev-console/src/components/monitoring/metrics/MetricsQueryInput.tsx
Outdated
Show resolved
Hide resolved
3d103fc to
741fd36
Compare
741fd36 to
297dedf
Compare
vikram-raj
left a comment
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
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, invincibleJai, serenamarie125, vikram-raj The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
FYI @openshift/openshift-team-monitoring |
Tracks:
Gif:

/cc @openshift/team-devconsole-ux @serenamarie125