feat: add gpu options
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import { type MachineType } from "@/db/schema";
|
||||
import type { AccessType } from "@/lib/AccessType";
|
||||
import {
|
||||
addCustomMachineSchema,
|
||||
addMachineSchema,
|
||||
@@ -53,6 +54,7 @@ import {
|
||||
import { ArrowUpDown, MoreHorizontal } from "lucide-react";
|
||||
import * as React from "react";
|
||||
import { useState } from "react";
|
||||
import type { z } from "zod";
|
||||
|
||||
export type Machine = MachineType;
|
||||
|
||||
@@ -237,6 +239,9 @@ export const columns: ColumnDef<Machine>[] = [
|
||||
models: {
|
||||
fieldType: "models",
|
||||
},
|
||||
gpu: {
|
||||
inputProps: {},
|
||||
},
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
@@ -263,7 +268,13 @@ export const columns: ColumnDef<Machine>[] = [
|
||||
},
|
||||
];
|
||||
|
||||
export function MachineList({ data }: { data: Machine[] }) {
|
||||
export function MachineList({
|
||||
data,
|
||||
userMetadata,
|
||||
}: {
|
||||
data: Machine[];
|
||||
userMetadata: z.infer<typeof AccessType>;
|
||||
}) {
|
||||
const [sorting, setSorting] = React.useState<SortingState>([]);
|
||||
const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>(
|
||||
[]
|
||||
@@ -332,6 +343,14 @@ export function MachineList({ data }: { data: Machine[] }) {
|
||||
models: {
|
||||
fieldType: "models",
|
||||
},
|
||||
gpu: {
|
||||
fieldType: !userMetadata.betaFeaturesAccess
|
||||
? "fallback"
|
||||
: "select",
|
||||
inputProps: {
|
||||
disabled: !userMetadata.betaFeaturesAccess,
|
||||
},
|
||||
},
|
||||
}}
|
||||
/>
|
||||
<InsertModal
|
||||
|
||||
@@ -59,7 +59,7 @@ function SnapshotPresetPicker({
|
||||
|
||||
React.useEffect(() => {
|
||||
findAllDeployments().then((a) => {
|
||||
console.log(a);
|
||||
// console.log(a);
|
||||
|
||||
const frameworks = a
|
||||
.map((item) => {
|
||||
|
||||
Reference in New Issue
Block a user