blob: 462b6a770ed0f6d1bbf1798b84855ecbb1a899c2 [file] [log] [blame]
{{/*
Copyright 2016 The Vanadium Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
*/}}
{{define "content"}} {{if .Value}}
<section class="section--center mdl-grid">
<div class="mdl-cell mdl-cell--12-col">
<table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp">
<tbody>
<tr>
<td class="mdl-data-table__cell--non-numeric">Stat Name</td>
<td class="mdl-data-table__cell--non-numeric"><pre>{{.StatName}}</pre></td>
</tr>
{{with $goVal := goValueFromVOM .Value}}
<tr>
<td class="mdl-data-table__cell--non-numeric">Value (Go)</td>
<td class="mdl-data-table__cell--non-numeric"><pre>{{$goVal}}</pre></td>
</tr>
<tr>
<td class="mdl-data-table__cell--non-numeric">Type (Go)</td>
<td class="mdl-data-table__cell--non-numeric fixed-width">{{printf "%T" $goVal}}</td>
</tr>
{{else}}
<tr>
<td class="mdl-data-table__cell--non-numeric">Value (VDL)</td>
<td class="mdl-data-table__cell--non-numeric fixed-width">{{.Value}}</td>
</tr>
{{end}}
<tr>
<td class="mdl-data-table__cell--non-numeric">Type (VDL)</td>
<td class="mdl-data-table__cell--non-numeric fixed-width">{{.Value.Type}}</td>
</tr>
{{with .TimeSeriesData}}
<tr>
<td class="mdl-data-table__cell--non-numeric">History</td>
<td class="mdl-data-table__cell--non-numeric"><script>drawHistoryGraphs('{{.}}')</script></td>
</tr>
{{end}}
</tbody>
</table>
</div>
</section>
{{end}}
{{if .Globbed}}
<section class="section--center mdl-grid">
<h5>Glob</h5>
<div class="mdl-cell mdl-cell--12-col">
<ul>
{{range .Children}}
<li><a href="stats?n={{urlquery $.ServerName}}&s={{urlquery .}}">{{.}}</a></li>
{{end}}
{{range .ChildrenErrors}}
<li>ERROR({{verrorID .}}): {{.}}</li>
{{end}}
</ul>
</div>
</section>
{{else}}
{{with .Error}}
<section class="section--center mdl-grid">
<h5><i class="material-icons">info</i>ERROR({{verrorID .}})</h5>
<div class="mdl-cell mdl-cell--12-col fixed-width">{{.}}</div>
</section>
{{end}}
{{end}}
{{end}}