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

Fix the time selection dropdown issue for the ceph RBD snapshot graph in DR dashboard #935

Conversation

TimothyAsirJeyasing
Copy link
Contributor

@TimothyAsirJeyasing TimothyAsirJeyasing commented Jul 25, 2023

Comment on lines 148 to 163
<GridItem
lg={10}
rowSpan={1}
sm={12}
className="pf-u-font-weight-bold pf-c-title pf-m-lg"
>
{t('Utilization')}
</GridItem>
<GridItem
lg={2}
rowSpan={1}
sm={12}
className="mco-dashboard__contentRow mco-cluster-app__contentRow--flexEnd"
>
<UtilizationDurationDropdown />
</GridItem>
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
lg={10}
rowSpan={1}
sm={12}
className="pf-u-font-weight-bold pf-c-title pf-m-lg"
>
{t('Utilization')}
</GridItem>
<GridItem
lg={2}
rowSpan={1}
sm={12}
className="mco-dashboard__contentRow mco-cluster-app__contentRow--flexEnd"
>
<UtilizationDurationDropdown />
</GridItem>

Copy link
Contributor

Choose a reason for hiding this comment

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

My suggestion is to create a new Component called UtilizationCard, call dropdown component, and other utilization-related components like SnapshotUtilizationCard. Call only UtilizationCard from here remove all other components

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@GowthamShanmugam
Copy link
Contributor

GowthamShanmugam commented Jul 25, 2023

Your PR title is long and broken, also to link the BZ use format (Bug BZ_ID: PR title)

@SanjalKatiyar
Copy link
Collaborator

plz fix commit title length...

@SanjalKatiyar
Copy link
Collaborator

/retitle Bug 2223705: Fix the time selection dropdown issue for the ceph RBD snapshot graph in DR dashboard

@openshift-ci openshift-ci bot changed the title Bug: 2223705 Fix the time selection dropdown issue at ceph RBD snapsh… Bug 2223705: Fix the time selection dropdown issue for the ceph RBD snapshot graph in DR dashboard Jul 27, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 27, 2023

@TimothyAsirJeyasing: This pull request references Bugzilla bug 2223705, which is valid.

No validations were run on this bug

Requesting review from QA contact:
/cc @PrasadDesala

In response to this:

Bug 2223705: Fix the time selection dropdown issue for the ceph RBD snapshot graph in DR dashboard

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
Copy link
Contributor

openshift-ci bot commented Jul 27, 2023

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: PrasadDesala.

Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@TimothyAsirJeyasing: This pull request references Bugzilla bug 2223705, which is valid.

No validations were run on this bug

Requesting review from QA contact:
/cc @PrasadDesala

In response to this:

Bug 2223705: Fix the time selection dropdown issue for the ceph RBD snapshot graph in DR dashboard

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.

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.

@TimothyAsirJeyasing
Copy link
Contributor Author

Screenshot from 2023-07-28 13-58-38

@@ -318,6 +307,51 @@ export const ClusterAppCard: React.FC = () => {
);
};

const UtilizationCard: React.FC<UtilizationCardProps> = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Move this inside cluster.tsx

Copy link
Contributor Author

@TimothyAsirJeyasing TimothyAsirJeyasing Jul 28, 2023

Choose a reason for hiding this comment

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

Ok, if that is the case, shall i move the content of SnapshotUtilizationCard into UtilizationCard. Because the SnapshotUtilizationCard component is only used within the UtilizationCard component and doesn't have any additional reusability across the application, So shall i consider merging the logic of SnapshotUtilizationCard directly into UtilizationCard. Feeling like it can lead to a simpler component structure and reduce the number of components. ?

Copy link
Contributor

Choose a reason for hiding this comment

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

UtilizationCard is a common one, SnapshotUtilizationCard is a DR specific. It will be used only inside DRCard.

const { t } = useCustomTranslation();

