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

Added expand and upgrade activities in persistent storage dashboard #4021

Merged
merged 1 commit into from Jan 22, 2020

Conversation

afreen23
Copy link
Contributor

Upgrade Activity
Screenshot from 2020-01-21 09-37-27

Expand Activity
Screenshot from 2020-01-21 09-38-29

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. component/ceph Related to ceph-storage-plugin labels Jan 21, 2020
import ActivityItem from '@console/shared/src/components/dashboard/activity-card/ActivityItem';
import { K8sResourceKind } from '@console/internal/module/k8s';

export const ClusterExpandActivity: React.FC = () => (
Copy link
Contributor Author

@afreen23 afreen23 Jan 21, 2020

Choose a reason for hiding this comment

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

We can reuse this too, but may be in future we want to modify the look and feel, hence keeping separate

import { SubscriptionState } from '@console/operator-lifecycle-manager';
import { K8sResourceKind } from '@console/internal/module/k8s';

export const isOCSUpgradeActivity = (subscription: K8sResourceKind): boolean => {
Copy link
Contributor

Choose a reason for hiding this comment

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

@andybraren overview dashboard detects upgrade activity for every operator in status card. Do we want to have this as activity in storage dashboard ? Should we, for the future, consider including this to storage cluster status instead of activity ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, to align with the recent change in Cluster Overview the Storage status in the storage dashboard's status card should probably become "Upgrading" in the future (FYI @yuvalgalanti). For now though (if this is merging before Friday) including it as an activity seems okay.

};

export const getOCSSubscription = (subscriptions: FirehoseResult): K8sResourceKind => {
const itemsData: K8sResourceKind[] = _.get(subscriptions, 'data');
Copy link
Contributor

Choose a reason for hiding this comment

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

you can use TS 3.7 optional chaining - applies for all usages of _.get

Copy link
Contributor Author

@afreen23 afreen23 Jan 21, 2020

Choose a reason for hiding this comment

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

I am looking for all instances now, to nail down with the hammer :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot from 2020-01-21 18-29-05

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. component/core Related to console core functionality and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 21, 2020
@afreen23 afreen23 force-pushed the ocs-activity branch 2 times, most recently from e6763bb to 25cf286 Compare January 21, 2020 14:48
frontend/packages/console-app/src/plugin.tsx Outdated Show resolved Hide resolved
if (isClusterExpandActivity(ocsCluster)) {
resourceActivities.push({
resource: ocsCluster,
timestamp: null,
Copy link
Contributor

Choose a reason for hiding this comment

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

you dont have to specify timestamp: null

Copy link
Contributor

Choose a reason for hiding this comment

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

cant you use status.lastUpdated as timestamp ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is not any lastUpdated field in this type of CRD. Only creationtimestamp is present.

Signed-off-by: Afreen Rahman <afrahman@redhat.com>
@rawagner
Copy link
Contributor

/lgtm
/retest

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afreen23, rawagner

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 Jan 22, 2020
@openshift-merge-robot openshift-merge-robot merged commit c62e6ac into openshift:master Jan 22, 2020
@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/ceph Related to ceph-storage-plugin component/core Related to console core functionality 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.

None yet

6 participants