实现节点看板(仅对企业版开放)

This commit is contained in:
GoEdgeLab
2021-07-06 20:06:20 +08:00
parent b86453408c
commit 4599fc2709
34 changed files with 1313 additions and 296 deletions

View File

@@ -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: "内存",