Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit 8b295d4

Browse files
committed
Feat: chart support 10 min
1 parent 9ea1c17 commit 8b295d4

File tree

4 files changed

+60
-10
lines changed

4 files changed

+60
-10
lines changed

src/app/service/chart_option.js

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,25 @@ export function getDefaultOption() {
1616
series: [
1717
{
1818
type: "line",
19-
areaStyle: {},
19+
2020
smooth: true,
21-
symbol: "none"
21+
symbol: "none",
22+
lineStyle: {
23+
color: "rgb(67, 145, 250,0.9)",
24+
width: 1
25+
},
26+
areaStyle: {
27+
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
28+
{
29+
offset: 0,
30+
color: "rgb(67, 145, 250,0.8)"
31+
},
32+
{
33+
offset: 1,
34+
color: "rgb(17, 95, 200,0)"
35+
}
36+
])
37+
}
2238
}
2339
]
2440
};
@@ -39,9 +55,24 @@ export function getStatusChartOption1() {
3955
series: [
4056
{
4157
type: "line",
42-
areaStyle: {},
4358
smooth: true,
44-
symbol: "none"
59+
symbol: "none",
60+
lineStyle: {
61+
color: "rgb(67, 145, 250,0.9)",
62+
width: 1
63+
},
64+
areaStyle: {
65+
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
66+
{
67+
offset: 0,
68+
color: "rgb(67, 145, 250,0.8)"
69+
},
70+
{
71+
offset: 1,
72+
color: "rgb(17, 95, 200,0)"
73+
}
74+
])
75+
}
4576
}
4677
]
4778
};
@@ -63,9 +94,24 @@ export function getStatusChartOption2() {
6394
{
6495
name: "Running",
6596
type: "line",
66-
areaStyle: {},
6797
smooth: true,
68-
symbol: "none"
98+
symbol: "none",
99+
lineStyle: {
100+
color: "rgb(67, 145, 250,0.9)",
101+
width: 1
102+
},
103+
areaStyle: {
104+
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
105+
{
106+
offset: 0,
107+
color: "rgb(67, 145, 250,0.8)"
108+
},
109+
{
110+
offset: 1,
111+
color: "rgb(17, 95, 200,0)"
112+
}
113+
])
114+
}
69115
}
70116
]
71117
};

src/app/views/Services.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,15 @@
136136
<div class="daemonChartArea">
137137
<el-row :gutter="20">
138138
<el-col :md="12" :offset="0">
139-
<p>CPU</p>
139+
<p>{{ $t("services.cpuChartTip") }}</p>
140140
<div
141141
class="daemon-chart"
142142
:id="'echart-wrapper-daemon-cpu-' + index"
143143
style="width: 100%; height: 40px"
144144
></div>
145145
</el-col>
146146
<el-col :md="12" :offset="0">
147-
<p>{{ $t("overview.mem") }}</p>
147+
<p>{{ $t("services.memChartTip") }}</p>
148148
<div
149149
class="daemon-chart"
150150
:id="'echart-wrapper-daemon-mem-' + index"

src/language/en_us.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,9 @@
786786
"copyId": "(available for API calls)",
787787
"toDocker": "Docker",
788788
"toFileManager": "Files",
789-
"toTerminal": "Terminal"
789+
"toTerminal": "Terminal",
790+
"cpuChartTip": "CPU (10 min)",
791+
"memChartTip": "Memory (10 min)"
790792
},
791793
"container": {
792794
"remoteList": "Select daemon",

src/language/zh_cn.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,9 @@
786786
"copyId": "(可用于 API 调用)",
787787
"toFileManager": "文件管理",
788788
"toTerminal": "控制台",
789-
"toDocker": "镜像管理"
789+
"toDocker": "镜像管理",
790+
"cpuChartTip": "CPU(10min)",
791+
"memChartTip": "内存(10min)"
790792
},
791793
"container": {
792794
"remoteList": "请选择一个节点",

0 commit comments

Comments
 (0)