数据看板增加独立IP数量

This commit is contained in:
GoEdgeLab
2024-05-05 11:13:23 +08:00
parent 304419da5b
commit cd2d828e48
3 changed files with 26 additions and 8 deletions

View File

@@ -78,7 +78,7 @@
</div>
</div>
<div class="ui column with-border">
<div class="ui column">
<h4>API节点<link-icon href="/settings/api" v-if="dashboard.canGoSettings"></link-icon></h4>
<div class="value"><span>{{dashboard.countAPINodes}}</span>
<span style="font-size: 1em" v-if="dashboard.countOfflineAPINodes > 0">/ <a href="/settings/api" v-if="dashboard.canGoSettings"><span class="red" style="font-size: 1em">{{dashboard.countOfflineAPINodes}}离线</span></a><span class="red" style="font-size: 1em" v-else>{{dashboard.countOfflineAPINodes}}离线</span></span>
@@ -95,10 +95,19 @@
<div class="value"><span>{{dashboard.countServers}}</span></div>
</div>
<div class="ui column with-border">
<h4>今日流量</h4>
<div class="ui column">
<h4>当天独立IP</h4>
<div class="value">
<span v-if="todayCountIPs > 0">{{todayCountIPsFormat}}</span>
<span v-else class="disabled">尚无数据</span>
</div>
</div>
<div class="ui column">
<h4>当天流量</h4>
<div class="value"><span>{{todayTraffic}}</span>{{todayTrafficUnit}}</div>
</div>
</columns-grid>
<chart-columns-grid>

View File

@@ -5,6 +5,7 @@ Tea.context(function () {
this.dashboard = {}
this.localLowerVersionAPINode = null
this.countWeakAdmins = 0
this.todayCountIPsFormat = "0"
this.$delay(function () {
this.$post("$")
@@ -13,6 +14,8 @@ Tea.context(function () {
this[k] = resp.data[k]
}
this.todayCountIPsFormat = teaweb.formatNumber(this.todayCountIPs)
this.isLoading = false
this.$delay(function () {