Adding configuration option to specify the bar chart
This commit is contained in:
@@ -219,6 +219,9 @@ Other settings that might be interesting in no particular order:
|
||||
* ``ENABLE_QUERY``: Defaults to ``True`` causing a Query tab to show up in the
|
||||
web interface allowing users to write and execute arbitrary queries against
|
||||
a set of endpoints in PuppetDB. Change this to ``False`` to disable this.
|
||||
* ``GRAPH_TYPE```: Specify the type of graph to display. Default is
|
||||
pie, other good option is donut. Other choices can be found here:
|
||||
`_C3JS_documentation`
|
||||
* ``GRAPH_FACTS``: A list of fact names to tell PuppetBoard to generate a
|
||||
pie-chart on the fact page. With some fact values being unique per node,
|
||||
like ipaddress, uuid, and serial number, as well as structured facts it was
|
||||
@@ -241,6 +244,7 @@ Other settings that might be interesting in no particular order:
|
||||
|
||||
.. _pypuppetdb documentation: http://pypuppetdb.readthedocs.org/en/v0.1.0/quickstart.html#ssl
|
||||
.. _Flask documentation: http://flask.pocoo.org/docs/0.10/quickstart/#sessions
|
||||
.. _C3JS_documentation: http://c3js.org/examples.html#chart
|
||||
|
||||
Puppet Enterprise
|
||||
-----------------
|
||||
|
||||
@@ -21,6 +21,7 @@ TABLE_COUNT_SELECTOR = [10, 20, 50, 100, 500]
|
||||
OFFLINE_MODE = False
|
||||
ENABLE_CATALOG = False
|
||||
OVERVIEW_FILTER = None
|
||||
GRAPH_TYPE = 'pie'
|
||||
GRAPH_FACTS = ['architecture',
|
||||
'clientversion',
|
||||
'domain',
|
||||
|
||||
@@ -47,6 +47,8 @@ GRAPH_FACTS = [x.strip() for x in os.getenv('GRAPH_FACTS',
|
||||
GRAPH_FACTS_DEFAULT).split(',')]
|
||||
|
||||
|
||||
GRAPH_TYPE = os.getenv('GRAPH_TYPE', 'pie')
|
||||
|
||||
# Tuples are hard to express as an environment variable, so here
|
||||
# the tupple can be listed as a list of items
|
||||
# export INVENTORY_FACTS="Hostname, fqdn, IP Address, ipaddress,.. etc"
|
||||
|
||||
@@ -30,7 +30,7 @@ if (otherdata.length > 0) {
|
||||
bindto: '#factChart',
|
||||
data: {
|
||||
columns: realdata,
|
||||
type : 'donut',
|
||||
type : '{{config.GRAPH_TYPE|default('pie')}}',
|
||||
}
|
||||
});
|
||||
{% endblock onload_script %}
|
||||
|
||||
Reference in New Issue
Block a user