Skip to content

Commit 5ada143

Browse files
committed
fix(site): WorkspaceProxyPage: show wsproxy errors in context
1 parent 8701dbc commit 5ada143

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

site/src/pages/HealthPage/WorkspaceProxyPage.tsx

+10-3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ export const WorkspaceProxyPage = () => {
3939
</Header>
4040

4141
<Main>
42+
{workspace_proxy.error ? (
43+
<Alert severity="error">{workspace_proxy.error}</Alert>
44+
) : null}
4245
{workspace_proxy.warnings.map((warning) => {
4346
return (
4447
<Alert key={warning.code} severity="warning">
@@ -48,6 +51,7 @@ export const WorkspaceProxyPage = () => {
4851
})}
4952

5053
{regions.map((region) => {
54+
const errors = region.status?.report?.errors ?? [];
5155
const warnings = region.status?.report?.warnings ?? [];
5256

5357
return (
@@ -138,14 +142,17 @@ export const WorkspaceProxyPage = () => {
138142
color: theme.palette.text.secondary,
139143
}}
140144
>
141-
{warnings.length > 0 ? (
145+
{warnings.length === 0 && errors.length === 0 ? (
146+
<span>OK</span>
147+
) : (
142148
<div css={{ display: "flex", flexDirection: "column" }}>
149+
{errors.map((error, i) => (
150+
<span key={i}>{error}</span>
151+
))}
143152
{warnings.map((warning, i) => (
144153
<span key={i}>{warning}</span>
145154
))}
146155
</div>
147-
) : (
148-
<span>No warnings</span>
149156
)}
150157
<span data-chromatic="ignore">
151158
{createDayString(region.updated_at)}

0 commit comments

Comments
 (0)