-
Notifications
You must be signed in to change notification settings - Fork 26
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(canvas): Add a container for Pipes #1086
Conversation
59091ad
to
53672a9
Compare
packages/camel-catalog/assembly/src/main/resources/schemas/PipeConfiguration.json
Outdated
Show resolved
Hide resolved
packages/camel-catalog/assembly/src/main/resources/schemas/PipeConfiguration.json
Outdated
Show resolved
Hide resolved
...to-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/KaotoCamelCatalogMojo.java
Show resolved
Hide resolved
@@ -48,6 +60,10 @@ export class PipeVisualEntity implements BaseVisualCamelEntity { | |||
getNodeLabel(path?: string): string { | |||
if (!path) return ''; | |||
|
|||
if (path === ROOT_PATH) { | |||
return this.id; |
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.
shouldn't rather this be the name of the Pipe
and fallback to the id
if not present?
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.
We are always assigning the pipe name as id
so will there be any chance of id
being undefined?
As far as I think, pipe name can be update either from the source-code or from the form, both of the cases are handled!
Case 1. When the pipe name gets updated form the Source-code.
Case 2. When the pipe name gets updated from the form
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.
You're right @shivamG640 👍 , let's keep it as it is
packages/ui/src/models/visualization/flows/pipe-visual-entity.ts
Outdated
Show resolved
Hide resolved
Hi, @lordrip |
@@ -70,14 +94,20 @@ export class PipeVisualEntity implements BaseVisualCamelEntity { | |||
} | |||
|
|||
toJSON() { | |||
return this.spec; | |||
return this.pipe.spec; |
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 is a bit strange, here we're just returning the spec
section to be serialized, rather than the entire Pipe
definition.
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 see it now, is the Pipe
resource who serializes the entire object here:
toJSON(): PipeType {
return this.pipe;
}
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 good, thanks for taking care of it @shivamG640.
After merging KaotoIO#1086, Storybook needs to be updated to accomodate for the new `Pipe` constructor
After merging #1086, Storybook needs to be updated to accomodate for the new `Pipe` constructor
Thanks for adding the Stories fix @lordrip |
Fixes: #1031
Description###
Loads container for Pipes.
Loads the Configuration form when a user clicks on the Pipe Container.
Manage the sync between source-code and form.