<!--Copyright STACKEO - INRIA 2020 .-->
<mxGraphModel dx="1336" dy="801" 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="0">
  <root>
    <mxCell id="0" />
    <mxCell id="1" parent="0" />
    {% for Tier in DrawIO.tiers %}
      <mxCell id="{{Tier.ids[0]}}" value="" style="group" vertex="1" connectable="0" parent="1">
        <mxGeometry x="{{Tier.position[0]}}" y="{{Tier.position[1]}}" width="{{Tier.dimension[0]}}" height="{{Tier.dimension[1]}}" as="geometry" />
      </mxCell>
      <mxCell id="{{Tier.ids[1]}}" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#CCCCCC;strokeColor=#EBEBEB;fontColor=#333333;" parent="{{Tier.ids[0]}}" vertex="1">
        <mxGeometry width="{{Tier.dimension[0]}}" height="{{Tier.dimension[1]}}" as="geometry" />
      </mxCell>
      <object label="" id="{{Tier.ids[2]}}" Type="label">
        <mxCell style="group;fontFamily=Comic Sans MS;fontColor=#FFF11F;" parent="{{Tier.ids[0]}}" vertex="1" connectable="0">
          <mxGeometry width="{{Tier.dimension[0]}}" height="60" as="geometry" />
        </mxCell>
      </object>
      <object label="{{Tier.name}}"   Type="Tier" id="{{Tier.ids[3]}}">
        <mxCell style="rounded=1;whiteSpace=wrap;html=1;arcSize=0;fillColor=#195190FF;strokeColor=#6c8ebf;fontFamily=Comic Sans MS;fontSize=22;fontColor=#FFFFFF;" parent="{{Tier.ids[2]}}" vertex="1">
          <mxGeometry width="{{Tier.dimension[0]}}" height="60" as="geometry" />
        </mxCell>
      </object>
      {% for Node in Tier.nodes %}
      <object label="{{Node.name}}" Type="{{Node.type}}" Tier="{{Tier.ids[3]}}" id="{{Node.ids[0]}}">
        <mxCell  style="group;align=left;labelBackgroundColor=none;fillColor=none;fontSize=11;fontColor=#000000;rounded=1;" vertex="1" connectable="0" parent="{{Tier.ids[0]}}">
          <mxGeometry x="{{Node.position[0]}}" y="{{Node.position[1]}}" width="{{Node.dimension[0]}}" height="{{Node.dimension[1]}}" as="geometry" />
        </mxCell>
      </object>
    <mxCell id="{{Node.ids[1]}}" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="{{Node.ids[0]}}" vertex="1">
      <mxGeometry width="{{Node.dimension[0]}}" height="{{Node.dimension[1]}}" as="geometry" />
    </mxCell>
    <mxCell id="{{Node.ids[2]}}" value="{{Node.name}}" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;labelBackgroundColor=none;fontSize=13;fontColor=#000000;" parent="{{Node.ids[0]}}" vertex="1">
      <mxGeometry x="5" y="1" width="100" height="20" as="geometry" />
    </mxCell>

    {% for Layer in Node.layers %}
    <mxCell id="{{Layer.ids[1]}}" value="" style="group;labelBackgroundColor=#FF99CC;fillColor=#{{Layer.colors[0]}};strokeColor=#{{Layer.colors[1]}};" parent="{{Node.ids[0]}}" vertex="1" connectable="0">
      <mxGeometry x="{{Layer.position[0]}}" y="{{Layer.position[1]}}" width="{{Layer.dimension[0]}}" height="{{Layer.dimension[1]}}" as="geometry" />
    </mxCell>
    <object label="" Type="{{Layer.type}}layerElement" id="{{Layer.ids[0]}}" Node="{{Node.ids[0]}}" Hub="{{Layer.hub}}">
      <mxCell style="rounded=0;whiteSpace=wrap;html=1;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fillColor=#{{Layer.colors[0]}};strokeColor=#{{Layer.colors[1]}};" parent="{{Layer.ids[1]}}" vertex="1">
        <mxGeometry width="{{Layer.dimension[0]}}" height="{{Layer.dimension[1]}}" as="geometry" />
      </mxCell>
    </object>
    <mxCell id="{{Layer.ids[2]}}" value="{{Layer.type}}" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontStyle=2;fontColor=#B3B3B3;fontSize=11;" parent="{{Layer.ids[1]}}" vertex="1">
      <mxGeometry x="139" width="40" height="20" as="geometry" />
    </mxCell>
    {% if  not Layer.hub %}
    {% for Component in Layer.components %}

      <object label="{{Component.name}}" Type="Component" id="{{Component.id}}" Layer="{{Layer.ids[0]}}">
      <mxCell style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fontSize=11;align=center;" vertex="1" parent="{{Layer.ids[1]}}">
        <mxGeometry x="54.94736842105263" width="{{Component.dimension[0]}}" height="{{Component.dimension[1]}}" as="geometry" />
      </mxCell>
    </object>
    {% endfor %}
    {% else %}
    {% for Component in Layer.components %}
      {% if Component.type=='Hardware' %}
      <object label="" Type="PhysicalComponent" id="{{Component.id}}">
      <mxCell style="group;strokeWidth=1;fillColor=none;fontColor=none;" vertex="1" connectable="0" parent="{{Layer.ids[3]}}">
        <mxGeometry x="{{Component.position[0]}}" width="{{Component.dimension[0]}}" height="{{Component.dimension[1]}}" as="geometry" />
      </mxCell>
    </object>
    <mxCell id="{{Component.id}}1" value="" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1;" vertex="1" parent="{{Component.id}}">
      <mxGeometry x="2.9165384615384653" width="90" height="25" as="geometry" />
    </mxCell>
    <mxCell id="{{Component.id}}2" value="{{Component.name}}" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1;verticalAlign=middle;" vertex="1" parent="{{Component.id}}">
      <mxGeometry x="4.9581153846153825" y="2.2999999999999545" width="86" height="20.5" as="geometry" />
    </mxCell>
    <mxCell id="{{Component.id}}3" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#000000;" vertex="1" parent="{{Component.id}}">
      <mxGeometry x="7" y="4.559999999999945" width="2" height="2" as="geometry" />
    </mxCell>
    {% for i in range(7) %}
    <mxCell id="{{Component.id}}{{4+i}}" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#000000;" vertex="1" parent="{{Component.id}}">
      <mxGeometry x="92.91346153846153" y="{{1.6666666666666288+i*3}}" width="2.916538461538462" height="0.7844016136261763" as="geometry" />
    </mxCell>

    <mxCell id="{{Component.id}}{{i+11}}" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#000000;" vertex="1" parent="{{Component.id}}">
      <mxGeometry y="{{1.6666666666666288+i*3}}" width="2.916538461538462" height="0.7844016136261763" as="geometry" />
    </mxCell>
    {% endfor %}
      {% else %}
    <object label="{{Component.name}}" Type="Component" id="{{Component.id}}" Layer="{{Layer.ids[0]}}">
      <mxCell style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=none;fontSize=11;align=center;" vertex="1" parent="{{Layer.ids[3]}}">
        <mxGeometry x="{{Component.position[0]}}" width="{{Component.dimension[0]}}" height="{{Component.dimension[1]}}" as="geometry" />
      </mxCell>
    </object>
    {% endif %}
    {% endfor %}
    <object label="" Type="Hub" id="{{Layer.ids[3]}}">
      <mxCell style="group" vertex="1" connectable="0" parent="{{Layer.ids[1]}}">
        <mxGeometry x="8.4473684210526017" y="20" width="{{Layer.dimension[0] - 30}}" height="{{Layer.dimension[1] - 35}}" as="geometry" />
      </mxCell>
    </object>
    {% endif %}
    {% endfor %}
    {% endfor %}
    {% endfor %}
    {% for link in DrawIO.links %}
      <mxCell Layer="{{link.layer}}" Type="Link" id="{{link.id}}" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Comic Sans MS;fontSize=17;fontColor=#000000;"  edge="1" parent="1" source="{{link.source}}" target="{{link.sink}}">
        <mxGeometry relative="1" as="geometry" />
      </mxCell>
      {% endfor %}
  </root>
</mxGraphModel>
