diff --git a/client/public/locales/en/translation.json b/client/public/locales/en/translation.json index a26eb9ebb9..57d836d54d 100644 --- a/client/public/locales/en/translation.json +++ b/client/public/locales/en/translation.json @@ -483,6 +483,7 @@ "tagsAssessment": "Assessment Tags", "tagsCriteria": "Criteria Tags", "target": "Target", + "targets": "Targets", "tagCategory": "Tag category", "tagCategoryDeleted": "Tag category deleted", "tagCategories": "Tag categories", diff --git a/client/src/app/pages/applications/components/application-detail-drawer/application-detail-drawer.tsx b/client/src/app/pages/applications/components/application-detail-drawer/application-detail-drawer.tsx index 882578b58e..81b8299b4c 100644 --- a/client/src/app/pages/applications/components/application-detail-drawer/application-detail-drawer.tsx +++ b/client/src/app/pages/applications/components/application-detail-drawer/application-detail-drawer.tsx @@ -64,7 +64,7 @@ import { Paths } from "@app/Paths"; import { useFetchArchetypes } from "@app/queries/archetypes"; import { useFetchAssessments } from "@app/queries/assessments"; import { DecoratedApplication } from "../../applications-table/useDecoratedApplications"; -import { TaskStates } from "@app/queries/tasks"; +import { TaskStates, useFetchTaskByID } from "@app/queries/tasks"; export interface IApplicationDetailDrawerProps extends Pick { @@ -182,6 +182,11 @@ const TabDetailsContent: React.FC<{ .filter((fullArchetype) => fullArchetype?.review) .filter(Boolean); + const { task } = useFetchTaskByID(application.tasks.currentAnalyzer?.id); + const targets = task?.data?.rules?.labels?.included.filter((t) => + t.startsWith("konveyor.io/target=") + ); + return ( <> @@ -303,6 +308,18 @@ const TabDetailsContent: React.FC<{ onEditClick={onEditClick} onCloseClick={onCloseClick} /> + + + {t("terms.targets")} + + {targets?.map((t) => ( + + {t} + + ))} + {targets?.length == 0 || + (!targets && )} + ); };