@@ -41,7 +41,7 @@ export function InstanceDetail({ instanceId, children }: {
)
}
- if (!appId || !app) {
+ if (!resolvedAppInstanceId || !app) {
return (
{t('detail.notFound')}
diff --git a/web/features/deployments/detail/overview-tab.tsx b/web/features/deployments/detail/overview-tab.tsx
index 423299e331..884f87f02a 100644
--- a/web/features/deployments/detail/overview-tab.tsx
+++ b/web/features/deployments/detail/overview-tab.tsx
@@ -88,27 +88,27 @@ function overviewDeploymentStatus(status?: string): 'deploying' | 'deploy_failed
return 'ready'
}
-function DeployFromOverviewButton({ appId }: {
- appId: string
+function DeployFromOverviewButton({ appInstanceId }: {
+ appInstanceId: string
}) {
const { t } = useTranslation('deployments')
const openDeployDrawer = useSetAtom(openDeployDrawerAtom)
return (
-
@@ -178,7 +178,7 @@ function DeploymentStatusSection({ appId }: {
{releaseRows.length === 0
? canCreateRelease
? (
-
}>
+
}>
{t('overview.createRelease')}
)
@@ -188,7 +188,7 @@ function DeploymentStatusSection({ appId }: {
)
: (
-
+
)}
)
@@ -214,11 +214,11 @@ function DeploymentStatusSection({ appId }: {
)
}
-function AccessStatusSection({ appId }: {
- appId: string
+function AccessStatusSection({ appInstanceId }: {
+ appInstanceId: string
}) {
const { t } = useTranslation('deployments')
- const input = { params: { appInstanceId: appId } }
+ const input = { params: { appInstanceId } }
const { data: overview } = useQuery(consoleQuery.enterprise.appDeploy.getAppInstanceOverview.queryOptions({
input,
}))
@@ -234,7 +234,7 @@ function AccessStatusSection({ appId }: {
}>
+
}>
{t('overview.configureAccess')}
@@ -266,14 +266,14 @@ function AccessStatusSection({ appId }: {
)
}
-export function OverviewTab({ instanceId: appId }: {
- instanceId: string
+export function OverviewTab({ appInstanceId }: {
+ appInstanceId: string
}) {
return (
)
}
diff --git a/web/features/deployments/detail/settings-tab.tsx b/web/features/deployments/detail/settings-tab.tsx
index d3278872e6..6d6b63851d 100644
--- a/web/features/deployments/detail/settings-tab.tsx
+++ b/web/features/deployments/detail/settings-tab.tsx
@@ -39,12 +39,12 @@ function DeleteInstanceButton({
const deleteInstance = useMutation(consoleQuery.enterprise.appDeploy.deleteAppInstance.mutationOptions())
const [isDeleting, setIsDeleting] = useState(false)
const [showDeleteConfirm, setShowDeleteConfirm] = useState(false)
- const appId = app.id
- const appName = app.name ?? appId ?? ''
+ const appInstanceId = app.id
+ const appName = app.name ?? appInstanceId ?? ''
const canDelete = !hasDeployments && Boolean(settings) && settings?.deleteGuard?.canDelete !== false
const handleDelete = () => {
- if (!appId)
+ if (!appInstanceId)
return
void (async () => {
@@ -52,7 +52,7 @@ function DeleteInstanceButton({
try {
await deleteInstance.mutateAsync({
params: {
- appInstanceId: appId,
+ appInstanceId,
},
})
toast.success(t('settings.deleted'))
@@ -144,15 +144,15 @@ function SettingsForm({ app, settings }: SettingsFormProps) {
const canSave = Boolean(name.trim() && (name !== initialName || description !== initialDescription) && !isSaving)
const handleSave = () => {
- const appId = app.id
- if (!canSave || !appId)
+ const appInstanceId = app.id
+ if (!canSave || !appInstanceId)
return
void (async () => {
setIsSaving(true)
try {
await updateInstance.mutateAsync({
params: {
- appInstanceId: appId,
+ appInstanceId,
},
body: {
name: name.trim(),
@@ -216,10 +216,10 @@ function SettingsForm({ app, settings }: SettingsFormProps) {
)
}
-function SettingsFormSection({ appId }: {
- appId: string
+function SettingsFormSection({ appInstanceId }: {
+ appInstanceId: string
}) {
- const appInput = { params: { appInstanceId: appId } }
+ const appInput = { params: { appInstanceId } }
const { data: overview } = useQuery(consoleQuery.enterprise.appDeploy.getAppInstanceOverview.queryOptions({
input: appInput,
}))
@@ -243,10 +243,10 @@ function SettingsFormSection({ appId }: {
)
}
-function DeleteInstanceControlSection({ appId }: {
- appId: string
+function DeleteInstanceControlSection({ appInstanceId }: {
+ appInstanceId: string
}) {
- const appInput = { params: { appInstanceId: appId } }
+ const appInput = { params: { appInstanceId } }
const { data: overview } = useQuery(consoleQuery.enterprise.appDeploy.getAppInstanceOverview.queryOptions({
input: appInput,
}))
@@ -272,13 +272,13 @@ function DeleteInstanceControlSection({ appId }: {
)
}
-export function SettingsTab({ instanceId: appId }: {
- instanceId: string
+export function SettingsTab({ appInstanceId }: {
+ appInstanceId: string
}) {
return (
-
-
+
+
)
}
diff --git a/web/features/deployments/detail/versions-tab.tsx b/web/features/deployments/detail/versions-tab.tsx
index b2bbb60349..3046b08e7f 100644
--- a/web/features/deployments/detail/versions-tab.tsx
+++ b/web/features/deployments/detail/versions-tab.tsx
@@ -11,8 +11,8 @@ import { DEPLOYMENT_PAGE_SIZE } from '../data'
import { deployedRows } from '../utils'
import { ReleaseHistoryTable } from './versions-tab/release-history-table'
-function CreateReleaseControl({ appId, canCreateRelease }: {
- appId: string
+function CreateReleaseControl({ appInstanceId, canCreateRelease }: {
+ appInstanceId: string
canCreateRelease: boolean
}) {
const { t } = useTranslation('deployments')
@@ -32,7 +32,7 @@ function CreateReleaseControl({ appId, canCreateRelease }: {
try {
const response = await createRelease.mutateAsync({
params: {
- appInstanceId: appId,
+ appInstanceId,
},
body: {
name: releaseName,
@@ -149,11 +149,11 @@ function CreateReleaseControl({ appId, canCreateRelease }: {
)
}
-export function VersionsTab({ instanceId: appId }: {
- instanceId: string
+export function VersionsTab({ appInstanceId }: {
+ appInstanceId: string
}) {
const { t } = useTranslation('deployments')
- const input = { params: { appInstanceId: appId } }
+ const input = { params: { appInstanceId } }
const { data: overview } = useQuery(consoleQuery.enterprise.appDeploy.getAppInstanceOverview.queryOptions({
input,
}))
@@ -185,7 +185,7 @@ export function VersionsTab({ instanceId: appId }: {
)
-