Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@
"tagsAssessment": "Assessment Tags",
"tagsCriteria": "Criteria Tags",
"target": "Target",
"targets": "Targets",
"tagCategory": "Tag category",
"tagCategoryDeleted": "Tag category deleted",
"tagCategories": "Tag categories",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<IPageDrawerContentProps, "onCloseClick"> {
Expand Down Expand Up @@ -182,6 +182,13 @@ const TabDetailsContent: React.FC<{
.filter((fullArchetype) => fullArchetype?.review)
.filter(Boolean);

const { task, isFetching, fetchError, refetch } = useFetchTaskByID(
application.tasks.currentAnalyzer?.id
);
const targets = task?.data?.rules?.labels?.included.filter((t) =>
t.startsWith("konveyor.io/target=")
);

return (
<>
<TextContent className={`${spacing.mtMd} ${spacing.mbMd}`}>
Expand Down Expand Up @@ -303,6 +310,12 @@ const TabDetailsContent: React.FC<{
onEditClick={onEditClick}
onCloseClick={onCloseClick}
/>
<TextContent className={spacing.mtLg}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is talking about the targets for an analysis, this content should be on the Reports tab.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sjd78, @rszwajko, the information was added to the app details tab according to this issue: #2012
Could you please confirm where it should be added? Thanks

<Title headingLevel="h3" size="md">
{t("terms.targets")}
</Title>
{targets?.map((t) => <Text component="small">{t}</Text>)}
</TextContent>
</>
);
};
Expand Down
Loading