mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-25 11:36:34 +08:00
[区域]可以设置区域说明文字
This commit is contained in:
@@ -20,7 +20,8 @@ func (this *CreatePopupAction) RunGet(params struct{}) {
|
||||
}
|
||||
|
||||
func (this *CreatePopupAction) RunPost(params struct {
|
||||
Name string
|
||||
Name string
|
||||
Description string
|
||||
|
||||
Must *actions.Must
|
||||
CSRF *actionutils.CSRF
|
||||
@@ -29,15 +30,19 @@ func (this *CreatePopupAction) RunPost(params struct {
|
||||
Field("name", params.Name).
|
||||
Require("请输入区域名称")
|
||||
|
||||
createResp, err := this.RPC().NodeRegionRPC().CreateNodeRegion(this.AdminContext(), &pb.CreateNodeRegionRequest{Name: params.Name})
|
||||
createResp, err := this.RPC().NodeRegionRPC().CreateNodeRegion(this.AdminContext(), &pb.CreateNodeRegionRequest{
|
||||
Name: params.Name,
|
||||
Description: params.Description,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
this.Data["region"] = maps.Map{
|
||||
"id": createResp.NodeRegionId,
|
||||
"name": params.Name,
|
||||
"id": createResp.NodeRegionId,
|
||||
"name": params.Name,
|
||||
"description": params.Description,
|
||||
}
|
||||
|
||||
// 日志
|
||||
|
||||
Reference in New Issue
Block a user