File tree 1 file changed +10
-3
lines changed
site/src/pages/HealthPage
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ export const WorkspaceProxyPage = () => {
39
39
</ Header >
40
40
41
41
< Main >
42
+ { workspace_proxy . error ? (
43
+ < Alert severity = "error" > { workspace_proxy . error } </ Alert >
44
+ ) : null }
42
45
{ workspace_proxy . warnings . map ( ( warning ) => {
43
46
return (
44
47
< Alert key = { warning . code } severity = "warning" >
@@ -48,6 +51,7 @@ export const WorkspaceProxyPage = () => {
48
51
} ) }
49
52
50
53
{ regions . map ( ( region ) => {
54
+ const errors = region . status ?. report ?. errors ?? [ ] ;
51
55
const warnings = region . status ?. report ?. warnings ?? [ ] ;
52
56
53
57
return (
@@ -138,14 +142,17 @@ export const WorkspaceProxyPage = () => {
138
142
color : theme . palette . text . secondary ,
139
143
} }
140
144
>
141
- { warnings . length > 0 ? (
145
+ { warnings . length === 0 && errors . length === 0 ? (
146
+ < span > OK</ span >
147
+ ) : (
142
148
< div css = { { display : "flex" , flexDirection : "column" } } >
149
+ { errors . map ( ( error , i ) => (
150
+ < span key = { i } > { error } </ span >
151
+ ) ) }
143
152
{ warnings . map ( ( warning , i ) => (
144
153
< span key = { i } > { warning } </ span >
145
154
) ) }
146
155
</ div >
147
- ) : (
148
- < span > No warnings</ span >
149
156
) }
150
157
< span data-chromatic = "ignore" >
151
158
{ createDayString ( region . updated_at ) }
You can’t perform that action at this time.
0 commit comments