Add the name of the metric to the metric page
This commit is contained in:
@@ -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()))
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
<h1>Metric</h1>
|
||||
<div class="page-header">
|
||||
<h1>Metric
|
||||
<small>{{name}}</small>
|
||||
</h1>
|
||||
</div>
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
{% for key,value in metric %}
|
||||
|
||||
Reference in New Issue
Block a user