Skip to content
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 1797573: Add pod count on dev-console monitoring dashboard page #4072

Merged
merged 1 commit into from
Feb 5, 2020

Conversation

vikram-raj
Copy link
Member

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. component/dev-console Related to dev-console labels Jan 27, 2020
@invincibleJai
Copy link
Member

/kind bug

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 27, 2020
Comment on lines +20 to +24
{pods.loaded ? (
<h1 className="odc-monitoring-dashboard-pod-count__count">{pods.data.length}</h1>
) : (
<LoadingInline />
Copy link
Member

@invincibleJai invincibleJai Jan 27, 2020

Choose a reason for hiding this comment

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

@vikram-raj can we have specs for the conditional branch here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Adding test for this.

Copy link
Member Author

Choose a reason for hiding this comment

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

@invincibleJai Added tests for this. PTAL.

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 27, 2020
pods?: FirehoseResult<PodKind[]>;
}

export const PodCount: React.FC<PodCountProps> = ({ pods }) => {
Copy link
Member

Choose a reason for hiding this comment

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

We usually have one component per file, will it make sense here as well? I know here MonitoringDasboardPodCount we just have Firehose. WDYT?

Copy link
Member Author

@vikram-raj vikram-raj Jan 27, 2020

Choose a reason for hiding this comment

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

In MonitoringDasboardPodCount just have Firehose i:e I put it in one file.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm ok with multiple components per file if it's used internally. The idea being that only the default export should ever be consumed elsewhere.

{_.map(queries, (q) => (
<GridItem span={4} key={q.title}>
{_.map(queries, (q, i) => (
<GridItem span={i === 0 ? 5 : 4} key={q.title}>
Copy link
Member

Choose a reason for hiding this comment

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

any reason for this condition here?

Copy link
Member Author

@vikram-raj vikram-raj Jan 27, 2020

Choose a reason for hiding this comment

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

Yes, as per UX podCount block width is smaller than other block and the first graph block is bigger than others.

@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 29, 2020
Comment on lines 45 to 56
<>
<h5>{title}</h5>
<PrometheusGraphLink query={query}>
<QueryBrowser
hideControls
defaultTimespan={defaultTimespan}
namespace={namespace}
queries={[query]}
isStack
/>
</PrometheusGraphLink>
</>
Copy link
Member

Choose a reason for hiding this comment

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

@vikram-raj can we avoid repetition of PrometheusGraphLink and QueryBrowser and just change isStack to true or false

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.

@invincibleJai
Copy link
Member

/lgtm cancel

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jan 29, 2020
@@ -23,7 +22,7 @@ describe('Monitoring Dashboard graph', () => {

it('should render area graph', () => {
const wrapper = shallow(<MonitoringDashboardGraph {...monitoringDashboardGraphProps} />);
expect(wrapper.find(Area).exists()).toBe(true);
expect(wrapper.find(QueryBrowser).props().isStack).toBe(true);
Copy link
Member

Choose a reason for hiding this comment

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

@vikram-raj can we extend the test to check isStack as well in props for normal series and stacked chart?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @vikram-raj

@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 29, 2020
query={query}
/>
)}
<>
Copy link
Contributor

Choose a reason for hiding this comment

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

unnecessary fragment

Copy link
Member Author

Choose a reason for hiding this comment

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

removed it.

pods?: FirehoseResult<PodKind[]>;
}

export const PodCount: React.FC<PodCountProps> = ({ pods }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm ok with multiple components per file if it's used internally. The idea being that only the default export should ever be consumed elsewhere.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jan 31, 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 Feb 3, 2020
@vikram-raj
Copy link
Member Author

/retitle Bug 1797573: Add pod count on dev-console monitoring dashboard page

@openshift-ci-robot openshift-ci-robot changed the title Add pod count on dev-console monitoring dashboard page Bug 1797573: Add pod count on dev-console monitoring dashboard page Feb 3, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Feb 3, 2020
@openshift-ci-robot
Copy link
Contributor

@vikram-raj: This pull request references Bugzilla bug 1797573, 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.

In response to this:

Bug 1797573: Add pod count on dev-console monitoring dashboard page

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.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 4, 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 Feb 4, 2020
@christianvogt
Copy link
Contributor

/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt, invincibleJai, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a 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 Feb 5, 2020
@vikram-raj
Copy link
Member Author

/test analyze

/test e2e-gcp-console

@openshift-bot
Copy link
Contributor

/retest

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

1 similar comment
@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 21957b5 into openshift:master Feb 5, 2020
@openshift-ci-robot
Copy link
Contributor

@vikram-raj: All pull requests linked via external trackers have merged. Bugzilla bug 1797573 has been moved to the MODIFIED state.

In response to this:

Bug 1797573: Add pod count on dev-console monitoring dashboard page

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.

@vikram-raj vikram-raj deleted the ODC-2835 branch February 5, 2020 08:41
@spadgett spadgett added this to the v4.4 milestone Feb 6, 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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/dev-console Related to dev-console kind/bug Categorizes issue or PR as related to a bug. 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.

7 participants