diff --git a/CHANGELOG.md b/CHANGELOG.md index 61a38ad364..ad5fa430c8 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 d97b114f17..fbbc231b88 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 0000000000..eb4cefb345 --- /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 0000000000..65ba0075eb --- /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 e8cb5867a7..eb44fa23b7 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 0000000000..c13e2328fd --- /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 a2b748ad38..609ad5ebef 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 0000000000..9fd799e158 --- /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 0000000000..dc9146cffd --- /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 0dd4a749ba..0000000000 --- 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 0000000000..05d7221c10 --- /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 6c1f54186c..786a908720 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 + +