Add PQL endpoint to Query form

Requires https://github.com/voxpupuli/pypuppetdb/pull/97
This commit is contained in:
Raphaël Pinson
2016-06-20 14:43:03 +02:00
parent fac55edc98
commit 38986047a6
3 changed files with 5 additions and 2 deletions

View File

@@ -722,7 +722,9 @@ def query(env):
form = QueryForm(csrf_enabled=False)
if form.validate_on_submit():
if form.query.data[0] == '[':
if form.endpoints.data == 'pql':
query = form.query.data
elif form.query.data[0] == '[':
query = form.query.data
else:
query = '[{0}]'.format(form.query.data)