diff --git a/ui-v2/src/components/deployments/deployment-description.tsx b/ui-v2/src/components/deployments/deployment-description.tsx new file mode 100644 index 000000000000..aa9a62c5d08f --- /dev/null +++ b/ui-v2/src/components/deployments/deployment-description.tsx @@ -0,0 +1,15 @@ +import { Deployment } from "@/api/deployments"; +import Markdown from "react-markdown"; +import remarkGfm from "remark-gfm"; + +type DeploymentDescriptionProps = { + deployment: Deployment; +}; + +export const DeploymentDescription = ({ + deployment, +}: DeploymentDescriptionProps) => ( + + {deployment.description} + +); diff --git a/ui-v2/src/components/deployments/deployment-details-page.tsx b/ui-v2/src/components/deployments/deployment-details-page.tsx index 3c4414b765a8..c1f9f2587d9f 100644 --- a/ui-v2/src/components/deployments/deployment-details-page.tsx +++ b/ui-v2/src/components/deployments/deployment-details-page.tsx @@ -36,7 +36,7 @@ export const DeploymentDetailsPage = ({ id }: DeploymentDetailsPageProps) => {
- +
diff --git a/ui-v2/src/components/deployments/deployment-details-tabs.tsx b/ui-v2/src/components/deployments/deployment-details-tabs.tsx index d73c34f2bdf0..8eda492f694a 100644 --- a/ui-v2/src/components/deployments/deployment-details-tabs.tsx +++ b/ui-v2/src/components/deployments/deployment-details-tabs.tsx @@ -1,8 +1,11 @@ +import { Deployment } from "@/api/deployments"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import type { DeploymentDetailsTabOptions } from "@/routes/deployments/deployment.$id"; import { Link, getRouteApi } from "@tanstack/react-router"; import { type JSX } from "react"; +import { DeploymentDescription } from "./deployment-description"; + const routeApi = getRouteApi("/deployments/deployment/$id"); type TabOption = { @@ -11,77 +14,82 @@ type TabOption = { ViewComponent: () => JSX.Element; }; -const TAB_OPTIONS = [ - { - value: "Runs", - LinkComponent: () => ( - - Runs - - ), - ViewComponent: () => ( - -
{""}
-
- ), - }, - { - value: "Upcoming", - LinkComponent: () => ( - - Upcoming - - ), - ViewComponent: () => ( - -
{""}
-
- ), - }, - { - value: "Parameters", - LinkComponent: () => ( - - Parameters - - ), - ViewComponent: () => ( - -
{""}
-
- ), - }, - { - value: "Configuration", - LinkComponent: () => ( - - Configuration - - ), - ViewComponent: () => ( - -
{""}
-
- ), - }, - { - value: "Description", - LinkComponent: () => ( - - Description - - ), - ViewComponent: () => ( - -
{""}
-
- ), - }, -] as const satisfies Array; - -export const DeploymentDetailsTabs = (): JSX.Element => { +type DeploymentDetailsTabsProps = { + deployment: Deployment; +}; +export const DeploymentDetailsTabs = ({ + deployment, +}: DeploymentDetailsTabsProps): JSX.Element => { const { tab } = routeApi.useSearch(); + const TAB_OPTIONS = [ + { + value: "Runs", + LinkComponent: () => ( + + Runs + + ), + ViewComponent: () => ( + +
{""}
+
+ ), + }, + { + value: "Upcoming", + LinkComponent: () => ( + + Upcoming + + ), + ViewComponent: () => ( + +
{""}
+
+ ), + }, + { + value: "Parameters", + LinkComponent: () => ( + + Parameters + + ), + ViewComponent: () => ( + +
{""}
+
+ ), + }, + { + value: "Configuration", + LinkComponent: () => ( + + Configuration + + ), + ViewComponent: () => ( + +
{""}
+
+ ), + }, + { + value: "Description", + LinkComponent: () => ( + + Description + + ), + ViewComponent: () => ( + + + + ), + }, + ] as const satisfies Array; + return (