-
Notifications
You must be signed in to change notification settings - Fork 667
Add monitoring dashboard graph #3923
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
Conversation
|
/kind feature |
|
cc: @openshift/team-devconsole-ux |
frontend/packages/dev-console/src/components/monitoring/dashboard/MonitoringDashboardGraph.scss
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/monitoring/dashboard/MonitoringDashboardGraph.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/monitoring/dashboard/MonitoringDashboardGraph.tsx
Outdated
Show resolved
Hide resolved
|
No tests for |
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.
Better to define a new chart type for this & move it under MonitoringDashboardGraph
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.
humanize & DataType shall vary & depend on query so it's better to drive both through props.
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.
Done
frontend/packages/dev-console/src/components/monitoring/dashboard/MonitoringDashboardGraph.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/monitoring/dashboard/MonitoringDashboard.tsx
Outdated
Show resolved
Hide resolved
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.
change the type to GraphTypes
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.
Done.
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.
better to use uppercase for enums
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.
use humanizeCpuCores
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.
Done
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.
use humanizeDecimalBytesPerSec
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.
Done
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.
better to use enum GraphTypes
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.
Done.
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: we have type React.FC and do implicit return
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.
Done
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.
FWIW @invincibleJai this is more than just a nit, it's a requirement. We don't want to create anything without types if we can avoid it.
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: can we have class name as odc-filename-*
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 am reusing this class from _graph.scss.
|
/lgtm |
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.
@vikram-raj i'm not sure if this story covers this. But is it currently possible to click on the graph, and have it bring you to the Metrics tab with "Custom Query" selected and the PromQL field populated with the associated query & the graph shown?
If this is not part of this story, lmk and i'll enter a bug/enhancement.
Note that this is the behavior of the Project Dashboard graphs, but I'm not sure if we explicitly called this out in the Acceptance Criteria.
|
@serenamarie125 this has been handled as part of #3954, it's in WIP as it depends on work for #3891 cc @vikram-raj |
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: MonitoringDashboardQueries is not a component file and therefore the file name shouldn't begin in uppercase.
andrewballantyne
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.
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.
We don't export types anymore. You can infer the type of a component through React.ComponentProps<typeof MyComponent>
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.
| <GridItem span={4} key={i}> | |
| <GridItem span={4} key={title}> |
Could we not use title for this? Two same-named items wouldn't be helpful, no?
Maybe ${chartType}-${title} if we'd want the same stat in two different chart formats?
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.
Perhaps I am missing the obvious here, but how does this render a line graph? QueryBrowser is a line graph?
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.
Yes, QueryBrowser component render line graph.
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.
Not sure the test needs to know that. If the underlying nvm... it appears you explicitly check for QueryBrowser changes the way it works, our test wouldn't make sense anymore.line before rendering the QueryBrowser lol
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.
Perhaps give this a type so if any other items are added to the array they conform to the same shape.
|
Okay, got the graphs to render... was my local env that had an issue (needed to rebuild the server). UX Concern (@openshift/team-devconsole-ux) - hovering over a chart allows me to "zoom in"... but I have no way to zoom back out. This feels like a pretty big concern to the sanity of using this feature. To get monitoring in is probably our first priority, but I think we need a bug to track this for fix after feature freeze (or if there is time before feature freeze). |
andrewballantyne
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, but I think we need to address the UX issue with the line charts.
@vikram-raj please log a bug around #3923 (comment)
Yes, we can take it as bug because in |
@andrewballantyne Here is the ticket to track this issue https://issues.redhat.com/browse/ODC-2779 |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewballantyne, invincibleJai, 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. |
2 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
FYI @openshift/openshift-team-monitoring |


story - https://issues.redhat.com/browse/ODC-2627
This PR adds graphs on dev-monitoring dashboard page.
Adding WIP as pre-can queries are not finalized yet.