diff --git a/app/wails/frontend/components.d.ts b/app/wails/frontend/components.d.ts index 4097f71..1b25107 100644 --- a/app/wails/frontend/components.d.ts +++ b/app/wails/frontend/components.d.ts @@ -8,6 +8,7 @@ export {} declare module 'vue' { export interface GlobalComponents { CPUUsage: typeof import('./src/components/system/cpu/CPUUsage.vue')['default'] + CPUUsageChart: typeof import('./src/components/system/cpu/CPUUsageChart.vue')['default'] ElButton: typeof import('element-plus/es')['ElButton'] ElCol: typeof import('element-plus/es')['ElCol'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] diff --git a/app/wails/frontend/package.json b/app/wails/frontend/package.json index 2c787dd..657cf29 100644 --- a/app/wails/frontend/package.json +++ b/app/wails/frontend/package.json @@ -20,8 +20,10 @@ "dependencies": { "@types/node": "^15.14.9", "@vueuse/core": "^10.2.1", + "echarts": "^5.4.2", "element-plus": "^2.3.7", "eruda": "^3.0.0", + "moment": "^2.29.4", "pinia": "^2.1.4", "typescript": "^4.6.4", "vue": "^3.3.4", diff --git a/app/wails/frontend/package.json.md5 b/app/wails/frontend/package.json.md5 index afa8e8b..16bf302 100644 --- a/app/wails/frontend/package.json.md5 +++ b/app/wails/frontend/package.json.md5 @@ -1 +1 @@ -f7e689a150f3e4da3eb915e6777b2fd0 \ No newline at end of file +65a151a5092c94d18dcc017ea27c6d61 \ No newline at end of file diff --git a/app/wails/frontend/src/components/system/cpu/CPUUsageChart.vue b/app/wails/frontend/src/components/system/cpu/CPUUsageChart.vue new file mode 100644 index 0000000..db8e8dc --- /dev/null +++ b/app/wails/frontend/src/components/system/cpu/CPUUsageChart.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/app/wails/frontend/src/views/tabs/home/Home.vue b/app/wails/frontend/src/views/tabs/home/Home.vue index fec039d..0819d6b 100644 --- a/app/wails/frontend/src/views/tabs/home/Home.vue +++ b/app/wails/frontend/src/views/tabs/home/Home.vue @@ -40,9 +40,9 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import en from 'element-plus/dist/locale/en.mjs' import {useGlobalTabs} from "src/store/globalTabs"; import {useRouter} from "vue-router"; -import {ElAutoResizer} from "element-plus"; import CPUUsage from "src/components/system/cpu/CPUUsage.vue"; import MemoryUsage from "src/components/system/memory/MemoryUsage.vue"; +import CPUUsageChart from "src/components/system/cpu/CPUUsageChart.vue"; function switchLocale(){ console.log(globalConfigState.ui.value.locale) if(globalConfigState.ui.value.locale.name === 'zh-cn'){ @@ -96,18 +96,24 @@ const generateData = (