From 1aed1c587e369bd9d505b336e4d45638433181ba Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 27 Dec 2022 09:47:54 +0900 Subject: [PATCH] enhance(client): heatmap for dashboard --- packages/client/package.json | 1 + .../src/pages/admin/overview.heatmap.vue | 233 ++++++++++++++++++ packages/client/src/pages/admin/overview.vue | 14 ++ yarn.lock | 10 + 4 files changed, 258 insertions(+) create mode 100644 packages/client/src/pages/admin/overview.heatmap.vue diff --git a/packages/client/package.json b/packages/client/package.json index bebad2bf9c..0af8ffac0b 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -22,6 +22,7 @@ "browser-image-resizer": "git+https://github.com/misskey-dev/browser-image-resizer#v2.2.1-misskey.3", "chart.js": "4.1.1", "chartjs-adapter-date-fns": "3.0.0", + "chartjs-chart-matrix": "^1.3.0", "chartjs-plugin-gradient": "0.6.1", "chartjs-plugin-zoom": "2.0.0", "compare-versions": "5.0.1", diff --git a/packages/client/src/pages/admin/overview.heatmap.vue b/packages/client/src/pages/admin/overview.heatmap.vue new file mode 100644 index 0000000000..ce5b684ae8 --- /dev/null +++ b/packages/client/src/pages/admin/overview.heatmap.vue @@ -0,0 +1,233 @@ + + + + + diff --git a/packages/client/src/pages/admin/overview.vue b/packages/client/src/pages/admin/overview.vue index 67f612e6b5..cc5b9b7b68 100644 --- a/packages/client/src/pages/admin/overview.vue +++ b/packages/client/src/pages/admin/overview.vue @@ -5,34 +5,47 @@ + + + + + + + + + + + + + @@ -51,6 +64,7 @@ import XUsers from './overview.users.vue'; import XActiveUsers from './overview.active-users.vue'; import XStats from './overview.stats.vue'; import XModerators from './overview.moderators.vue'; +import XHeatmap from './overview.heatmap.vue'; import MkTagCloud from '@/components/MkTagCloud.vue'; import { version, url } from '@/config'; import * as os from '@/os'; diff --git a/yarn.lock b/yarn.lock index 25cd2980e7..3fdc9145fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4956,6 +4956,15 @@ __metadata: languageName: node linkType: hard +"chartjs-chart-matrix@npm:^1.3.0": + version: 1.3.0 + resolution: "chartjs-chart-matrix@npm:1.3.0" + peerDependencies: + chart.js: ">=3.0.0" + checksum: d29a08f3ffd888a1b6c45be2cbeb8987c145a74b07a713c84001860669b200931517746c475537dd0893c57a739115fa96a68d3a113013aff28f3bee4494d5cc + languageName: node + linkType: hard + "chartjs-plugin-gradient@npm:0.6.1": version: 0.6.1 resolution: "chartjs-plugin-gradient@npm:0.6.1" @@ -5165,6 +5174,7 @@ __metadata: browser-image-resizer: "git+https://github.com/misskey-dev/browser-image-resizer#v2.2.1-misskey.3" chart.js: 4.1.1 chartjs-adapter-date-fns: 3.0.0 + chartjs-chart-matrix: ^1.3.0 chartjs-plugin-gradient: 0.6.1 chartjs-plugin-zoom: 2.0.0 compare-versions: 5.0.1