mirror of https://github.com/ehang-io/nps
fix the number of client bug
parent
4b3834e46d
commit
883dd07d86
|
@ -342,7 +342,10 @@ func GetDashboardData() map[string]interface{} {
|
||||||
data := make(map[string]interface{})
|
data := make(map[string]interface{})
|
||||||
data["version"] = version.VERSION
|
data["version"] = version.VERSION
|
||||||
data["hostCount"] = common.GeSynctMapLen(file.GetDb().JsonDb.Hosts)
|
data["hostCount"] = common.GeSynctMapLen(file.GetDb().JsonDb.Hosts)
|
||||||
data["clientCount"] = common.GeSynctMapLen(file.GetDb().JsonDb.Clients) - 1 //Remove the public key client
|
data["clientCount"] = common.GeSynctMapLen(file.GetDb().JsonDb.Clients)
|
||||||
|
if beego.AppConfig.String("public_vkey") != "" { //remove public vkey
|
||||||
|
data["clientCount"] = data["clientCount"].(int) - 1
|
||||||
|
}
|
||||||
dealClientData()
|
dealClientData()
|
||||||
c := 0
|
c := 0
|
||||||
var in, out int64
|
var in, out int64
|
||||||
|
|
Loading…
Reference in New Issue