/
koa73
/
SEAF2DrawIO
Обзор
Документация
Войти
/
koa73
/
SEAF2DrawIO
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
data/patterns/main.yaml
198 строк
11 KB
oleg
v. 1.1
14 мар 2025, 18:33
14 мар 2025, 18:33
7a20bd1
Код
Авторство
О чём код?
# Переменные {{ id, label, x_pos, y_pos, width, height, style, url }} указываются в двойных {{}} скобках # В одинарных {} скобках указываются переменные в xml заменяемые данными из данных объекта # Связка с родительским объектом осуществляется через параметр parent={<ключ из описания объекта>} # Шаблон с фиксированным значением parent="1" является корневым для данной диаграммы (page) # # x/y - позиция вернего левого угла иконки, h/w - height/width, ext_page - шаблон дополнительной диаграммы # algo - алгоритм размещения элементов по строкам/столбцвм Y+ - по оси Y сверху вниз, X+ - по оси Х слева на право # deep - колличество элементов в строку или столбец до начала новой строки или столбца # # group ID 002 - родительский контейнер для размещения объектов в EXT NET # group ID 003 - родительский контейнер для размещения объектов в Internet # group ID 004 - родительский контейнер для размещения объектов в WAN # group ID 100 - линки # region: xml : > <object id="{{id}}" label="{{label}}"> <mxCell style="swimlane;whiteSpace=wrap;html=1;fillColor=#CCE5FF;" vertex="1" parent="1"> <mxGeometry x="{{x_pos}}" y="{{y_pos}}" width="{{width}}" height="{{height}}" as="geometry" /> </mxCell> </object> schema : 'seaf.ta.services.dc_region' x : 20 y : 30 h : 630 w : 760 offset: 10 algo: 'Y+' deep: 3 az: xml : > <object id="{{id}}" label="{{label}}"> <mxCell style="swimlane;whiteSpace=wrap;html=1;fillColor=#CCFFE6;" vertex="1" parent="{region}"> <mxGeometry x="{{x_pos}}" y="{{y_pos}}" width="{{width}}" height="{{height}}" as="geometry" /> </mxCell> </object> schema : 'seaf.ta.services.dc_az' parent_id: 'region' x : 390 y : 30 h: 260 w : 360 offset: 10 algo: 'Y+' deep: 3 office: xml : > <object id="{{id}}" label="{{label}}"> <mxCell style="shape=mxgraph.cisco.buildings.generic_building;html=1;pointerEvents=1;dashed=0;fillColor=#036897;strokeColor=#ffffff;strokeWidth=2;verticalLabelPosition=bottom;verticalAlign=top;align=center;outlineConnect=0;" vertex="1" parent="{region}"> <mxGeometry x="{{x_pos}}" y="{{y_pos}}" width="{{width}}" height="{{height}}" as="geometry" /> </mxCell> </object> schema : 'seaf.ta.services.office' parent_id: 'region' x : 20 y : 40 h: 60 w : 120 offset: 25 algo: 'Y+' deep: 3 ext_page : > <diagram id="{id}" name="{name}"> <mxGraphModel dx="{width}" dy="{height}" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="1"> <root> <mxCell id="0"/> <mxCell id="1" parent="0"/> <mxCell value="Office" id="001" style="group;strokeColor=default;rounded=0;strokeWidth=1;perimeterSpacing=1;fontColor=none;noLabel=1;" parent="0" vertex="1"> <mxGeometry x="615" y="60" width="1385" height="1060" as="geometry" /> </mxCell> <mxCell value="External Net" id="002" style="group;fontColor=none;noLabel=1;" parent="0" vertex="1"> <mxGeometry x="20" y="60" width="200" height="1060" as="geometry" /> </mxCell> <mxCell id="003" value="INTERNET" style="group;fontColor=none;noLabel=1;" parent="0" vertex="1"> <mxGeometry x="240" y="60" width="160" height="1060" as="geometry" /> </mxCell> <mxCell id="004" value="WAN" style="group;fontColor=none;noLabel=1;" parent="0" vertex="1"> <mxGeometry x="420" y="60" width="160" height="1060" as="geometry" /> </mxCell> <mxCell id="100" value="Links" style="group;fontColor=none;noLabel=1;" parent="0"/> </root> </mxGraphModel> </diagram> dc: xml : > <object id="{{id}}" label="{{label}}"> <mxCell style="shape=mxgraph.cisco.buildings.branch_office;html=1;pointerEvents=1;dashed=0;fillColor=#036897;strokeColor=#ffffff;strokeWidth=2;verticalLabelPosition=bottom;verticalAlign=top;align=center;outlineConnect=0;" vertex="1" parent="{availabilityzone}"> <mxGeometry x="{{x_pos}}" y="{{y_pos}}" width="{{width}}" height="{{height}}" as="geometry" /> </mxCell> </object> schema : 'seaf.ta.services.dc' parent_id: 'availabilityzone' x : 230 y : 30 h : 60 w : 120 offset: 25 algo: 'Y+' deep: 3 ext_page : > <diagram id="{id}" name="{name}"> <mxGraphModel dx="{width}" dy="{height}" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="1"> <root> <mxCell id="0"/> <mxCell id="1" parent="0"/> <mxCell id="01" value="Links" style="group;fontColor=none;noLabel=1;" parent="0"/> <mxCell id="001" value="DC" style="group;strokeColor=default;rounded=0;strokeWidth=1;perimeterSpacing=1;fontColor=none;noLabel=1;" parent="0" vertex="1"> <mxGeometry x="615" y="60" width="1821" height="1400" as="geometry" /> </mxCell> <mxCell value="External Net" id="002" style="group;fontColor=none;noLabel=1;" parent="0" vertex="1"> <mxGeometry x="20" y="60" width="200" height="1400" as="geometry" /> </mxCell> <mxCell id="003" value="INTERNET" style="group;fontColor=none;noLabel=1;" parent="0" vertex="1"> <mxGeometry x="240" y="60" width="160" height="1400" as="geometry" /> </mxCell> <mxCell id="004" value="WAN" style="group;fontColor=none;noLabel=1;" parent="0" vertex="1"> <mxGeometry x="420" y="60" width="160" height="1400" as="geometry" /> </mxCell> <mxCell id="100" value="Links" style="group;fontColor=none;noLabel=1;" parent="0"/> </root> </mxGraphModel> </diagram> segment_internet: xml : > <mxCell id="{{id}}" value="" style="group;noLabel=1;" parent="003" vertex="1"> <mxGeometry x="{{x_pos}}" y="{{y_pos}}" width="{{width}}" height="{{height}}" as="geometry" /> </mxCell> schema: 'seaf.ta.services.network_segment' parent_id: 'location' type: "zone:INTERNET" x: 1 y: 1 w: 1 h: 1 algo: 'none' segment_transport_wan: xml : > <mxCell id="{{id}}" value="" style="group;noLabel=1;" parent="004" vertex="1"> <mxGeometry x="{{x_pos}}" y="{{y_pos}}" width="{{width}}" height="{{height}}" as="geometry" /> </mxCell> schema: 'seaf.ta.services.network_segment' parent_id: 'location' type: "zone:TRANSPORT-WAN" x: 1 y: 1 w: 1 h: 1 algo: 'none' isp: xml : > <mxCell id="{{id}}" value="" style="group;noLabel=1;" parent="{parent_type}" vertex="1"> <mxGeometry x="{{x_pos}}" y="{{y_pos}}" width="{{width}}" height="{{height}}" as="geometry" /> </mxCell> <mxCell id="{{id}}" value="<div style="font-size: 9px;"><font style="font-size: 9px; font-family: Calibri; color: rgb(255, 255, 255); direction: ltr; letter-spacing: 0px; line-height: 120%; opacity: 1;">ISP<br style="font-size: 9px;"></font><font style="font-size: 9px; font-family: Calibri; color: rgb(255, 255, 255); direction: ltr; letter-spacing: 0px; line-height: 120%; opacity: 1;">{title}</font><font style="font-size: 9px; font-family: Calibri; color: rgb(255, 255, 255); direction: ltr; letter-spacing: 0px; line-height: 120%; opacity: 1;"><br style="font-size: 9px;"></font></div>" style="verticalAlign=middle;align=center;vsdxID=5657;fillColor=#612621;gradientColor=none;shape=stencil(nZBLDsIwEENPM1sUMoILlHIBThCRQEaEpErD9/SkNUhVFyy6G9vPGsnETe9N50irvuR0cQ+xxRPvSGuJ3mUp9SJuiZtTyu6c0y1a6M5UUqvRcRad9UBrZfLxIG8Hb7viDWz0ruk+/HsiVYhe376C3gMNEifoL1wE/0EXgrP39RgXwVYSAgad5vMFq4X1uf0A);strokeColor=#6a5628;spacingTop=-2;spacingBottom=-2;spacingLeft=-2;spacingRight=-2;labelBackgroundColor=none;rounded=1;html=1;whiteSpace=wrap;horizontal=1;fontSize=9;" vertex="1" parent="{Group_ID}"> <mxGeometry x="0" y="5" width="66" height="40" as="geometry" /> </mxCell> <object label="" id="{{id}}"> <mxCell style="shape=mxgraph.cisco.routers.router;sketch=0;html=1;pointerEvents=1;dashed=0;fillColor=#036897;strokeColor=#ffffff;strokeWidth=2;verticalLabelPosition=bottom;verticalAlign=top;align=center;outlineConnect=0;labelBackgroundColor=default;fontSize=12;fontColor=#FFFFFF;" vertex="1" parent="{Group_ID}"> <mxGeometry x="60" y="25" width="28" height="22" as="geometry" /> </mxCell> </object> <mxCell id="{{id}}" value="<div style="font-size: 1px"><p style="align:center;margin-left:0;margin-right:0;margin-top:0px;margin-bottom:0px;text-indent:0;valign:middle;direction:ltr;"><font style="font-size: 7.06px; font-family: Calibri; color: rgb(0, 0, 0); direction: ltr; letter-spacing: 0px; line-height: 100%; opacity: 1;"><b>{title} Router</b></font><font style="font-size: 7.06px; font-family: Calibri; color: rgb(0, 0, 0); direction: ltr; letter-spacing: 0px; line-height: 100%; opacity: 1;"><br></font></p></div>" style="verticalAlign=middle;align=center;vsdxID=12895;fillColor=#ffff00;gradientColor=none;fillOpacity=40;shape=stencil(nZBLDoAgDERP0z3SIyjew0SURgSD+Lu9kMZoXLhwN9O+tukAlrNpJg1SzDH4QW/URgNYgZTkjA4UkwJUgGXng+6DX1zLfmoymdXo17xh5zmRJ6Q42BWCfc2oJfdAr+Yv+AP9Cb7OJ3H/2JG1HNGz/84klThPVCc=);strokeColor=none;spacingTop=-3;spacingBottom=-3;spacingLeft=-3;spacingRight=-3;labelBackgroundColor=none;rounded=0;html=1;whiteSpace=wrap;" vertex="1" parent="{Group_ID}"> <mxGeometry x="70" y="45" width="39" height="18" as="geometry" /> </mxCell> schema: 'seaf.ta.services.network' parent_id: 'segment' parent_key: 'zone' type: "type:WAN" deep: 15 offset: 30 x: 10 y: 5 w: 110 h: 60 algo: 'Y+' #--------------------------------------# network_links: xml: > <object id="{id}" label="{label}"> <mxCell style="{style}" edge="1" parent="100" source="{source_id}" target="{target_id}"> <mxGeometry relative="1" as="geometry"/> </mxCell> </object> style: "endArrow=none;edgeStyle=orthogonalEdgeStyle;rounded=0;curved=0;strokeColor=#FF0000;" schema: 'seaf.ta.services.network' parent_id: 'segment' targets: 'location' parent_key: 'location' type: "type:WAN"