feat: 网元行为接口新增获取目录压缩为ZIP/文件内容查看cat

This commit is contained in:
TsMask
2024-10-15 11:47:25 +08:00
parent 065895e1d2
commit 0a24e50e9d
2 changed files with 129 additions and 13 deletions

View File

@@ -17,10 +17,8 @@ func Setup(router *gin.Engine) {
// 启动时需要的初始参数
InitLoad()
neGroup := router.Group("/ne")
// 网元操作处理
neActionGroup := neGroup.Group("/action")
neActionGroup := router.Group("/ne/action")
{
neActionGroup.GET("/files",
middleware.PreAuthorize(nil),
@@ -35,6 +33,14 @@ func Setup(router *gin.Engine) {
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neAction", collectlogs.BUSINESS_TYPE_IMPORT)),
controller.NewNeAction.PushFile,
)
neActionGroup.GET("/pullDirZip",
middleware.PreAuthorize(nil),
controller.NewNeAction.PullDirZip,
)
neActionGroup.GET("/viewFile",
middleware.PreAuthorize(nil),
controller.NewNeAction.ViewFile,
)
neActionGroup.PUT("/service",
middleware.PreAuthorize(nil),
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neAction", collectlogs.BUSINESS_TYPE_OTHER)),
@@ -43,7 +49,7 @@ func Setup(router *gin.Engine) {
}
// 网元信息
neInfoGroup := neGroup.Group("/info")
neInfoGroup := router.Group("/ne/info")
{
neInfoGroup.GET("/state",
middleware.PreAuthorize(nil),
@@ -104,7 +110,7 @@ func Setup(router *gin.Engine) {
}
// 网元主机
neHostGroup := neGroup.Group("/host")
neHostGroup := router.Group("/ne/host")
{
neHostGroup.GET("/list",
middleware.PreAuthorize(nil),
@@ -153,7 +159,7 @@ func Setup(router *gin.Engine) {
}
// 网元主机命令
neHostCmdGroup := neGroup.Group("/hostCmd")
neHostCmdGroup := router.Group("/ne/hostCmd")
{
neHostCmdGroup.GET("/list",
middleware.PreAuthorize(nil),
@@ -181,7 +187,7 @@ func Setup(router *gin.Engine) {
}
// 网元版本信息
neVersionGroup := neGroup.Group("/version")
neVersionGroup := router.Group("/ne/version")
{
neVersionGroup.GET("/list",
middleware.PreAuthorize(nil),
@@ -199,7 +205,7 @@ func Setup(router *gin.Engine) {
}
// 网元软件包信息
neSoftwareGroup := neGroup.Group("/software")
neSoftwareGroup := router.Group("/ne/software")
{
neSoftwareGroup.GET("/list",
middleware.PreAuthorize(nil),
@@ -232,7 +238,7 @@ func Setup(router *gin.Engine) {
}
// 网元授权激活信息
neLicenseGroup := neGroup.Group("/license")
neLicenseGroup := router.Group("/ne/license")
{
neLicenseGroup.GET("/list",
middleware.PreAuthorize(nil),
@@ -262,7 +268,7 @@ func Setup(router *gin.Engine) {
}
// 网元参数配置
neConfigGroup := neGroup.Group("/config")
neConfigGroup := router.Group("/ne/config")
{
// 网元参数配置可用属性值
neConfigGroup.GET("/list",
@@ -315,7 +321,7 @@ func Setup(router *gin.Engine) {
}
// 网元配置文件备份记录
neConfigBackupGroup := neGroup.Group("/config/backup")
neConfigBackupGroup := router.Group("/ne/config/backup")
{
neConfigBackupGroup.GET("/list",
middleware.PreAuthorize(nil),