This divides templates into two classes: autoflow and static. This is
controlled by a boolean "autoflow" property on templates. Any autoflow
templates that will be rendered for a host, have their cells arranged in
a left-to-right, top-to-bottom fashion.
Static templates, are assumed to have precise positioning information
for their graphs. The only adjustment made to them will be a translation
of their Y coords so they do not overlap other layouts.
The autoflow templates, after processing, become a static layout as
defined above and are positioned accordingly.
The JSON encoder was very upset with the ,string struct tag option. It
spat out the error:
json: invalid use of ,string struct tag, trying to unmarshal
"18aed9a7-dc83-406e-a4dc-40d53049541a" into string
The documentation appears to be incomplete on this struct tag option,
and removing it fixes this error.
React-grid-layout uses an "i" parameter in the JSON describing a layout
as an identifier. This is used to bind DOM elements' keys to Cells from
the API. Also, we need a "Name" to describe what each graph is to a
user.
Also, react-grid-layout specified widths and heights in terms of units
of the grid that it establishes. In order to have this properly
configured, the extents of this grid need to be spelled out when
creating a ReactGridLayout, hence the addition of "cols" and
"rowHeight" props to that component.
Finally, react-grid-layout incorporates some of its own styles. To
support this, some modifications needed to be made to the webpack config
to allow us to pull in includes from node_modules.