Skip to content

Commit

Permalink
Merge branch 'main' into mta-1956
Browse files Browse the repository at this point in the history
  • Loading branch information
ibolton336 authored Jan 16, 2024
2 parents da679f6 + 2ea144d commit bb4c75e
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 46 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/pr-closed.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions client/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1031,7 +1023,7 @@ export const ApplicationsTable: React.FC = () => {
},
]
: []),
...(analysisReadAccess && hasExistingAnalysis
...(analysesReadAccess && hasExistingAnalysis
? [
{
title: t("actions.analysisDetails"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
Divider,
Tooltip,
Label,
LabelGroup,
} from "@patternfly/react-core";
import spacing from "@patternfly/react-styles/css/utilities/Spacing/spacing";
import {
Expand Down Expand Up @@ -210,16 +211,18 @@ export const ApplicationDetailDrawer: React.FC<
{t("terms.archetypesAssessed")}
</DescriptionListTerm>
<DescriptionListDescription>
{assessedArchetypes?.length ? (
assessedArchetypes.map((assessedArchetype) => (
<ArchetypeItem
key={assessedArchetype?.id}
archetype={assessedArchetype}
/>
))
) : (
<EmptyTextMessage message={t("terms.none")} />
)}
<LabelGroup>
{assessedArchetypes?.length ? (
assessedArchetypes.map((assessedArchetype) => (
<ArchetypeItem
key={assessedArchetype?.id}
archetype={assessedArchetype}
/>
))
) : (
<EmptyTextMessage message={t("terms.none")} />
)}
</LabelGroup>
</DescriptionListDescription>
</DescriptionListGroup>

Expand All @@ -228,16 +231,18 @@ export const ApplicationDetailDrawer: React.FC<
{t("terms.archetypesReviewed")}
</DescriptionListTerm>
<DescriptionListDescription>
{reviewedArchetypes?.length ? (
reviewedArchetypes.map((reviewedArchetype) => (
<ArchetypeItem
key={reviewedArchetype?.id}
archetype={reviewedArchetype}
/>
))
) : (
<EmptyTextMessage message={t("terms.none")} />
)}
<LabelGroup>
{reviewedArchetypes?.length ? (
reviewedArchetypes.map((reviewedArchetype) => (
<ArchetypeItem
key={reviewedArchetype?.id}
archetype={reviewedArchetype}
/>
))
) : (
<EmptyTextMessage message={t("terms.none")} />
)}
</LabelGroup>
</DescriptionListDescription>
</DescriptionListGroup>
</DescriptionList>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ export const ApplicationLandscape: React.FC<IApplicationLandscapeProps> = ({
<Donut
isAssessment={false}
id="landscape-donut-unassessed"
value={landscapeData.unassessed}
value={landscapeData.unassessed + landscapeData.unknown}
total={landscapeData.applicationsCount}
color={RISK_LIST.unknown.hexColor}
riskLabel={
<Link to={getRisksUrl(["unknown"])}>
{`${t("terms.unassessed")}/${t("terms.unknown")}`}
</Link>
}
riskTitle={t("terms.unassessed")}
riskTitle={t("terms.unassessedOrUnknown")}
/>
</FlexItem>
</Flex>
Expand Down
13 changes: 1 addition & 12 deletions client/src/app/rbac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit bb4c75e

Please sign in to comment.