Adding configuration option to specify the bar chart

This commit is contained in:
Mike Terzo
2017-01-31 03:00:01 -05:00
parent 1170577525
commit e28eb5027d
4 changed files with 8 additions and 1 deletions

View File

@@ -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',

View File

@@ -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"

View File

@@ -30,7 +30,7 @@ if (otherdata.length > 0) {
bindto: '#factChart',
data: {
columns: realdata,
type : 'donut',
type : '{{config.GRAPH_TYPE|default('pie')}}',
}
});
{% endblock onload_script %}