mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
console: add minimal user management
This commit is contained in:
@@ -75,16 +75,19 @@ func (c *Component) Start() error {
|
||||
c.r.Info().Msg("starting console component")
|
||||
|
||||
c.d.HTTP.AddHandler("/", netHTTP.HandlerFunc(c.assetsHandlerFunc))
|
||||
c.d.HTTP.GinRouter.GET("/api/v0/console/docs/:name", c.docsHandlerFunc)
|
||||
c.d.HTTP.GinRouter.GET("/api/v0/console/widget/flow-last", c.widgetFlowLastHandlerFunc)
|
||||
c.d.HTTP.GinRouter.GET("/api/v0/console/widget/flow-rate", c.widgetFlowRateHandlerFunc)
|
||||
c.d.HTTP.GinRouter.GET("/api/v0/console/widget/exporters", c.widgetExportersHandlerFunc)
|
||||
c.d.HTTP.GinRouter.GET("/api/v0/console/widget/top/:name", c.widgetTopHandlerFunc)
|
||||
c.d.HTTP.GinRouter.GET("/api/v0/console/widget/graph", c.widgetGraphHandlerFunc)
|
||||
c.d.HTTP.GinRouter.POST("/api/v0/console/graph", c.graphHandlerFunc)
|
||||
c.d.HTTP.GinRouter.POST("/api/v0/console/sankey", c.sankeyHandlerFunc)
|
||||
c.d.HTTP.GinRouter.POST("/api/v0/console/filter/validate", c.filterValidateHandlerFunc)
|
||||
c.d.HTTP.GinRouter.POST("/api/v0/console/filter/complete", c.filterCompleteHandlerFunc)
|
||||
endpoint := c.d.HTTP.GinRouter.Group("/api/v0/console", c.userAuthentication())
|
||||
endpoint.GET("/docs/:name", c.docsHandlerFunc)
|
||||
endpoint.GET("/widget/flow-last", c.widgetFlowLastHandlerFunc)
|
||||
endpoint.GET("/widget/flow-rate", c.widgetFlowRateHandlerFunc)
|
||||
endpoint.GET("/widget/exporters", c.widgetExportersHandlerFunc)
|
||||
endpoint.GET("/widget/top/:name", c.widgetTopHandlerFunc)
|
||||
endpoint.GET("/widget/graph", c.widgetGraphHandlerFunc)
|
||||
endpoint.POST("/graph", c.graphHandlerFunc)
|
||||
endpoint.POST("/sankey", c.sankeyHandlerFunc)
|
||||
endpoint.POST("/filter/validate", c.filterValidateHandlerFunc)
|
||||
endpoint.POST("/filter/complete", c.filterCompleteHandlerFunc)
|
||||
endpoint.GET("/user/info", c.requireUserAuthentication(), c.userInfoHandlerFunc)
|
||||
endpoint.GET("/user/avatar", c.requireUserAuthentication(), c.userAvatarHandlerFunc)
|
||||
|
||||
c.t.Go(func() error {
|
||||
ticker := time.NewTicker(10 * time.Second)
|
||||
|
||||
Reference in New Issue
Block a user