Drawing the graph

We'll create an HTML/JavaScript template, graph.html.template, based loosely on one of the many rich VivaGraph examples in order to interpret the JSON and invoke VivaGraph in order to make an interactive graph.

  1. First of all, make a directory for the project, download the VivaGraph library source from the repository on GitHub and extract the distribution library:
      $ mkdir graphdev      $ cd graphdev      $ git clone https://github.com/anvaka/VivaGraphJS.git      Cloning into 'VivaGraphJS'...      remote: Counting objects: 3135, done.      remote: Total 3135 (delta 0), reused 0 (delta 0), pack-reused                        3135      Receiving objects: 100% (3135/3135), 2.64 MiB | 1.44 MiB/s, done.      Resolving deltas: 100% (1673/1673), done.      $ cp VivaGraphJS/dist/vivagraph.js ...

Get JUNOS Automation Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.