-
Notifications
You must be signed in to change notification settings - Fork 605
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
Conversation
/kind bug |
{pods.loaded ? ( | ||
<h1 className="odc-monitoring-dashboard-pod-count__count">{pods.data.length}</h1> | ||
) : ( | ||
<LoadingInline /> |
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 can we have specs for the conditional branch here?
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.
Adding test for this.
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 Added tests for this. PTAL.
pods?: FirehoseResult<PodKind[]>; | ||
} | ||
|
||
export const PodCount: React.FC<PodCountProps> = ({ pods }) => { |
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 usually have one component per file, will it make sense here as well? I know here MonitoringDasboardPodCount
we just have Firehose
. WDYT?
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 MonitoringDasboardPodCount
just have Firehose
i:e I put it in one file.
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'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}> |
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.
any reason for this condition here?
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, as per UX podCount block width is smaller than other block and the first graph block is bigger than others.
/lgtm |
<> | ||
<h5>{title}</h5> | ||
<PrometheusGraphLink query={query}> | ||
<QueryBrowser | ||
hideControls | ||
defaultTimespan={defaultTimespan} | ||
namespace={namespace} | ||
queries={[query]} | ||
isStack | ||
/> | ||
</PrometheusGraphLink> | ||
</> |
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 can we avoid repetition of PrometheusGraphLink
and QueryBrowser
and just change isStack
to true or false
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.
/lgtm cancel |
@@ -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); |
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 can we extend the test to check isStack
as well in props for normal series and stacked chart?
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.
Here is a test case for render the line graph https://github.com/openshift/console/pull/4072/files#diff-a3f715c19539634ce725a50299562c84R31
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.
Thanks @vikram-raj
/lgtm |
query={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.
unnecessary fragment
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.
removed it.
pods?: FirehoseResult<PodKind[]>; | ||
} | ||
|
||
export const PodCount: React.FC<PodCountProps> = ({ pods }) => { |
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'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.
/lgtm |
/retitle Bug 1797573: Add pod count on dev-console monitoring dashboard page |
@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:
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. |
/lgtm |
/approve |
[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 |
/test analyze /test e2e-gcp-console |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@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:
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. |
Bug fix - https://issues.redhat.com/browse/ODC-2835