diff --git a/client/web/admin/package.json b/client/web/admin/package.json
index b0e481351..ab3ce30cd 100644
--- a/client/web/admin/package.json
+++ b/client/web/admin/package.json
@@ -27,8 +27,8 @@
"acorn": "^6.4.1",
"axios": "0.21.2",
"bootstrap-vue": "^2.21.2",
+ "echarts": "^5.3.3",
"brace": "^0.11.1",
- "chart.js": "^2.9.3",
"copy-to-clipboard": "^3.3.1",
"flush-promises": "^1.0.2",
"fstream": "^1.0.12",
@@ -49,6 +49,7 @@
"stylelint-scss": "3.14.2",
"stylelint-webpack-plugin": "^0.10.5",
"vue": "2.6.14",
+ "vue-echarts": "^6.2.3",
"vue-native-websocket": "^2.0.15",
"vue-router": "3.1.5",
"vue-select": "3.4.0",
@@ -63,6 +64,7 @@
"@vue/cli-plugin-eslint": "^3.10.0",
"@vue/cli-plugin-unit-mocha": "^3.10.0",
"@vue/cli-service": "^3.10.0",
+ "@vue/composition-api": "^1.7.0",
"@vue/eslint-config-standard": "^4.0.0",
"@vue/test-utils": "^1.0.0-beta.25",
"babel-eslint": "^10.0.2",
diff --git a/client/web/admin/src/components/index.js b/client/web/admin/src/components/index.js
index b43306446..48f1e88a2 100644
--- a/client/web/admin/src/components/index.js
+++ b/client/web/admin/src/components/index.js
@@ -8,6 +8,22 @@ import { components } from '@cortezaproject/corteza-vue'
import { LMap, LTileLayer, LMarker } from 'vue2-leaflet'
import 'leaflet/dist/leaflet.css'
import { Icon } from 'leaflet'
+
+// import ECharts modules manually to reduce bundle size
+import ECharts from 'vue-echarts'
+import { use } from 'echarts/core'
+import {
+ SVGRenderer,
+} from 'echarts/renderers'
+import {
+ LineChart,
+} from 'echarts/charts'
+import {
+ TitleComponent,
+ GridComponent,
+ TooltipComponent,
+} from 'echarts/components'
+
const { CCorredorManualButtons, CPermissionsButton, CInputConfirm } = components
Vue.use(PortalVue)
@@ -23,6 +39,16 @@ Vue.component('l-map', LMap)
Vue.component('l-tile-layer', LTileLayer)
Vue.component('l-marker', LMarker)
+use([
+ LineChart,
+ SVGRenderer,
+ TitleComponent,
+ GridComponent,
+ TooltipComponent,
+])
+
+Vue.component('e-charts', ECharts)
+
delete Icon.Default.prototype._getIconUrl
Icon.Default.mergeOptions({
iconRetinaUrl: require('leaflet/dist/images/marker-icon-2x.png'),
diff --git a/client/web/admin/src/views/Dashboard.vue b/client/web/admin/src/views/Dashboard.vue
index 135c4c52e..874f6857d 100644
--- a/client/web/admin/src/views/Dashboard.vue
+++ b/client/web/admin/src/views/Dashboard.vue
@@ -1,6 +1,6 @@
-
+
+
-
-
- {{ users.valid }}
-
-
-
- {{ $t('users.title') }}
-
+
+
+
+ {{ users.valid }}
+
+
+
+ {{ $t('users.title') }}
+
+
-
-
+
{{ users.total }}
@@ -64,6 +72,7 @@
{{ users.suspended }}
@@ -79,6 +88,7 @@
{{ users.deleted }}
@@ -87,31 +97,40 @@
-
+
+
+
+
-
-
- {{ roles.valid }}
-
-
-
- {{ $t('roles.title') }}
-
+
+
+
+ {{ roles.valid }}
+
+
+
+ {{ $t('roles.title') }}
+
+
-
+
{{ roles.total }}
@@ -136,6 +156,7 @@
{{ roles.archived }}
@@ -151,6 +172,7 @@
{{ roles.deleted }}
@@ -159,31 +181,38 @@
-
+
+
-
-
- {{ applications.valid }}
-
-
-
- {{ $t('applications.title') }}
-
+
+
+
+ {{ applications.valid }}
+
+
+
+ {{ $t('applications.title') }}
+
+
-
+
{{ applications.total }}
@@ -208,6 +238,7 @@
{{ applications.deleted }}
@@ -216,7 +247,7 @@
-
+
@@ -224,14 +255,19 @@