Add the name of the metric to the metric page

This commit is contained in:
Nick Lewis
2013-08-21 17:07:24 -07:00
parent b25d85bd32
commit 644e169a7f
2 changed files with 8 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ from __future__ import absolute_import
import os
import logging
import collections
import urllib
from flask import (
Flask, render_template, abort, url_for,
@@ -206,5 +207,6 @@ def metrics():
@app.route('/metric/<metric>')
def metric(metric):
name = urllib.unquote(metric)
metric = puppetdb.metric(metric)
return render_template('metric.html', metric=sorted(metric.items()))
return render_template('metric.html', name=name, metric=sorted(metric.items()))