From 9d52013780d21c45e57ab17862530932f2c8e533 Mon Sep 17 00:00:00 2001 From: Ian Bolton Date: Fri, 5 Jan 2024 16:20:29 -0500 Subject: [PATCH 1/4] :bug: Add missing label group for app drawer (#1658) https://issues.redhat.com/browse/MTA-1963 Signed-off-by: ibolton336 --- .../application-detail-drawer.tsx | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) 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 15144d45d..f3b393e91 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 @@ -21,6 +21,7 @@ import { Divider, Tooltip, Label, + LabelGroup, } from "@patternfly/react-core"; import spacing from "@patternfly/react-styles/css/utilities/Spacing/spacing"; import { @@ -210,16 +211,18 @@ export const ApplicationDetailDrawer: React.FC< {t("terms.archetypesAssessed")} - {assessedArchetypes?.length ? ( - assessedArchetypes.map((assessedArchetype) => ( - - )) - ) : ( - - )} + + {assessedArchetypes?.length ? ( + assessedArchetypes.map((assessedArchetype) => ( + + )) + ) : ( + + )} + @@ -228,16 +231,18 @@ export const ApplicationDetailDrawer: React.FC< {t("terms.archetypesReviewed")} - {reviewedArchetypes?.length ? ( - reviewedArchetypes.map((reviewedArchetype) => ( - - )) - ) : ( - - )} + + {reviewedArchetypes?.length ? ( + reviewedArchetypes.map((reviewedArchetype) => ( + + )) + ) : ( + + )} + From 538f241fd9fa99937609047c3f15ab9946c655d6 Mon Sep 17 00:00:00 2001 From: Ian Bolton Date: Mon, 8 Jan 2024 12:26:19 -0500 Subject: [PATCH 2/4] :bug: Account for unknown risk in landscape view (#1659) https://issues.redhat.com/browse/MTA-1955 Signed-off-by: ibolton336 --- client/public/locales/en/translation.json | 1 + .../application-landscape/application-landscape.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/public/locales/en/translation.json b/client/public/locales/en/translation.json index b7621ed97..f97c91fc2 100644 --- a/client/public/locales/en/translation.json +++ b/client/public/locales/en/translation.json @@ -437,6 +437,7 @@ "teamMember": "team member", "ticket": "Ticket", "trivialButMigratable": "Trivial but migratable", + "unassessedOrUnknown": "Unassessed or unknown", "unassessed": "Unassessed", "unassigned": "Not yet assigned", "unknown": "Unknown", diff --git a/client/src/app/pages/reports/components/application-landscape/application-landscape.tsx b/client/src/app/pages/reports/components/application-landscape/application-landscape.tsx index 6e7fb4326..6637c350e 100644 --- a/client/src/app/pages/reports/components/application-landscape/application-landscape.tsx +++ b/client/src/app/pages/reports/components/application-landscape/application-landscape.tsx @@ -186,7 +186,7 @@ export const ApplicationLandscape: React.FC = ({ = ({ {`${t("terms.unassessed")}/${t("terms.unknown")}`} } - riskTitle={t("terms.unassessed")} + riskTitle={t("terms.unassessedOrUnknown")} /> From c226ee699f242581ca6df89b1f23b588dc3e583a Mon Sep 17 00:00:00 2001 From: David Zager Date: Thu, 11 Jan 2024 09:31:06 -0500 Subject: [PATCH 3/4] :seedling: add cherry-pick workflow for pr-closed event (#1661) Signed-off-by: David Zager --- .github/workflows/pr-closed.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/pr-closed.yaml diff --git a/.github/workflows/pr-closed.yaml b/.github/workflows/pr-closed.yaml new file mode 100644 index 000000000..41afa19e6 --- /dev/null +++ b/.github/workflows/pr-closed.yaml @@ -0,0 +1,16 @@ +name: PR Closed + +on: + pull_request_target: + branches: + - main + types: + - closed + +jobs: + cherry_pick_job: + permissions: + pull-requests: write + contents: write + if: github.event.pull_request.merged == true + uses: konveyor/release-tools/.github/workflows/cherry-pick.yml@main From 2ea144d6b5a9ab35263c07ed259c9579b521e442 Mon Sep 17 00:00:00 2001 From: Ian Bolton Date: Thu, 11 Jan 2024 15:48:43 -0500 Subject: [PATCH 4/4] :bug: Fix analyses details required permissions (#1656) - Addresses an issue with the analysis details permissions. analysis:get -> analyses:get Signed-off-by: ibolton336 --- .../applications-table/applications-table.tsx | 16 ++++------------ client/src/app/rbac.ts | 13 +------------ 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/client/src/app/pages/applications/applications-table/applications-table.tsx b/client/src/app/pages/applications/applications-table/applications-table.tsx index 62386a672..13d6b52ff 100644 --- a/client/src/app/pages/applications/applications-table/applications-table.tsx +++ b/client/src/app/pages/applications/applications-table/applications-table.tsx @@ -54,16 +54,12 @@ import keycloak from "@app/keycloak"; import { RBAC, RBAC_TYPE, - analysisReadScopes, - analysisWriteScopes, + analysesReadScopes, applicationsWriteScopes, - assessmentReadScopes, assessmentWriteScopes, credentialsReadScopes, - credentialsWriteScopes, dependenciesWriteScopes, importsWriteScopes, - reviewsReadScopes, reviewsWriteScopes, tasksReadScopes, tasksWriteScopes, @@ -542,16 +538,12 @@ export const ApplicationsTable: React.FC = () => { importWriteAccess = checkAccess(userScopes, importsWriteScopes), applicationWriteAccess = checkAccess(userScopes, applicationsWriteScopes), assessmentWriteAccess = checkAccess(userScopes, assessmentWriteScopes), - analysisWriteAccess = checkAccess(userScopes, analysisWriteScopes), - assessmentReadAccess = checkAccess(userScopes, assessmentReadScopes), credentialsReadAccess = checkAccess(userScopes, credentialsReadScopes), - credentialsWriteAccess = checkAccess(userScopes, credentialsWriteScopes), dependenciesWriteAccess = checkAccess(userScopes, dependenciesWriteScopes), - analysisReadAccess = checkAccess(userScopes, analysisReadScopes), + analysesReadAccess = checkAccess(userScopes, analysesReadScopes), tasksReadAccess = checkAccess(userScopes, tasksReadScopes), tasksWriteAccess = checkAccess(userScopes, tasksWriteScopes), - reviewsWriteAccess = checkAccess(userScopes, reviewsWriteScopes), - reviewsReadAccess = checkAccess(userScopes, reviewsReadScopes); + reviewsWriteAccess = checkAccess(userScopes, reviewsWriteScopes); const areAppsInWaves = selectedRows.some( (application) => application.migrationWave !== null @@ -1031,7 +1023,7 @@ export const ApplicationsTable: React.FC = () => { }, ] : []), - ...(analysisReadAccess && hasExistingAnalysis + ...(analysesReadAccess && hasExistingAnalysis ? [ { title: t("actions.analysisDetails"), diff --git a/client/src/app/rbac.ts b/client/src/app/rbac.ts index cf136ff19..5f1aa09b3 100644 --- a/client/src/app/rbac.ts +++ b/client/src/app/rbac.ts @@ -110,18 +110,7 @@ export const archetypesWriteScopes = [ "archetypes:delete", ]; -export const analysisWriteScopes = [ - "applications.analysis:put", - "applications.analysis:post", - "applications.analysis:delete", - "archetypes.analysis:put", - "archetypes.analysis:post", - "archetypes.analysis:delete", -]; -export const analysisReadScopes = [ - "applications.analysis:get", - "archetypes.analysis:get", -]; +export const analysesReadScopes = ["applications.analyses:get"]; export const assessmentWriteScopes = [ "applications.assessments:put",