From 09eb76bf0fb9210f643c507414d8ec399f4d41cb Mon Sep 17 00:00:00 2001 From: Developer Date: Mon, 22 Jun 2026 08:05:44 +0000 Subject: [PATCH] style(widgets): apply formatter to dashboard and addon files --- frontend/src/addons/GrafanaAddonPage.tsx | 4 +- frontend/src/addons/SshTasksAddonPage.tsx | 4 +- .../src/components/WidgetConfigDialog.tsx | 68 ++++--------------- frontend/src/pages/AddonPage.tsx | 4 +- frontend/src/pages/Dashboard.tsx | 17 ++--- 5 files changed, 24 insertions(+), 73 deletions(-) diff --git a/frontend/src/addons/GrafanaAddonPage.tsx b/frontend/src/addons/GrafanaAddonPage.tsx index c3adce4..894b41b 100644 --- a/frontend/src/addons/GrafanaAddonPage.tsx +++ b/frontend/src/addons/GrafanaAddonPage.tsx @@ -16,8 +16,8 @@ export function GrafanaAddonPage() {

- Open the full Grafana instance for dashboards, metrics, and - log exploration. + Open the full Grafana instance for dashboards, metrics, and log + exploration.

@@ -426,30 +399,21 @@ export function WidgetConfigDialog({ open, onClose }: Props) { variant="ghost" size="icon" className="h-8 w-8" - disabled={ - index === - sortedInstances.length - 1 - } - onClick={() => - moveInstance(index, 1) - } + disabled={index === sortedInstances.length - 1} + onClick={() => moveInstance(index, 1)} > - toggleEnabled(instance) - } + onCheckedChange={() => toggleEnabled(instance)} aria-label={`Toggle ${instance.title}`} /> @@ -457,9 +421,7 @@ export function WidgetConfigDialog({ open, onClose }: Props) { variant="ghost" size="icon" className="h-8 w-8 text-destructive" - onClick={() => - removeInstance(instance) - } + onClick={() => removeInstance(instance)} > diff --git a/frontend/src/pages/AddonPage.tsx b/frontend/src/pages/AddonPage.tsx index 3dfe759..a094b0a 100644 --- a/frontend/src/pages/AddonPage.tsx +++ b/frontend/src/pages/AddonPage.tsx @@ -19,9 +19,7 @@ export function AddonPage() { if (!Page) { return ( - - Addon "{addonId}" is not installed. - + Addon "{addonId}" is not installed. ); } diff --git a/frontend/src/pages/Dashboard.tsx b/frontend/src/pages/Dashboard.tsx index 5c20f5e..0192daa 100644 --- a/frontend/src/pages/Dashboard.tsx +++ b/frontend/src/pages/Dashboard.tsx @@ -139,9 +139,7 @@ function ShortcutDialog({ - onChange({ ...draft, icon: e.target.value }) - } + onChange={(e) => onChange({ ...draft, icon: e.target.value })} /> @@ -183,9 +181,7 @@ function ShortcutDialog({ - onChange({ ...draft, url: e.target.value }) - } + onChange={(e) => onChange({ ...draft, url: e.target.value })} /> ) : draft.shortcut_type === "action" ? ( @@ -237,9 +233,7 @@ function ShortcutDialog({ - onChange({ ...draft, notes: e.target.value }) - } + onChange={(e) => onChange({ ...draft, notes: e.target.value })} />
@@ -385,10 +379,7 @@ export function Dashboard() { description="Quick links to websites today, with room for action and user shortcuts later." action={
-