2024-02-22 10:18:59 +01:00
|
|
|
package ui
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
|
|
|
func GroupWeb(router *gin.Engine) *gin.Engine {
|
|
|
|
router.GET("/index.html", index)
|
|
|
|
router.GET("/", index)
|
|
|
|
router.POST("/", index)
|
|
|
|
router.GET("/login.html", getLogin)
|
2024-02-23 11:22:28 +01:00
|
|
|
router.GET("/logout.html", getLogout)
|
2024-02-22 10:18:59 +01:00
|
|
|
router.POST("/login.html", postLogin)
|
2024-02-22 20:52:37 +01:00
|
|
|
router.GET("/profile/", getProfile)
|
2024-02-23 11:22:28 +01:00
|
|
|
router.GET("/empty.html", getEmpty)
|
2024-02-24 11:30:41 +01:00
|
|
|
subnetsGroup := router.Group("/subnets")
|
|
|
|
subnetsGroup.GET("/", getSubnetsPage)
|
|
|
|
subnetsGroup.GET("/new")
|
|
|
|
subnetsGroup.GET("/details/:id")
|
|
|
|
subnetsGroup.GET("/edit/:id")
|
|
|
|
subnetsGroup.POST("/edit/:id")
|
|
|
|
addressGroup := router.Group("/addresses")
|
|
|
|
addressGroup.GET("/", getSubnetsPage)
|
|
|
|
addressGroup.GET("/new")
|
|
|
|
addressGroup.GET("/details/:id")
|
|
|
|
addressGroup.GET("/edit/:id")
|
|
|
|
addressGroup.POST("/edit/:id")
|
2024-02-22 10:18:59 +01:00
|
|
|
return router
|
2024-02-22 20:52:37 +01:00
|
|
|
|
2024-02-22 10:18:59 +01:00
|
|
|
}
|