diff --git a/ui/src/pages/AppsTab/AppsTab.tsx b/ui/src/pages/AppsTab/AppsTab.tsx index 0fbca0a7..3d506e7a 100644 --- a/ui/src/pages/AppsTab/AppsTab.tsx +++ b/ui/src/pages/AppsTab/AppsTab.tsx @@ -34,6 +34,7 @@ import { useApplicationConfig, useUpdateApplicationConfig, useProcessorRouteMapp import type { ApplicationConfig, TapDefinition } from '../../api/queries/commands'; import { useRouteCatalog } from '../../api/queries/catalog'; import type { AppCatalogEntry, RouteSummary } from '../../api/types'; +import { DeploymentProgress } from '../../components/DeploymentProgress'; import styles from './AppsTab.module.css'; function formatBytes(bytes: number): string { @@ -54,6 +55,7 @@ function timeAgo(date: string): string { const STATUS_COLORS: Record = { RUNNING: 'running', STARTING: 'warning', FAILED: 'error', STOPPED: 'auto', + DEGRADED: 'warning', STOPPING: 'auto', }; function slugify(name: string): string { @@ -174,6 +176,11 @@ function CreateAppView({ environments, selectedEnv }: { environments: Environmen const [ports, setPorts] = useState(Array.isArray(defaults.exposedPorts) ? defaults.exposedPorts as number[] : []); const [newPort, setNewPort] = useState(''); const [envVars, setEnvVars] = useState<{ key: string; value: string }[]>([]); + const [appPort, setAppPort] = useState('8080'); + const [replicas, setReplicas] = useState('1'); + const [deployStrategy, setDeployStrategy] = useState('blue-green'); + const [stripPrefix, setStripPrefix] = useState(true); + const [sslOffloading, setSslOffloading] = useState(true); const [configTab, setConfigTab] = useState<'variables' | 'monitoring' | 'resources'>('variables'); const [busy, setBusy] = useState(false); @@ -221,6 +228,11 @@ function CreateAppView({ environments, selectedEnv }: { environments: Environmen cpuLimit: cpuLimit ? parseFloat(cpuLimit) : null, exposedPorts: ports, customEnvVars: Object.fromEntries(envVars.filter((v) => v.key.trim()).map((v) => [v.key, v.value])), + appPort: appPort ? parseInt(appPort) : 8080, + replicas: replicas ? parseInt(replicas) : 1, + deploymentStrategy: deployStrategy, + stripPathPrefix: stripPrefix, + sslOffloading: sslOffloading, }; await updateContainerConfig.mutateAsync({ appId: app.id, config: containerConfig }); @@ -430,6 +442,28 @@ function CreateAppView({ environments, selectedEnv }: { environments: Environmen onChange={(e) => setNewPort(e.target.value)} onKeyDown={(e) => { if (e.key === 'Enter') { e.preventDefault(); addPort(); } }} /> + + App Port + setAppPort(e.target.value)} style={{ width: 80 }} /> + + Replicas + setReplicas(e.target.value)} style={{ width: 60 }} type="number" /> + + Deploy Strategy + setAppPort(e.target.value)} style={{ width: 80 }} /> + + Replicas + setReplicas(e.target.value)} style={{ width: 60 }} type="number" /> + + Deploy Strategy +