mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-15 04:26:36 +08:00
节点列表增加连接数列
This commit is contained in:
@@ -64,10 +64,11 @@
|
||||
<th>节点名称</th>
|
||||
<th>IP</th>
|
||||
<th class="width10">DNS线路</th>
|
||||
<th class="width5 center">CPU<sort-arrow name="cpuOrder"></sort-arrow></th>
|
||||
<th class="width5 center">内存<sort-arrow name="memoryOrder"></sort-arrow></th>
|
||||
<th class="center" style="width: 7em">下行带宽<sort-arrow name="trafficOutOrder"></sort-arrow></th>
|
||||
<th class="center" style="width: 7em">负载<sort-arrow name="loadOrder"></sort-arrow></th>
|
||||
<th class="width5 center" v-if="windowWidth < miniWidth || windowWidth > columnWidth1">CPU<sort-arrow name="cpuOrder"></sort-arrow></th>
|
||||
<th class="width5 center" v-if="windowWidth < miniWidth || windowWidth > columnWidth2">内存<sort-arrow name="memoryOrder"></sort-arrow></th>
|
||||
<th class="center" style="width: 7em" v-if="windowWidth < miniWidth || windowWidth > columnWidth3">下行带宽<sort-arrow name="trafficOutOrder"></sort-arrow></th>
|
||||
<th class="center" style="width: 7em" v-if="windowWidth < miniWidth || windowWidth > columnWidth4">连接数<sort-arrow name="connectionsOrder"></sort-arrow></th>
|
||||
<th class="center" style="width: 7em" v-if="windowWidth < miniWidth || windowWidth > columnWidth5">负载<sort-arrow name="loadOrder"></sort-arrow></th>
|
||||
<th class="two wide center">状态</th>
|
||||
<th class="two op">操作</th>
|
||||
</tr>
|
||||
@@ -117,20 +118,24 @@
|
||||
</span>
|
||||
<span v-else class="disabled">-</span>
|
||||
</td>
|
||||
<td class="center">
|
||||
<td class="center" v-if="windowWidth < miniWidth || windowWidth > columnWidth1">
|
||||
<span v-if="node.status.isActive" :class="{red:node.status.cpuUsage > 0.50}">{{node.status.cpuUsageText}}</span>
|
||||
<span v-else class="disabled">-</span>
|
||||
</td>
|
||||
<td class="center">
|
||||
<td class="center" v-if="windowWidth < miniWidth || windowWidth > columnWidth2">
|
||||
<span v-if="node.status.isActive" :class="{red:node.status.memUsage > 0.80}">{{node.status.memUsageText}}</span>
|
||||
<span v-else class="disabled">-</span>
|
||||
</td>
|
||||
<td class="center">
|
||||
<td class="center" v-if="windowWidth < miniWidth || windowWidth > columnWidth3">
|
||||
<span v-if="node.status.isActive && node.status.trafficOutBytes > 0">{{teaweb.formatBits(node.status.trafficOutBytes * 8/60)}}</span>
|
||||
<span v-else class="disabled">-</span>
|
||||
</td>
|
||||
<td class="center">
|
||||
<span v-if="node.status.isActive">{{node.status.load1m}}</span>
|
||||
<td class="center" v-if="windowWidth < miniWidth || windowWidth > columnWidth4">
|
||||
<span v-if="node.status.isActive && node.status.countConnections > 0">{{node.status.countConnections}}</span>
|
||||
<span v-else class="disabled">-</span>
|
||||
</td>
|
||||
<td class="center" v-if="windowWidth < miniWidth || windowWidth > columnWidth5">
|
||||
<span v-if="node.status.isActive && node.status.load1m > 0">{{node.status.load1m}}</span>
|
||||
<span v-else class="disabled">-</span>
|
||||
</td>
|
||||
<td class="center">
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
Tea.context(function () {
|
||||
this.teaweb = teaweb
|
||||
|
||||
// 显示的统计项
|
||||
this.windowWidth = window.innerWidth
|
||||
this.miniWidth = 760
|
||||
this.columnWidth1 = 800
|
||||
this.columnWidth2 = 900
|
||||
this.columnWidth3 = 1000
|
||||
this.columnWidth4 = 1100
|
||||
this.columnWidth5 = 1200
|
||||
|
||||
let that = this
|
||||
window.addEventListener("resize", function () {
|
||||
that.windowWidth = window.innerWidth
|
||||
})
|
||||
|
||||
this.deleteNode = function (nodeId) {
|
||||
teaweb.confirm("确定要从当前集群中删除这个节点吗?", function () {
|
||||
this.$post("/nodes/delete")
|
||||
|
||||
Reference in New Issue
Block a user