kaoto icon indicating copy to clipboard operation
kaoto copied to clipboard

Clarify entities vs. visualEntities

Open igarashitm opened this issue 11 months ago • 2 comments

Please describe the task that needs to be done

Currently CamelRouteResource.getEntities() returns everything other than CamelRouteVisualEntity, which contains other visual entities such as RouteConfiguration

https://github.com/KaotoIO/kaoto/blob/main/packages/ui/src/models/camel/camel-route-resource.ts#L149

It would be better to clarify what getEntities() should return. Having the fact that we also have getVisualEntities() in mind, it would be either

  • All entities, both visual entities and non visual entities
  • Non visual entities

I find it useful if getEntities() would return all entities rather than just non visual entities. In that way it could represent the order of the entities when visual ones and non visual ones are combined.

igarashitm avatar Feb 13 '25 05:02 igarashitm

Clarify:

  • getEntities(): These are non-visible entities, like beans or at some point rest and restConfiguration.
  • getVisualEntities(): Everything that goes rendered in the Canvas

lordrip avatar Mar 04 '25 15:03 lordrip

getEntities should only return non-visible entities, whereas getVisualEntities() should return everything going to the Canvas.

lordrip avatar Mar 04 '25 15:03 lordrip