ui(deploy): Checkpoints disclosure (hides current deployment, flags pruned JARs)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,9 +2,10 @@ import { useState, useEffect, useRef } from 'react';
|
||||
import { useParams, useLocation } from 'react-router';
|
||||
import { useEnvironmentStore } from '../../../api/environment-store';
|
||||
import { useEnvironments } from '../../../api/queries/admin/environments';
|
||||
import { useApps, useAppVersions } from '../../../api/queries/admin/apps';
|
||||
import { useApps, useAppVersions, useDeployments } from '../../../api/queries/admin/apps';
|
||||
import { PageLoader } from '../../../components/PageLoader';
|
||||
import { IdentitySection } from './IdentitySection';
|
||||
import { Checkpoints } from './Checkpoints';
|
||||
import { deriveAppName } from './utils/deriveAppName';
|
||||
import styles from './AppDeploymentPage.module.css';
|
||||
|
||||
@@ -21,6 +22,8 @@ export default function AppDeploymentPage() {
|
||||
const env = environments.find((e) => e.slug === selectedEnv);
|
||||
const { data: versions = [] } = useAppVersions(selectedEnv, app?.slug);
|
||||
const currentVersion = versions.slice().sort((a, b) => b.version - a.version)[0] ?? null;
|
||||
const { data: deployments = [] } = useDeployments(selectedEnv, app?.slug);
|
||||
const currentDeployment = deployments.find((d) => d.status === 'RUNNING') ?? null;
|
||||
|
||||
// Form state
|
||||
const [name, setName] = useState('');
|
||||
@@ -61,6 +64,17 @@ export default function AppDeploymentPage() {
|
||||
onStagedJarChange={setStagedJar}
|
||||
deploying={false}
|
||||
/>
|
||||
{mode === 'deployed' && (
|
||||
<Checkpoints
|
||||
deployments={deployments}
|
||||
versions={versions}
|
||||
currentDeploymentId={currentDeployment?.id ?? null}
|
||||
onRestore={(id) => {
|
||||
// TODO: wired in Task 10.3 (restore hydrates form from snapshot)
|
||||
console.info('restore checkpoint', id);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user