Code

Show graphs only if SysDB indicated that time-series are available.
[sysdb/webui.git] / templates / metric.tmpl
index 40be05c14fa7a3aa02b985e7282ec80f214e0fbf..d855356695e2962d9aa718f41bdd191b796ad1d5 100644 (file)
@@ -1,6 +1,8 @@
 <section>{{$m := index .Metrics 0}}
        <h1>Metric {{$.Name}} &mdash; {{$m.Name}}</h1>
+{{if $m.Timeseries}}
        <img src="/graph/{{urlquery $.Name}}/{{urlquery $m.Name}}" border="0" />
+{{end}}
        <table class="results">
                <tr><td><b>Host</b></td><td><a href="/host/{{urlquery $.Name}}">{{$.Name}}</a></td></tr>
                <tr><td><b>Last update</b></td><td>{{$m.LastUpdate}}</td></tr>