Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8a12ee7

Browse files
authored
fix(site): show wsproxy errors in context in WorkspaceProxyPage (#11556)
* Shows the overall report error at the top of the page, if present.* Shows workspaceproxy errors above warnings inside the corresponding element, if present.* Improves unregistered proxy status
1 parent8701dbc commit8a12ee7

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

‎site/src/pages/HealthPage/WorkspaceProxyPage.tsx

Lines changed: 18 additions & 5 deletions
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+
<Alertseverity="error">{workspace_proxy.error}</Alert>
44+
)}
4245
{workspace_proxy.warnings.map((warning)=>{
4346
return(
4447
<Alertkey={warning.code}severity="warning">
@@ -48,6 +51,7 @@ export const WorkspaceProxyPage = () => {
4851
})}
4952

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

5357
return(
@@ -138,14 +142,23 @@ export const WorkspaceProxyPage = () => {
138142
color:theme.palette.text.secondary,
139143
}}
140144
>
141-
{warnings.length>0 ?(
145+
{region.status?.status==="unregistered" ?(
146+
<span>Has not connected yet</span>
147+
) :warnings.length===0&&errors.length===0 ?(
148+
<span>OK</span>
149+
) :(
142150
<divcss={{display:"flex",flexDirection:"column"}}>
143-
{warnings.map((warning,i)=>(
144-
<spankey={i}>{warning}</span>
151+
{[...errors, ...warnings].map((msg,i)=>(
152+
<span
153+
css={{
154+
":first-letter":{textTransform:"uppercase"},
155+
}}
156+
key={i}
157+
>
158+
{msg}
159+
</span>
145160
))}
146161
</div>
147-
) :(
148-
<span>No warnings</span>
149162
)}
150163
<spandata-chromatic="ignore">
151164
{createDayString(region.updated_at)}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp