From 0248a2a98926d47bf10ada8446393cb6fe0e0238 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 25 Jun 2022 23:01:40 +0900 Subject: [PATCH] enhance(client): improve control panel --- .../client/src/components/queue-chart.vue | 232 --------- .../src/pages/admin/overview.federation.vue | 105 ++++ .../src/pages/admin/overview.queue-chart.vue | 213 ++++++++ packages/client/src/pages/admin/overview.vue | 487 ++++++++++++++---- .../src/pages/admin/queue.chart.chart.vue | 181 +++++++ .../client/src/pages/admin/queue.chart.vue | 146 ++++-- packages/client/src/pages/admin/queue.vue | 35 +- 7 files changed, 996 insertions(+), 403 deletions(-) delete mode 100644 packages/client/src/components/queue-chart.vue create mode 100644 packages/client/src/pages/admin/overview.federation.vue create mode 100644 packages/client/src/pages/admin/overview.queue-chart.vue create mode 100644 packages/client/src/pages/admin/queue.chart.chart.vue diff --git a/packages/client/src/components/queue-chart.vue b/packages/client/src/components/queue-chart.vue deleted file mode 100644 index 7bb548cf06..0000000000 --- a/packages/client/src/components/queue-chart.vue +++ /dev/null @@ -1,232 +0,0 @@ - - - - - diff --git a/packages/client/src/pages/admin/overview.federation.vue b/packages/client/src/pages/admin/overview.federation.vue new file mode 100644 index 0000000000..6709c30c64 --- /dev/null +++ b/packages/client/src/pages/admin/overview.federation.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/packages/client/src/pages/admin/overview.queue-chart.vue b/packages/client/src/pages/admin/overview.queue-chart.vue new file mode 100644 index 0000000000..646d1ac2f3 --- /dev/null +++ b/packages/client/src/pages/admin/overview.queue-chart.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/packages/client/src/pages/admin/overview.vue b/packages/client/src/pages/admin/overview.vue index f81f6104c7..22d9d72a70 100644 --- a/packages/client/src/pages/admin/overview.vue +++ b/packages/client/src/pages/admin/overview.vue @@ -1,92 +1,318 @@ + + diff --git a/packages/client/src/pages/admin/queue.chart.vue b/packages/client/src/pages/admin/queue.chart.vue index be63830bdd..c213037b65 100644 --- a/packages/client/src/pages/admin/queue.chart.vue +++ b/packages/client/src/pages/admin/queue.chart.vue @@ -1,80 +1,148 @@ diff --git a/packages/client/src/pages/admin/queue.vue b/packages/client/src/pages/admin/queue.vue index c2865525ab..d091fe647c 100644 --- a/packages/client/src/pages/admin/queue.vue +++ b/packages/client/src/pages/admin/queue.vue @@ -1,14 +1,9 @@ @@ -19,12 +14,11 @@ import XQueue from './queue.chart.vue'; import XHeader from './_header_.vue'; import MkButton from '@/components/ui/button.vue'; import * as os from '@/os'; -import { stream } from '@/stream'; import * as config from '@/config'; import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; -const connection = markRaw(stream.useChannel('queueStats')); +let tab = $ref('deliver'); function clear() { os.confirm({ @@ -38,19 +32,6 @@ function clear() { }); } -onMounted(() => { - nextTick(() => { - connection.send('requestLog', { - id: Math.random().toString().substr(2, 8), - length: 200, - }); - }); -}); - -onBeforeUnmount(() => { - connection.dispose(); -}); - const headerActions = $computed(() => [{ asFullButton: true, icon: 'fas fa-up-right-from-square', @@ -60,7 +41,13 @@ const headerActions = $computed(() => [{ }, }]); -const headerTabs = $computed(() => []); +const headerTabs = $computed(() => [{ + key: 'deliver', + title: 'Deliver', +}, { + key: 'inbox', + title: 'Inbox', +}]); definePageMetadata({ title: i18n.ts.jobQueue,