HomePhorge

puppetboard/app.py: Enhancing queries for Node and Report states (#271)

Description

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>

Details

Provenance
Corey Hammerton <corey.hammerton@gmail.com>Authored on Aug 19 2016, 2:39 AM
GitHub <noreply@github.com>Committed on Aug 19 2016, 2:39 AM
vanmeeuwenPushed on Nov 8 2016, 12:42 PM
Parents
rPBfeac4441c9fa: Travis: run tests under python 3.5 (#284)
Branches
Unknown
Tags
Unknown
Build Status
Buildable 6248
Build 6350: Continuous Integration for Software Development Projects