facts: Add graph for facts endpoint.
This commit is contained in:
committed by
Daniele Sluijters
parent
e71f30ab50
commit
23af033cbb
@@ -184,9 +184,12 @@ def facts():
|
||||
def fact(fact):
|
||||
"""Fetches the specific fact from PuppetDB and displays its value per
|
||||
node for which this fact is known."""
|
||||
# we can only consume the generator once, lists can be doubly consumed
|
||||
# om nom nom
|
||||
localfacts = [ f for f in yield_or_stop(puppetdb.facts(name=fact)) ]
|
||||
return Response(stream_with_context(stream_template('fact.html',
|
||||
name=fact,
|
||||
facts=yield_or_stop(puppetdb.facts(name=fact)))))
|
||||
facts=localfacts)))
|
||||
|
||||
@app.route('/query', methods=('GET', 'POST'))
|
||||
def query():
|
||||
|
||||
Reference in New Issue
Block a user