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
feat add support to move sink for eventSource #4847
feat add support to move sink for eventSource #4847
Conversation
21c3117
to
f37ecef
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.
Looks great @invincibleJai ! LGTM
0bc1cb2
to
d4f377c
Compare
/kind feature |
frontend/packages/knative-plugin/src/components/sink-source/SinkSourceController.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/knative-plugin/src/components/sink-source/__tests__/SinkSourceModal.spec.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/knative-plugin/src/components/sink-source/__tests__/SinkSourceModal.spec.tsx
Outdated
Show resolved
Hide resolved
d4f377c
to
dcf25c8
Compare
}, | ||
}, | ||
}; | ||
const formProps: SinkSourceModalProps = { |
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.
make this common so the other modal component unit test can use this? WDYT?
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 was wondering if we could reuse this formik properities in all other formik wrapped components but not sure if we can keep it as separate utility for reusing.
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.
@sahil143 @karthikjeeyar we can reuse for modal component , any suggested file/location to place it as it could be in different packages as well
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.
have moved it to shared 24331a6
frontend/packages/knative-plugin/src/components/sink-source/__tests__/SinkSourceModal.spec.tsx
Outdated
Show resolved
Hide resolved
<ModalBody> | ||
<p> | ||
Select a sink to move the event source | ||
<strong>{` ${resourceName} `}</strong> |
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.
<strong>{` ${resourceName} `}</strong> | |
<strong>{resourceName}</strong> |
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.
@sahil143 used <strong>{
${resourceName} }</strong>
to add space i.e
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 would also work 😉
<strong> {resourceName} </strong>
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.
Doesn't this work?
Select a sink to move the event source <strong>{resourceName}</strong> to
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.
let me try it
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.
It's working , not sure what i was thinking 🤔
frontend/packages/knative-plugin/src/components/sink-source/__tests__/SinkSource.spec.tsx
Outdated
Show resolved
Hide resolved
}, | ||
}, | ||
}; | ||
const formProps: SinkSourceModalProps = { |
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 was wondering if we could reuse this formik properities in all other formik wrapped components but not sure if we can keep it as separate utility for reusing.
a9528c4
to
24331a6
Compare
frontend/packages/knative-plugin/src/components/sink-source/SinkSource.tsx
Outdated
Show resolved
Hide resolved
24331a6
to
e5fa3cd
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.
/lgtm
verified changes locally
e5fa3cd
to
d418c69
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.
/lgtm
<ModalBody> | ||
<p> | ||
Select a sink to move the event source | ||
<strong>{` ${resourceName} `}</strong> |
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.
Doesn't this work?
Select a sink to move the event source <strong>{resourceName}</strong> to
import SinkSource from './SinkSource'; | ||
|
||
type SinkSourceControllerProps = { | ||
obj: K8sResourceKind; |
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.
Can we be more specific on the prop name. Why not source
? I see this pattern is copied from TrafficSplittingController
;/
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.
updated :)
@invincibleJai I also made this comment but it seems to be buried in the thread somewhere: |
… no chnage in sink
d418c69
to
bd50cc7
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, invincibleJai, sahil143, serenamarie125 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 |
Fixes:
https://issues.redhat.com/browse/ODC-2550
Analysis / Root cause:
User can't change/move Sink for event source through web console
Solution Description:
User can change/move Sink for event source through web console through context menu/action item
Screen shots / Gifs for design review:
cc @serenamarie125
Unit test coverage report:
Browser conformance: