mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-30 00:30:31 +08:00
删除不必要的文件
This commit is contained in:
@@ -1,32 +0,0 @@
|
|||||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
|
||||||
|
|
||||||
package groups
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
|
||||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
|
||||||
"github.com/iwind/TeaGo/maps"
|
|
||||||
)
|
|
||||||
|
|
||||||
type OptionsAction struct {
|
|
||||||
actionutils.ParentAction
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *OptionsAction) RunPost(params struct{}) {
|
|
||||||
resp, err := this.RPC().ReportNodeGroupRPC().FindAllEnabledReportNodeGroups(this.AdminContext(), &pb.FindAllEnabledReportNodeGroupsRequest{})
|
|
||||||
if err != nil {
|
|
||||||
this.ErrorPage(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
var groupMaps = []maps.Map{}
|
|
||||||
for _, group := range resp.ReportNodeGroups {
|
|
||||||
groupMaps = append(groupMaps, maps.Map{
|
|
||||||
"id": group.Id,
|
|
||||||
"name": group.Name,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.Data["groups"] = groupMaps
|
|
||||||
|
|
||||||
this.Success()
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user