return (
<Grid hasGutter>
Copy link
Contributor

Choose a reason for hiding this comment

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

don't use a grid or GridItem here use CSS to maintain a space between graphs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

sm={12}
className="mco-dashboard__contentRow mco-cluster-app__contentRow--flexEnd"
>
<UtilizationDurationDropdown />
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will do that

Comment on lines 368 to 371
type UtilizationCardProps = {
clusterName: string;
peerClusters: string[];
};
Copy link
Contributor

Choose a reason for hiding this comment

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

movie this also inside cluster.tsx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

"Current value: ": "Current value: ",
"Max value: ": "Max value: ",
"Min value: ": "Min value: ",
"Utlization": "Utlization",
Copy link
Contributor

Choose a reason for hiding this comment

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

type Utlization => Utilization

CustomUtilizationSummary,
}) => {
return (
<>
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
<>

showLegend
CustomUtilizationSummary={CustomUtilizationSummary}
/>
</>
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
</>

component={TextVariants.h3}
className="mco-cluster-app__contentRow--flexStart"
>
{t('Utlization')}
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
{t('Utlization')}
{t('Utilization')}

hideHorizontalBorder
showLegend
</div>
<div style={{ marginBottom: '20px' }}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't use any style property directly. Also, use only PF global values.

Copy link
Contributor Author

@TimothyAsirJeyasing TimothyAsirJeyasing Jul 31, 2023

Choose a reason for hiding this comment

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

pf-m-spacer-* classes in PatternFly are not working for adding vertical spacing between elements. Worked only for components like buttons, form elements, and some others. So shall i use css to deal this ?

Copy link
Contributor

Choose a reason for hiding this comment

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

you need to use a class from CSS and PF global variable works for vertical spacing, there is lot of reference in other places

Comment on lines +405 to +420
clusterName: string;
peerClusters: string[];
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
clusterName: string;
peerClusters: string[];
peerClusters: string[];

use only peerClusters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need the selected cluster name for the Replication throughput ...

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 pass the clusterName inside peerClusters array and fetch from it

@SanjalKatiyar
Copy link
Collaborator

shorten commit title and fix build tests...

humanizeValue={humanizeDecimalBytesPerSec}
CustomUtilizationSummary={CustomUtilizationSummary}
/>
<UtilizationCard peerClusters={[...peerClusters, clusterName]} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Peer cluster is already has current cluster name, why we need to pass again?

Copy link
Contributor

@GowthamShanmugam GowthamShanmugam Aug 3, 2023

Choose a reason for hiding this comment

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

ok, so you need the current cluster for the throughput graph, ok the pass is as different argument. I think the old code was fine

@@ -41,6 +41,10 @@
height: auto;
}

.mco-cluster-app__space-between {
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
.mco-cluster-app__space-between {
.mco-cluster-app__graph--margin-top {

@@ -41,6 +41,10 @@
height: auto;
}

.mco-cluster-app__space-between {
margin-top: 20px;
Copy link
Contributor

Choose a reason for hiding this comment

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

use --pf-global--spacer

@TimothyAsirJeyasing
Copy link
Contributor Author

/test odf-console-e2e-aws

@SanjalKatiyar
Copy link
Collaborator

shorten commit title and fix build tests...

cc @TimothyAsirJeyasing

@GowthamShanmugam
Copy link
Contributor

/cherry-pick release-4.14

@openshift-cherrypick-robot

@GowthamShanmugam: once the present PR merges, I will cherry-pick it on top of release-4.14 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.14

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.

@GowthamShanmugam
Copy link
Contributor

/retitle Fix the time selection dropdown issue for the ceph RBD snapshot graph in DR dashboard

@openshift-ci openshift-ci bot changed the title Bug 2223705: Fix the time selection dropdown issue for the ceph RBD snapshot graph in DR dashboard Fix the time selection dropdown issue for the ceph RBD snapshot graph in DR dashboard Aug 8, 2023
@GowthamShanmugam
Copy link
Contributor

/cherry-pick release-4.14-compatibility

@openshift-cherrypick-robot

@GowthamShanmugam: once the present PR merges, I will cherry-pick it on top of release-4.14-compatibility in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.14-compatibility

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.

@SanjalKatiyar
Copy link
Collaborator

/lgtm cancel
fix MCs and commit (as mentioned above)...

<UtilizationDurationDropdown />
</div>
</div>
<div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need div here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am using this for css class

humanizeValue={humanizeNumber}
/>
</div>
<div className="mco-cluster-app__graph--margin-top">
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of top use margin-below and use this class name in both SnapshotUtilizationCard div

Copy link
Contributor Author

@TimothyAsirJeyasing TimothyAsirJeyasing Aug 11, 2023

Choose a reason for hiding this comment

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

Ok

@openshift-ci openshift-ci bot added the lgtm label Aug 14, 2023
@@ -41,6 +41,10 @@
height: auto;
}

.mco-cluster-app__graph--margin-below {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
.mco-cluster-app__graph--margin-below {
.mco-cluster-app__graph--margin-bottom {

@openshift-ci openshift-ci bot added the lgtm label Aug 21, 2023
@SanjalKatiyar
Copy link
Collaborator

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 21, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: GowthamShanmugam, SanjalKatiyar, TimothyAsirJeyasing

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

@SanjalKatiyar
Copy link
Collaborator

/cherry-pick release-4.14

@openshift-cherrypick-robot

@SanjalKatiyar: once the present PR merges, I will cherry-pick it on top of release-4.14 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.14

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.

@SanjalKatiyar
Copy link
Collaborator

/cherry-pick release-4.14-compatibility

@openshift-cherrypick-robot

@SanjalKatiyar: once the present PR merges, I will cherry-pick it on top of release-4.14-compatibility in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.14-compatibility

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-merge-robot openshift-merge-robot merged commit 559babd into red-hat-storage:master Aug 21, 2023
3 checks passed
@openshift-cherrypick-robot

@GowthamShanmugam: new pull request created: #976

In response to this:

/cherry-pick release-4.14

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-cherrypick-robot

@GowthamShanmugam: new pull request created: #977

In response to this:

/cherry-pick release-4.14-compatibility

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants