diff --git a/puppetboard/app.py b/puppetboard/app.py index f23630620..f6ad01fd5 100644 --- a/puppetboard/app.py +++ b/puppetboard/app.py @@ -862,9 +862,9 @@ def metrics(env): current_env=env) -@app.route('/metric/', +@app.route('/metric/', defaults={'env': app.config['DEFAULT_ENVIRONMENT']}) -@app.route('//metric/') +@app.route('//metric/') def metric(env, metric): """Lists all information about the metric of the given name. @@ -876,7 +876,7 @@ def metric(env, metric): check_env(env, envs) name = unquote(metric) - metric = puppetdb.metric(metric) + metric = get_or_abort(puppetdb.metric, metric) return render_template( 'metric.html', name=name,