Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

lordrip
Copy link

@lordrip lordrip commented Apr 16, 2024

This is a draft PR to illustrate a potential workaround, it shouldn't be merged as-is.

Screenshot

image

@lordrip lordrip marked this pull request as draft April 16, 2024 20:20
return (
<img
className={props.className}
src={NodeIconResolver.getIcon(props.tile.name)}
src={NodeIconResolver.getIcon(props.tile.name, iconType)}
Copy link
Author

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),
Copy link
Author

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),
Copy link
Author

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.

Comment on lines +149 to +154
switch (type) {
case NodeIconType.Component:
return this.getComponentIcon(elementName) ?? this.getDefaultCamelIcon();
case NodeIconType.EIP:
return this.getEIPIcon(elementName) ?? this.getDefaultCamelIcon();
}
Copy link
Author

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.

Copy link
Author

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.

@lordrip lordrip closed this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant