puppetboard/app.py: Enhancing queries for Node and Report states (#271)
- puppetboard/app.py: Enhancing queries for Node and Report states
This resolves #264
On the Nodes and Reports tabs when the user adds a status query string
argument additional query clauses are generated based on its value.
Can be one of failed, changed, unchanged, noop or unreported (for Nodes
only)
No query clause is generated for noop on the Nodes tab. The query field
latest_report_noop was added in PuppetDB 4.1 and we do not want to break
compatability between minor or bug-fix versions.
- puppetboard/app.py: Simplifying the query logic in nodes()
The new logic starts with a blank AndOperator() object then proceeds
to build the query based on environment and status values. After all
after all checking if there are no operations declare the object as
None.
- puppetboard/app.py: Simplifying the query logic for reports()
Similar to the work done for nodes()
- puppetboard/app.py: Fixing pep8 formatting in nodes()
- Add pagination to reports/<node>