网站列表增加QPS和攻击QPS信息

This commit is contained in:
刘祥超
2023-07-07 18:52:00 +08:00
parent a5e97fc425
commit 858cf49966
3 changed files with 41 additions and 14 deletions

View File

@@ -63,7 +63,9 @@
<th>部署集群</th>
<th>域名</th>
<th>端口</th>
<th class="center" style="width: 8em">下行带宽<tip-icon content="最近5分钟峰值带宽每5分钟更新一次"></tip-icon><sort-arrow name="trafficOutOrder"></sort-arrow></th>
<th class="value-column center">下行带宽<tip-icon content="最近5分钟峰值带宽每5分钟更新一次"></tip-icon><sort-arrow name="trafficOutOrder"></sort-arrow></th>
<th class="value-column center" v-if="windowWidth < miniWidth || windowWidth > columnWidth4">QPS<tip-icon content="最近5分钟平均QPS每5分钟更新一次"></tip-icon><sort-arrow name="requestsOrder"></sort-arrow></th>
<th class="value-column center" v-if="windowWidth < miniWidth || windowWidth > columnWidth5">攻击QPS<tip-icon content="最近5分钟平均攻击QPS每5分钟更新一次"></tip-icon><sort-arrow name="attackRequestsOrder"></sort-arrow></th>
<th class="two wide center">状态</th>
<th class="two op">操作</th>
</tr>
@@ -105,6 +107,14 @@
<td class="center">
<span v-if="server.bandwidthBits > 0" class="bandwidth-span"><bits-var :v-bits="server.bandwidthBits"></bits-var></span>
<span class="disabled" v-else>-</span>
</td>
<td class="center" v-if="windowWidth < miniWidth || windowWidth > columnWidth4">
<span v-if="server.qps != '0'">{{server.qps}}</span>
<span v-else class="disabled">-</span>
</td>
<td class="center" v-if="windowWidth < miniWidth || windowWidth > columnWidth5">
<span v-if="server.attackQPS != '0'">{{server.attackQPS}}</span>
<span v-else class="disabled">-</span>
</td>
<td class="center">
<div v-if="!checkDNS">

View File

@@ -1,4 +1,12 @@
Tea.context(function () {
this.windowWidth = window.innerWidth
this.miniWidth = 760
this.columnWidth1 = 800
this.columnWidth2 = 900
this.columnWidth3 = 1000
this.columnWidth4 = 1100
this.columnWidth5 = 1200
this.servers.forEach(function (v) {
v["status"] = {
isOk: false,