商业版支持L2节点

This commit is contained in:
GoEdgeLab
2022-04-04 12:08:18 +08:00
parent c4588803e7
commit 1373517c57
13 changed files with 113 additions and 42 deletions

View File

@@ -33,7 +33,7 @@ func (this *DetailAction) RunGet(params struct {
this.ErrorPage(err)
return
}
node := nodeResp.Node
var node = nodeResp.Node
if node == nil {
this.WriteString("找不到要操作的节点")
return
@@ -197,7 +197,7 @@ func (this *DetailAction) RunGet(params struct {
}
// 运行状态
status := &nodeconfigs.NodeStatus{}
var status = &nodeconfigs.NodeStatus{}
if len(node.StatusJSON) > 0 {
err = json.Unmarshal(node.StatusJSON, &status)
if err != nil {
@@ -285,6 +285,8 @@ func (this *DetailAction) RunGet(params struct {
"isOn": node.IsOn,
"records": recordMaps,
"routes": routeMaps,
"level": node.Level,
"levelInfo": nodeconfigs.FindNodeLevel(int(node.Level)),
"status": maps.Map{
"isActive": status.IsActive,