mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-25 11:10:29 +08:00
可以在创建、修改节点的时候选择分组,可以根据分组筛选节点
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
)
|
||||
|
||||
type CreatePopupAction struct {
|
||||
@@ -31,7 +32,7 @@ func (this *CreatePopupAction) RunPost(params struct {
|
||||
params.Must.
|
||||
Field("name", params.Name).
|
||||
Require("请输入分组名称")
|
||||
_, err := this.RPC().NodeGroupRPC().CreateNodeGroup(this.AdminContext(), &pb.CreateNodeGroupRequest{
|
||||
createResp, err := this.RPC().NodeGroupRPC().CreateNodeGroup(this.AdminContext(), &pb.CreateNodeGroupRequest{
|
||||
ClusterId: params.ClusterId,
|
||||
Name: params.Name,
|
||||
})
|
||||
@@ -40,5 +41,10 @@ func (this *CreatePopupAction) RunPost(params struct {
|
||||
return
|
||||
}
|
||||
|
||||
this.Data["group"] = maps.Map{
|
||||
"id": createResp.GroupId,
|
||||
"name": params.Name,
|
||||
}
|
||||
|
||||
this.Success()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user