diff --git a/CHANGELOG.md b/CHANGELOG.md index 61a38ad36..ad5fa430c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ You should also include the user name that made the change. - Client: Add new gabber kick sounds (thanks for noizenecio) - Client: Compress non-animated PNG files @saschanaz - Client: Youtube window player @sim1222 +- Client: enhance dashboard of control panel @syuilo ### Bugfixes - Server: 引用内の文章がnyaizeされてしまう問題を修正 @kabo2468 diff --git a/packages/client/src/components/MkChart.vue b/packages/client/src/components/MkChart.vue index d97b114f1..fbbc231b8 100644 --- a/packages/client/src/components/MkChart.vue +++ b/packages/client/src/components/MkChart.vue @@ -38,6 +38,7 @@ import gradient from 'chartjs-plugin-gradient'; import * as os from '@/os'; import { defaultStore } from '@/store'; import { useChartTooltip } from '@/scripts/use-chart-tooltip'; +import { chartVLine } from '@/scripts/chart-vline'; const props = defineProps({ src: { @@ -311,27 +312,7 @@ const render = () => { gradient, }, }, - plugins: [{ - id: 'vLine', - beforeDraw(chart, args, options) { - if (chart.tooltip?._active?.length) { - const activePoint = chart.tooltip._active[0]; - const ctx = chart.ctx; - const x = activePoint.element.x; - const topY = chart.scales.y.top; - const bottomY = chart.scales.y.bottom; - - ctx.save(); - ctx.beginPath(); - ctx.moveTo(x, bottomY); - ctx.lineTo(x, topY); - ctx.lineWidth = 1; - ctx.strokeStyle = vLineColor; - ctx.stroke(); - ctx.restore(); - } - }, - }], + plugins: [chartVLine(vLineColor)], }); }; diff --git a/packages/client/src/pages/admin/overview.active-users.vue b/packages/client/src/pages/admin/overview.active-users.vue new file mode 100644 index 000000000..eb4cefb34 --- /dev/null +++ b/packages/client/src/pages/admin/overview.active-users.vue @@ -0,0 +1,223 @@ + + + + + + + + + + + + diff --git a/packages/client/src/pages/admin/overview.ap-requests.vue b/packages/client/src/pages/admin/overview.ap-requests.vue new file mode 100644 index 000000000..65ba0075e --- /dev/null +++ b/packages/client/src/pages/admin/overview.ap-requests.vue @@ -0,0 +1,263 @@ + + + + + + + + + + + + + + + diff --git a/packages/client/src/pages/admin/overview.federation.vue b/packages/client/src/pages/admin/overview.federation.vue index e8cb5867a..eb44fa23b 100644 --- a/packages/client/src/pages/admin/overview.federation.vue +++ b/packages/client/src/pages/admin/overview.federation.vue @@ -1,100 +1,185 @@ - + - - - - - {{ instance.name ?? instance.host }} - {{ instance.host }} + + + + Sub + + Top 10 - - - + + Pub + + Top 10 + + + + + + + + {{ number(federationSubActive) }} + + + Sub + + + + + + + {{ number(federationPubActive) }} + + + Pub + + + + - + diff --git a/packages/client/src/pages/admin/overview.instances.vue b/packages/client/src/pages/admin/overview.instances.vue new file mode 100644 index 000000000..c13e2328f --- /dev/null +++ b/packages/client/src/pages/admin/overview.instances.vue @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + diff --git a/packages/client/src/pages/admin/overview.queue-chart.vue b/packages/client/src/pages/admin/overview.queue.chart.vue similarity index 55% rename from packages/client/src/pages/admin/overview.queue-chart.vue rename to packages/client/src/pages/admin/overview.queue.chart.vue index a2b748ad3..609ad5ebe 100644 --- a/packages/client/src/pages/admin/overview.queue-chart.vue +++ b/packages/client/src/pages/admin/overview.queue.chart.vue @@ -3,7 +3,7 @@ diff --git a/packages/client/src/pages/admin/overview.queue.vue b/packages/client/src/pages/admin/overview.queue.vue new file mode 100644 index 000000000..9fd799e15 --- /dev/null +++ b/packages/client/src/pages/admin/overview.queue.vue @@ -0,0 +1,127 @@ + + + + + Process{{ number(activeSincePrevTick) }} + Active{{ number(active) }} + Waiting{{ number(waiting) }} + Delayed{{ number(delayed) }} + + + + + Process + + + + Active + + + + Delayed + + + + Waiting + + + + + + + + + diff --git a/packages/client/src/pages/admin/overview.stats.vue b/packages/client/src/pages/admin/overview.stats.vue new file mode 100644 index 000000000..dc9146cff --- /dev/null +++ b/packages/client/src/pages/admin/overview.stats.vue @@ -0,0 +1,153 @@ + + + + + + + + + {{ number(stats.originalUsersCount) }} + + + Users + + + + + + + {{ number(stats.originalNotesCount) }} + + + Notes + + + + + + + {{ number(stats.instances) }} + + Instances + + + + + + + {{ number(onlineUsersCount) }} + + Online + + + + + + + + + diff --git a/packages/client/src/pages/admin/overview.user.vue b/packages/client/src/pages/admin/overview.user.vue deleted file mode 100644 index 0dd4a749b..000000000 --- a/packages/client/src/pages/admin/overview.user.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - @{{ acct(user) }} - - - - - - - - diff --git a/packages/client/src/pages/admin/overview.users.vue b/packages/client/src/pages/admin/overview.users.vue new file mode 100644 index 000000000..05d7221c1 --- /dev/null +++ b/packages/client/src/pages/admin/overview.users.vue @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + diff --git a/packages/client/src/pages/admin/overview.vue b/packages/client/src/pages/admin/overview.vue index 6c1f54186..786a90872 100644 --- a/packages/client/src/pages/admin/overview.vue +++ b/packages/client/src/pages/admin/overview.vue @@ -1,207 +1,66 @@ - + - - - Stats - - - Users - - {{ number(stats.originalUsersCount) }} - () - - - - Notes - - {{ number(stats.originalNotesCount) }} - () - - - - - - - Job queue - - - Deliver - - - - Inbox - - - - - - - New users - - - - - - - Recent files - - - - - - - Environment - - - Misskey - {{ version }} - - - Node.js - {{ serverInfo.node }} - - - PostgreSQL - {{ serverInfo.psql }} - - - Redis - {{ serverInfo.redis }} - - - Vue - {{ vueVersion }} - - - - - - - Active users - - - - - - Active instances - - - - - - Federation - - - Sub - - {{ number(federationSubActive) }} - () - - - - Pub - - {{ number(federationPubActive) }} - () - - - - - - - - - - - - - - - - - - - Sub - - Top 10 - - - Pub - - Top 10 - - - - + + Stats + + + + Active users + + + + Federation + + + + Instances + + + + Ap requests + + + + New users + + + + Deliver queue + + + + Inbox queue + +