23 lines
472 B
Go
23 lines
472 B
Go
package ui
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"git.jmbit.de/jmb/goipam/db"
|
|
"git.jmbit.de/jmb/goipam/utils"
|
|
"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(utils.GenMetaContent(c), counters, nil))
|
|
}
|