-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: parsed connections from different UMLs between same nodes are a…
…dded as distinct edges (to allow editing)
- Loading branch information
Showing
5 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
samples/output/output.prod_plantuml_2_entities_2uml.end2end.drawio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<mxfile host="drawio-plugin" agent="5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36" modified="2024-01-19T20:10:20.942Z" version="20.5.3" etag="qxKskqLJAw_2JW9f-WZD" type="embed"><diagram id="diagram_1" name="AWS components"><mxGraphModel dx="1615" dy="1865" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="1"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" value="<b>Name</b>: producer-lambda<BR><b>ARN</b>: arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda<BR>-----------<BR><b>CodeSize</b>: 1234<BR><b>Handler</b>: main<BR><b>Layers</b>: 0<BR><b>Memory</b>: 128<BR><b>PackageType</b>: Zip<BR><b>Runtime</b>: go1.x<BR><b>Timeout</b>: 30<BR><b>TracingConfig</b>: {'Mode': 'Active'}<BR><b>Version</b>: $LATEST" style="verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;align=left;pointerEvents=1;shape=mxgraph.aws3.lambda_function;prIcon=server;fillColor=#F58534;gradientColor=none;html=1;" parent="1" vertex="1"><mxGeometry x="-40" y="-202" width="69" height="72" as="geometry"/></mxCell><mxCell id="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" value="<b>Name</b>: consumer-lambda<BR><b>ARN</b>: arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" style="verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;align=left;pointerEvents=1;shape=mxgraph.aws3.lambda_function;prIcon=server;fillColor=#F58534;gradientColor=none;html=1;" parent="1" vertex="1"><mxGeometry x="1470" y="-172" width="69" height="72" as="geometry"/></mxCell><mxCell id="vertex:dynamo:arn:aws:dynamodb:eu-west-1:123456789012:table/table1" value="<b>Name</b>: table1<BR><b>ARN</b>: arn:aws:dynamodb:eu-west-1:123456789012:table/table1" style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.dynamo_db;fillColor=#2E73B8;gradientColor=none;" parent="1" vertex="1"><mxGeometry x="1470" y="80" width="72" height="81" as="geometry"/></mxCell><mxCell id="vertex:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" value="<b>Name</b>: internal<BR><b>ARN</b>: arn:aws:sns:eu-west-1:123456789012:internal.fifo<BR>-----------<BR><b>Owner</b>: 123456789<BR><b>SubscriptionsConfirmed</b>: 3<BR><b>SubscriptionsPending</b>: 0" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=#FF4F8B;gradientDirection=north;fillColor=#BC1356;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;fontSize=12;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.sns;" parent="1" vertex="1"><mxGeometry x="530" y="-470" width="78" height="78" as="geometry"/></mxCell><mxCell id="vertex:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" value="<b>Name</b>: events<BR><b>ARN</b>: arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo<BR>-----------<BR><b>DelaySeconds</b>: 0<BR><b>FifoQueue</b>: TRUE<BR><b>ReceiveMessageWaitTimeSeconds</b>: 0<BR><b>SqsManagedSseEnabled</b>: false<BR><b>VisibilityTimeout</b>: 30" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=#FF4F8B;gradientDirection=north;fillColor=#BC1356;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;fontSize=12;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.sqs;" parent="1" vertex="1"><mxGeometry x="1060" y="-80" width="78" height="78" as="geometry"/></mxCell><mxCell id="vertex:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events2.fifo" value="<b>Name</b>: events2<BR><b>ARN</b>: arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events2.fifo" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=#FF4F8B;gradientDirection=north;fillColor=#BC1356;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;fontSize=12;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.sqs;" parent="1" vertex="1"><mxGeometry x="1060" y="-589" width="78" height="78" as="geometry"/></mxCell><mxCell id="vertex:s3:arn:aws:s3:::bucket_name/key_name" value="<b>Name</b>: key_name<BR><b>ARN</b>: arn:aws:s3:::bucket_name/key_name" style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.bucket_with_objects;fillColor=#E05243;gradientColor=none;" parent="1" vertex="1"><mxGeometry x="550" y="60" width="78" height="78" as="geometry"/></mxCell><mxCell id="edge:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" style="jettySize=auto;html=1;startArrow=none;endArrow=none;" parent="1" source="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" target="vertex:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" edge="2"><mxGeometry as="geometry"/></mxCell><mxCell id="edge:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:s3:arn:aws:s3:::bucket_name/key_name" style="jettySize=auto;html=1;startArrow=none;endArrow=none;" parent="1" source="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" target="vertex:s3:arn:aws:s3:::bucket_name/key_name" edge="2"><mxGeometry as="geometry"/></mxCell><mxCell id="edge:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo:to:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" style="jettySize=auto;html=1;startArrow=none;endArrow=none;" parent="1" source="vertex:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" target="vertex:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" edge="2"><mxGeometry as="geometry"/></mxCell><mxCell id="edge:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo:to:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events2.fifo" style="jettySize=auto;html=1;startArrow=none;endArrow=none;" parent="1" source="vertex:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" target="vertex:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events2.fifo" edge="2"><mxGeometry as="geometry"/></mxCell><mxCell id="edge:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" style="jettySize=auto;html=1;startArrow=none;endArrow=none;" parent="1" source="vertex:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" target="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" edge="2"><mxGeometry as="geometry"/></mxCell><mxCell id="edge:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda:to:dynamo:arn:aws:dynamodb:eu-west-1:123456789012:table/table1" style="jettySize=auto;html=1;startArrow=none;endArrow=none;" parent="1" source="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:consumer-lambda" target="vertex:dynamo:arn:aws:dynamodb:eu-west-1:123456789012:table/table1" edge="2"><mxGeometry as="geometry"/></mxCell><mxCell id="2" value="same_entity_diff_elements" parent="0" visible="0"/><mxCell id="edge_same_entity_diff_elements_1:actor:5991ce42:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" style="jettySize=auto;html=1;orthogonalLoop=1;edgeStyle=orthogonalEdgeStyle;curved=1;startArrow=oval;endArrow=classicThin;dashed=1;strokeColor=#FF3333;strokeWidth=1;fontSize=22;" parent="2" source="vertex:actor:5991ce42" target="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" edge="2"><mxGeometry as="geometry"/></mxCell><mxCell id="label_same_entity_diff_elements_1:actor:5991ce42:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" value="1: Put new file into S3 bucket" style="edgeLabel;html=1;align=left;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;fontColor=#FF3333;fontStyle=0;fontSize=14;" parent="edge_same_entity_diff_elements_1:actor:5991ce42:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" vertex="1" connectable="0"><mxGeometry relative="1" as="geometry"><mxPoint as="offset"/></mxGeometry></mxCell><mxCell id="edge_same_entity_diff_elements_2:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:s3:arn:aws:s3:::bucket_name/key_name" style="jettySize=auto;html=1;orthogonalLoop=1;edgeStyle=orthogonalEdgeStyle;curved=1;startArrow=oval;endArrow=classicThin;dashed=1;strokeColor=#FF3333;strokeWidth=1;fontSize=22;" parent="2" source="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" target="vertex:s3:arn:aws:s3:::bucket_name/key_name" edge="2"><mxGeometry as="geometry"/></mxCell><mxCell id="label_same_entity_diff_elements_2:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:s3:arn:aws:s3:::bucket_name/key_name" value="2: Put new file into S3 bucket" style="edgeLabel;html=1;align=left;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;fontColor=#FF3333;fontStyle=0;fontSize=14;" parent="edge_same_entity_diff_elements_2:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:s3:arn:aws:s3:::bucket_name/key_name" vertex="1" connectable="0"><mxGeometry relative="1" as="geometry"><mxPoint as="offset"/></mxGeometry></mxCell><mxCell id="edge_same_entity_diff_elements_3:actor:5991ce42:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" style="jettySize=auto;html=1;orthogonalLoop=1;edgeStyle=orthogonalEdgeStyle;curved=1;startArrow=oval;endArrow=classicThin;dashed=1;strokeColor=#FF3333;strokeWidth=1;fontSize=22;" parent="2" source="vertex:actor:5991ce42" target="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" edge="2"><mxGeometry as="geometry"/></mxCell><mxCell id="label_same_entity_diff_elements_3:actor:5991ce42:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" value="3: Put new file into S3 bucket" style="edgeLabel;html=1;align=left;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;fontColor=#FF3333;fontStyle=0;fontSize=14;" parent="edge_same_entity_diff_elements_3:actor:5991ce42:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" vertex="1" connectable="0"><mxGeometry relative="1" as="geometry"><mxPoint as="offset"/></mxGeometry></mxCell><mxCell id="edge_same_entity_diff_elements_4:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" style="jettySize=auto;html=1;orthogonalLoop=1;edgeStyle=orthogonalEdgeStyle;curved=1;startArrow=oval;endArrow=classicThin;dashed=1;strokeColor=#FF3333;strokeWidth=1;fontSize=22;" parent="2" source="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" target="vertex:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" edge="2"><mxGeometry as="geometry"/></mxCell><mxCell id="label_same_entity_diff_elements_4:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" value="4: Send Event to SNS that file processing is finished" style="edgeLabel;html=1;align=left;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;fontColor=#FF3333;fontStyle=0;fontSize=14;" parent="edge_same_entity_diff_elements_4:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" vertex="1" connectable="0"><mxGeometry relative="1" as="geometry"><mxPoint as="offset"/></mxGeometry></mxCell><mxCell id="edge_same_entity_diff_elements_5:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo:to:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" style="jettySize=auto;html=1;orthogonalLoop=1;edgeStyle=orthogonalEdgeStyle;curved=1;startArrow=oval;endArrow=classicThin;dashed=1;strokeColor=#FF3333;strokeWidth=1;fontSize=22;" parent="2" source="vertex:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo" target="vertex:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" edge="2"><mxGeometry as="geometry"/></mxCell><mxCell id="label_same_entity_diff_elements_5:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo:to:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" value="5: Fanout Event to SQS" style="edgeLabel;html=1;align=left;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;fontColor=#FF3333;fontStyle=0;fontSize=14;" parent="edge_same_entity_diff_elements_5:sns:arn:aws:sns:eu-west-1:123456789012:internal.fifo:to:sqs:arn:aws:sqs:eu-west-1:123456789012:int-eu-live-events.fifo" vertex="1" connectable="0"><mxGeometry relative="1" as="geometry"><mxPoint as="offset"/></mxGeometry></mxCell><mxCell id="3" value="actors" parent="0"/><mxCell id="vertex:actor:5991ce42" value="<b>Name</b>: Donald" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" parent="3" vertex="1"><mxGeometry x="-560" y="-400" width="30" height="60" as="geometry"/></mxCell><mxCell id="4" value="same_entity_diff_elements2" parent="0"/><mxCell id="edge_same_entity_diff_elements2_1:actor:5991ce42:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" style="jettySize=auto;html=1;orthogonalLoop=1;edgeStyle=orthogonalEdgeStyle;curved=1;startArrow=oval;endArrow=classicThin;dashed=1;strokeColor=#0A0CA4;strokeWidth=1;fontSize=22;" parent="4" source="vertex:actor:5991ce42" target="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" edge="2"><mxGeometry as="geometry"/></mxCell><mxCell id="label_same_entity_diff_elements2_1:actor:5991ce42:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" value="1: Put another file into S3 bucket" style="edgeLabel;html=1;align=left;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;fontColor=#0A0CA4;fontStyle=0;fontSize=14;" parent="edge_same_entity_diff_elements2_1:actor:5991ce42:to:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" vertex="1" connectable="0"><mxGeometry relative="1" as="geometry"><mxPoint as="offset"/></mxGeometry></mxCell><mxCell id="edge_same_entity_diff_elements2_2:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:s3:arn:aws:s3:::bucket_name/key_name" style="jettySize=auto;html=1;orthogonalLoop=1;edgeStyle=orthogonalEdgeStyle;curved=1;startArrow=oval;endArrow=classicThin;dashed=1;strokeColor=#0A0CA4;strokeWidth=1;fontSize=22;" parent="4" source="vertex:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda" target="vertex:s3:arn:aws:s3:::bucket_name/key_name" edge="2"><mxGeometry as="geometry"/></mxCell><mxCell id="label_same_entity_diff_elements2_2:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:s3:arn:aws:s3:::bucket_name/key_name" value="2: Put another file into S3 bucket" style="edgeLabel;html=1;align=left;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=#FFF2CC;fontColor=#0A0CA4;fontStyle=0;fontSize=14;" parent="edge_same_entity_diff_elements2_2:lambda_function:arn:aws:lambda:eu-west-1:123456789012:function:producer-lambda:to:s3:arn:aws:s3:::bucket_name/key_name" vertex="1" connectable="0"><mxGeometry relative="1" as="geometry"><mxPoint as="offset"/></mxGeometry></mxCell></root></mxGraphModel></diagram></mxfile> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
from multicloud_diagrams import MultiCloudDiagrams | ||
from samples.samples.aws_service_end_2_end import prepare_end2end | ||
|
||
|
||
def main(): | ||
mcd = MultiCloudDiagrams() | ||
|
||
prefix = 'prod' | ||
prev_file = f'../output/output.{prefix}_plantuml_2_entities_2uml.end2end.drawio' | ||
|
||
mcd.read_coords_from_file(prev_file) | ||
prepare_end2end(mcd) | ||
|
||
mcd.read_uml_mappings('same_entity_diff_elements.yaml') | ||
label_style = { | ||
'labelBackgroundColor': 'none', | ||
'fontColor': '#FF3333', | ||
'fontStyle': 0, | ||
'fontSize': 14 | ||
} | ||
edge_style = { | ||
'orthogonalLoop': '1', | ||
'edgeStyle': 'orthogonalEdgeStyle', | ||
'curved': '1', | ||
'startArrow': 'oval', | ||
'endArrow': 'classicThin', | ||
'dashed': '1', | ||
'strokeColor': '#FF3333', | ||
'strokeWidth': '1', | ||
'fontSize': '22' | ||
} | ||
label_style2 = { | ||
'labelBackgroundColor': 'none', | ||
'fontColor': '#0A0CA4', | ||
'fontStyle': 0, | ||
'fontSize': 14 | ||
} | ||
edge_style2 = { | ||
'orthogonalLoop': '1', | ||
'edgeStyle': 'orthogonalEdgeStyle', | ||
'curved': '1', | ||
'startArrow': 'oval', | ||
'endArrow': 'classicThin', | ||
'dashed': '1', | ||
'strokeColor': '#0A0CA4', | ||
'strokeWidth': '1', | ||
'fontSize': '22' | ||
} | ||
mcd.read_uml_from_file('same_entity_diff_elements.plantuml', edge_style=edge_style, label_style=label_style) | ||
mcd.read_uml_from_file('same_entity_diff_elements2.plantuml', edge_style=edge_style2, label_style=label_style2) | ||
|
||
mcd.export_to_file(prev_file) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@startuml | ||
actor Donald | ||
participant stage1 | ||
participant S3Bucket | ||
|
||
Donald->>stage1: Put another file into S3 bucket | ||
stage1->>S3Bucket: Put another file into S3 bucket | ||
note left: Single line note on the left | ||
@enduml |