File tree 2 files changed +9
-5
lines changed
site/src/pages/CreateTemplatePage
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,10 @@ export const Logs: Story = {
78
78
...MockTemplateVersion . job ,
79
79
status : "running" ,
80
80
} ,
81
+ matched_provisioners : {
82
+ count : 1 ,
83
+ available : 1 ,
84
+ } ,
81
85
} ,
82
86
} ,
83
87
decorators : [ withWebSocket ] ,
Original file line number Diff line number Diff line change @@ -29,10 +29,6 @@ export const BuildLogsDrawer: FC<BuildLogsDrawerProps> = ({
29
29
variablesSectionRef,
30
30
...drawerProps
31
31
} ) => {
32
- const matchingProvisioners = templateVersion ?. matched_provisioners ?. count ;
33
- const availableProvisioners =
34
- templateVersion ?. matched_provisioners ?. available ;
35
-
36
32
const logs = useWatchVersionLogs ( templateVersion ) ;
37
33
const logsContainer = useRef < HTMLDivElement > ( null ) ;
38
34
@@ -60,6 +56,10 @@ export const BuildLogsDrawer: FC<BuildLogsDrawerProps> = ({
60
56
error instanceof JobError &&
61
57
error . job . error_code === "REQUIRED_TEMPLATE_VARIABLES" ;
62
58
59
+ const matchingProvisioners = templateVersion ?. matched_provisioners ?. count ;
60
+ const availableProvisioners =
61
+ templateVersion ?. matched_provisioners ?. available ;
62
+
63
63
return (
64
64
< Drawer anchor = "right" { ...drawerProps } >
65
65
< div css = { styles . root } >
@@ -85,7 +85,7 @@ export const BuildLogsDrawer: FC<BuildLogsDrawerProps> = ({
85
85
drawerProps . onClose ( ) ;
86
86
} }
87
87
/>
88
- ) : logs ? (
88
+ ) : availableProvisioners && availableProvisioners > 0 && logs ? (
89
89
< section ref = { logsContainer } css = { styles . logs } >
90
90
< WorkspaceBuildLogs logs = { logs } css = { { border : 0 } } />
91
91
</ section >
You can’t perform that action at this time.
0 commit comments