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

feat(Catalog): Add RouteConfiguration related entities #1012

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

lordrip
Copy link
Member

@lordrip lordrip commented Apr 16, 2024

Context

As a prerequisite of #492, we need to add the related entities to the catalog.

This commit adds the following entities:

  • intercept
  • interceptFrom
  • interceptSendToEndpoint
  • onException
  • onCompletion

In addition to that, we also show the entity ID if provided in case there's no description available.

Note

These entities will be available in an upcoming PR when the RouteConfiguration visual entity class is introduced.

relates: #492

@lordrip lordrip requested a review from igarashitm April 16, 2024 09:34
@lordrip lordrip changed the title feat(Catalog): Add RouteConfiguration entities feat(Catalog): Add RouteConfiguration related entities Apr 16, 2024
@lordrip lordrip force-pushed the feat/add-route-configuration-tiles branch from ef2d88a to df8f17b Compare April 16, 2024 10:00
@@ -366,7 +366,7 @@ describe('Camel Route', () => {
const logWhenNode = whenNode?.getChildren()?.[0];
expect(logWhenNode).toBeDefined();
expect(logWhenNode!.data.path).toEqual('from.steps.1.choice.when.0.steps.0.log');
expect(logWhenNode!.getNodeLabel()).toEqual('log');
expect(logWhenNode!.getNodeLabel()).toEqual('log-1');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am baffled by this one....the test label says "should use uri as label" but here it seems we check for an id?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmm, suspicious, I'll check again

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, the test is to check that all nodes are creted properly. This particular expectation is checking the node's label and since this change, for a processor, the label algorithm goes like this:

  1. Description
  2. Id
  3. Component name
      case 'to':
      case 'toD':
        return uriString ?? id ?? camelElementLookup.processorName;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I see. the test description was a bit misleading

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reworked this section to only show IDs as a fallback for entities, like intercept*, errorHandler and onException

As a prerequisite of KaotoIO#492, we
need to add the related entities to the catalog.

This commit adds the following entities:
* intercept
* interceptFrom
* interceptSendToEndpoint
* onException
* onCompletion

In addition to that, we also show the entity ID if provided in case
there's no description available.

relates: KaotoIO#492
@lordrip lordrip force-pushed the feat/add-route-configuration-tiles branch from df8f17b to d42e30d Compare April 16, 2024 11:26
@lordrip lordrip merged commit 1014ed5 into KaotoIO:main Apr 16, 2024
6 checks passed
@lordrip lordrip deleted the feat/add-route-configuration-tiles branch April 16, 2024 12:44
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.

None yet

2 participants