diff --git a/Dockerfile b/Dockerfile index 7174cefb69..6a612c81c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ # - https://github.com/konveyor/tackle2-ui/pull/1781 # Builder image -FROM registry.access.redhat.com/ubi9/nodejs-20:1-59 as builder +FROM registry.access.redhat.com/ubi9/nodejs-20:1-59.1726663413 as builder USER 1001 COPY --chown=1001 . . diff --git a/client/src/app/pages/applications/analysis-wizard/set-targets.tsx b/client/src/app/pages/applications/analysis-wizard/set-targets.tsx index 3b255d375e..2842bbec8e 100644 --- a/client/src/app/pages/applications/analysis-wizard/set-targets.tsx +++ b/client/src/app/pages/applications/analysis-wizard/set-targets.tsx @@ -25,6 +25,8 @@ import { useLocalTableControls } from "@app/hooks/table-controls"; import { useSetting } from "@app/queries/settings"; import { AppPlaceholder } from "@app/components/AppPlaceholder"; import { StateError } from "@app/components/StateError"; +import { universalComparator } from "@app/utils/utils"; +import { toLabelValue } from "@app/utils/rules-utils"; interface SetTargetsProps { applications: Application[]; @@ -177,9 +179,12 @@ const SetTargetsInternal: React.FC = ({ tableName: "target-cards", items: targets, idProperty: "name", - initialFilterValues: { name: applicationProviders }, + initialFilterValues: { provider: applicationProviders }, columnNames: { name: "name", + provider: "provider", + custom: "custom", + labels: "labels", }, isFilterEnabled: true, isPaginationEnabled: false, @@ -200,11 +205,56 @@ const SetTargetsInternal: React.FC = ({ value: language, })), placeholderText: "Filter by language...", - categoryKey: "name", + categoryKey: "provider", title: "Languages", type: FilterType.multiselect, matcher: (filter, target) => !!target.provider?.includes(filter), }, + { + placeholderText: "Filter by name...", + categoryKey: "name", + title: "Name", + type: FilterType.search, + matcher: (filter, target) => + !!target.name?.toLowerCase().includes(filter.toLowerCase()), + }, + { + placeholderText: "Filter by custom target...", + categoryKey: "custom", + title: "Custom target", + type: FilterType.select, + selectOptions: [ + { value: "true", label: "Yes" }, + { value: "false", label: "No" }, + ], + matcher: (filter, target) => String(!!target.custom) === filter, + }, + { + selectOptions: unique( + targets + .flatMap(({ labels }) => labels ?? []) + .map(({ name, label }) => ({ + name, + label: toLabelValue(label), + })), + ({ label }) => label + ) + .map(({ label, name }) => ({ + value: label, + label: name, + chipLabel: label, + })) + .sort((a, b) => universalComparator(a.label, b.label)), + + placeholderText: "Filter by labels...", + categoryKey: "labels", + title: "Labels", + type: FilterType.multiselect, + matcher: (filter, target) => + (target.labels ?? []) + .map(({ label }) => toLabelValue(label)) + .includes(filter), + }, ], }); diff --git a/client/src/app/pages/archetypes/archetypes-page.tsx b/client/src/app/pages/archetypes/archetypes-page.tsx index a6fe66f0d0..895b390230 100644 --- a/client/src/app/pages/archetypes/archetypes-page.tsx +++ b/client/src/app/pages/archetypes/archetypes-page.tsx @@ -17,6 +17,7 @@ import { ToolbarContent, ToolbarGroup, ToolbarItem, + Tooltip, } from "@patternfly/react-core"; import { Table, @@ -27,8 +28,7 @@ import { Td, ActionsColumn, } from "@patternfly/react-table"; -import { CubesIcon } from "@patternfly/react-icons"; - +import { CubesIcon, PencilAltIcon } from "@patternfly/react-icons"; import { AppPlaceholder } from "@app/components/AppPlaceholder"; import { ConditionalRender } from "@app/components/ConditionalRender"; import { FilterToolbar, FilterType } from "@app/components/FilterToolbar"; @@ -473,6 +473,17 @@ const Archetypes: React.FC = () => { } /> + {archetypeWriteAccess && ( + + +