DrawTheNet.IO is a web application to draw network diagrams with simple yaml code.
I needed a simple way to draw network diagrams for my documentation.
I found some existing tools on the web but I didn't like the way to store the diagrams.
I wanted something more simple and more "code" like. You can easily store your diagram source in a
git repository, or any documentation system. You can even use the generated URL to jump on the
editor quickly.
More info on
The interface is divided in 3 parts:
The document is divided in multiple main section.
All those sections are optional, default value will be applied to most parameters. You can check the
details in the Reference tab.
refs
to store template objects:refs:
icon: &icon
iconFamily: Cisco
color: #ff0000
The key of items in each section must be unique. For example, you can't define 2 nodes with the same name:
icons:
myicon: { icon: router, iconFamily: Cisco, color: #ff0000 }
myicon: { icon: AP, iconFamily: Cisco, color: #ffff00 }
icons:
myicon: { icon: router, iconFamily: Cisco, color: #ff0000 }
myOthericon: { iicon: AP, iconFamily: Cisco, color: #ffff00 }
The diagram section is used to define the diagram main properties.
You can define the grid density with the help of the row and column header. They wil define how many
of
each is availalble as coordinates for your nodes.
Note that modifying the amount of columns/rows won't change the size of the diagram, it will only
change
the amount of available coordinates.
diagram:
columns: 5
rows: 5
gridLines: true
watermark: false
icons:
MyRouter: {x: 2, y: 2, iconFamily: cisco, icon: router}
diagram:
columns: 5
rows: 15
gridLines: true
watermark: false
icons:
MyRouter: {x: 2, y: 2, iconFamily: cisco, icon: router}
You can define the aspect ratio of the diagram with the aspectRatio
property.
The aspect ratio is defined as a string composed as :
"width:height"
By default, the grid is a square, so the aspect ratio is "1:1"
.
If you want to define a landscape diagram, you can set the aspect ratio to "2:1"
for
example.
diagram:
columns: 5
rows: 5
gridLines: true
watermark: false
icons:
MyRouter: {x: 2, y: 2, iconFamily: cisco, icon: router}
diagram:
columns: 5
rows: 5
aspectRatio: "2:1"
gridLines: true
watermark: false
icons:
MyRouter: {x: 2, y: 2, iconFamily: cisco, icon: router}
gridLines
property.diagram:
columns: 5
rows: 5
gridLines: true
watermark: false
icons:
MyRouter: {x: 2, y: 2, iconFamily: cisco, icon: router}
diagram:
columns: 5
rows: 5
gridLines: false
watermark: false
icons:
MyRouter: {x: 2, y: 2, iconFamily: cisco, icon: router}
The background of the diagram is white by default. To override this, you can set the
fill
property.
By default a small watermark is applied at the bottom right of your diagram as a clickable link with
"Made with DrawTheNet.IO" as text.
This is to help spread the project to futur viewer of the diagram.
You can disable this watermark by setting the watermark
property to false
but please conside keeping it on to help the project.
The title is a zone place bellow your nodes. It convey general informations about the diagram, its
production date, the author, ...
You can show the title with either a top bar ot a full box around it.
By default, the title is not shown. This is equivalent to setting the type
property to
null
or none
.
To show it with a full box, set the type
property to box
.
For a lighter looking diagram, you can set the type
property to bar
to
only show a bar above it.
On the leftmost part you can find the title log. It default to the DrawTheNet.IO logo but you can
change it by setting the logoUrl
property.
The background behind the logo can be changed by setting the logoFill
property. If not
set, it will default to the diagram fill
color property.
Note that only svg logo can be transparent as of today.
The title and sub-title are the main texts of the title. They are set by the text
and
subText
properties respectively. They default to being empty.
On the right side, you can find various info about the diagram.
The author is set by the author
property. If unspecified, it will display as "Unknown".
You can hide it by setting it to null
.
The company is set by the company
property. If unspecified, it will not be shown.
The date is set by the date
property. If unspecified, it will display as the current
date in the locale of your browser. You can hide it by setting it to null
.
The version is set by the version
property. If unspecified, it will display as "1". You
can hide it by setting it to null
.
Icons are at the core of DrawTheNet.IO. They are the main way to represent nodes your network.
icons:
chddc1slb005:
x: 3
y: 2
icon: "load-balancers"
iconFamily: "azure"
color: "white"
fill: "#555555"
An icon is composed of a rounded rectangle ontop of which is the icon image and the name of the node.
To be able to specify an icon, you need to specify the icon family it belongs to.
You can specify it with the iconFamily
property.
It can be one of:
AWS
: Amazon Web ServicesAzure
: Microsoft AzureM365
: Microsoft 365D365
: Microsoft Dynamics 365Power Platform
: Microsoft Power PlatformGCP
: Google Cloud PlatformCisco
: CiscoFortinet
: FortinetIconify
: Iconfiy
The icon can specify it with the icon
property.
If the specified name doesn't exist in the icon family, the icon image will not be drawn but the
bounding box if the icon will still be rendered.
Note : You can find easily icons with the Icon Explorer integrated into the app.
The icon is by default 1x1 in size (relative to the amount of row & columns specified in the
diagram
section
The size of the icon can be specified with the w
(width) and h
(height)
properties.
icons:
chddc1slb005:
x: 3
y: 2
icon: "load-balancers"
iconFamily: "azure"
color: "white"
fill: "#555555"
icons:
chddc1slb005:
x: 3
y: 2
w: 1
h: 2
icon: "load-balancers"
iconFamily: "azure"
color: "white"
fill: "#555555"
This section is a reference of all available object properties for a valid document.
Note that most of those properties are optional and will default to a value if not
specified.
For all properties noted as SVG color, you can use any valid SVG color value.
It can be either:
white
, blue
, green
, ...
(as specified int the
SVG
specs).
#XXYYZZ
where
XX
, YY
and ZZ
are hexadecimal
values
between 00 and FF for the red, green and blue component of the color.
rgb(XXX,YYY,ZZZ)
where
XXX
, YYY
and ZZZ
are decimal
values between 0 and 255 for the red, green and blue component of the color.
Define the diagram settings.
Property | Value Type | Default | Description |
---|---|---|---|
|
string |
|
The width:height ration of the diagram.A null value will auto compute a best fit ratio to use all the available space |
|
object |
|
The margin in px around the whole diagram area (title included). Composed of 4 properties :
|
|
string |
|
The background color of the diagram. Can be any valid SVG color. |
|
boolean |
|
If true, a small link to the app will be displayed in the bottom right of the
diagram. 💗 To help the project, consider leaving it on. 💗 |
|
number |
|
The upscaling render ratio for PNG export. |
|
string |
|
Prefix appended to any exported file title. |
|
integer |
|
reserved for futur use. |
Define the global diagram settings.
Property | Value Type | Default | Description |
---|---|---|---|
|
integer |
|
The number of columns of the drawing grid. Note that this won't change the width of the diagram, only the range availalble as x coordinate, with 0 being the leftest postion and this value - 1 the rightest. |
|
integer |
|
The number of rows of the drawing grid. Note that this won't change the
width of the diagram, only the range availalble as y
coordinate, with 0 being the highest postion and this value - 1 the lowest. See invertY bellow to invert this axis. |
|
boolean |
|
If true, the y axis will be inverted, with 0 being the
lowest postion and rows - 1 the highest.
|
|
boolean |
|
If true, grid lines will be drawn on the diagram at each integer columns and
rows. Dotted lines represent midpoints between each full stop position. |
|
object |
|
The margin in px around the diagram area (without title). Composed of 4 properties :
|
Define the title settings.
Properties:
Property | Value Type | Default | Description |
---|---|---|---|
|
string |
|
The type of title border. Can be either of the following:
none .
|
|
string |
|
The title position. Can be either of the following:
bottom .
|
|
string |
|
The title text of the diagram. |
|
string |
|
The sub-title text of the diagram. If undefined, empty, or null, the section will not be displayed. |
|
string |
|
The author(s) of the diagram. If undefined, empty, or null, the section will not be displayed. |
|
string |
|
The company related to the diagram. If undefined, empty, or null, the section will not be displayed. |
|
string |
|
The date related to the diagram. If empty or null, the section will not be displayed. If undefined, the current date will be used in the format yyyy-mm-dd. |
|
string |
|
The version of the diagram. If empty or null, the section will not be displayed. If undefined, 1 will be used. |
|
string |
|
The title texts color. Can be any valid SVG color. |
|
string |
|
The title top bar or box border color. Can be any valid SVG color. |
|
string |
|
The title area fill color. Can be any valid SVG color. If undefined, empty, or null, the document color will be used. |
|
number |
|
The percentage relative to the global document heigth for the title area. |
|
object |
|
The padding inside the area. Composed of 4 properties :
|
|
string |
|
The title logo URL. Can either be a URI or a base64 encoded image data URI. |
|
string |
|
The background color behind the logo. Can be any valid SVG color. If undefined or null, the diagram fill color will be used. |
Define the icons / nodes.
Contain Icon objects. If defined as Object, keys can be used in groups and connection to
reference this node.
If defined as an Array, the position/index of the items will be used as a key.
Note that the key/name of the object definition inside the parent is used as the node text by default.
Properties:
Property | Value Type | Default | Description |
---|---|---|---|
|
string |
|
The family of the icon. Can be either of:
|
|
string |
|
The icon image name. Refer to the icon explorer for the list of available icons. |
|
string |
|
The icon's text. By default the object key is used as text. Set this property to override it. |
|
integer/string |
|
The icon x position within the digram. Can be either:
|
|
integer/string |
|
The icon y position within the digram. Can be either:
|
|
integer |
|
The icon width within the digram. It is a unitless quantity, 1 represent a width of 1 within the grid |
|
integer |
|
The icon height within the digram. It is a unitless quantity, 1 represent a height of 1 within the grid |
|
string |
|
Define the text location relative to the icon image. Can be either of:
|
|
string |
|
Optional URL link target for the icon text to point to. |
|
string |
|
The text color. Can be any valid SVG color. |
|
string |
|
The fill color for the icon bounding box. Can be any valid SVG color. |
|
string |
|
The color of the border of the bounding box. Can be any valid SVG color. |
|
string |
|
Allow to set a dotted lines instead of a solid one. The fist number is the length of the dash (in px), the second one is the length of the gap (in px). |
|
string |
|
Override the fill color for the icon. Can be any valid SVG color. If not specified, the icon won't be altered from the original. |
|
string |
|
Override the stroke color for the icon. Can be any valid SVG color. If not specified, the icon won't be altered from the original. |
|
integer |
|
Override the stroke width for the icon. If not specified, the icon won't be altered from the original. |
|
bool |
|
Don't change white in the source svg file. |
|
object |
|
An object defining the metadata to be displayed on mouse over. Any properties (except the 2 specified bellow) will be displayed as a key/value pair. Extra metadata can be loaded dynamicly by using the url
property.The specified URL will be called with a GET request and the response will be parsed as a JSON object. The response object will be merged with the metadata object.The url property will be removed from the final object.The URL can be constructed dynamicly by insering {{tokens}} inside
it.A custom erro text can be specified with the errorText
property.See exemples in the Icons section of this Help file. |
Define the icons / nodes.
Contain Icon objects. If defined as Object, keys can be used in groups and connection to
reference this node.
If defined as an Array, the position/index of the items will be used as a key.
Note that the key/name of the item is used as the group text by default.
Groups are drawn in order, so place groups that should have a lower z-index at the top of
the group array.
Properties:
Property | Value Type | Default | Description |
---|---|---|---|
|
string array |
|
An array listing the names of the items that should be grouped together. Items can be icons, other groups or notes. |
|
string |
|
Define the text location relative to the group box. Can be either of:
|
|
string |
|
The text color Can be either:
|
|
string |
|
The fill color for the icon bounding box Can be either:
|
|
string |
|
The color of the border of the bounding box. Can be either:
|
|
string |
|
Allow to set a dotted lines instead of a solid one. The fist number is the length of the dash (in px), the second one is the length of the gap (in px). |
Notes contain simple text or markdown.
Properties:
Property | Value Type | Default | Description |
---|---|---|---|
|
integer/string |
|
The icon x position within the digram. Can be either:
|
|
integer/string |
|
The icon y position within the digram. Can be either:
|
|
string |
|
Alignment of the text along the x axis.
|
|
string |
|
Alignment of the text along the y axis.
|
|
string |
|
This defines the default behaviour for how flex items are laid out along the
cross
axis
on the current line. Think of it as the justify-content version for the cross-axis (perpendicular to the main-axis).
|
|
string |
|
The direction of the note.
|
|
string |
|
This defines the alignment along the main axis.
|
|
integer |
|
The icon width within the digram. It is a unitless quantity, 1 represent a width of 1 within the grid |
|
integer |
|
The icon height within the digram. It is a unitless quantity, 1 represent a height of 1 within the grid |
|
string |
|
The text color Can be either:
|
|
string |
|
The fill color for the note bounding box Can be either:
|
|
string |
|
The color of the border of the bounding box. Can be either:
|
|
string |
|
Allow to set a dotted lines instead of a solid one. The fist number is the length of the dash (in px), the second one is the length of the gap (in px). |
Connections are an array of individual connections.
The order is insignificant because connections will always be drawn from left to right.
Properties:
Property | Value Type | Default | Description |
---|---|---|---|
|
string array |
|
An array of 2 icons, groups or notes, one for each endpoint of the
connection. When an endpoint is a group, lines will be drawn to each group member. labels for each endpoint can be appended to the endpoint name, separated by a colon. For example, endpoints: [spines:40Gb,leaves:40Gb] .
|
|
string |
|
If defined, must be one of :
|
|
string |
|
The text color Can be either:
|
|
string |
|
The color of the border of the bounding box. Can be either:
|
|
string |
|
Allow to set a dotted lines instead of a solid one. The fist number is the length of the dash (in px), the second one is the length of the gap (in px). |