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

Commitba6690f

Browse files
fix: show no provisioners warning (#17835)
<img width="1510" alt="Screenshot 2025-05-14 at 14 53 02"src="https://github.com/user-attachments/assets/f9c0fbb9-ea39-4fbc-a550-00d9f609a01e"/>Fix#17421
1 parent1bacd82 commitba6690f

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

‎site/src/pages/CreateTemplatePage/BuildLogsDrawer.stories.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ export const Logs: Story = {
7878
...MockTemplateVersion.job,
7979
status:"running",
8080
},
81+
matched_provisioners:{
82+
count:1,
83+
available:1,
84+
},
8185
},
8286
},
8387
decorators:[withWebSocket],

‎site/src/pages/CreateTemplatePage/BuildLogsDrawer.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ export const BuildLogsDrawer: FC<BuildLogsDrawerProps> = ({
2929
variablesSectionRef,
3030
...drawerProps
3131
})=>{
32-
constmatchingProvisioners=templateVersion?.matched_provisioners?.count;
33-
constavailableProvisioners=
34-
templateVersion?.matched_provisioners?.available;
35-
3632
constlogs=useWatchVersionLogs(templateVersion);
3733
constlogsContainer=useRef<HTMLDivElement>(null);
3834

@@ -60,6 +56,10 @@ export const BuildLogsDrawer: FC<BuildLogsDrawerProps> = ({
6056
errorinstanceofJobError&&
6157
error.job.error_code==="REQUIRED_TEMPLATE_VARIABLES";
6258

59+
constmatchingProvisioners=templateVersion?.matched_provisioners?.count;
60+
constavailableProvisioners=
61+
templateVersion?.matched_provisioners?.available;
62+
6363
return(
6464
<Draweranchor="right"{...drawerProps}>
6565
<divcss={styles.root}>
@@ -85,7 +85,7 @@ export const BuildLogsDrawer: FC<BuildLogsDrawerProps> = ({
8585
drawerProps.onClose();
8686
}}
8787
/>
88-
) :logs ?(
88+
) :availableProvisioners&&availableProvisioners>0&&logs ?(
8989
<sectionref={logsContainer}css={styles.logs}>
9090
<WorkspaceBuildLogslogs={logs}css={{border:0}}/>
9191
</section>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp