增加一部分操作日志

This commit is contained in:
GoEdgeLab
2020-11-10 21:37:48 +08:00
parent d088e88e58
commit 35f728515e
61 changed files with 273 additions and 22 deletions

View File

@@ -1,8 +1,9 @@
package clusters
import (
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeAdmin/internal/oplogs"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/iwind/TeaGo/actions"
)
@@ -29,7 +30,7 @@ func (this *CreateAction) RunPost(params struct {
Field("name", params.Name).
Require("请输入集群名称")
_, err := this.RPC().NodeClusterRPC().CreateNodeCluster(this.AdminContext(), &pb.CreateNodeClusterRequest{
createResp, err := this.RPC().NodeClusterRPC().CreateNodeCluster(this.AdminContext(), &pb.CreateNodeClusterRequest{
Name: params.Name,
GrantId: params.GrantId,
InstallDir: params.InstallDir,
@@ -39,5 +40,8 @@ func (this *CreateAction) RunPost(params struct {
return
}
// 创建日志
this.CreateLog(oplogs.LevelInfo, "创建集群:%d", createResp.ClusterId)
this.Success()
}