26 lines
524 B
Go
26 lines
524 B
Go
package ui
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"git.jmbit.de/jmb/goipam/db"
|
|
"git.jmbit.de/jmb/goipam/web/templates"
|
|
)
|
|
|
|
func index(c *gin.Context) {
|
|
counters := templates.IndexCounts{
|
|
AddressCount: db.CountAddresss(),
|
|
SubnetCount: db.CountSubnets(),
|
|
DeviceCount: db.CountDevices(),
|
|
LocationCount: db.CountLocations(),
|
|
}
|
|
|
|
c.HTML(http.StatusOK, "", templates.Index(templates.GenMetaContent(c), counters, nil))
|
|
}
|
|
|
|
func getEmpty(c *gin.Context) {
|
|
c.HTML(http.StatusOK, "", templates.Empty())
|
|
}
|