Adding configuration option to specify the bar chart
This commit is contained in:
@@ -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