mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 20:40:26 +08:00
实现节点看板(仅对企业版开放)
This commit is contained in:
@@ -7,7 +7,7 @@ Tea.context(function () {
|
||||
this.$delay(function () {
|
||||
this.reloadHourlyTrafficChart()
|
||||
this.reloadHourlyRequestsChart()
|
||||
this.reloadTopNodeStatsChart()
|
||||
this.reloadTopNodesChart()
|
||||
this.reloadTopDomainsChart()
|
||||
this.reloadCPUChart()
|
||||
})
|
||||
@@ -265,7 +265,7 @@ Tea.context(function () {
|
||||
}
|
||||
|
||||
// 节点排行
|
||||
this.reloadTopNodeStatsChart = function () {
|
||||
this.reloadTopNodesChart = function () {
|
||||
let that = this
|
||||
let axis = teaweb.countAxis(this.topNodeStats, function (v) {
|
||||
return v.countRequests
|
||||
@@ -283,7 +283,10 @@ Tea.context(function () {
|
||||
value: function (v) {
|
||||
return v.countRequests / axis.divider;
|
||||
},
|
||||
axis: axis
|
||||
axis: axis,
|
||||
click: function (args, stats) {
|
||||
window.location = "/clusters/cluster/node?nodeId=" + stats[args.dataIndex].nodeId + "&clusterId=" + that.clusterId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -332,7 +335,7 @@ Tea.context(function () {
|
||||
}
|
||||
|
||||
this.reloadCPUChart = function () {
|
||||
let axis = {unit: "", divider: 1}
|
||||
let axis = {unit: "%", divider: 1}
|
||||
teaweb.renderLineChart({
|
||||
id: "cpu-chart",
|
||||
name: "CPU",
|
||||
@@ -352,7 +355,7 @@ Tea.context(function () {
|
||||
}
|
||||
|
||||
this.reloadMemoryChart = function () {
|
||||
let axis = {unit: "", divider: 1}
|
||||
let axis = {unit: "%", divider: 1}
|
||||
teaweb.renderLineChart({
|
||||
id: "memory-chart",
|
||||
name: "内存",
|
||||
|
||||
Reference in New Issue
Block a user