看板增加离线节点数字

This commit is contained in:
GoEdgeLab
2021-09-27 09:23:48 +08:00
parent 5e89bdf594
commit 9e97271083
7 changed files with 45 additions and 16 deletions

View File

@@ -3,6 +3,7 @@ package usernodes
import (
"encoding/json"
"fmt"
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
@@ -20,6 +21,11 @@ func (this *IndexAction) Init() {
}
func (this *IndexAction) RunGet(params struct{}) {
if !teaconst.IsPlus {
this.RedirectURL("/")
return
}
countResp, err := this.RPC().UserNodeRPC().CountAllEnabledUserNodes(this.AdminContext(), &pb.CountAllEnabledUserNodesRequest{})
if err != nil {
this.ErrorPage(err)