2024-02-22 20:52:37 +01:00
|
|
|
package templates
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
2024-02-23 11:43:23 +01:00
|
|
|
templ Index(metaContent MetaContent, counters IndexCounts, err error) {
|
2024-02-22 20:52:37 +01:00
|
|
|
@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">
|
2024-02-23 11:22:28 +01:00
|
|
|
<a href="/subnets/">
|
2024-02-22 20:52:37 +01:00
|
|
|
<p class="heading">Subnets</p>
|
|
|
|
<p class="title">{ fmt.Sprint(counters.SubnetCount) }</p>
|
2024-02-23 11:22:28 +01:00
|
|
|
</a>
|
2024-02-22 20:52:37 +01:00
|
|
|
</div>
|
|
|
|
<div class="level-item has-text-centered">
|
2024-02-23 11:22:28 +01:00
|
|
|
<a href="/addresses/">
|
2024-02-22 20:52:37 +01:00
|
|
|
<p class="heading">Addresses</p>
|
|
|
|
<p class="title">{ fmt.Sprint(counters.AddressCount) }</p>
|
2024-02-23 11:22:28 +01:00
|
|
|
</a>
|
2024-02-22 20:52:37 +01:00
|
|
|
</div>
|
|
|
|
<div class="level-item has-text-centered">
|
2024-02-23 11:22:28 +01:00
|
|
|
<a href="/devices/">
|
2024-02-22 20:52:37 +01:00
|
|
|
<p class="heading">Devices</p>
|
|
|
|
<p class="title">{ fmt.Sprint(counters.DeviceCount) }</p>
|
2024-02-23 11:22:28 +01:00
|
|
|
</a>
|
2024-02-22 20:52:37 +01:00
|
|
|
</div>
|
|
|
|
<div class="level-item has-text-centered">
|
2024-02-23 11:22:28 +01:00
|
|
|
<a href="/locations/">
|
2024-02-22 20:52:37 +01:00
|
|
|
<p class="heading">Locations</p>
|
|
|
|
<p class="title">{ fmt.Sprint(counters.LocationCount) }</p>
|
2024-02-23 11:22:28 +01:00
|
|
|
</a>
|
2024-02-22 20:52:37 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|