diff --git a/puppetboard/app.py b/puppetboard/app.py index 4675e7e..a709ed2 100644 --- a/puppetboard/app.py +++ b/puppetboard/app.py @@ -1115,6 +1115,10 @@ def radiator(env): stats['unchanged_percent'] = 0 stats['unreported_percent'] = 0 + if ('Accept' in request.headers and + request.headers["Accept"] == 'application/json'): + return jsonify(**stats) + return render_template( 'radiator.html', stats=stats,