diff --git a/frontend/src/components/config/util.tsx b/frontend/src/components/config/util.tsx index 23dd62918..bb29f2ccd 100644 --- a/frontend/src/components/config/util.tsx +++ b/frontend/src/components/config/util.tsx @@ -14,6 +14,7 @@ import { Switch } from "@ui/switch"; import { MinusCircle, PlusCircle } from "lucide-react"; import { ReactNode } from "react"; import { cn } from "@util/helpers"; +import { Resource } from "@monitor/client/dist/types"; export const ConfigItem = ({ label, diff --git a/frontend/src/resources/builder/config.tsx b/frontend/src/resources/builder/config.tsx index 6c5b72cba..05bb38de7 100644 --- a/frontend/src/resources/builder/config.tsx +++ b/frontend/src/resources/builder/config.tsx @@ -13,6 +13,7 @@ import { Button } from "@ui/button"; import { Card, CardHeader, CardTitle, CardContent } from "@ui/card"; import { useState } from "react"; import { ResourceSelector } from "@components/config/util"; +import { SecurityGroupIds } from "./config/security-group-ids"; const BuilderTypeSelector = ({ selected, @@ -119,6 +120,9 @@ const BuilderConfigInner = ({ subnet_id: true, key_pair_name: true, assign_public_ip: true, + security_group_ids: (ids, set) => ( + + ), }} /> )} diff --git a/frontend/src/resources/builder/config/index.tsx b/frontend/src/resources/builder/config/index.tsx deleted file mode 100644 index e69de29bb..000000000 diff --git a/frontend/src/resources/builder/config/security-group-ids.tsx b/frontend/src/resources/builder/config/security-group-ids.tsx new file mode 100644 index 000000000..643fa8208 --- /dev/null +++ b/frontend/src/resources/builder/config/security-group-ids.tsx @@ -0,0 +1,51 @@ +import { ConfigItem } from "@components/config/util"; +import { Types } from "@monitor/client"; +import { Button } from "@ui/button"; +import { Input } from "@ui/input"; +import { MinusCircle } from "lucide-react"; + +export const SecurityGroupIds = ({ + ids, + set, +}: { + ids: string[]; + set: (update: Partial) => void; +}) => { + return ( + +
+ {ids.map((arg, i) => ( +
+ { + ids[i] = e.target.value; + set({ security_group_ids: [...ids] }); + }} + /> + +
+ ))} + + +
+
+ ); +}; diff --git a/frontend/src/resources/deployment/config/components/extra-args.tsx b/frontend/src/resources/deployment/config/components/extra-args.tsx index 785e5c87a..604321086 100644 --- a/frontend/src/resources/deployment/config/components/extra-args.tsx +++ b/frontend/src/resources/deployment/config/components/extra-args.tsx @@ -1,3 +1,4 @@ +import { ConfigItem } from "@components/config/util"; import { DeploymentConfig } from "@monitor/client/dist/types"; import { Button } from "@ui/button"; import { Input } from "@ui/input"; @@ -11,36 +12,38 @@ export const ExtraArgs = ({ set: (update: Partial) => void; }) => { return ( -
- {args.map((arg, i) => ( -
- { - args[i] = e.target.value; - set({ extra_args: [...args] }); - }} - /> - -
- ))} + +
+ {args.map((arg, i) => ( +
+ { + args[i] = e.target.value; + set({ extra_args: [...args] }); + }} + /> + +
+ ))} - -
+ +
+ ); };