Skip to content

Commit eb22598

Browse files
authored
Make sure display access endpoint only when deployment running (#241)
* Make sure display access endpoint only when deployment running * dont show access endpoint when the deployment is terminated
1 parent 171be1f commit eb22598

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dashboard/src/pages/Deployment/Overview.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ export default function DeploymentOverview() {
3737
const highlightTheme = themeType === 'dark' ? dark : docco
3838
const portForwardCommand = `kubectl port-forward -n ${kubeNamespace} svc/${deploymentName} 8080:3000`
3939
const [copyNotification, setCopyNotification] = useState<string>()
40+
const shouldShowAccessButton =
41+
deployment?.status !== 'terminated' && (!deployment?.urls || deployment.urls.length === 0)
4042

4143
return (
4244
<div>
@@ -51,7 +53,7 @@ export default function DeploymentOverview() {
5153
gap: 10,
5254
}}
5355
>
54-
{(!deployment?.urls || deployment.urls.length === 0) && (
56+
{shouldShowAccessButton && (
5557
<Button
5658
size='mini'
5759
startEnhancer={<MdOutlineAccessibilityNew />}

0 commit comments

Comments
 (0)