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

Fix(canvas): Display multicast/loadbalance as parallel executed processes #1431

Merged
merged 4 commits into from
Sep 17, 2024

Conversation

shivamG640
Copy link
Contributor

@shivamG640 shivamG640 commented Sep 11, 2024

Fixes #1347
Fixes #648

Test this change here.

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@06ecb09). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1431   +/-   ##
=======================================
  Coverage        ?   67.71%           
  Complexity      ?       25           
=======================================
  Files           ?      269           
  Lines           ?     7644           
  Branches        ?     1520           
=======================================
  Hits            ?     5176           
  Misses          ?     2408           
  Partials        ?       60           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lhein
Copy link
Contributor

lhein commented Sep 12, 2024

grafik

@shivamG640 shivamG640 force-pushed the Fix_1347 branch 4 times, most recently from b177c11 to 178ab52 Compare September 12, 2024 13:39
@shivamG640 shivamG640 marked this pull request as ready for review September 12, 2024 13:44
@lhein
Copy link
Contributor

lhein commented Sep 13, 2024

I am wondering if the quality check makes sense for test classes in this specific case.

packages/ui/src/models/visualization/base-visual-entity.ts Outdated Show resolved Hide resolved
expect(vizNode).toBeDefined();
expect(vizNode.data).toMatchObject({
path,
icon: expect.any(String),
Copy link
Member

Choose a reason for hiding this comment

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

good idea 👍

@shivamG640 shivamG640 force-pushed the Fix_1347 branch 2 times, most recently from a7e8297 to 2596938 Compare September 16, 2024 14:27
@shivamG640 shivamG640 requested a review from lordrip September 16, 2024 14:47
Comment on lines 54 to 62
addNodeInteraction(vizNode: IVisualizationNode, processorName: keyof ProcessorDefinition): void {
const stepsProperties = CamelComponentSchemaService.getProcessorStepsProperties(processorName);
const canHaveChildren = stepsProperties.find((property) => property.type === 'branch') !== undefined;
const canHaveSpecialChildren = Object.keys(stepsProperties).length > 1;
const canReplaceStep = CamelComponentSchemaService.canReplaceStep(processorName);
const canRemoveStep = !CamelComponentSchemaService.DISABLED_REMOVE_STEPS.includes(processorName);
const canBeDisabled = CamelComponentSchemaService.canBeDisabled(processorName);

vizNode.setNodeInteraction({
canHavePreviousStep: false,
canHaveNextStep: false,
canRemoveFlow: false,
canHaveChildren,
canHaveSpecialChildren,
canReplaceStep,
canRemoveStep,
canBeDisabled,
});
}
Copy link
Member

Choose a reason for hiding this comment

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

This also seems very similar to the abstract-camel-visual-entity counterpart.

Copy link
Member

Choose a reason for hiding this comment

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

We can take care of this in another PR, so we can also remove the other duplication from other visual entities as well.

Copy link
Contributor Author

@shivamG640 shivamG640 Sep 17, 2024

Choose a reason for hiding this comment

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

Created a task for this- #1445

@shivamG640 shivamG640 force-pushed the Fix_1347 branch 3 times, most recently from 0552f29 to d3dea74 Compare September 16, 2024 20:35
Copy link
Member

@lordrip lordrip left a comment

Choose a reason for hiding this comment

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

Thanks for handling the feedback 👍 , LGTM

Copy link

sonarcloud bot commented Sep 17, 2024

@lordrip lordrip merged commit 9b7cd80 into KaotoIO:main Sep 17, 2024
12 checks passed
@shivamG640 shivamG640 deleted the Fix_1347 branch September 17, 2024 09:24
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.

Display multicast children as parallel executed processes LoadBalancer steps shown in canvas in linear way
3 participants