blob: 9d9f271c47626b5be4dfb547fd541b01945ddaeb [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"}}
<section class="section--center mdl-grid">
<h5>Collection {{.Tree.Database.Id.Name}}/{{.Tree.Collection.Id.Name}}</h5>
<div class="mdl-cell mdl-cell--12-col">
<dl>
<dt>App Blessing:<dt><dd>{{.Tree.Database.Id.Blessing}}</dd>
<dt>Creator's User Blessing:<dt><dd>{{.Tree.Collection.Id.Blessing}}</dd>
<dt>Number of Rows:<dt><dd>{{.Tree.RowCount}}</dd>
<dt>Total Key Size:<dt><dd>{{.Tree.TotKeySize}}</dd>
<dt>Keys<dt>
<dd>
<table>
<tr><th></th><th>Key</th><th>Value</th></tr>
<tr><th colspan="3">
{{if .Tree.KeysPage.HasPrev}}
<a href="collection?n={{$.ServerName}}&db={{.Tree.Database.Id.Blessing}}&dn={{.Tree.Database.Id.Name}}&cb={{.Tree.Collection.Id.Blessing}}&cn={{.Tree.Collection.Id.Name}}">
[back]
</a>
{{end}}
&nbsp;
</th></tr>
{{range .Tree.KeysPage.KeyVals}}
<tr><td>{{.Index}}</td><td>{{.Key}}</td><td><code>{{.Value}}</code></td></tr>
{{else}}
<tr><td colspan="3">(no keys)</td></tr>
{{end}}
<tr><th colspan="3">
{{if len .Tree.KeysPage.NextKey}}
<a href="collection?n={{$.ServerName}}&db={{.Tree.Database.Id.Blessing}}&dn={{.Tree.Database.Id.Name}}&cb={{.Tree.Collection.Id.Blessing}}&cn={{.Tree.Collection.Id.Name}}&firstkey={{.Tree.KeysPage.NextKey}}">
(next)
</a>
{{end}}
&nbsp;
</th></tr>
</table>
</dd>
</dl>
</div>
</section>
{{end}}