From c66003e7c500b715606121474b1fa6e0c518f3f0 Mon Sep 17 00:00:00 2001 From: Ian Bolton Date: Wed, 8 Nov 2023 11:30:37 -0500 Subject: [PATCH] :sparkles: Add archetype risk to drawer (#1522) https://issues.redhat.com/browse/MTA-1330 --------- Signed-off-by: ibolton336 --- client/public/locales/en/translation.json | 1 + client/src/app/api/models.ts | 1 + .../archetypes/components/archetype-detail-drawer.tsx | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/client/public/locales/en/translation.json b/client/public/locales/en/translation.json index 69b7dfe931..3e66f825c1 100644 --- a/client/public/locales/en/translation.json +++ b/client/public/locales/en/translation.json @@ -364,6 +364,7 @@ "reviewComments": "Review comments", "risk": "Risk", "riskFromApplication": "Application risk", + "riskFromArchetype": "Archetype risk", "rootPath": "Root path", "scheduled": "Scheduled", "select": "Select", diff --git a/client/src/app/api/models.ts b/client/src/app/api/models.ts index d3f105e47f..5191e8aa8e 100644 --- a/client/src/app/api/models.ts +++ b/client/src/app/api/models.ts @@ -760,6 +760,7 @@ export interface Archetype { assessments?: Ref[]; assessed?: boolean; review?: Ref; + risk?: Risk; } export type ProviderType = "Java" | "Go"; diff --git a/client/src/app/pages/archetypes/components/archetype-detail-drawer.tsx b/client/src/app/pages/archetypes/components/archetype-detail-drawer.tsx index 03949044aa..5b34102156 100644 --- a/client/src/app/pages/archetypes/components/archetype-detail-drawer.tsx +++ b/client/src/app/pages/archetypes/components/archetype-detail-drawer.tsx @@ -25,6 +25,7 @@ import { PageDrawerContent } from "@app/components/PageDrawerContext"; import { dedupeArrayOfObjects } from "@app/utils/utils"; import { LabelsFromItems } from "@app/components/labels-from-items/labels-from-items"; import { ReviewFields } from "@app/pages/applications/components/application-detail-drawer/review-fields"; +import { RiskLabel } from "@app/components/RiskLabel"; export interface IArchetypeDetailDrawerProps { onCloseClick: () => void; @@ -198,6 +199,14 @@ const ArchetypeDetailDrawer: React.FC = ({ + + + {t("terms.riskFromArchetype")} + + + + +