puppetboard/app.py: Using the plain-text metric name in metrics() (#259)
This fixes #258 URL quoting is now done in pypuppetdb >= 0.2.3 which contributed to the metric URL being double-quoted by the time it reached PuppetDB, which responds with a 404. Instead using the plain-text name to build the link to metric()
This commit is contained in:
@@ -771,10 +771,8 @@ def metrics(env):
|
||||
check_env(env, envs)
|
||||
|
||||
metrics = get_or_abort(puppetdb._query, 'mbean')
|
||||
for key, value in metrics.items():
|
||||
metrics[key] = value.split('/')[2]
|
||||
return render_template('metrics.html',
|
||||
metrics=sorted(metrics.items()),
|
||||
metrics=sorted(metrics.keys()),
|
||||
envs=envs,
|
||||
current_env=env)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user