mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-25 03:26:34 +08:00
改进操作日志
This commit is contained in:
@@ -112,7 +112,7 @@ func (this *InstallAction) RunPost(params struct {
|
||||
}
|
||||
|
||||
// 创建日志
|
||||
this.CreateLog(oplogs.LevelInfo, "安装节点 %d", params.NodeId)
|
||||
defer this.CreateLog(oplogs.LevelInfo, "安装节点 %d", params.NodeId)
|
||||
|
||||
this.Success()
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ func (this *StartAction) RunPost(params struct {
|
||||
}
|
||||
|
||||
// 创建日志
|
||||
this.CreateLog(oplogs.LevelInfo, "远程启动节点 %d", params.NodeId)
|
||||
defer this.CreateLog(oplogs.LevelInfo, "远程启动节点 %d", params.NodeId)
|
||||
|
||||
if resp.IsOk {
|
||||
this.Success()
|
||||
|
||||
@@ -20,7 +20,7 @@ func (this *StopAction) RunPost(params struct {
|
||||
}
|
||||
|
||||
// 创建日志
|
||||
this.CreateLog(oplogs.LevelInfo, "远程停止节点 %d", params.NodeId)
|
||||
defer this.CreateLog(oplogs.LevelInfo, "远程停止节点 %d", params.NodeId)
|
||||
|
||||
if resp.IsOk {
|
||||
this.Success()
|
||||
|
||||
@@ -190,7 +190,7 @@ func (this *UpdateAction) RunPost(params struct {
|
||||
Must *actions.Must
|
||||
}) {
|
||||
// 创建日志
|
||||
this.CreateLog(oplogs.LevelInfo, "修改节点 %d", params.NodeId)
|
||||
defer this.CreateLog(oplogs.LevelInfo, "修改节点 %d", params.NodeId)
|
||||
|
||||
if params.NodeId <= 0 {
|
||||
this.Fail("要操作的节点不存在")
|
||||
|
||||
@@ -15,7 +15,7 @@ func (this *UpdateInstallStatusAction) RunPost(params struct {
|
||||
IsInstalled bool
|
||||
}) {
|
||||
// 创建日志
|
||||
this.CreateLog(oplogs.LevelInfo, "修改节点安装状态 %d", params.NodeId)
|
||||
defer this.CreateLog(oplogs.LevelInfo, "修改节点安装状态 %d", params.NodeId)
|
||||
|
||||
_, err := this.RPC().NodeRPC().UpdateNodeIsInstalled(this.AdminContext(), &pb.UpdateNodeIsInstalledRequest{
|
||||
NodeId: params.NodeId,
|
||||
|
||||
Reference in New Issue
Block a user