-
-
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.
- Loading branch information
Showing
10 changed files
with
156 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
layout: default | ||
title: Customization | ||
parent: CORE Components | ||
nav_order: 3 | ||
date: 2023-08-16 | ||
--- | ||
|
||
# Customization | ||
{: .d-inline-block } | ||
|
||
New (v0.3.10) | ||
{: .label .label-green } | ||
|
||
|
||
## Code Snippet: | ||
|
||
```python | ||
{% root_include_snippet ../tests/core/test_colors.py color_red%} | ||
``` | ||
|
||
## Rendering: | ||
|
||
![layers](output/jpg/color_red.jpg) | ||
|
||
### Full XML dump: | ||
|
||
```xml | ||
{% root_include docs/core-components/output/drawio/color_red.drawio%} | ||
``` | ||
|
||
### drawio file: | ||
|
||
Download generated ``color_red.drawio``: | ||
|
||
[Download](output/drawio/color_red.drawio){: .btn .btn-purple } | ||
|
||
|
||
## Code Snippet: | ||
|
||
```python | ||
{% root_include_snippet ../tests/core/test_colors.py color_blue%} | ||
``` | ||
|
||
## Rendering: | ||
|
||
![layers](output/jpg/color_blue.jpg) | ||
|
||
### Full XML dump: | ||
|
||
```xml | ||
{% root_include docs/core-components/output/drawio/color_blue.drawio%} | ||
``` | ||
|
||
### drawio file: | ||
|
||
Download generated ``color_blue.drawio``: | ||
|
||
[Download](output/drawio/color_blue.drawio){: .btn .btn-purple } | ||
|
||
|
||
## Code Snippet: | ||
|
||
```python | ||
{% root_include_snippet ../tests/core/test_colors.py color_table%} | ||
``` | ||
|
||
## Rendering: | ||
|
||
![layers](output/jpg/color_table.jpg) | ||
|
||
### Full XML dump: | ||
|
||
```xml | ||
{% root_include docs/core-components/output/drawio/color_table.drawio%} | ||
``` | ||
|
||
### drawio file: | ||
|
||
Download generated ``color_table.drawio``: | ||
|
||
[Download](output/drawio/color_table.drawio){: .btn .btn-purple } | ||
|
||
|
||
|
||
|
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="multicloud-diagrams" agent="PIP package multicloud-diagrams. Generate resources in draw.io compatible format for Cloud infrastructure. Copyrights @ Roman Tsypuk 2023. MIT license." type="MultiCloud"><diagram id="diagram_1" name="AWS components"><mxGraphModel dx="1015" dy="661" 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:prod-lambda-name" value="<b>Name</b>: prod-lambda-name<BR><b>ARN</b>: arn:aws:lambda:eu-west-1:123456789012:function:prod-lambda-name" style="verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;align=left;pointerEvents=1;shape=mxgraph.aws3.lambda_function;prIcon=server;fillColor=#0000FF;gradientColor=none;html=1;" parent="1" vertex="1"><mxGeometry width="69" height="72" as="geometry" /></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 @@ | ||
<mxfile host="multicloud-diagrams" agent="PIP package multicloud-diagrams. Generate resources in draw.io compatible format for Cloud infrastructure. Copyrights @ Roman Tsypuk 2023. MIT license." type="MultiCloud"><diagram id="diagram_1" name="AWS components"><mxGraphModel dx="1015" dy="661" 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:prod-lambda-name" value="<b>Name</b>: prod-lambda-name<BR><b>ARN</b>: arn:aws:lambda:eu-west-1:123456789012:function:prod-lambda-name" style="verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;align=left;pointerEvents=1;shape=mxgraph.aws3.lambda_function;prIcon=server;fillColor=#FF0000;gradientColor=none;html=1;" parent="1" vertex="1"><mxGeometry width="69" height="72" as="geometry" /></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 @@ | ||
<mxfile host="multicloud-diagrams" agent="PIP package multicloud-diagrams. Generate resources in draw.io compatible format for Cloud infrastructure. Copyrights @ Roman Tsypuk 2023. MIT license." type="MultiCloud"><diagram id="diagram_1" name="AWS components"><mxGraphModel dx="1015" dy="661" 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:LSI:users_to_model-users-idx:list" value="<b>LSI:users_to_model-users-idx</b>" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;fillColor=#FF9933;" parent="1" vertex="1"><mxGeometry width="300" height="120" as="geometry" /></mxCell><mxCell id="vertex:LSI:users_to_model-users-idx:row:0" value="IndexName" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="vertex:LSI:users_to_model-users-idx:list" vertex="1"><mxGeometry width="300" height="30" y="30" as="geometry" /></mxCell><mxCell id="vertex:LSI:users_to_model-users-idx:row:1" value="IndexSizeBytes" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="vertex:LSI:users_to_model-users-idx:list" vertex="1"><mxGeometry width="300" height="30" y="60" as="geometry" /></mxCell><mxCell id="vertex:LSI:users_to_model-users-idx:row:2" value="IndexStatus" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="vertex:LSI:users_to_model-users-idx:list" vertex="1"><mxGeometry width="300" height="30" y="90" as="geometry" /></mxCell></root></mxGraphModel></diagram></mxfile> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,59 @@ | ||
from multicloud_diagrams import MultiCloudDiagrams | ||
from utils.templating import TestRendering | ||
|
||
|
||
class TestCoreVertexInIsolation(TestRendering): | ||
|
||
def test_color_red(self): | ||
# docs | ||
self.node_type = 'color_red' | ||
|
||
# given | ||
mcd = MultiCloudDiagrams() | ||
|
||
# when | ||
mcd.add_vertex(node_id="arn:aws:lambda:eu-west-1:123456789012:function:prod-lambda-name", | ||
node_name='prod-lambda-name', | ||
node_type='lambda_function', | ||
fill_color='#FF0000') | ||
|
||
# then | ||
# docs | ||
self.mcd = mcd | ||
|
||
def test_color_blue(self): | ||
# docs | ||
self.node_type = 'color_blue' | ||
|
||
# given | ||
mcd = MultiCloudDiagrams() | ||
|
||
# when | ||
mcd.add_vertex(node_id="arn:aws:lambda:eu-west-1:123456789012:function:prod-lambda-name", | ||
node_name='prod-lambda-name', | ||
node_type='lambda_function', | ||
fill_color='#0000FF') | ||
|
||
# then | ||
# docs | ||
self.mcd = mcd | ||
|
||
def test_color_table(self): | ||
# docs | ||
self.node_type = 'color_table' | ||
|
||
# given | ||
mcd = MultiCloudDiagrams() | ||
|
||
# when | ||
rows = [ | ||
'IndexName', | ||
'IndexSizeBytes', | ||
'IndexStatus', | ||
] | ||
|
||
mcd.add_list(table_name='LSI:users_to_model-users-idx', rows=rows, fill_color='#FF9933;') | ||
|
||
# then | ||
# docs | ||
self.mcd = mcd |
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
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