43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
package templates
|
|
|
|
import "fmt"
|
|
|
|
templ Index(metaContent 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">
|
|
<a href="/subnets/">
|
|
<p class="heading">Subnets</p>
|
|
<p class="title">{ fmt.Sprint(counters.SubnetCount) }</p>
|
|
</a>
|
|
</div>
|
|
<div class="level-item has-text-centered">
|
|
<a href="/addresses/">
|
|
<p class="heading">Addresses</p>
|
|
<p class="title">{ fmt.Sprint(counters.AddressCount) }</p>
|
|
</a>
|
|
</div>
|
|
<div class="level-item has-text-centered">
|
|
<a href="/devices/">
|
|
<p class="heading">Devices</p>
|
|
<p class="title">{ fmt.Sprint(counters.DeviceCount) }</p>
|
|
</a>
|
|
</div>
|
|
<div class="level-item has-text-centered">
|
|
<a href="/locations/">
|
|
<p class="heading">Locations</p>
|
|
<p class="title">{ fmt.Sprint(counters.LocationCount) }</p>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
}
|