From 67ff2077a63e1cd40814b00402361db668c00a1e Mon Sep 17 00:00:00 2001 From: Dean Sheather Date: Mon, 7 Aug 2023 08:52:06 -0700 Subject: [PATCH] feat: add derp only text to proxies list in dashboard (#8932) --- site/src/components/DeploySettingsLayout/Badges.tsx | 8 ++++++-- .../WorkspaceProxyPage/WorkspaceProxyRow.tsx | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/site/src/components/DeploySettingsLayout/Badges.tsx b/site/src/components/DeploySettingsLayout/Badges.tsx index f9d34bca91..465422ef03 100644 --- a/site/src/components/DeploySettingsLayout/Badges.tsx +++ b/site/src/components/DeploySettingsLayout/Badges.tsx @@ -23,11 +23,15 @@ export const EntitledBadge: FC = () => { ) } -export const HealthyBadge: FC = () => { +export const HealthyBadge: FC<{ derpOnly: boolean }> = ({ derpOnly }) => { const styles = useStyles() + let text = "Healthy" + if (derpOnly) { + text = "Healthy (DERP Only)" + } return ( - Healthy + {text} ) } diff --git a/site/src/pages/UserSettingsPage/WorkspaceProxyPage/WorkspaceProxyRow.tsx b/site/src/pages/UserSettingsPage/WorkspaceProxyPage/WorkspaceProxyRow.tsx index e106eb61ea..760d6f5ca8 100644 --- a/site/src/pages/UserSettingsPage/WorkspaceProxyPage/WorkspaceProxyRow.tsx +++ b/site/src/pages/UserSettingsPage/WorkspaceProxyPage/WorkspaceProxyRow.tsx @@ -169,9 +169,14 @@ const DetailedProxyStatus: FC<{ return } + let derpOnly = false + if ("derp_only" in proxy) { + derpOnly = proxy.derp_only + } + switch (proxy.status.status) { case "ok": - return + return case "unhealthy": return case "unreachable": @@ -189,7 +194,7 @@ const ProxyStatus: FC<{ }> = ({ proxy }) => { let icon = if (proxy.healthy) { - icon = + icon = } return icon