snapshot: AlertCenter拆分前快照
This commit is contained in:
1 parent
6a40956afa
commit
805cb767a8
23 files changed
+1560
-404
No files matched your search
@@ -26,14 +26,16 @@ func Register(r *gin.Engine, db *gorm.DB, log *zap.Logger, cfg *config.Config) {
|
||||
r.StaticFile("/agent/install.sh", "./agent/deploy/install.sh")
|
||||
r.StaticFile("/agent/aiops-agent-linux-amd64", "./agent/bin/aiops-agent-linux-amd64")
|
||||
r.StaticFile("/agent/aiops-agent-linux-arm64", "./agent/bin/aiops-agent-linux-arm64")
|
||||
r.StaticFile("/agent/aiops-agent-darwin-arm64", "./agent/bin/aiops-agent-darwin-arm64") // macOS Apple Silicon // Logan.Li
|
||||
r.GET("/agent/arch", func(c *gin.Context) {
|
||||
c.JSON(200, gin.H{
|
||||
"version": "1.0.0",
|
||||
"downloads": gin.H{
|
||||
"amd64": "/agent/aiops-agent-linux-amd64",
|
||||
"arm64": "/agent/aiops-agent-linux-arm64",
|
||||
"linux-amd64": "/agent/aiops-agent-linux-amd64",
|
||||
"linux-arm64": "/agent/aiops-agent-linux-arm64",
|
||||
"darwin-arm64": "/agent/aiops-agent-darwin-arm64",
|
||||
},
|
||||
"install": "curl -fsSL http://<server>:8080/agent/install.sh | bash -s -- --server http://<server>:8080 --token <token>",
|
||||
"install": "curl -fsSL http://<server>:8080/agent/install.sh | sudo bash -s -- --server http://<server>:8080 --token <token>",
|
||||
})
|
||||
})
|
||||
|
||||
@@ -70,6 +72,15 @@ func Register(r *gin.Engine, db *gorm.DB, log *zap.Logger, cfg *config.Config) {
|
||||
admin.DELETE("/users/:id", authHandler.DeleteUser)
|
||||
admin.POST("/users/batch-import", authHandler.BatchImportUsers)
|
||||
admin.GET("/users/import-template", authHandler.ImportTemplate)
|
||||
|
||||
// 角色管理路由 // Logan.Li
|
||||
admin.GET("/roles", authHandler.ListRoles)
|
||||
admin.POST("/roles", authHandler.CreateRole)
|
||||
admin.PUT("/roles/:id", authHandler.UpdateRole)
|
||||
admin.DELETE("/roles/:id", authHandler.DeleteRole)
|
||||
|
||||
// 权限列表(供角色权限选择)
|
||||
admin.GET("/permissions", authHandler.ListPermissions)
|
||||
}
|
||||
|
||||
// LDAP 配置路由
|
||||
@@ -198,6 +209,8 @@ func Register(r *gin.Engine, db *gorm.DB, log *zap.Logger, cfg *config.Config) {
|
||||
clusters.GET("/:id/deployments", k8sHandler.ListDeployments)
|
||||
clusters.GET("/:id/services", k8sHandler.ListServices)
|
||||
clusters.GET("/:id/ingresses", k8sHandler.ListIngresses)
|
||||
clusters.GET("/:id/topology", k8sHandler.GetTopology) // 获取拓扑布局 // Logan.Li
|
||||
clusters.PUT("/:id/topology", k8sHandler.SaveTopology) // 保存拓扑布局 // Logan.Li
|
||||
}
|
||||
|
||||
// 告警路由
|
||||
|
||||
Reference in new issue
Block a user