-
Notifications
You must be signed in to change notification settings - Fork 0
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
Temp: Pass Icon type as a workaround #11
Conversation
return ( | ||
<img | ||
className={props.className} | ||
src={NodeIconResolver.getIcon(props.tile.name)} | ||
src={NodeIconResolver.getIcon(props.tile.name, iconType)} |
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 we successfully determine all icons usage, we could pass the CatalogKind
type directly to the method. Alternatively, if for some reason knowing the processorName
+ componentName
is useful, we could change the API to pass that instead.
@@ -232,7 +232,7 @@ export abstract class AbstractCamelVisualEntity implements BaseVisualCamelEntity | |||
path: ROOT_PATH, | |||
entity: this, | |||
isGroup: true, | |||
icon: NodeIconResolver.getIcon(this.type), | |||
icon: NodeIconResolver.getIcon(this.type, NodeIconType.VisualEntity), |
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 need to first merge the RouteConfiguration PR first, so we have all VisualEntities available to add this extra argument.
const data: CamelRouteVisualEntityData = { | ||
path, | ||
icon: NodeIconResolver.getIcon(CamelComponentSchemaService.getIconName(componentLookup)), | ||
icon: NodeIconResolver.getIcon(CamelComponentSchemaService.getIconName(componentLookup), nodeIconType), |
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 needs further evaluation, as we need to confirm that it works well with Kamelets as well.
switch (type) { | ||
case NodeIconType.Component: | ||
return this.getComponentIcon(elementName) ?? this.getDefaultCamelIcon(); | ||
case NodeIconType.EIP: | ||
return this.getEIPIcon(elementName) ?? this.getDefaultCamelIcon(); | ||
} |
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 this proves to be right, we can remove the rest of the method.
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.
TODO: Check wether the Pipe's icons are correct.
This is a draft PR to illustrate a potential workaround, it shouldn't be merged as-is.
Screenshot