diff options
Diffstat (limited to 'application_router.go')
-rw-r--r-- | application_router.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/application_router.go b/application_router.go index 334e9f3..da71538 100644 --- a/application_router.go +++ b/application_router.go @@ -14,7 +14,7 @@ import ( ) func CreateApplicationRouter(applicationContext *ApplicationContext, - notificationController *NotificationController) *gin.Engine { + notificationController *NotificationController, resourcesController *ResourcesController) *gin.Engine { router := gin.New() router.Use(gin.Logger()) router.Use(gin.Recovery()) @@ -342,6 +342,14 @@ func CreateApplicationRouter(applicationContext *ApplicationContext, success(c, applicationContext.StatisticsController.GetStatistics(c, filter)) }) + + api.GET("/resources/system", func(c *gin.Context) { + success(c, resourcesController.GetSystemStats(c)) + }) + + api.GET("/resources/process", func(c *gin.Context) { + success(c, resourcesController.GetProcessStats(c)) + }) } return router |