diff --git a/frontend/package.json b/frontend/package.json index 12eb42ac..11a26b94 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,11 +9,13 @@ }, "dependencies": { "ant-design-vue": "^1.7.3", + "apexcharts": "^3.33.1", "axios": "^0.21.1", "chart.js": "^2.9.4", "core-js": "^3.9.0", "reconnecting-websocket": "^4.4.0", "vue": "^2.6.11", + "vue-apexcharts": "^1.6.2", "vue-chartjs": "^3.5.1", "vue-codemirror": "^4.0.6", "vue-gettext": "^2.1.12", diff --git a/frontend/src/api/analytic.js b/frontend/src/api/analytic.js index 629641e2..9ca6edb4 100644 --- a/frontend/src/api/analytic.js +++ b/frontend/src/api/analytic.js @@ -1,8 +1,8 @@ import http from '@/lib/http' const analytic = { - cpu_usage() { - return http.get('/analytic/cpu') + init() { + return http.get('/analytic/init') } } diff --git a/frontend/src/components/Chart/CPUChart.vue b/frontend/src/components/Chart/CPUChart.vue new file mode 100644 index 00000000..0f9b7247 --- /dev/null +++ b/frontend/src/components/Chart/CPUChart.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/frontend/src/components/Chart/DiskChart.vue b/frontend/src/components/Chart/DiskChart.vue new file mode 100644 index 00000000..66a0f7b2 --- /dev/null +++ b/frontend/src/components/Chart/DiskChart.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/frontend/src/components/Chart/NetChart.vue b/frontend/src/components/Chart/NetChart.vue new file mode 100644 index 00000000..5f888f81 --- /dev/null +++ b/frontend/src/components/Chart/NetChart.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/frontend/src/components/Chart/RadialBarChart.vue b/frontend/src/components/Chart/RadialBarChart.vue new file mode 100644 index 00000000..39ed48e3 --- /dev/null +++ b/frontend/src/components/Chart/RadialBarChart.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index 3aab8237..81fe9313 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -62,17 +62,16 @@ export const routes = [ meta: { icon: 'file', hideChildren: true - }, - children: [{ - path: 'config/:name', - name: $gettext('Edit Configuration'), - component: () => import('@/views/config/ConfigEdit.vue'), - meta: { - hiddenInSidebar: true - }, - },] + } + }, + { + path: 'config/:name', + name: $gettext('Edit Configuration'), + component: () => import('@/views/config/ConfigEdit.vue'), + meta: { + hiddenInSidebar: true + }, }, - { path: 'about', name: $gettext('About'), diff --git a/frontend/src/views/config/ConfigEdit.vue b/frontend/src/views/config/ConfigEdit.vue index 9b152120..e303c777 100644 --- a/frontend/src/views/config/ConfigEdit.vue +++ b/frontend/src/views/config/ConfigEdit.vue @@ -3,8 +3,8 @@ - Cancel - Save + Cancel + Save diff --git a/frontend/src/views/dashboard/DashBoard.vue b/frontend/src/views/dashboard/DashBoard.vue index 6b59541e..ad2e19aa 100644 --- a/frontend/src/views/dashboard/DashBoard.vue +++ b/frontend/src/views/dashboard/DashBoard.vue @@ -1,64 +1,148 @@