Skip to content

Conversation

@cloudbehl
Copy link
Contributor

@cloudbehl cloudbehl commented Jun 24, 2019

Dependent: #1742

Screenshot from 2019-06-26 00-45-04

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 24, 2019
@jelkosz
Copy link

jelkosz commented Jun 24, 2019

can you please add also a screenshot?

@cloudbehl cloudbehl changed the title Health and details card for ceph dashboard [WIP] Health and details card for ceph dashboard Jun 24, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 24, 2019
@cloudbehl
Copy link
Contributor Author

@jelkosz Ack will do that. Fixing lint errors will update them in a while.

@cloudbehl cloudbehl force-pushed the health-details-card branch 2 times, most recently from aad5ebd to 60ab862 Compare June 24, 2019 12:56
@spadgett spadgett added this to the v4.2 milestone Jun 24, 2019
@cloudbehl cloudbehl force-pushed the health-details-card branch 3 times, most recently from 7c51f1f to c5bde2b Compare June 25, 2019 19:36
@cloudbehl cloudbehl changed the title [WIP] Health and details card for ceph dashboard Health and Details card for ceph dashboard Jun 25, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 25, 2019
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for { and <>

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
title="version"
title="Version"

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
}, [watchK8sResource, stopWatchK8sResource, watchURL, stopWatchURL]);
}, [watchK8sResource, stopWatchK8sResource]);

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
export const CEPH_ERROR = 'Ceph health is in error state';
export const CEPH_ERROR = 'Ceph health is in an error state';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rawagner Messages are going to change a bit more. I am a discussion with the UX team and will send a separate PR fixing the message.

Copy link
Contributor

Choose a reason for hiding this comment

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

no need to export

Copy link
Contributor

Choose a reason for hiding this comment

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

watchURL and stopWatchURL is never used

Copy link
Contributor

Choose a reason for hiding this comment

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

this does not seem correct, ocsResponse is not SystemHealth[]

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
'./components/dashboard-page/storage-dashboard/health-card' /* webpackChunkName: "health-card" */
'./components/dashboard-page/storage-dashboard/health-card' /* webpackChunkName: "storage-health-card" */

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
'./components/dashboard-page/storage-dashboard/details-card' /* webpackChunkName: "details-card" */
'./components/dashboard-page/storage-dashboard/details-card' /* webpackChunkName: "storage-details-card" */

Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't enable storage plugin yet

@cloudbehl cloudbehl force-pushed the health-details-card branch from c5bde2b to f4c26ce Compare June 26, 2019 06:54
@vojtechszocs
Copy link
Contributor

Is this ready for review?

Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the style, its not supposed to be here. I also need to remove it from Overview's Health card

Copy link
Contributor

Choose a reason for hiding this comment

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

Removed in #1833

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rawagner done

@spadgett
Copy link
Member

/approve
/assign @vojtechszocs

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 26, 2019
@cloudbehl cloudbehl force-pushed the health-details-card branch 2 times, most recently from 7528d5c to bde6e5d Compare July 1, 2019 13:13
@rawagner
Copy link
Contributor

rawagner commented Jul 1, 2019

/lgtm
@vojtechszocs

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 1, 2019
@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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: no need for trailing /index, this can be

import { CEPH_HEALTHY, CEPH_DEGRADED, CEPH_ERROR, CEPH_UNKNOWN } from '../../../constants';

Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed in #1873 (comment), code under packages should converge towards "single default component export per file" convention.

If this was a default export, you wouldn't have to give it an explicit name, i.e.

export default withDashboardResources(HealthCard);

It's up to you.

You can always add packages/ceph-storage-plugin/.eslintrc that extends packages/.eslintrc.js and tweak rules as necessary, although in the long term, all code under packages should converge to the same conventions and rule config.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why not src/components/dashboard-page/storage-dashboard/queries.ts just like in #1732?

export const StorageHealthQueries = {
  CEPH_STATUS_QUERY: 'ceph_health_status',
};

This way, you can co-locate query definitions with the corresponding Dashboard tab (in this case, storage-dashboard).

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest adding plugin ID to webpackChunkName, e.g. ceph-storage-health-card or similar.

Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above 😃

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 2, 2019
@cloudbehl cloudbehl force-pushed the health-details-card branch from b6eb552 to 990d5ec Compare July 3, 2019 03:07
@openshift-ci-robot openshift-ci-robot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 3, 2019
@cloudbehl cloudbehl force-pushed the health-details-card branch 2 times, most recently from e36ca40 to bb20d3d Compare July 3, 2019 11:27
@cloudbehl
Copy link
Contributor Author

@vojtechszocs updated the PR please have a look.

@cloudbehl cloudbehl force-pushed the health-details-card branch from bb20d3d to b4d270b Compare July 8, 2019 09:07
@rawagner
Copy link
Contributor

rawagner commented Jul 8, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 8, 2019
@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.

Copy link
Member

Choose a reason for hiding this comment

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

nit: we try to keep the imports alphabetized in new code

Copy link
Member

Choose a reason for hiding this comment

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

Why is this an object instead of an array?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree with Sam, this should be an array, with individual elements of type CephHealth.

const cephHealthValues: CephHealth[] = [
  {
    state: HealthState.OK,
    message: CEPH_HEALTHY,
  },
  // the rest of values
];

@openshift-bot
Copy link
Contributor

/retest

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree with Sam, this should be an array, with individual elements of type CephHealth.

const cephHealthValues: CephHealth[] = [
  {
    state: HealthState.OK,
    message: CEPH_HEALTHY,
  },
  // the rest of values
];

@cloudbehl cloudbehl force-pushed the health-details-card branch from b4d270b to a75aca3 Compare July 8, 2019 18:20
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 8, 2019
@cloudbehl
Copy link
Contributor Author

@spadgett @vojtechszocs Updated the code, please look and thanks for pointing. #1803 (comment))

@cloudbehl cloudbehl force-pushed the health-details-card branch from a75aca3 to ed67bd6 Compare July 8, 2019 18:26
Signed-off-by: Ankush Behl <cloudbehl@gmail.com>
@cloudbehl cloudbehl force-pushed the health-details-card branch from ed67bd6 to 218e777 Compare July 9, 2019 13:34
@rawagner
Copy link
Contributor

rawagner commented Jul 9, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 9, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cloudbehl, rawagner, spadgett

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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-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 fc53e3c into openshift:master Jul 9, 2019
@openshift-ci-robot
Copy link
Contributor

@cloudbehl: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-aws 218e777 link /test e2e-aws

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

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. I understand the commands that are listed here.

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. 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.

8 participants