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

Commit0e98c0e

Browse files
authored
fix(site): remove a misplaced warning banner in the frontend (#15837)
This PR fixes some faulty frontend logic that was introduced in#15686
1 parent08f0eaa commit0e98c0e

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

‎site/src/pages/WorkspacePage/Workspace.stories.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,16 @@ type Story = StoryObj<typeof Workspace>;
6363

6464
exportconstRunning:Story={
6565
args:{
66-
workspace:Mocks.MockWorkspace,
66+
workspace:{
67+
...Mocks.MockWorkspace,
68+
latest_build:{
69+
...Mocks.MockWorkspace.latest_build,
70+
matched_provisioners:{
71+
count:0,
72+
available:0,
73+
},
74+
},
75+
},
6776
handleStart:action("start"),
6877
handleStop:action("stop"),
6978
buildInfo:Mocks.MockBuildInfo,

‎site/src/pages/WorkspacePage/Workspace.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ export const Workspace: FC<WorkspaceProps> = ({
110110
(r)=>resourceOptionValue(r)===resourcesNav.value,
111111
);
112112

113-
constshouldDisplayBuildLogs=
114-
(buildLogs??[]).length>0&&workspace.latest_build.status!=="running";
115-
113+
constworkspaceRunning=workspace.latest_build.status==="running";
114+
consthaveBuildLogs=(buildLogs??[]).length>0;
116115
constprovisionersHealthy=
117116
(workspace.latest_build.matched_provisioners?.available??0)>0;
117+
constshouldDisplayBuildLogs=haveBuildLogs&&!workspaceRunning;
118118
constshouldShowProvisionerAlert=
119-
!provisionersHealthy&&(!buildLogs||buildLogs.length===0);
119+
!workspaceRunning&&!haveBuildLogs&&!provisionersHealthy;
120120

121121
return(
122122
<div

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp