Skip to content

Commit 67ff207

Browse files
authored
feat: add derp only text to proxies list in dashboard (#8932)
1 parent 82e0e2e commit 67ff207

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

site/src/components/DeploySettingsLayout/Badges.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ export const EntitledBadge: FC = () => {
2323
)
2424
}
2525

26-
export const HealthyBadge: FC = () => {
26+
export const HealthyBadge: FC<{ derpOnly: boolean }> = ({ derpOnly }) => {
2727
const styles = useStyles()
28+
let text = "Healthy"
29+
if (derpOnly) {
30+
text = "Healthy (DERP Only)"
31+
}
2832
return (
2933
<span className={combineClasses([styles.badge, styles.enabledBadge])}>
30-
Healthy
34+
{text}
3135
</span>
3236
)
3337
}

site/src/pages/UserSettingsPage/WorkspaceProxyPage/WorkspaceProxyRow.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,14 @@ const DetailedProxyStatus: FC<{
169169
return <ProxyStatus proxy={proxy} />
170170
}
171171

172+
let derpOnly = false
173+
if ("derp_only" in proxy) {
174+
derpOnly = proxy.derp_only
175+
}
176+
172177
switch (proxy.status.status) {
173178
case "ok":
174-
return <HealthyBadge />
179+
return <HealthyBadge derpOnly={derpOnly} />
175180
case "unhealthy":
176181
return <NotHealthyBadge />
177182
case "unreachable":
@@ -189,7 +194,7 @@ const ProxyStatus: FC<{
189194
}> = ({ proxy }) => {
190195
let icon = <NotHealthyBadge />
191196
if (proxy.healthy) {
192-
icon = <HealthyBadge />
197+
icon = <HealthyBadge derpOnly={false} />
193198
}
194199

195200
return icon

0 commit comments

Comments
 (0)