mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-04 21:50:28 +08:00
优化代码
This commit is contained in:
@@ -185,7 +185,7 @@ Vue.component("metric-chart", {
|
|||||||
return v / axis.divider
|
return v / axis.divider
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
areaStyle: {},
|
areaStyle: {},
|
||||||
barWidth: "20em"
|
barWidth: "20em"
|
||||||
@@ -257,7 +257,7 @@ Vue.component("metric-chart", {
|
|||||||
return v / axis.divider
|
return v / axis.divider
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
areaStyle: {}
|
areaStyle: {}
|
||||||
}
|
}
|
||||||
@@ -343,7 +343,7 @@ Vue.component("metric-chart", {
|
|||||||
return v / axis.divider
|
return v / axis.divider
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
areaStyle: {},
|
areaStyle: {},
|
||||||
barWidth: "20em"
|
barWidth: "20em"
|
||||||
|
|||||||
@@ -533,7 +533,7 @@ window.teaweb = {
|
|||||||
type: "bar",
|
type: "bar",
|
||||||
data: values.map(valueFunc),
|
data: values.map(valueFunc),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: this.DefaultChartColor
|
||||||
},
|
},
|
||||||
barWidth: "20em"
|
barWidth: "20em"
|
||||||
}
|
}
|
||||||
@@ -598,7 +598,7 @@ window.teaweb = {
|
|||||||
type: "line",
|
type: "line",
|
||||||
data: values.map(valueFunc),
|
data: values.map(valueFunc),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: this.DefaultChartColor
|
||||||
},
|
},
|
||||||
areaStyle: {},
|
areaStyle: {},
|
||||||
smooth: true
|
smooth: true
|
||||||
@@ -909,8 +909,9 @@ window.teaweb = {
|
|||||||
return s
|
return s
|
||||||
},
|
},
|
||||||
chartColor: function (color) {
|
chartColor: function (color) {
|
||||||
|
// old blue: #5470c6
|
||||||
if (color == null || color.length == 0) {
|
if (color == null || color.length == 0) {
|
||||||
color = "#5470c6"
|
color = "#9DD3E8"
|
||||||
}
|
}
|
||||||
|
|
||||||
if (color == "red") {
|
if (color == "red") {
|
||||||
@@ -920,13 +921,14 @@ window.teaweb = {
|
|||||||
color = "#fac858"
|
color = "#fac858"
|
||||||
}
|
}
|
||||||
if (color == "blue") {
|
if (color == "blue") {
|
||||||
color = "#5470c6"
|
color = "#9DD3E8"
|
||||||
}
|
}
|
||||||
if (color == "green") {
|
if (color == "green") {
|
||||||
color = "#3ba272"
|
color = "#3ba272"
|
||||||
}
|
}
|
||||||
return color
|
return color
|
||||||
}
|
},
|
||||||
|
DefaultChartColor: "#9DD3E8"
|
||||||
}
|
}
|
||||||
|
|
||||||
String.prototype.quoteIP = function () {
|
String.prototype.quoteIP = function () {
|
||||||
|
|||||||
@@ -104,13 +104,13 @@ Tea.context(function () {
|
|||||||
return v.bytes / axis.divider;
|
return v.bytes / axis.divider;
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
smooth: true
|
smooth: true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ Tea.context(function () {
|
|||||||
return v.count / axis.divider;
|
return v.count / axis.divider;
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
barWidth: "20em"
|
barWidth: "20em"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,10 +73,10 @@ Tea.context(function () {
|
|||||||
return v.countRequests / axis.divider
|
return v.countRequests / axis.divider
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
smooth: true
|
smooth: true
|
||||||
},
|
},
|
||||||
@@ -147,10 +147,10 @@ Tea.context(function () {
|
|||||||
return v.bytes / axis.divider
|
return v.bytes / axis.divider
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
smooth: true
|
smooth: true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -73,10 +73,10 @@ Tea.context(function () {
|
|||||||
return v.countRequests / axis.divider
|
return v.countRequests / axis.divider
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
smooth: true
|
smooth: true
|
||||||
},
|
},
|
||||||
@@ -147,10 +147,10 @@ Tea.context(function () {
|
|||||||
return v.bytes / axis.divider
|
return v.bytes / axis.divider
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
smooth: true
|
smooth: true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -82,10 +82,10 @@ Tea.context(function () {
|
|||||||
return v.countRequests / axis.divider
|
return v.countRequests / axis.divider
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
smooth: true
|
smooth: true
|
||||||
},
|
},
|
||||||
@@ -156,10 +156,10 @@ Tea.context(function () {
|
|||||||
return v.bytes / axis.divider
|
return v.bytes / axis.divider
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
smooth: true
|
smooth: true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ Tea.context(function () {
|
|||||||
return v.count / axis.divider;
|
return v.count / axis.divider;
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
barWidth: "20em"
|
barWidth: "20em"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ Tea.context(function () {
|
|||||||
return v.count / axis.divider;
|
return v.count / axis.divider;
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
barWidth: "20em"
|
barWidth: "20em"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ Tea.context(function () {
|
|||||||
}),
|
}),
|
||||||
areaStyle: {},
|
areaStyle: {},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
smooth: true
|
smooth: true
|
||||||
},
|
},
|
||||||
@@ -159,7 +159,7 @@ Tea.context(function () {
|
|||||||
return v.count / axis.divider;
|
return v.count / axis.divider;
|
||||||
}),
|
}),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#9DD3E8"
|
color: teaweb.DefaultChartColor
|
||||||
},
|
},
|
||||||
barWidth: "20em"
|
barWidth: "20em"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user