diff --git a/web/app/components/gpu-form.tsx b/web/app/components/gpu-form.tsx index 7f94dae..28d1e4c 100644 --- a/web/app/components/gpu-form.tsx +++ b/web/app/components/gpu-form.tsx @@ -38,12 +38,14 @@ const packageNamesRegex = new RegExp( const packageNamesErrorMsg = "Please provide values in comma separated format as suggested in examples"; export interface GpuFormProps { + machineName?: string; customNodesJson: OutputCustomNodesJson; modelsJson: OutputModel[]; onBackStep: (event: React.MouseEvent) => void; } export default function GpuForm({ + machineName, onBackStep, customNodesJson, modelsJson, @@ -69,6 +71,9 @@ export default function GpuForm({ id="machine-name" name="machine_name" placeholder="Machine name" + defaultValue={machineName} + disabled={!!machineName} + readOnly={!!machineName} onChange={(e) => { if (machineNameRegex.test(e.target.value)) { setMachineNameError(null); diff --git a/web/app/routes/apps/route.tsx b/web/app/routes/apps/route.tsx index 3f7e1bb..6e59e99 100644 --- a/web/app/routes/apps/route.tsx +++ b/web/app/routes/apps/route.tsx @@ -157,7 +157,6 @@ interface AppsLayoutProps { } function AppsLayout({ apps }: AppsLayoutProps) { - const deleteFetcher = useDeleteFetcherAction(); const [appStateFilter, setAppStateFilter] = useState("deployed"); const displayApps = apps.filter((app) => appStateFilter === app.state); @@ -291,50 +290,7 @@ function AppsLayout({ apps }: AppsLayoutProps) { {app.state === "deployed" ? ( - - - - - - - Actions - - Delete - - - - - - - Are you sure you want to delete the app? - - - This action cannot be undone. Are you sure you - want to permanently delete this app? - - - - - - - - - - - - - + ) : null} @@ -352,6 +308,52 @@ function AppsLayout({ apps }: AppsLayoutProps) { ); } +interface DropdownActionMenuProps { + app: App; +} +function DropdownActionMenu({ app }: DropdownActionMenuProps) { + const deleteFetcher = useDeleteFetcherAction(); + return ( + + + + + + + Actions + + Delete + + + Rebuild + + + + + + Are you sure you want to delete the app? + + This action cannot be undone. Are you sure you want to permanently + delete this app? + + + + + + + + + + + + + + ); +} + function ErrorLayout() { const revalidator = useRevalidator(); return ( diff --git a/web/app/routes/create-app/route.tsx b/web/app/routes/create-app/route.tsx index 45f021e..79d0e3c 100644 --- a/web/app/routes/create-app/route.tsx +++ b/web/app/routes/create-app/route.tsx @@ -1,4 +1,10 @@ -import { json, redirect, useFetcher, useLoaderData } from "@remix-run/react"; +import { + json, + redirect, + useFetcher, + useLoaderData, + useSearchParams, +} from "@remix-run/react"; import { CreateAppErrorResponseBody, @@ -79,6 +85,7 @@ export const loader = async (args: LoaderFunctionArgs) => { }; export default function CreateAppPage() { + const [searchParams, _] = useSearchParams(); const createAppFetcher = useFetcher({ key: CREATE_APP_FETCHER_KEY, }); @@ -188,6 +195,7 @@ export default function CreateAppPage() { {currentStep?.name == "GPU" ? ( <>