Make Puppetboard work with the PuppetDB V4 api
This PR just enables the basic functionality of PuppetBoard with the new PyPuppetDB version. https://github.com/puppet-community/puppetboard/pull/176 includes this work as well as other work to make better utilization of the new library
"Skips" were highlighted with orange on one page and yellow on another. This change makes them consistent, and switches the color to "black" for accessibility reasons. (The contrast between the shades of orange and red used for skips and errors was *very* low. Indistinguishable on some screens.)
Instead of querying PuppetDB for every fact that it knows about only
querying it for the fact names that it knows about. The result is a
much smaller result set that is more noticable on environments with
large numbers of nodes and/or facts.
On one environment with > 2500 fact-names and 35 nodes a curl test
to the facts endpoint without any query string returned in ~3.5 seconds.
Ran another curl test to the facts endpoint with the query string that
the code in this commit creates, the command finished in ~0.040 seconds.
This makes use of the available catalog endpoints in pypuppetdb and PuppetDB
and displays to administrators the last compiled catalog for a node,
if the variable ENABLE_CATALOG is True (defaults to False)
Added inventory page showing a table similar to the "Nodes" one,
but containing any customizable set of facts.
A setting INVENTORY_FACTS has been added. It controls the list
of facts to be displayed along with a description for the header
of the table.
When there are more than 15 unique fact values it groups the least
commonly used into an other label.
Co-authored-by: Sage Imel <sage@cat.pdx.edu>
Co-authored-by: Ryan Niebur <ryan@cat.pdx.edu>
chart.js is poorly maintained and has been disabled. c3.js
has active development and removes the need for two charts
on the facts page.
Co-authored-by: Sage Imel <sage@cat.pdx.edu>
Co-authored-by: Ryan Niebur <ryan@cat.pdx.edu>
To align with added offline resources:
* Semantic UI from 0.12.0 to 0.16.1
(0.18.0 is not yet available on cdnjs.cloudflare.com)
* jQuery TableSorter from 2.13.3 to 2.17.2
* moment.js from 2.5.1 to 2.7.0