From 0f925d2e051c7319a535407f2a2ba7480f7dbff2 Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Fri, 20 Nov 2020 11:31:05 +0100 Subject: [PATCH] added text corrections --- docs/cmd/graph.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/cmd/graph.md b/docs/cmd/graph.md index de73a2796..940693417 100644 --- a/docs/cmd/graph.md +++ b/docs/cmd/graph.md @@ -4,11 +4,14 @@ The `graph` command generates graphical representaitons of the deployed topology. -Two graphing options are available; using a HTML page generated by `containerlab` based on a Go html template, or using a [dot file](https://en.wikipedia.org/wiki/DOT_(graph_description_language)) that can visualized using [Graphviz](https://graphviz.org/) +Two graphing options are available: + +* an HTML page with embedded graphics generated by `containerlab` based on a Go HTML template +* a [graph description file in dot format](https://en.wikipedia.org/wiki/DOT_(graph_description_language)) that can be rendered using [Graphviz](https://graphviz.org/) or viewed [online](https://dreampuf.github.io/GraphvizOnline/). #### HTML -The HTML based graph is created by rendering a [GoHTML](https://golang.org/pkg/html/template/) template against a `struct` containing the topology name as well as a `json` string where 2 lists are present: `nodes` and `links` . +The HTML based graph is created by rendering a [Go HTML](https://golang.org/pkg/html/template/) template against a `struct` containing the topology name as well as a `json` string where 2 lists are present: `nodes` and `links` . `nodes` contains data about the lab nodes, such as name, kind, type, image, state, IP addresses,... @@ -50,7 +53,7 @@ Within the template Javascript libraries such as [**d3js directed force graph** `containerlab` comes with a (minimalistic) default template using [d3js](https://github.com/d3/d3-force). -After the graph generation, it allows to freely move the nodes to a desired position then export the graph in PNG format +After the graph generation, its possible to freely move the nodes to a desired position and export the graph in PNG format. ![default_graph](https://gitlab.com/rdodin/pics/-/wikis/uploads/5f3ade3559a5f044d4786bfd0e278b65/image.png) @@ -72,13 +75,13 @@ With the global `--name | -n` flag a user sets the name of the lab that will be #### srv -The `--srv` flag enables the HTML graph representation if present, it specifies an address a http server will listen to. +The `--srv` flag enables the HTML graph representation if present, it specifies an address a HTTP server will listen to. -A single path `/` is served, where the graph is generated based on either a default template or on the template supplied using `--template` +A single path `/` is served, where the graph is generated based on either a default template or on the template supplied using `--template`. #### template -The `--template` flag allows to customize the HTML based graph by supplying a user defined template that will be rendered and exposed on the address specified by `--srv` +The `--template` flag allows to customize the HTML based graph by supplying a user defined template that will be rendered and exposed on the address specified by `--srv`. ### Examples @@ -93,4 +96,4 @@ containerlab graph --topo /path/to/topo1.yaml --srv ":3002" # start an http server on :3002 where topo1 graph will be rendered using a custom template my_template.html containerlab graph --topo /path/to/topo1.yaml --srv ":3002" --template my_template.html -``` \ No newline at end of file +```