Skip to content

Conversation

@vikram-raj
Copy link
Member

@vikram-raj vikram-raj commented Jan 11, 2020

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.

Screenshot from 2020-01-13 14-21-01

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. component/dev-console Related to dev-console labels Jan 11, 2020
@vikram-raj
Copy link
Member Author

/kind feature

@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 11, 2020
@vikram-raj
Copy link
Member Author

cc: @openshift/team-devconsole-ux

@debsmita1
Copy link
Contributor

No tests for MonitoringDashboardGraph component?

Copy link
Contributor

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

Comment on lines 38 to 39
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines 18 to 19
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use humanizeCpuCores

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use humanizeDecimalBytesPerSec

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

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.

Copy link
Member

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-*

Copy link
Member Author

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.

@vikram-raj vikram-raj changed the title [WIP]Add monitoring dashboard graph Add monitoring dashboard graph Jan 17, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 17, 2020
@invincibleJai
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 17, 2020
Copy link
Contributor

@serenamarie125 serenamarie125 left a 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.

@invincibleJai
Copy link
Member

@serenamarie125 this has been handled as part of #3954, it's in WIP as it depends on work for #3891 cc @vikram-raj

Copy link
Contributor

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.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jan 21, 2020
Copy link
Contributor

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what the prerequisites are to run this, but I got console & UI errors when I tried to test it...

Screen Shot 2020-01-21 at 6 06 59 AM
Screen Shot 2020-01-21 at 6 07 45 AM

Copy link
Contributor

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>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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?

Comment on lines +28 to +33
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

@andrewballantyne andrewballantyne Jan 21, 2020

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 QueryBrowser changes the way it works, our test wouldn't make sense anymore. nvm... it appears you explicitly check for line before rendering the QueryBrowser lol

Copy link
Contributor

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.

@andrewballantyne
Copy link
Contributor

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).

Copy link
Contributor

@andrewballantyne andrewballantyne left a 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)

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 21, 2020
@vikram-raj
Copy link
Member Author

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).

Yes, we can take it as bug because in QueryBrowser component has the prop to hideControls and it hides the zoom out button for the graph but didn't disable the zoom-in feature.

@vikram-raj
Copy link
Member Author

LGTM, but I think we need to address the UX issue with the line charts.

@vikram-raj please log a bug around #3923 (comment)

@andrewballantyne Here is the ticket to track this issue https://issues.redhat.com/browse/ODC-2779

@invincibleJai
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 21, 2020
@openshift-ci-robot
Copy link
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 789499a into openshift:master Jan 21, 2020
@kyoto
Copy link
Member

kyoto commented Jan 22, 2020

FYI @openshift/openshift-team-monitoring

@spadgett spadgett added this to the v4.4 milestone Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/dev-console Related to dev-console kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.