Skip to content

Commit 14a9610

Browse files
committed
don't show the go-to-console button until the cloud instance is ready
1 parent bbc055b commit 14a9610

File tree

2 files changed

+31
-26
lines changed

2 files changed

+31
-26
lines changed

www/src/components/overview/clusters/all/AllClustersTableCols.tsx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,22 @@ const ColActions = columnHelper.accessor((instance) => instance, {
115115
const instance = getValue()
116116

117117
return (
118-
<Flex gap="small">
119-
<Button
120-
secondary
121-
small
122-
startIcon={<ConsoleIcon color={theme.colors['icon-default']} />}
123-
as={Link}
124-
to={sanitizeConsoleUrl(instance.consoleUrl)}
125-
target="_blank"
126-
rel="noopener noreferrer"
127-
onClick={(e) => e.stopPropagation()}
128-
>
129-
Go to Console
130-
</Button>
118+
<Flex gap="small" justify="flex-end" width="100%">
119+
{(instance.type === CombinedClusterType.SelfHosted ||
120+
instance.status === ConsoleInstanceStatus.Provisioned) && (
121+
<Button
122+
secondary
123+
small
124+
startIcon={<ConsoleIcon />}
125+
as={Link}
126+
to={sanitizeConsoleUrl(instance.consoleUrl)}
127+
target="_blank"
128+
rel="noopener noreferrer"
129+
onClick={(e) => e.stopPropagation()}
130+
>
131+
Go to Console
132+
</Button>
133+
)}
131134
<IconFrame
132135
clickable
133136
tooltip="View instance details"

www/src/components/overview/clusters/plural-cloud/CloudInstanceTableCols.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -167,19 +167,21 @@ const ColActions = columnHelper.accessor((instance) => instance, {
167167
const instance = getValue()
168168

169169
return (
170-
<Flex gap="small">
171-
<Button
172-
secondary
173-
small
174-
startIcon={<ConsoleIcon color={theme.colors['icon-default']} />}
175-
as={Link}
176-
to={sanitizeConsoleUrl(instance.url)}
177-
target="_blank"
178-
rel="noopener noreferrer"
179-
onClick={(e) => e.stopPropagation()}
180-
>
181-
Go to Console
182-
</Button>
170+
<Flex gap="small" justify="flex-end" width="100%">
171+
{instance.status === ConsoleInstanceStatus.Provisioned && (
172+
<Button
173+
secondary
174+
small
175+
startIcon={<ConsoleIcon />}
176+
as={Link}
177+
to={sanitizeConsoleUrl(instance.url)}
178+
target="_blank"
179+
rel="noopener noreferrer"
180+
onClick={(e) => e.stopPropagation()}
181+
>
182+
Go to Console
183+
</Button>
184+
)}
183185
<IconFrame
184186
clickable
185187
tooltip="View instance details"

0 commit comments

Comments
 (0)