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

Add Jobs, CronJobs, and standalone Pods to topology view #5818

Merged

Conversation

jeff-phillips-18
Copy link
Member

Fixes:
https://issues.redhat.com/browse/ODC-4045
https://issues.redhat.com/browse/ODC-4047
https://issues.redhat.com/browse/ODC-4048
https://issues.redhat.com/browse/ODC-4051
https://issues.redhat.com/browse/ODC-4052

Description:
As a Developer, I want to be able to see any workload type in the topology/list view so I can better get a view of all of the computing resources being used. This adds Jobs, CronJobs, Pods.

Screen shots / Gifs for design review:

Topology View:

image

Job Side Panel:

image

image

CronJob Side Panel:

image

image

Pod Side Panel:

image

image

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

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

/kind feature

@openshift-ci-robot openshift-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. component/core Related to console core functionality labels Jun 24, 2020
@openshift-ci-robot openshift-ci-robot added component/dev-console Related to dev-console component/shared Related to console-shared labels Jun 24, 2020
@bgliwa01
Copy link

@jeff-phillips-18 can we add a pod donut on the details page of the standalone pods please?
cc @beaumorley @serenamarie125

@jeff-phillips-18
Copy link
Member Author

@bgliwa01 Added the Pod donut to the pod details page:

image

@serenamarie125
Copy link
Contributor

I don't think we discussed this during Epic Exploration or Design ... I'm curious, should we NOT show Jobs with Completed status in Topology @jeff-phillips-18 @bgliwa01 @sspeiche @spadgett ?

@jeff-phillips-18
Copy link
Member Author

@serenamarie125 Jobs get cleaned up based on the spec.successfulJobsHistoryLimit and spec.failedJobsHistoryLimit so I don't think we provide any further limitations in the UI.

@jeff-phillips-18
Copy link
Member Author

/retest

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.

Nice work @jeff-phillips-18!
LGTM

Copy link

@bgliwa01 bgliwa01 left a comment

Choose a reason for hiding this comment

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

looks good!

Comment on lines 13 to 14
}) => {
return (
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 do implicit return

import { ResourceOverviewDetails } from './resource-overview-details';
import { PodsOverview } from './pods-overview';

const JobOverviewDetails: React.SFC<JobOverviewDetailsProps> = ({
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const JobOverviewDetails: React.SFC<JobOverviewDetailsProps> = ({
const JobOverviewDetails: React.FC<JobOverviewDetailsProps> = ({

<DetailsItem label="Desired Completions" obj={job} path="spec.completions" />
<DetailsItem label="Parallelism" obj={job} path="spec.parallelism" />
<DetailsItem label="Active Deadline Seconds" obj={job} path="spec.activeDeadlineSeconds">
{job.spec.activeDeadlineSeconds
Copy link
Member

Choose a reason for hiding this comment

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

will it be good to have a check ?

Suggested change
{job.spec.activeDeadlineSeconds
{job?.spec?.activeDeadlineSeconds

@@ -0,0 +1,99 @@
import * as _ from 'lodash-es';
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
import * as _ from 'lodash-es';
import * as _ from 'lodash';

Comment on lines 194 to 195
currentPodCount = pods.length;
title = `${currentPodCount}`;
subTitle = podKindString(currentPodCount);
return {
title,
subTitle,
titleComponent: getTitleComponent(),
};
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 it as below or currentPodCount being used at other place?

Suggested change
currentPodCount = pods.length;
title = `${currentPodCount}`;
subTitle = podKindString(currentPodCount);
return {
title,
subTitle,
titleComponent: getTitleComponent(),
};
return {
title : pods.length,
subTitle: podKindString(currentPodCount),
titleComponent: getTitleComponent(),
};

Copy link
Member Author

Choose a reason for hiding this comment

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

It has to be a string or a zero value will be ignored (there is a check for !title in the underlying components).

item: OverviewItem<CronJobKind>;
};

export type CronJobResourcesTabProps = {
Copy link
Member

Choose a reason for hiding this comment

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

nit: do we need to export it?

</div>
);

export const CronJobResourcesTab: React.SFC<CronJobResourcesTabProps> = ({ item }) => {
Copy link
Member

Choose a reason for hiding this comment

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

nit: do we need to export it ?

@invincibleJai
Copy link
Member

invincibleJai commented Jun 30, 2020

Verified locally seems to work as mentioned . can see Jobs, CronJobs, and standalone Pods to topology view along with associated Sidebar

Looks good cc @christianvogt

@invincibleJai
Copy link
Member

/lgtm

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

/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bgliwa01, christianvogt, invincibleJai, jeff-phillips-18, serenamarie125

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 Jul 6, 2020
@openshift-merge-robot openshift-merge-robot merged commit a8b3a22 into openshift:master Jul 6, 2020
@spadgett spadgett added this to the v4.6 milestone Jul 8, 2020
@jeff-phillips-18 jeff-phillips-18 deleted the all-workloads branch December 2, 2020 13:34
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/core Related to console core functionality component/dev-console Related to dev-console component/shared Related to console-shared kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants