diff --git a/dashboard/src/lib/addons/deepgram.ts b/dashboard/src/lib/addons/deepgram.ts index e3698a3af5..e95a521489 100644 --- a/dashboard/src/lib/addons/deepgram.ts +++ b/dashboard/src/lib/addons/deepgram.ts @@ -5,7 +5,7 @@ export const deepgramConfigValidator = z.object({ deepgramAPIKey: z.string().nonempty().default("*********"), quayUsername: z.string().nonempty().default("username"), quaySecret: z.string().nonempty().default("secret"), - quayEmail: z.string(), + quayEmail: z.string().nonempty().default(""), releaseTag: z.string().nonempty().default("release-240426"), }); diff --git a/dashboard/src/lib/addons/template.ts b/dashboard/src/lib/addons/template.ts index b8a3e379c8..660532b449 100644 --- a/dashboard/src/lib/addons/template.ts +++ b/dashboard/src/lib/addons/template.ts @@ -2,6 +2,7 @@ import Logs from "main/home/add-on-dashboard/common/Logs"; import Settings from "main/home/add-on-dashboard/common/Settings"; import DatadogForm from "main/home/add-on-dashboard/datadog/DatadogForm"; import DeepgramForm from "main/home/add-on-dashboard/deepgram/DeepgramForm"; +import DeepgramOverview from "main/home/add-on-dashboard/deepgram/DeepgramOverview"; import MetabaseForm from "main/home/add-on-dashboard/metabase/MetabaseForm"; import MezmoForm from "main/home/add-on-dashboard/mezmo/MezmoForm"; import NewRelicForm from "main/home/add-on-dashboard/newrelic/NewRelicForm"; @@ -291,6 +292,11 @@ export const ADDON_TEMPLATE_DEEPGRAM: AddonTemplate<"deepgram"> = { icon: "https://play-lh.googleusercontent.com/wczDL05-AOb39FcL58L32h6j_TrzzGTXDLlOrOmJ-aNsnoGsT1Gkk2vU4qyTb7tGxRw=w240-h480-rw", tags: ["Networking"], tabs: [ + { + name: "overview", + displayName: "Overview", + component: DeepgramOverview, + }, { name: "configuration", displayName: "Configuration", @@ -314,7 +320,7 @@ export const ADDON_TEMPLATE_DEEPGRAM: AddonTemplate<"deepgram"> = { quayUsername: "", quaySecret: "", quayEmail: "", - releaseTag: "v1.0.0", + releaseTag: "", }, isModelTemplate: true, }; diff --git a/dashboard/src/main/home/add-on-dashboard/deepgram/DeepgramForm.tsx b/dashboard/src/main/home/add-on-dashboard/deepgram/DeepgramForm.tsx index 1b1f39eec7..edabc737f1 100644 --- a/dashboard/src/main/home/add-on-dashboard/deepgram/DeepgramForm.tsx +++ b/dashboard/src/main/home/add-on-dashboard/deepgram/DeepgramForm.tsx @@ -14,22 +14,6 @@ const DeepgramForm: React.FC = () => { } = useFormContext(); return (
- Instance type - - - The instance type to run the model on. Deepgram runs only on T4 GPUs and - we have prefilled a preferred instance type for now. Make sure the AWS - quota is properly set.{" "} - - - - Release tag @@ -51,9 +35,9 @@ const DeepgramForm: React.FC = () => { Quay.io Username diff --git a/dashboard/src/main/home/add-on-dashboard/deepgram/DeepgramOverview.tsx b/dashboard/src/main/home/add-on-dashboard/deepgram/DeepgramOverview.tsx new file mode 100644 index 0000000000..757cd5e113 --- /dev/null +++ b/dashboard/src/main/home/add-on-dashboard/deepgram/DeepgramOverview.tsx @@ -0,0 +1,39 @@ +import React from "react"; +import AceEditor from "react-ace"; + +import Spacer from "components/porter/Spacer"; +import Text from "components/porter/Text"; + +const DeepgramOverview: React.FC = () => { + return ( +
+ Example usage + + + You can use this model over an auto-generated endpoint from any app + running on Porter. + + + +
+ ); +}; + +export default DeepgramOverview; diff --git a/dashboard/src/main/home/inference-dashboard/ExpandedModelTemplate.tsx b/dashboard/src/main/home/inference-dashboard/ExpandedModelTemplate.tsx deleted file mode 100644 index 3400294dce..0000000000 --- a/dashboard/src/main/home/inference-dashboard/ExpandedModelTemplate.tsx +++ /dev/null @@ -1,112 +0,0 @@ -import React, { useContext, useMemo } from "react"; -import AceEditor from "react-ace"; -import { useHistory, useParams } from "react-router"; -import styled from "styled-components"; - -import Back from "components/porter/Back"; -import Button from "components/porter/Button"; -import Container from "components/porter/Container"; -import I from "components/porter/I"; -import Image from "components/porter/Image"; -import InfoSection from "components/porter/InfoSection"; -import Line from "components/porter/Line"; -import Link from "components/porter/Link"; -import Spacer from "components/porter/Spacer"; -import Text from "components/porter/Text"; -import { - AddonTemplateTagColor, - SUPPORTED_MODEL_ADDON_TEMPLATES, -} from "lib/addons/template"; - -import { Context } from "shared/Context"; - -import AddonFormContextProvider from "../add-on-dashboard/AddonFormContextProvider"; -import { Tag } from "../add-on-dashboard/AddonTemplates"; -import DashboardHeader from "../cluster-dashboard/DashboardHeader"; -import { models, tagColor } from "./models"; - -const ExpandedModelTemplate: React.FC = () => { - const { modelType } = useParams<{ - modelType: string; - }>(); - - const { currentProject } = useContext(Context); - const history = useHistory(); - - const templateMatch = SUPPORTED_MODEL_ADDON_TEMPLATES.find( - (t) => t.type === modelType - ); - - if (templateMatch === undefined) { - return null; - } - - return ( - - - - - - - {templateMatch.displayName} - - - - - - - - - - {templateMatch.tags?.map((t) => ( - <> - - {t} - - {templateMatch.tags.indexOf(t) !== - templateMatch.tags.length - 1 && } - - ))} - - - - - Example usage - - - After deploying this model, you will be able to use it over an - auto-generated endpoint from any app running on Porter. - - - - - ); -}; - -export default ExpandedModelTemplate;