-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into source-code-info
- Loading branch information
Showing
19 changed files
with
253 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Reconcile GitHub Issue (Comment) | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
- edited | ||
- closed | ||
- reopened | ||
- labeled | ||
- unlabeled | ||
issue_comment: | ||
types: | ||
- created | ||
- edited | ||
|
||
concurrency: | ||
group: reconcile-issue-${{ github.event.issue.number }}-${{ github.event_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
reconcile-issue: | ||
if: github.event_name == 'issues' || github.event_name == 'pull_request' | ||
secrets: inherit | ||
uses: konveyor/release-tools/.github/workflows/reconcile-issue.yaml@main | ||
|
||
reconcile-issue-comment: | ||
if: github.event_name == 'issue_comment' | ||
secrets: inherit | ||
uses: konveyor/release-tools/.github/workflows/reconcile-issue-comment.yaml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import dayjs from "dayjs"; | ||
import isSameOrBefore from "dayjs/plugin/isSameOrBefore"; | ||
import utc from "dayjs/plugin/utc"; | ||
import timezone from "dayjs/plugin/timezone"; | ||
import customParseFormat from "dayjs/plugin/customParseFormat"; | ||
|
||
dayjs.extend(utc); | ||
dayjs.extend(timezone); | ||
dayjs.extend(customParseFormat); | ||
dayjs.extend(isSameOrBefore); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...ages/applications/components/application-detail-drawer/components/assessed-archetypes.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from "react"; | ||
import { Application } from "@app/api/models"; | ||
import { Label, LabelGroup, Spinner } from "@patternfly/react-core"; | ||
import { EmptyTextMessage } from "@app/components/EmptyTextMessage"; | ||
import { useTranslation } from "react-i18next"; | ||
import { useFetchArchetypes } from "@app/queries/archetypes"; | ||
import { useFetchAllAssessmentsWithArchetypes } from "@app/queries/assessments"; | ||
|
||
interface IAssessedArchetypesProps { | ||
application: Application | null; | ||
} | ||
|
||
export const AssessedArchetypes: React.FC<IAssessedArchetypesProps> = ({ | ||
application, | ||
}) => { | ||
const { t } = useTranslation(); | ||
const { | ||
archetypes: applicationArchetypes, | ||
isFetching: isFetchingArchetypes, | ||
} = useFetchArchetypes(application); | ||
|
||
const { | ||
assessmentsWithArchetypes, | ||
isLoading: isFetchingAllAssessmentsWithArchetypesLoading, | ||
} = useFetchAllAssessmentsWithArchetypes(applicationArchetypes); | ||
|
||
const assessedArchetypesWithARequiredAssessment = assessmentsWithArchetypes | ||
?.filter((assessmentsWithArchetype) => { | ||
return ( | ||
assessmentsWithArchetype.archetype.assessed && | ||
assessmentsWithArchetype.assessments.some( | ||
(assessment) => assessment?.required === true | ||
) | ||
); | ||
}) | ||
.map((assessmentsWithArchetype) => assessmentsWithArchetype.archetype); | ||
|
||
if (isFetchingArchetypes || isFetchingAllAssessmentsWithArchetypesLoading) { | ||
return <Spinner size="md" />; | ||
} | ||
return ( | ||
<LabelGroup> | ||
{assessedArchetypesWithARequiredAssessment?.length ? ( | ||
assessedArchetypesWithARequiredAssessment?.map((archetype) => ( | ||
<Label key={archetype?.id}>{archetype?.name}</Label> | ||
)) | ||
) : ( | ||
<EmptyTextMessage message={t("terms.none")} /> | ||
)} | ||
</LabelGroup> | ||
); | ||
}; |
Oops, something went wrong.