-
Notifications
You must be signed in to change notification settings - Fork 667
Health and Details card for ceph dashboard #1803
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
Health and Details card for ceph dashboard #1803
Conversation
|
can you please add also a screenshot? |
|
@jelkosz Ack will do that. Fixing lint errors will update them in a while. |
aad5ebd to
60ab862
Compare
7c51f1f to
c5bde2b
Compare
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.
no need for { and <>
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.
| title="version" | |
| title="Version" |
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.
| }, [watchK8sResource, stopWatchK8sResource, watchURL, stopWatchURL]); | |
| }, [watchK8sResource, stopWatchK8sResource]); |
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.
| export const CEPH_ERROR = 'Ceph health is in error state'; | |
| export const CEPH_ERROR = 'Ceph health is in an error state'; |
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.
@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.
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.
no need to export
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.
watchURL and stopWatchURL is never used
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.
this does not seem correct, ocsResponse is not SystemHealth[]
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.
| './components/dashboard-page/storage-dashboard/health-card' /* webpackChunkName: "health-card" */ | |
| './components/dashboard-page/storage-dashboard/health-card' /* webpackChunkName: "storage-health-card" */ |
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.
| './components/dashboard-page/storage-dashboard/details-card' /* webpackChunkName: "details-card" */ | |
| './components/dashboard-page/storage-dashboard/details-card' /* webpackChunkName: "storage-details-card" */ |
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 wouldn't enable storage plugin yet
c5bde2b to
f4c26ce
Compare
|
Is this ready for review? |
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.
Please remove the style, its not supposed to be here. I also need to remove it from Overview's Health card
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 in #1833
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.
@rawagner done
|
/approve |
7528d5c to
bde6e5d
Compare
|
/lgtm |
|
/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. |
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.
Nit: no need for trailing /index, this can be
import { CEPH_HEALTHY, CEPH_DEGRADED, CEPH_ERROR, CEPH_UNKNOWN } from '../../../constants';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.
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.
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.
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).
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'd suggest adding plugin ID to webpackChunkName, e.g. ceph-storage-health-card or similar.
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.
Same as above 😃
b6eb552 to
990d5ec
Compare
e36ca40 to
bb20d3d
Compare
|
@vojtechszocs updated the PR please have a look. |
bb20d3d to
b4d270b
Compare
|
/lgtm |
|
/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. |
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.
nit: we try to keep the imports alphabetized in new code
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.
Why is this an object instead of an array?
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.
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
];|
/retest Please review the full test history for this PR and help us cut down flakes. |
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.
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
];b4d270b to
a75aca3
Compare
|
@spadgett @vojtechszocs Updated the code, please look and thanks for pointing. #1803 (comment)) |
a75aca3 to
ed67bd6
Compare
Signed-off-by: Ankush Behl <cloudbehl@gmail.com>
ed67bd6 to
218e777
Compare
|
/lgtm |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/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. |
|
@cloudbehl: The following test failed, say
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. DetailsInstructions 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. |
Dependent: #1742