diff --git a/frontend/src/resources/builder/config.tsx b/frontend/src/resources/builder/config.tsx deleted file mode 100644 index b8e84e8bf..000000000 --- a/frontend/src/resources/builder/config.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { Config } from "@components/config/Config"; -import { useRead, useWrite } from "@hooks"; -import { Section } from "@layouts/page"; -import { Types } from "@monitor/client"; -import { Button } from "@ui/button"; -import { Settings, Save, History } from "lucide-react"; -import { useState } from "react"; -import { useParams } from "react-router-dom"; - -export const BuilderConfig = () => { - const id = useParams().builderId; - const deployment = useRead("GetBuilder", { id }).data; - const [update, set] = useState>({}); - const { mutate } = useWrite("UpdateBuilder"); - - if (id && deployment?.config) { - return ( -
} - actions={ -
- - -
- } - > - -
- ); - } else { - // loading - return null; - } -}; diff --git a/frontend/src/resources/builder/index.tsx b/frontend/src/resources/builder/index.tsx index 2c9108655..d6c3539df 100644 --- a/frontend/src/resources/builder/index.tsx +++ b/frontend/src/resources/builder/index.tsx @@ -1,12 +1,5 @@ import { ResourceCard } from "@layouts/card"; -import { - Bot, - Cloud, - Factory, - History, - PlusCircle, - Settings, -} from "lucide-react"; +import { Bot, Cloud, Factory, History, Settings } from "lucide-react"; import { ResourceUpdates } from "@components/updates/resource"; import { useAddRecentlyViewed, useRead, useWrite } from "@hooks"; import { Resource } from "@layouts/resource"; @@ -16,15 +9,14 @@ import { useState } from "react"; import { Section } from "@layouts/page"; import { Button } from "@ui/button"; import { ConfirmUpdate } from "@components/config/confirm-update"; -import { Configuration } from "@components/config"; -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from "@ui/select"; -import { Input } from "@ui/input"; +// import { +// Select, +// SelectContent, +// SelectItem, +// SelectTrigger, +// SelectValue, +// } from "@ui/select"; +// import { Configuration } from "@components/config"; export const BuilderName = ({ id }: { id: string }) => { const builders = useRead("ListBuilders", {}).data; @@ -58,28 +50,28 @@ export const BuilderCard = ({ id }: { id: string }) => { ); }; -const BuilderTypeSelector = ({ - selected, - onSelect, -}: { - selected: Types.BuilderConfig["type"] | undefined; - onSelect: (type: Types.BuilderConfig["type"]) => void; -}) => ( - -); +// const BuilderTypeSelector = ({ +// selected, +// onSelect, +// }: { +// selected: Types.BuilderConfig["type"] | undefined; +// onSelect: (type: Types.BuilderConfig["type"]) => void; +// }) => ( +// +// ); const BuilderConfig = ({ id }: { id: string }) => { const builder = useRead("GetBuilder", { id }).data; const [update, setUpdate] = useState>({}); - const { mutate, isLoading } = useWrite("UpdateBuilder"); + const { mutate } = useWrite("UpdateBuilder"); if (!builder?.config) return null; @@ -115,7 +107,9 @@ const BuilderConfig = ({ id }: { id: string }) => { config={builder.config} loading={isLoading} update={update} - set={(input) => setUpdate((update) => ({ ...update, ...input }))} + set={(input: Extract) => + setUpdate((update) => ({ ...update, ...input })) + } layout={{ general: ["type", "params"], }}