From c26ddf6bb8054b65a249376c51e6d1e9b4da0cc3 Mon Sep 17 00:00:00 2001 From: nfebe Date: Mon, 6 Jul 2026 11:26:00 +0100 Subject: [PATCH 1/2] feat(observ): Add observability UI, plugin slots, notifications settings The observability plugin gets a full native UI. A fleet overview lands under a Monitoring group in the sidebar with real time-series graph panels (CPU, memory, network) instead of flat stat lists, a recovery timeline, and a "needs attention" list. Managed deployments there deep-link straight to their metrics tab; external containers are shown but not linked, since there is nothing for FlatRun to manage. Plugins can inject sections into the app through a slot system: a deployment's detail view renders plugin-contributed tabs, and settings renders plugin-contributed configuration forms driven by each plugin's schema. Notifications are a core settings tab. Targets are configured through per-service fields (email or webhook) that build the delivery URL for the user, rather than making them hand-write shoutrrr syntax, with a test-send per target. --- package-lock.json | 7 + package.json | 1 + src/components/NotificationsSettings.vue | 415 ++++++++++++++++ src/components/base/TimeRangePicker.vue | 58 +++ src/components/charts/TimeSeriesChart.vue | 126 +++++ src/components/plugins/PluginSlot.vue | 47 ++ src/components/plugins/kinds/MetricsPanel.vue | 221 +++++++++ src/components/plugins/kinds/SchemaForm.vue | 184 +++++++ src/layouts/DashboardLayout.vue | 21 +- src/router/index.ts | 6 + src/services/api.ts | 13 + src/services/observability.ts | 61 +++ src/services/pluginApi.ts | 11 + src/stores/plugins.ts | 18 + src/views/DeploymentDetailView.vue | 82 +++- src/views/ObservabilityView.vue | 456 ++++++++++++++++++ src/views/SettingsView.test.ts | 5 +- src/views/SettingsView.vue | 41 +- 18 files changed, 1746 insertions(+), 27 deletions(-) create mode 100644 src/components/NotificationsSettings.vue create mode 100644 src/components/base/TimeRangePicker.vue create mode 100644 src/components/charts/TimeSeriesChart.vue create mode 100644 src/components/plugins/PluginSlot.vue create mode 100644 src/components/plugins/kinds/MetricsPanel.vue create mode 100644 src/components/plugins/kinds/SchemaForm.vue create mode 100644 src/services/observability.ts create mode 100644 src/services/pluginApi.ts create mode 100644 src/views/ObservabilityView.vue diff --git a/package-lock.json b/package-lock.json index ffcd0c7..a6cc5af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "marked": "^18.0.5", "pinia": "^2.1.7", "primeicons": "^6.0.1", + "uplot": "^1.6.32", "vue": "^3.4.21", "vue-codemirror": "^6.1.1", "vue-router": "^4.3.0" @@ -4411,6 +4412,12 @@ "dev": true, "license": "MIT" }, + "node_modules/uplot": { + "version": "1.6.32", + "resolved": "https://registry.npmjs.org/uplot/-/uplot-1.6.32.tgz", + "integrity": "sha512-KIMVnG68zvu5XXUbC4LQEPnhwOxBuLyW1AHtpm6IKTXImkbLgkMy+jabjLgSLMasNuGGzQm/ep3tOkyTxpiQIw==", + "license": "MIT" + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", diff --git a/package.json b/package.json index 6f7f6ab..985375c 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "marked": "^18.0.5", "pinia": "^2.1.7", "primeicons": "^6.0.1", + "uplot": "^1.6.32", "vue": "^3.4.21", "vue-codemirror": "^6.1.1", "vue-router": "^4.3.0" diff --git a/src/components/NotificationsSettings.vue b/src/components/NotificationsSettings.vue new file mode 100644 index 0000000..f5db840 --- /dev/null +++ b/src/components/NotificationsSettings.vue @@ -0,0 +1,415 @@ + + + + + diff --git a/src/components/base/TimeRangePicker.vue b/src/components/base/TimeRangePicker.vue new file mode 100644 index 0000000..c61a2b4 --- /dev/null +++ b/src/components/base/TimeRangePicker.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/src/components/charts/TimeSeriesChart.vue b/src/components/charts/TimeSeriesChart.vue new file mode 100644 index 0000000..8a06007 --- /dev/null +++ b/src/components/charts/TimeSeriesChart.vue @@ -0,0 +1,126 @@ + + + + + diff --git a/src/components/plugins/PluginSlot.vue b/src/components/plugins/PluginSlot.vue new file mode 100644 index 0000000..1cc841f --- /dev/null +++ b/src/components/plugins/PluginSlot.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/src/components/plugins/kinds/MetricsPanel.vue b/src/components/plugins/kinds/MetricsPanel.vue new file mode 100644 index 0000000..738173a --- /dev/null +++ b/src/components/plugins/kinds/MetricsPanel.vue @@ -0,0 +1,221 @@ + + + + + diff --git a/src/components/plugins/kinds/SchemaForm.vue b/src/components/plugins/kinds/SchemaForm.vue new file mode 100644 index 0000000..03a1024 --- /dev/null +++ b/src/components/plugins/kinds/SchemaForm.vue @@ -0,0 +1,184 @@ + + + + + diff --git a/src/layouts/DashboardLayout.vue b/src/layouts/DashboardLayout.vue index 5078e85..a52b644 100644 --- a/src/layouts/DashboardLayout.vue +++ b/src/layouts/DashboardLayout.vue @@ -260,12 +260,16 @@