feat: 新增系统操作日志&其他优化

This commit is contained in:
meilin.huang
2022-07-14 11:39:12 +08:00
parent 1c18a01bf6
commit db554ebdc9
38 changed files with 6783 additions and 1388 deletions

View File

@@ -22,7 +22,7 @@ func InitMachineScriptRouter(router *gin.RouterGroup) {
ctx.NewReqCtxWithGin(c).Handle(ms.MachineScripts)
})
saveMachienScriptLog := ctx.NewLogInfo("保存脚本")
saveMachienScriptLog := ctx.NewLogInfo("保存脚本").WithSave(true)
smsP := ctx.NewPermission("machine:script:save")
// 保存脚本
machines.POST(":machineId/scripts", func(c *gin.Context) {
@@ -31,7 +31,7 @@ func InitMachineScriptRouter(router *gin.RouterGroup) {
Handle(ms.SaveMachineScript)
})
deleteLog := ctx.NewLogInfo("删除脚本")
deleteLog := ctx.NewLogInfo("删除脚本").WithSave(true)
dP := ctx.NewPermission("machine:script:del")
// 保存脚本
machines.DELETE(":machineId/scripts/:scriptId", func(c *gin.Context) {
@@ -40,7 +40,7 @@ func InitMachineScriptRouter(router *gin.RouterGroup) {
Handle(ms.DeleteMachineScript)
})
runLog := ctx.NewLogInfo("执行机器脚本")
runLog := ctx.NewLogInfo("执行机器脚本").WithSave(true)
rP := ctx.NewPermission("machine:script:run")
// 运行脚本
machines.GET(":machineId/scripts/:scriptId/run", func(c *gin.Context) {