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
Bug 1828611: Add events for Noobaa for activity card #5142
Bug 1828611: Add events for Noobaa for activity card #5142
Conversation
|
||
const eventsResource: FirehoseResource = { isList: true, kind: EventModel.kind, prop: 'events' }; | ||
|
||
const isNoobaaEventObject = (event: EventKind): boolean => { | ||
const eventName: string = _.get(event, 'involvedObject.name'); | ||
return _.startsWith(eventName, 'noobaa'); | ||
const component: string = _.get(event, 'source.component'); |
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.
optional chaining is preferred, even for the line below
572af20
to
334680d
Compare
/lgtm |
/retitle Add events for Noobaa for activity card |
/bugzilla refresh |
@afreen23: No Bugzilla bug is referenced in the title of this pull request. In response to this:
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. |
/retest |
/test |
@afreen23: The
Use In response to this:
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. |
/test all |
import { DATA_RESILIENCE_QUERIES } from '../../queries'; | ||
import './activity-card.scss'; | ||
import { NooBaaBackingStoreModel, NooBaaBucketClassModel } from '../../models'; |
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:
Can you fix the order of imports ?
if ( | ||
eventKind === PodModel.kind || | ||
eventKind === StatefulSetModel.kind || | ||
eventKind === NooBaaBackingStoreModel.kind || |
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.
Backing store is a Noobaa entity, isNoobaaEventObject(event)
can be avoided for this.
334680d
to
ee10fd4
Compare
const eventKind: string = event?.involvedObject?.kind; | ||
return ( | ||
_.startsWith(eventName, 'noobaa') || | ||
_.startsWith(component, 'noobaa') || |
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 are we using component
and eventName
both here ?
import { | ||
NooBaaBackingStoreModel, | ||
NooBaaBucketClassModel, | ||
NooBaaObjectBucketClaimModel, | ||
} from '../../models'; |
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.
import { | |
NooBaaBackingStoreModel, | |
NooBaaBucketClassModel, | |
NooBaaObjectBucketClaimModel, | |
} from '../../models'; | |
import { | |
NooBaaBackingStoreModel, | |
NooBaaBucketClassModel, | |
NooBaaObjectBucketClaimModel, | |
} from '../../models'; | |
import './activity-card.scss'; |
f3a07ac
to
5cc5fc4
Compare
const otherNoobaaEvents = (event: EventKind): boolean => { | ||
const eventKind: string = event?.involvedObject?.kind; | ||
return ( | ||
eventKind === NooBaaBackingStoreModel.kind || | ||
eventKind === NooBaaBucketClassModel.kind || | ||
eventKind === NooBaaObjectBucketClaimModel.kind | ||
); | ||
}; | ||
|
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.
const noobaaResources = [ NooBaaBackingStoreModel.kind, NooBaaBucketClassModel.kind , NooBaaObjectBucketClaimModel.kind];
if (otherNoobaaEvents(event)) { | ||
return true; | ||
} | ||
return false; |
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.
if (otherNoobaaEvents(event)) { | |
return true; | |
} | |
return false; | |
return noobaaResources.includes(eventKind) |
/retitle Bug 1828611: Add events for Noobaa for activity card |
@a2batic: This pull request references Bugzilla bug 1828611, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
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. |
5cc5fc4
to
363e8aa
Compare
@a2batic: This pull request references Bugzilla bug 1828611, which is valid. 3 validation(s) were run on this bug
In response to this:
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. |
for Object dashboard activity card Signed-off-by: Kanika <kmurarka@redhat.com>
363e8aa
to
7ba31ac
Compare
/bugzilla refresh |
@afreen23: This pull request references Bugzilla bug 1828611, which is valid. 3 validation(s) were run on this bug
In response to this:
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. |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a2batic, 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 |
@a2batic: All pull requests linked via external trackers have merged: openshift/console#5142. Bugzilla bug 1828611 has been moved to the MODIFIED state. In response to this:
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. |
Add events for Noobaa Backing store, Noobaa Bucket class, OBC and OB for Object dashboard activity card
Fixes: https://issues.redhat.com/browse/RHSTOR-1022
Signed-off-by: Kanika kmurarka@redhat.com
cc: @afreen23