43 lines
1.0 KiB
Plaintext
43 lines
1.0 KiB
Plaintext
|
package templates
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
templ Index(metaContent utils.MetaContent, counters IndexCounts, err error) {
|
||
|
@wrapBase(metaContent, "GoIPAM", err) {
|
||
|
<div class="section is-centered">
|
||
|
<div class="container">
|
||
|
@indexStats(counters)
|
||
|
</div>
|
||
|
</div>
|
||
|
}
|
||
|
}
|
||
|
|
||
|
templ indexStats(counters IndexCounts) {
|
||
|
<div class="level mt-5 box">
|
||
|
<div class="level-item has-text-centered">
|
||
|
<div>
|
||
|
<p class="heading">Subnets</p>
|
||
|
<p class="title">{ fmt.Sprint(counters.SubnetCount) }</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="level-item has-text-centered">
|
||
|
<div>
|
||
|
<p class="heading">Addresses</p>
|
||
|
<p class="title">{ fmt.Sprint(counters.AddressCount) }</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="level-item has-text-centered">
|
||
|
<div>
|
||
|
<p class="heading">Devices</p>
|
||
|
<p class="title">{ fmt.Sprint(counters.DeviceCount) }</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="level-item has-text-centered">
|
||
|
<div>
|
||
|
<p class="heading">Locations</p>
|
||
|
<p class="title">{ fmt.Sprint(counters.LocationCount) }</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
}
|