@backstage-community/plugin-azure-devops 0.4.4 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/alpha/package.json +2 -2
- package/dist/alpha/plugin.esm.js +69 -0
- package/dist/alpha/plugin.esm.js.map +1 -0
- package/dist/alpha.esm.js +1 -68
- package/dist/alpha.esm.js.map +1 -1
- package/dist/api/AzureDevOpsApi.esm.js +8 -0
- package/dist/api/AzureDevOpsApi.esm.js.map +1 -0
- package/dist/{esm/AzureDevOpsApi-GBxs-uQ7.esm.js → api/AzureDevOpsClient.esm.js} +11 -36
- package/dist/api/AzureDevOpsClient.esm.js.map +1 -0
- package/dist/components/AzureGitTagsIcon/AzureGitTagsIcon.esm.js +7 -0
- package/dist/components/AzureGitTagsIcon/AzureGitTagsIcon.esm.js.map +1 -0
- package/dist/components/AzurePipelinesIcon/AzurePipelinesIcon.esm.js +27 -0
- package/dist/components/AzurePipelinesIcon/AzurePipelinesIcon.esm.js.map +1 -0
- package/dist/{esm/AzurePullRequestsIcon-DOAkj-X3.esm.js → components/AzurePullRequestsIcon/AzurePullRequestsIcon.esm.js} +2 -2
- package/dist/components/AzurePullRequestsIcon/AzurePullRequestsIcon.esm.js.map +1 -0
- package/dist/{esm/index-Bwu2-Sgs.esm.js → components/BuildTable/BuildTable.esm.js} +7 -107
- package/dist/components/BuildTable/BuildTable.esm.js.map +1 -0
- package/dist/components/EntityPageAzureGitTags/EntityPageAzureGitTags.esm.js +22 -0
- package/dist/components/EntityPageAzureGitTags/EntityPageAzureGitTags.esm.js.map +1 -0
- package/dist/components/EntityPageAzureGitTags/index.esm.js +2 -0
- package/dist/components/EntityPageAzureGitTags/index.esm.js.map +1 -0
- package/dist/components/EntityPageAzurePipelines/EntityPageAzurePipelines.esm.js +32 -0
- package/dist/components/EntityPageAzurePipelines/EntityPageAzurePipelines.esm.js.map +1 -0
- package/dist/components/EntityPageAzurePipelines/index.esm.js +2 -0
- package/dist/components/EntityPageAzurePipelines/index.esm.js.map +1 -0
- package/dist/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.esm.js +22 -0
- package/dist/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.esm.js.map +1 -0
- package/dist/components/EntityPageAzurePullRequests/index.esm.js +2 -0
- package/dist/components/EntityPageAzurePullRequests/index.esm.js.map +1 -0
- package/dist/components/GitTagTable/GitTagTable.esm.js +53 -0
- package/dist/components/GitTagTable/GitTagTable.esm.js.map +1 -0
- package/dist/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.esm.js +41 -0
- package/dist/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.esm.js.map +1 -0
- package/dist/components/PullRequestTable/PullRequestTable.esm.js +90 -0
- package/dist/components/PullRequestTable/PullRequestTable.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/PullRequestsPage.esm.js +79 -0
- package/dist/components/PullRequestsPage/PullRequestsPage.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/index.esm.js +6 -0
- package/dist/components/PullRequestsPage/index.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.esm.js +16 -0
- package/dist/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.esm.js +85 -0
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicies.esm.js +10 -0
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicies.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.esm.js +66 -0
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.esm.js +33 -0
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.esm.js +17 -0
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/PullRequestGrid/PullRequestGrid.esm.js +29 -0
- package/dist/components/PullRequestsPage/lib/PullRequestGrid/PullRequestGrid.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.esm.js +50 -0
- package/dist/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/filters/allFilter.esm.js +6 -0
- package/dist/components/PullRequestsPage/lib/filters/allFilter.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/filters/assignedToTeamFilter.esm.js +17 -0
- package/dist/components/PullRequestsPage/lib/filters/assignedToTeamFilter.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.esm.js +20 -0
- package/dist/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/filters/assignedToUserFilter.esm.js +20 -0
- package/dist/components/PullRequestsPage/lib/filters/assignedToUserFilter.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/filters/createFilter.esm.js +45 -0
- package/dist/components/PullRequestsPage/lib/filters/createFilter.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/filters/createdByTeamFilter.esm.js +17 -0
- package/dist/components/PullRequestsPage/lib/filters/createdByTeamFilter.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/filters/createdByTeamsFilter.esm.js +32 -0
- package/dist/components/PullRequestsPage/lib/filters/createdByTeamsFilter.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/filters/createdByUserFilter.esm.js +18 -0
- package/dist/components/PullRequestsPage/lib/filters/createdByUserFilter.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/filters/types.esm.js +17 -0
- package/dist/components/PullRequestsPage/lib/filters/types.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/hooks/useFilterProcessor.esm.js +37 -0
- package/dist/components/PullRequestsPage/lib/hooks/useFilterProcessor.esm.js.map +1 -0
- package/dist/components/PullRequestsPage/lib/utils.esm.js +47 -0
- package/dist/components/PullRequestsPage/lib/utils.esm.js.map +1 -0
- package/dist/{esm/index-BJ_pWnMh.esm.js → components/ReadmeCard/ReadmeCard.esm.js} +8 -31
- package/dist/components/ReadmeCard/ReadmeCard.esm.js.map +1 -0
- package/dist/components/ReadmeCard/index.esm.js +2 -0
- package/dist/components/ReadmeCard/index.esm.js.map +1 -0
- package/dist/hooks/useBuildRuns.esm.js +37 -0
- package/dist/hooks/useBuildRuns.esm.js.map +1 -0
- package/dist/hooks/useDashboardPullRequests.esm.js +43 -0
- package/dist/hooks/useDashboardPullRequests.esm.js.map +1 -0
- package/dist/hooks/useGitTags.esm.js +30 -0
- package/dist/hooks/useGitTags.esm.js.map +1 -0
- package/dist/hooks/usePullRequests.esm.js +41 -0
- package/dist/hooks/usePullRequests.esm.js.map +1 -0
- package/dist/hooks/useReadme.esm.js +32 -0
- package/dist/hooks/useReadme.esm.js.map +1 -0
- package/dist/hooks/useUserEmail.esm.js +11 -0
- package/dist/hooks/useUserEmail.esm.js.map +1 -0
- package/dist/hooks/useUserTeamIds.esm.js +23 -0
- package/dist/hooks/useUserTeamIds.esm.js.map +1 -0
- package/dist/index.esm.js +7 -92
- package/dist/index.esm.js.map +1 -1
- package/dist/plugin.esm.js +68 -0
- package/dist/plugin.esm.js.map +1 -0
- package/dist/routes.esm.js +17 -0
- package/dist/routes.esm.js.map +1 -0
- package/dist/utils/arrayHas.esm.js +15 -0
- package/dist/utils/arrayHas.esm.js.map +1 -0
- package/dist/utils/equalsIgnoreCase.esm.js +6 -0
- package/dist/utils/equalsIgnoreCase.esm.js.map +1 -0
- package/dist/{esm/getAnnotationValuesFromEntity-G8YVs-3R.esm.js → utils/getAnnotationValuesFromEntity.esm.js} +7 -8
- package/dist/utils/getAnnotationValuesFromEntity.esm.js.map +1 -0
- package/dist/utils/getDurationFromDates.esm.js +34 -0
- package/dist/utils/getDurationFromDates.esm.js.map +1 -0
- package/package.json +19 -13
- package/dist/esm/AzureDevOpsApi-GBxs-uQ7.esm.js.map +0 -1
- package/dist/esm/AzurePullRequestsIcon-DOAkj-X3.esm.js.map +0 -1
- package/dist/esm/PullRequestsPage-CkhRQsgx.esm.js +0 -610
- package/dist/esm/PullRequestsPage-CkhRQsgx.esm.js.map +0 -1
- package/dist/esm/getAnnotationValuesFromEntity-G8YVs-3R.esm.js.map +0 -1
- package/dist/esm/index-1Rl7C23d.esm.js +0 -102
- package/dist/esm/index-1Rl7C23d.esm.js.map +0 -1
- package/dist/esm/index-BJ_pWnMh.esm.js.map +0 -1
- package/dist/esm/index-Bo-6jkQA.esm.js +0 -178
- package/dist/esm/index-Bo-6jkQA.esm.js.map +0 -1
- package/dist/esm/index-Bwu2-Sgs.esm.js.map +0 -1
- package/dist/esm/index-W1pvc5vi.esm.js +0 -25
- package/dist/esm/index-W1pvc5vi.esm.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PullRequestsPage-CkhRQsgx.esm.js","sources":["../../src/components/PullRequestsPage/lib/filters/types.ts","../../src/components/PullRequestsPage/lib/filters/allFilter.ts","../../src/utils/arrayHas.ts","../../src/utils/equalsIgnoreCase.ts","../../src/components/PullRequestsPage/lib/filters/assignedToTeamFilter.ts","../../src/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.ts","../../src/components/PullRequestsPage/lib/filters/assignedToUserFilter.ts","../../src/components/PullRequestsPage/lib/filters/createdByTeamFilter.ts","../../src/components/PullRequestsPage/lib/filters/createdByTeamsFilter.ts","../../src/components/PullRequestsPage/lib/filters/createdByUserFilter.ts","../../src/components/PullRequestsPage/lib/filters/createFilter.ts","../../src/components/PullRequestsPage/lib/utils.ts","../../src/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.tsx","../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.tsx","../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicies.tsx","../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.tsx","../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.tsx","../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.tsx","../../src/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.tsx","../../src/components/PullRequestsPage/lib/PullRequestGrid/PullRequestGrid.tsx","../../src/hooks/useDashboardPullRequests.ts","../../src/hooks/useUserEmail.ts","../../src/hooks/useUserTeamIds.ts","../../src/components/PullRequestsPage/lib/hooks/useFilterProcessor.ts","../../src/components/PullRequestsPage/PullRequestsPage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AllFilter } from './allFilter';\nimport { AssignedToTeamFilter } from './assignedToTeamFilter';\nimport { AssignedToTeamsFilter } from './assignedToTeamsFilter';\nimport { AssignedToUserFilter } from './assignedToUserFilter';\nimport { CreatedByTeamFilter } from './createdByTeamFilter';\nimport { CreatedByTeamsFilter } from './createdByTeamsFilter';\nimport { CreatedByUserFilter } from './createdByUserFilter';\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\n\n/** @public */\nexport enum FilterType {\n All = 'All',\n\n // Assigned To\n AssignedToUser = 'AssignedToUser',\n AssignedToCurrentUser = 'AssignedToCurrentUser',\n AssignedToTeam = 'AssignedToTeam',\n AssignedToTeams = 'AssignedToTeams',\n AssignedToCurrentUsersTeams = 'AssignedToCurrentUsersTeams',\n\n // Created By\n CreatedByUser = 'CreatedByUser',\n CreatedByCurrentUser = 'CreatedByCurrentUser',\n CreatedByTeam = 'CreatedByTeam',\n CreatedByTeams = 'CreatedByTeams',\n CreatedByCurrentUsersTeams = 'CreatedByCurrentUsersTeams',\n}\n\n/** @public */\nexport const FilterTypes = [\n FilterType.All,\n\n FilterType.AssignedToUser,\n FilterType.AssignedToCurrentUser,\n FilterType.AssignedToTeam,\n FilterType.AssignedToTeams,\n FilterType.AssignedToCurrentUsersTeams,\n\n FilterType.CreatedByUser,\n FilterType.CreatedByCurrentUser,\n FilterType.CreatedByTeam,\n FilterType.CreatedByTeams,\n FilterType.CreatedByCurrentUsersTeams,\n] as const;\n\n/** @public */\nexport type BaseFilter = {\n type: FilterType;\n};\n\n/** @public */\nexport type Filter =\n | AssignedToUserFilter\n | CreatedByUserFilter\n | AssignedToTeamFilter\n | CreatedByTeamFilter\n | AssignedToTeamsFilter\n | CreatedByTeamsFilter\n | AllFilter;\n\nexport type {\n AssignedToUserFilter,\n CreatedByUserFilter,\n AssignedToTeamFilter,\n CreatedByTeamFilter,\n AssignedToTeamsFilter,\n CreatedByTeamsFilter,\n AllFilter,\n};\n\n/** @public */\nexport type PullRequestFilter = (pullRequest: DashboardPullRequest) => boolean;\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\n\n/** @public */\nexport type AllFilter = BaseFilter & {\n type: FilterType.All;\n};\n\nexport function createAllFilter(): PullRequestFilter {\n return (_pullRequest: DashboardPullRequest): boolean => true;\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function arrayHas<T>(arr: T[], value: T): boolean {\n return new Set<T>(arr).has(value);\n}\n\nexport function stringArrayHas(\n arr: Array<string | undefined>,\n value: string | undefined,\n ignoreCase: boolean = false,\n): boolean {\n if (ignoreCase) {\n return arrayHas(\n arr.map(a => a?.toLocaleLowerCase('en-US')),\n value?.toLocaleLowerCase('en-US'),\n );\n }\n\n return arrayHas(arr, value);\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function equalsIgnoreCase(str1: string, str2: string): boolean {\n return str1.toLocaleLowerCase('en-US') === str2.toLocaleLowerCase('en-US');\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { stringArrayHas } from '../../../../utils';\n\n/** @public */\nexport type AssignedToTeamFilter = BaseFilter & {\n type: FilterType.AssignedToTeam;\n teamId: string;\n};\n\nexport function createAssignedToTeamFilter(\n filter: AssignedToTeamFilter,\n): PullRequestFilter {\n return (pullRequest: DashboardPullRequest): boolean => {\n const reviewerIds = pullRequest.reviewers?.map(reviewer => reviewer.id);\n\n if (!reviewerIds) {\n return false;\n }\n\n return stringArrayHas(reviewerIds, filter.teamId, true);\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { createAssignedToTeamFilter } from './assignedToTeamFilter';\n\n/** @public */\nexport type AssignedToTeamsFilter = BaseFilter &\n (\n | {\n type: FilterType.AssignedToTeams;\n teamIds: string[];\n }\n | {\n type: FilterType.AssignedToCurrentUsersTeams;\n teamIds?: string[];\n }\n );\n\nexport function createAssignedToTeamsFilter(\n filter: AssignedToTeamsFilter,\n): PullRequestFilter {\n const teamIds = filter.teamIds;\n\n return (pullRequest: DashboardPullRequest): boolean => {\n if (!teamIds) {\n return false;\n }\n\n return teamIds.some(teamId => {\n return createAssignedToTeamFilter({\n type: FilterType.AssignedToTeam,\n teamId,\n })(pullRequest);\n });\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { stringArrayHas } from '../../../../utils';\n\n/** @public */\nexport type AssignedToUserFilter = BaseFilter &\n (\n | {\n type: FilterType.AssignedToUser;\n email: string;\n }\n | {\n type: FilterType.AssignedToCurrentUser;\n email?: string;\n }\n );\n\nexport function createAssignedToUserFilter(\n filter: AssignedToUserFilter,\n): PullRequestFilter {\n const email = filter.email;\n\n return (pullRequest: DashboardPullRequest): boolean => {\n const uniqueNames = pullRequest.reviewers?.map(\n reviewer => reviewer.uniqueName,\n );\n\n if (!email || !uniqueNames) {\n return false;\n }\n\n return stringArrayHas(uniqueNames, email, true);\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { stringArrayHas } from '../../../../utils';\n\n/** @public */\nexport type CreatedByTeamFilter = BaseFilter &\n ({\n type: FilterType.CreatedByTeam;\n } & ({ teamId: string } | { teamName: string }));\n\nexport function createCreatedByTeamFilter(\n filter: CreatedByTeamFilter,\n): PullRequestFilter {\n return (pullRequest: DashboardPullRequest): boolean => {\n const [createdByTeams, team] =\n 'teamId' in filter\n ? [pullRequest.createdBy?.teamIds, filter.teamId]\n : [pullRequest.createdBy?.teamNames, filter.teamName];\n\n if (!createdByTeams) {\n return false;\n }\n\n return stringArrayHas(createdByTeams, team, true);\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { createCreatedByTeamFilter } from './createdByTeamFilter';\n\n/** @public */\nexport type CreatedByTeamsFilter = BaseFilter &\n (\n | ({\n type: FilterType.CreatedByTeams;\n } & ({ teamIds: string[] } | { teamNames: string[] }))\n | {\n type: FilterType.CreatedByCurrentUsersTeams;\n teamIds?: string[];\n }\n );\n\nexport function createCreatedByTeamsFilter(\n filter: CreatedByTeamsFilter,\n): PullRequestFilter {\n return (pullRequest: DashboardPullRequest): boolean => {\n if ('teamNames' in filter) {\n const teamNames = filter.teamNames;\n\n if (!teamNames) {\n return false;\n }\n\n return teamNames.some(teamName => {\n return createCreatedByTeamFilter({\n type: FilterType.CreatedByTeam,\n teamName,\n })(pullRequest);\n });\n }\n\n const teamIds = filter.teamIds;\n\n if (!teamIds) {\n return false;\n }\n\n return teamIds.some(teamId => {\n return createCreatedByTeamFilter({\n type: FilterType.CreatedByTeam,\n teamId,\n })(pullRequest);\n });\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { equalsIgnoreCase } from '../../../../utils';\n\n/** @public */\nexport type CreatedByUserFilter = BaseFilter &\n (\n | {\n type: FilterType.CreatedByUser;\n email: string;\n }\n | {\n type: FilterType.CreatedByCurrentUser;\n email?: string;\n }\n );\n\nexport function createCreatedByUserFilter(\n filter: CreatedByUserFilter,\n): PullRequestFilter {\n const email = filter.email;\n\n return (pullRequest: DashboardPullRequest): boolean => {\n const uniqueName = pullRequest.createdBy?.uniqueName;\n\n if (!email || !uniqueName) {\n return false;\n }\n\n return equalsIgnoreCase(email, uniqueName);\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Filter, FilterType, PullRequestFilter } from './types';\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { createAllFilter } from './allFilter';\nimport { createAssignedToTeamFilter } from './assignedToTeamFilter';\nimport { createAssignedToTeamsFilter } from './assignedToTeamsFilter';\nimport { createAssignedToUserFilter } from './assignedToUserFilter';\nimport { createCreatedByTeamFilter } from './createdByTeamFilter';\nimport { createCreatedByTeamsFilter } from './createdByTeamsFilter';\nimport { createCreatedByUserFilter } from './createdByUserFilter';\n\nexport function createFilter(filters: Filter | Filter[]): PullRequestFilter {\n const mapFilter = (filter: Filter): PullRequestFilter => {\n switch (filter.type) {\n case FilterType.AssignedToUser:\n case FilterType.AssignedToCurrentUser:\n return createAssignedToUserFilter(filter);\n\n case FilterType.CreatedByUser:\n case FilterType.CreatedByCurrentUser:\n return createCreatedByUserFilter(filter);\n\n case FilterType.AssignedToTeam:\n return createAssignedToTeamFilter(filter);\n\n case FilterType.CreatedByTeam:\n return createCreatedByTeamFilter(filter);\n\n case FilterType.AssignedToTeams:\n case FilterType.AssignedToCurrentUsersTeams:\n return createAssignedToTeamsFilter(filter);\n\n case FilterType.CreatedByTeams:\n case FilterType.CreatedByCurrentUsersTeams:\n return createCreatedByTeamsFilter(filter);\n\n case FilterType.All:\n return createAllFilter();\n\n default:\n return _ => false;\n }\n };\n\n if (Array.isArray(filters)) {\n if (filters.length === 1) {\n return mapFilter(filters[0]);\n }\n\n return (pullRequest: DashboardPullRequest): boolean =>\n filters.every(filter => mapFilter(filter)(pullRequest));\n }\n\n return mapFilter(filters);\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n DashboardPullRequest,\n PullRequestVoteStatus,\n Reviewer,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { Filter, createFilter } from './filters';\nimport {\n PullRequestColumnConfig,\n PullRequestGroup,\n PullRequestGroupConfig,\n} from './types';\n\n/**\n * Filters a reviewer based on vote status and if the reviewer is required.\n * @param reviewer - a reviewer to filter.\n * @returns whether or not to filter the `reviewer`.\n */\nexport function reviewerFilter(reviewer: Reviewer): boolean {\n return reviewer.voteStatus === PullRequestVoteStatus.NoVote\n ? !!reviewer.isRequired\n : !reviewer.isContainer;\n}\n\n/**\n * Removes values from the provided array and returns them.\n * @param arr - the array to extract values from.\n * @param filter - a filter used to extract values from the provided array.\n * @returns the values that were extracted from the array.\n *\n * @example\n * ```ts\n * const numbers = [1, 2, 3, 4, 5, 6];\n * const numberFilter = (num: number): boolean => num > 3;\n * const extractedNumbers = arrayExtract(numbers, numberFilter);\n * console.log(numbers); // [1, 2, 3]\n * console.log(extractedNumbers); // [4, 5, 6]\n * ```\n *\n * @example\n * ```ts\n * const numbers = [1, 2, 3, 4, 5, 6];\n * const numberFilter = (num: number): boolean => num % 2 === 0;\n * const extractedNumbers = arrayExtract(numbers, numberFilter);\n * console.log(numbers); // [1, 3, 5]\n * console.log(extractedNumbers); // [2, 4, 6]\n * ```\n */\nexport function arrayExtract<T>(arr: T[], filter: (value: T) => unknown): T[] {\n const extractedValues: T[] = [];\n\n for (let i = 0; i - extractedValues.length < arr.length; i++) {\n const offsetIndex = i - extractedValues.length;\n\n const value = arr[offsetIndex];\n\n if (filter(value)) {\n arr.splice(offsetIndex, 1);\n extractedValues.push(value);\n }\n }\n\n return extractedValues;\n}\n\n/**\n * Creates groups of pull requests based on a list of `PullRequestGroupConfig`.\n * @param pullRequests - all pull requests to be split up into groups.\n * @param configs - the config used for splitting up the pull request groups.\n * @returns a list of pull request groups.\n */\nexport function getPullRequestGroups(\n pullRequests: DashboardPullRequest[] | undefined,\n configs: PullRequestGroupConfig[],\n): PullRequestGroup[] | undefined {\n if (!pullRequests) {\n return undefined;\n }\n\n const remainingPullRequests: DashboardPullRequest[] = [...pullRequests];\n const pullRequestGroups: PullRequestGroup[] = [];\n\n configs.forEach(({ title, filter: configFilter, simplified }) => {\n const groupPullRequests = arrayExtract(remainingPullRequests, configFilter);\n\n pullRequestGroups.push({\n title,\n pullRequests: groupPullRequests,\n simplified,\n });\n });\n\n return pullRequestGroups;\n}\n\nexport function getPullRequestGroupConfigs(\n columnConfigs: PullRequestColumnConfig[],\n filterProcessor: (filters: Filter[]) => Filter[],\n): PullRequestGroupConfig[] {\n return columnConfigs.map(columnConfig => {\n const filters = filterProcessor(columnConfig.filters);\n return {\n title: columnConfig.title,\n filter: createFilter(filters),\n simplified: columnConfig.simplified,\n };\n });\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport DoneAllIcon from '@material-ui/icons/DoneAll';\nimport React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(theme => ({\n root: (props: { hasAutoComplete: boolean }) => ({\n color: props.hasAutoComplete\n ? theme.palette.success.main\n : theme.palette.grey[400],\n }),\n}));\n\nexport const AutoCompleteIcon = (props: { hasAutoComplete: boolean }) => {\n const classes = useStyles(props);\n return <DoneAllIcon className={classes.root} />;\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Policy,\n PolicyEvaluationStatus,\n PolicyType,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { styled, withStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\n\nimport CancelIcon from '@material-ui/icons/Cancel';\nimport GroupWorkIcon from '@material-ui/icons/GroupWork';\nimport React from 'react';\nimport WatchLaterIcon from '@material-ui/icons/WatchLater';\n\nconst PolicyRequiredIcon = withStyles(\n theme => ({\n root: {\n color: theme.palette.info.main,\n },\n }),\n { name: 'PolicyRequiredIcon' },\n)(WatchLaterIcon);\n\nconst PolicyIssueIcon = withStyles(\n theme => ({\n root: {\n color: theme.palette.error.main,\n },\n }),\n { name: 'PolicyIssueIcon' },\n)(CancelIcon);\n\nconst PolicyInProgressIcon = withStyles(\n theme => ({\n root: {\n color: theme.palette.info.main,\n },\n }),\n { name: 'PolicyInProgressIcon' },\n)(GroupWorkIcon);\n\nfunction getPolicyIcon(policy: Policy): JSX.Element | null {\n switch (policy.type) {\n case PolicyType.Build:\n switch (policy.status) {\n case PolicyEvaluationStatus.Running:\n return <PolicyInProgressIcon />;\n case PolicyEvaluationStatus.Rejected:\n return <PolicyIssueIcon />;\n case PolicyEvaluationStatus.Queued:\n return <PolicyRequiredIcon />;\n default:\n return null;\n }\n case PolicyType.MinimumReviewers:\n case PolicyType.RequiredReviewers:\n return <PolicyRequiredIcon />;\n case PolicyType.Status:\n case PolicyType.Comments:\n return <PolicyIssueIcon />;\n default:\n return null;\n }\n}\n\nconst PullRequestCardPolicyContainer = styled('div')({\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n});\n\ntype PullRequestCardPolicyProps = {\n policy: Policy;\n};\n\nexport const PullRequestCardPolicy = ({\n policy,\n}: PullRequestCardPolicyProps) => (\n <PullRequestCardPolicyContainer>\n {getPolicyIcon(policy)}{' '}\n <Typography component=\"span\">{policy.text}</Typography>\n </PullRequestCardPolicyContainer>\n);\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Policy } from '@backstage-community/plugin-azure-devops-common';\nimport { PullRequestCardPolicy } from './PullRequestCardPolicy';\nimport React from 'react';\n\ntype PullRequestCardProps = {\n policies: Policy[];\n className: string;\n};\n\nexport const PullRequestCardPolicies = ({\n policies,\n className,\n}: PullRequestCardProps) => (\n <div className={className}>\n {policies.map(policy => (\n <PullRequestCardPolicy key={policy.id} policy={policy} />\n ))}\n </div>\n);\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Avatar } from '@backstage/core-components';\nimport React from 'react';\nimport { Reviewer } from '@backstage-community/plugin-azure-devops-common';\nimport { makeStyles } from '@material-ui/core/styles';\n\ntype PullRequestCardReviewerProps = {\n reviewer: Reviewer;\n};\n\nconst useStyles = makeStyles(\n {\n avatar: {\n width: '2.5rem',\n height: '2.5rem',\n border: '0.3rem solid silver',\n },\n avatarText: {\n fontSize: '1rem',\n },\n },\n { name: 'PullRequestCardReviewer' },\n);\n\nexport const PullRequestCardReviewer = ({\n reviewer,\n}: PullRequestCardReviewerProps) => {\n const classes = useStyles();\n\n return (\n <Avatar\n displayName={reviewer.displayName}\n picture={reviewer.imageUrl}\n classes={classes}\n />\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PullRequestCardReviewer } from './PullRequestCardReviewer';\nimport React from 'react';\nimport { Reviewer } from '@backstage-community/plugin-azure-devops-common';\nimport { reviewerFilter } from '../utils';\nimport { styled } from '@material-ui/core/styles';\n\nconst PullRequestCardReviewersContainer = styled('div')({\n '& > *': {\n marginTop: 4,\n marginBottom: 4,\n },\n});\n\ntype PullRequestCardReviewersProps = {\n reviewers: Reviewer[];\n};\n\nexport const PullRequestCardReviewers = ({\n reviewers,\n}: PullRequestCardReviewersProps) => (\n <PullRequestCardReviewersContainer>\n {reviewers.filter(reviewerFilter).map(reviewer => (\n <PullRequestCardReviewer key={reviewer.id} reviewer={reviewer} />\n ))}\n </PullRequestCardReviewersContainer>\n);\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Avatar, Link } from '@backstage/core-components';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Typography from '@material-ui/core/Typography';\n\nimport { AutoCompleteIcon } from '../AutoCompleteIcon';\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { DateTime } from 'luxon';\nimport { PullRequestCardPolicies } from './PullRequestCardPolicies';\nimport { PullRequestCardReviewers } from './PullRequestCardReviewers';\nimport React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(\n theme => ({\n card: {\n backgroundColor:\n theme.palette.type === 'dark'\n ? theme.palette.grey[700]\n : theme.palette.common.white,\n },\n cardHeaderSimplified: {\n paddingBottom: theme.spacing(2),\n },\n cardHeaderAction: {\n display: 'flex',\n alignSelf: 'center',\n margin: 0,\n },\n content: {\n display: 'flex',\n flexDirection: 'row',\n },\n policies: {\n flex: 1,\n },\n avatar: { width: '2.5rem', height: '2.5rem' },\n avatarText: { fontSize: '1rem' },\n }),\n { name: 'PullRequestCard' },\n);\n\ntype PullRequestCardProps = {\n pullRequest: DashboardPullRequest;\n simplified?: boolean;\n};\n\nexport const PullRequestCard = ({\n pullRequest,\n simplified,\n}: PullRequestCardProps) => {\n const classes = useStyles();\n\n const title = (\n <Link to={pullRequest.link ?? ''} title={pullRequest.description}>\n {pullRequest.title}\n </Link>\n );\n\n const repoLink = (\n <Link to={pullRequest.repository?.url ?? ''} color=\"inherit\">\n {pullRequest.repository?.name}\n </Link>\n );\n\n const creationDate = pullRequest.creationDate\n ? DateTime.fromISO(pullRequest.creationDate).toRelative()\n : undefined;\n\n const subheader = (\n <Typography component=\"span\">\n {repoLink} · {creationDate}\n </Typography>\n );\n\n const avatar = (\n <Avatar\n displayName={pullRequest.createdBy?.displayName}\n picture={pullRequest.createdBy?.imageUrl}\n classes={{ avatar: classes.avatar, avatarText: classes.avatarText }}\n />\n );\n\n return (\n <Card\n classes={{ root: classes.card }}\n data-pull-request-id={pullRequest.pullRequestId}\n >\n <CardHeader\n avatar={avatar}\n title={title}\n subheader={subheader}\n action={\n <AutoCompleteIcon hasAutoComplete={pullRequest.hasAutoComplete} />\n }\n classes={{\n ...(simplified && { root: classes.cardHeaderSimplified }),\n action: classes.cardHeaderAction,\n }}\n />\n\n {!simplified && (\n <CardContent className={classes.content}>\n {pullRequest.policies && (\n <PullRequestCardPolicies\n policies={pullRequest.policies}\n className={classes.policies}\n />\n )}\n\n {pullRequest.reviewers && (\n <PullRequestCardReviewers reviewers={pullRequest.reviewers} />\n )}\n </CardContent>\n )}\n </Card>\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Paper from '@material-ui/core/Paper';\nimport Typography from '@material-ui/core/Typography';\nimport { styled, withStyles } from '@material-ui/core/styles';\n\nimport { PullRequestCard } from '../PullRequestCard';\nimport { PullRequestGroup } from '../types';\nimport React from 'react';\n\nconst ColumnPaper = withStyles(theme => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n flex: 1,\n padding: theme.spacing(2),\n backgroundColor:\n theme.palette.type === 'dark'\n ? theme.palette.grey[800]\n : theme.palette.grey[300],\n height: '100%',\n },\n}))(Paper);\n\nconst ColumnTitleDiv = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n marginBottom: theme.spacing(2),\n}));\n\nexport const PullRequestCardContainer = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n '& > *': {\n marginBottom: theme.spacing(2),\n },\n '& > :last-of-type': {\n marginBottom: 0,\n },\n}));\n\ntype PullRequestGridColumnProps = {\n pullRequestGroup: PullRequestGroup;\n};\n\nexport const PullRequestGridColumn = ({\n pullRequestGroup,\n}: PullRequestGridColumnProps) => {\n const columnTitle = (\n <ColumnTitleDiv>\n <Typography variant=\"h5\">{pullRequestGroup.title}</Typography>\n </ColumnTitleDiv>\n );\n\n const pullRequests = (\n <PullRequestCardContainer>\n {pullRequestGroup.pullRequests.map(pullRequest => (\n <PullRequestCard\n key={pullRequest.pullRequestId}\n pullRequest={pullRequest}\n simplified={pullRequestGroup.simplified}\n />\n ))}\n </PullRequestCardContainer>\n );\n\n return (\n <ColumnPaper>\n {columnTitle}\n {pullRequests}\n </ColumnPaper>\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PullRequestGridColumn } from '../PullRequestGridColumn';\nimport { PullRequestGroup } from '../types';\nimport React from 'react';\nimport { styled } from '@material-ui/core/styles';\n\nconst GridDiv = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n '& > *': {\n marginRight: theme.spacing(2),\n },\n '& > :last-of-type': {\n marginRight: 0,\n },\n}));\n\ntype PullRequestGridProps = {\n pullRequestGroups: PullRequestGroup[];\n};\n\nexport const PullRequestGrid = ({\n pullRequestGroups,\n}: PullRequestGridProps) => {\n return (\n <GridDiv>\n {pullRequestGroups.map((pullRequestGroup, index) => (\n <PullRequestGridColumn\n key={index}\n pullRequestGroup={pullRequestGroup}\n />\n ))}\n </GridDiv>\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { errorApiRef, useApi } from '@backstage/core-plugin-api';\nimport useAsyncRetry from 'react-use/esm/useAsyncRetry';\nimport useInterval from 'react-use/esm/useInterval';\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { azureDevOpsApiRef } from '../api';\nimport { useCallback } from 'react';\n\nconst POLLING_INTERVAL = 10000;\n\nexport function useDashboardPullRequests(\n project?: string,\n pollingInterval: number = POLLING_INTERVAL,\n teamsLimit?: number,\n): {\n pullRequests?: DashboardPullRequest[];\n loading: boolean;\n error?: Error;\n} {\n const api = useApi(azureDevOpsApiRef);\n const errorApi = useApi(errorApiRef);\n\n const getDashboardPullRequests = useCallback(async (): Promise<\n DashboardPullRequest[]\n > => {\n if (!project) {\n return Promise.reject(new Error('Missing project name'));\n }\n\n try {\n return await api.getDashboardPullRequests(project, teamsLimit);\n } catch (error) {\n if (error instanceof Error) {\n errorApi.post(error);\n }\n\n return Promise.reject(error);\n }\n }, [project, api, teamsLimit, errorApi]);\n\n const {\n value: pullRequests,\n loading,\n error,\n retry,\n } = useAsyncRetry(\n () => getDashboardPullRequests(),\n [getDashboardPullRequests],\n );\n\n useInterval(() => retry(), pollingInterval);\n\n return {\n pullRequests,\n loading,\n error,\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { identityApiRef, useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\n\nexport function useUserEmail(): string | undefined {\n const identityApi = useApi(identityApiRef);\n const state = useAsync(() => identityApi.getProfileInfo(), [identityApi]);\n return state.value?.email;\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { azureDevOpsApiRef } from '../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\n\nexport function useUserTeamIds(userId: string | undefined): {\n teamIds?: string[];\n loading: boolean;\n error?: Error;\n} {\n const api = useApi(azureDevOpsApiRef);\n\n const {\n value: teamIds,\n loading,\n error,\n } = useAsync(() => {\n return userId ? api.getUserTeamIds(userId) : Promise.resolve(undefined);\n }, [userId, api]);\n\n return {\n teamIds,\n loading,\n error,\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Filter, FilterType } from '../filters';\nimport { useUserEmail, useUserTeamIds } from '../../../../hooks';\n\nexport function useFilterProcessor(): (filters: Filter[]) => Filter[] {\n const userEmail = useUserEmail();\n const { teamIds } = useUserTeamIds(userEmail);\n\n return (filters: Filter[]): Filter[] => {\n for (const filter of filters) {\n switch (filter.type) {\n case FilterType.AssignedToCurrentUser:\n case FilterType.CreatedByCurrentUser:\n filter.email = userEmail;\n break;\n\n case FilterType.AssignedToCurrentUsersTeams:\n case FilterType.CreatedByCurrentUsersTeams:\n filter.teamIds = teamIds;\n break;\n\n default:\n break;\n }\n }\n\n return filters;\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Content,\n Header,\n Page,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { PullRequestColumnConfig, PullRequestGroup } from './lib/types';\nimport React, { useState } from 'react';\nimport { getPullRequestGroupConfigs, getPullRequestGroups } from './lib/utils';\nimport { FilterType } from './lib/filters';\nimport { PullRequestGrid } from './lib/PullRequestGrid';\nimport { useDashboardPullRequests } from '../../hooks';\nimport { useFilterProcessor } from './lib/hooks';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\nimport { azureDevOpsPullRequestDashboardReadPermission } from '@backstage-community/plugin-azure-devops-common';\n\ntype PullRequestsPageContentProps = {\n pullRequestGroups: PullRequestGroup[] | undefined;\n loading: boolean;\n error?: Error;\n};\n\nconst PullRequestsPageContent = ({\n pullRequestGroups,\n loading,\n error,\n}: PullRequestsPageContentProps) => {\n if (loading && (!pullRequestGroups || pullRequestGroups.length <= 0)) {\n return <Progress />;\n }\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return <PullRequestGrid pullRequestGroups={pullRequestGroups ?? []} />;\n};\n\nconst DEFAULT_COLUMN_CONFIGS: PullRequestColumnConfig[] = [\n {\n title: 'Created by me',\n filters: [{ type: FilterType.CreatedByCurrentUser }],\n simplified: false,\n },\n {\n title: 'Other PRs',\n filters: [{ type: FilterType.All }],\n simplified: true,\n },\n];\n\ntype PullRequestsPageProps = {\n projectName?: string;\n pollingInterval?: number;\n defaultColumnConfigs?: PullRequestColumnConfig[];\n teamsLimit?: number;\n};\n\nexport const PullRequestsPage = (props: PullRequestsPageProps) => {\n const { projectName, pollingInterval, defaultColumnConfigs, teamsLimit } =\n props;\n\n const { pullRequests, loading, error } = useDashboardPullRequests(\n projectName,\n pollingInterval,\n teamsLimit,\n );\n\n const [columnConfigs] = useState(\n defaultColumnConfigs ?? DEFAULT_COLUMN_CONFIGS,\n );\n\n const filterProcessor = useFilterProcessor();\n\n const pullRequestGroupConfigs = getPullRequestGroupConfigs(\n columnConfigs,\n filterProcessor,\n );\n\n const pullRequestGroups = getPullRequestGroups(\n pullRequests,\n pullRequestGroupConfigs,\n );\n\n return (\n <Page themeId=\"tool\">\n <Header title=\"Azure Pull Requests\" />\n <Content>\n <RequirePermission\n permission={azureDevOpsPullRequestDashboardReadPermission}\n >\n <PullRequestsPageContent\n pullRequestGroups={pullRequestGroups}\n loading={loading}\n error={error}\n />\n </RequirePermission>\n </Content>\n </Page>\n );\n};\n"],"names":["FilterType","useStyles","error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0BY,IAAA,UAAA,qBAAAA,WAAL,KAAA;AACL,EAAAA,YAAA,KAAM,CAAA,GAAA,KAAA,CAAA;AAGN,EAAAA,YAAA,gBAAiB,CAAA,GAAA,gBAAA,CAAA;AACjB,EAAAA,YAAA,uBAAwB,CAAA,GAAA,uBAAA,CAAA;AACxB,EAAAA,YAAA,gBAAiB,CAAA,GAAA,gBAAA,CAAA;AACjB,EAAAA,YAAA,iBAAkB,CAAA,GAAA,iBAAA,CAAA;AAClB,EAAAA,YAAA,6BAA8B,CAAA,GAAA,6BAAA,CAAA;AAG9B,EAAAA,YAAA,eAAgB,CAAA,GAAA,eAAA,CAAA;AAChB,EAAAA,YAAA,sBAAuB,CAAA,GAAA,sBAAA,CAAA;AACvB,EAAAA,YAAA,eAAgB,CAAA,GAAA,eAAA,CAAA;AAChB,EAAAA,YAAA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A;AAAA,KAAA;AAAA,oBAEZ,KAAA,CAAA,aAAA;AAAA,MAAC,uBAAA;AAAA,MAAA;AAAA,QACC,iBAAA;AAAA,QACA,OAAA;AAAA,QACA,KAAA;AAAA,OAAA;AAAA,KACF;AAAA,GAEJ,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAnnotationValuesFromEntity-G8YVs-3R.esm.js","sources":["../../src/utils/getAnnotationValuesFromEntity.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport {\n AZURE_DEVOPS_PROJECT_ANNOTATION,\n AZURE_DEVOPS_BUILD_DEFINITION_ANNOTATION,\n AZURE_DEVOPS_README_ANNOTATION,\n AZURE_DEVOPS_REPO_ANNOTATION,\n AZURE_DEVOPS_HOST_ORG_ANNOTATION,\n} from '@backstage-community/plugin-azure-devops-common';\n\nexport function getAnnotationValuesFromEntity(entity: Entity): {\n project: string;\n repo?: string;\n definition?: string;\n host?: string;\n org?: string;\n readmePath?: string;\n} {\n const hostOrg = getHostOrg(entity.metadata.annotations);\n const projectRepo = getProjectRepo(entity.metadata.annotations);\n const project =\n entity.metadata.annotations?.[AZURE_DEVOPS_PROJECT_ANNOTATION];\n const definition =\n entity.metadata.annotations?.[AZURE_DEVOPS_BUILD_DEFINITION_ANNOTATION];\n const readmePath =\n entity.metadata.annotations?.[AZURE_DEVOPS_README_ANNOTATION];\n\n if (definition) {\n if (project) {\n return {\n project,\n definition,\n readmePath: readmePath,\n ...hostOrg,\n };\n }\n if (projectRepo.project) {\n return {\n project: projectRepo.project,\n repo: projectRepo.repo,\n definition,\n readmePath: readmePath,\n ...hostOrg,\n };\n }\n throw new Error(\n `Value for annotation \"${AZURE_DEVOPS_PROJECT_ANNOTATION}\" was not found`,\n );\n } else {\n if (projectRepo.project) {\n return {\n project: projectRepo.project,\n repo: projectRepo.repo,\n readmePath: readmePath,\n ...hostOrg,\n };\n }\n\n if (project) {\n throw new Error(\n `Value for annotation \"${AZURE_DEVOPS_BUILD_DEFINITION_ANNOTATION}\" was not found`,\n );\n }\n }\n\n throw new Error('Expected \"dev.azure.com\" annotations were not found');\n}\n\nfunction getProjectRepo(annotations?: Record<string, string>): {\n project?: string;\n repo?: string;\n} {\n const annotation = annotations?.[AZURE_DEVOPS_REPO_ANNOTATION];\n if (!annotation) {\n return { project: undefined, repo: undefined };\n }\n\n if (annotation.split('/').length === 2) {\n const [project, repo] = annotation.split('/');\n if (project && repo) {\n return { project, repo };\n }\n }\n\n throw new Error(\n `Invalid value for annotation \"${AZURE_DEVOPS_REPO_ANNOTATION}\"; expected format is: <project-name>/<repo-name>, found: \"${annotation}\"`,\n );\n}\n\nfunction getHostOrg(annotations?: Record<string, string>): {\n host?: string;\n org?: string;\n} {\n const annotation = annotations?.[AZURE_DEVOPS_HOST_ORG_ANNOTATION];\n if (!annotation) {\n return { host: undefined, org: undefined };\n }\n\n const segments = annotation.split('/');\n if (segments.length === 2) {\n const [host, org] = segments;\n if (host && org) {\n return { host, org };\n }\n } else if (segments.length === 3) {\n const [host, subpath, org] = segments;\n return { host: `${host}/${subpath}`, org };\n }\n\n throw new Error(\n `Invalid value for annotation \"${AZURE_DEVOPS_HOST_ORG_ANNOTATION}\"; expected format is: <host-name>/<organization-name>, found: \"${annotation}\"`,\n );\n}\n"],"names":[],"mappings":";;AAyBO,SAAS,8BAA8B,MAO5C,EAAA;AAhCF,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AAiCE,E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AM,MAAA,QAAA,GAAW,UAAW,CAAA,KAAA,CAAM,GAAG,CAAA,CAAA;AACrC,EAAI,IAAA,QAAA,CAAS,WAAW,CAAG,EAAA;AACzB,IAAM,MAAA,CAAC,IAAM,EAAA,GAAG,CAAI,GAAA,QAAA,CAAA;AACpB,IAAA,IAAI,QAAQ,GAAK,EAAA;AACf,MAAO,OAAA,EAAE,MAAM,GAAI,EAAA,CAAA;AAAA,KACrB;AAAA,GACF,MAAA,IAAW,QAAS,CAAA,MAAA,KAAW,CAAG,EAAA;AAChC,IAAA,MAAM,CAAC,IAAA,EAAM,OAAS,EAAA,GAAG,CAAI,GAAA,QAAA,CAAA;AAC7B,IAAA,OAAO,EAAE,IAAM,EAAA,CAAA,EAAG,IAAI,CAAI,CAAA,EAAA,OAAO,IAAI,GAAI,EAAA,CAAA;AAAA,GAC3C;AAEA,EAAA,MAAM,IAAI,KAAA;AAAA,IACR,CAAA,8BAAA,EAAiC,gCAAgC,CAAA,gEAAA,EAAmE,UAAU,CAAA,CAAA,CAAA;AAAA,GAChJ,CAAA;AACF;;;;"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { azureDevOpsGitTagReadPermission } from '@backstage-community/plugin-azure-devops-common';
|
|
2
|
-
import Box from '@material-ui/core/Box';
|
|
3
|
-
import { ResponseErrorPanel, Table, Link } from '@backstage/core-components';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import SvgIcon from '@material-ui/core/SvgIcon';
|
|
6
|
-
import { useEntity } from '@backstage/plugin-catalog-react';
|
|
7
|
-
import { stringifyEntityRef } from '@backstage/catalog-model';
|
|
8
|
-
import { a as azureDevOpsApiRef } from './AzureDevOpsApi-GBxs-uQ7.esm.js';
|
|
9
|
-
import '@backstage/errors';
|
|
10
|
-
import { useApi } from '@backstage/core-plugin-api';
|
|
11
|
-
import useAsync from 'react-use/esm/useAsync';
|
|
12
|
-
import 'luxon';
|
|
13
|
-
import 'humanize-duration';
|
|
14
|
-
import { g as getAnnotationValuesFromEntity } from './getAnnotationValuesFromEntity-G8YVs-3R.esm.js';
|
|
15
|
-
import { RequirePermission } from '@backstage/plugin-permission-react';
|
|
16
|
-
|
|
17
|
-
const AzureGitTagsIcon = (props) => /* @__PURE__ */ React.createElement(SvgIcon, { ...props, viewBox: "0 0 32 32" }, /* @__PURE__ */ React.createElement("path", { d: "M22.5 12C23.8807 12 25 10.8807 25 9.5C25 8.11929 23.8807 7 22.5 7C21.1193 7 20 8.11929 20 9.5C20 10.8807 21.1193 12 22.5 12ZM18.6842 3C17.6695 3 16.6927 3.38568 15.9516 4.07892L3.77041 15.4742C2.01578 17.1157 1.96966 19.8841 3.66863 21.5831L9.99455 27.909C11.6543 29.5687 14.3452 29.5687 16.005 27.909L27.8282 16.0858C28.5783 15.3356 28.9998 14.3182 28.9998 13.2574V6.5C28.9998 4.567 27.4328 3 25.4998 3H18.6842ZM17.3179 5.53946C17.6884 5.19284 18.1769 5 18.6842 5H25.4998C26.3282 5 26.9998 5.67157 26.9998 6.5V13.2574C26.9998 13.7878 26.789 14.2965 26.414 14.6716L14.5907 26.4948C13.7121 27.3735 12.2874 27.3735 11.4088 26.4948L5.08284 20.1689C4.18339 19.2694 4.20781 17.8038 5.13673 16.9348L17.3179 5.53946Z" }));
|
|
18
|
-
|
|
19
|
-
function useGitTags(entity) {
|
|
20
|
-
const api = useApi(azureDevOpsApiRef);
|
|
21
|
-
const { value, loading, error } = useAsync(() => {
|
|
22
|
-
const { project, repo, host, org } = getAnnotationValuesFromEntity(entity);
|
|
23
|
-
return api.getGitTags(
|
|
24
|
-
project,
|
|
25
|
-
repo,
|
|
26
|
-
stringifyEntityRef(entity),
|
|
27
|
-
host,
|
|
28
|
-
org
|
|
29
|
-
);
|
|
30
|
-
}, [api]);
|
|
31
|
-
return {
|
|
32
|
-
items: value == null ? void 0 : value.items,
|
|
33
|
-
loading,
|
|
34
|
-
error
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const columns = [
|
|
39
|
-
{
|
|
40
|
-
title: "Tag",
|
|
41
|
-
field: "name",
|
|
42
|
-
highlight: false,
|
|
43
|
-
defaultSort: "desc",
|
|
44
|
-
width: "auto",
|
|
45
|
-
render: (row) => {
|
|
46
|
-
var _a;
|
|
47
|
-
return /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, /* @__PURE__ */ React.createElement(Link, { to: (_a = row.link) != null ? _a : "" }, row.name));
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
title: "Commit",
|
|
52
|
-
field: "peeledObjectId",
|
|
53
|
-
width: "auto",
|
|
54
|
-
render: (row) => {
|
|
55
|
-
var _a;
|
|
56
|
-
return /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, /* @__PURE__ */ React.createElement(Link, { to: (_a = row.commitLink) != null ? _a : "" }, row.peeledObjectId));
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
title: "Created By",
|
|
61
|
-
field: "createdBy",
|
|
62
|
-
width: "auto"
|
|
63
|
-
}
|
|
64
|
-
];
|
|
65
|
-
const GitTagTable = () => {
|
|
66
|
-
const { entity } = useEntity();
|
|
67
|
-
const { items, loading, error } = useGitTags(entity);
|
|
68
|
-
if (error) {
|
|
69
|
-
return /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error });
|
|
70
|
-
}
|
|
71
|
-
return /* @__PURE__ */ React.createElement(
|
|
72
|
-
Table,
|
|
73
|
-
{
|
|
74
|
-
isLoading: loading,
|
|
75
|
-
columns,
|
|
76
|
-
options: {
|
|
77
|
-
search: true,
|
|
78
|
-
paging: true,
|
|
79
|
-
pageSize: 5,
|
|
80
|
-
showEmptyDataSourceMessage: !loading
|
|
81
|
-
},
|
|
82
|
-
title: /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, /* @__PURE__ */ React.createElement(AzureGitTagsIcon, { style: { fontSize: 30 } }), /* @__PURE__ */ React.createElement(Box, { mr: 1 }), "Azure Repos - Git Tags (", items ? items.length : 0, ")"),
|
|
83
|
-
data: items != null ? items : []
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const EntityPageAzureGitTags = () => {
|
|
89
|
-
const { entity } = useEntity();
|
|
90
|
-
return /* @__PURE__ */ React.createElement(
|
|
91
|
-
RequirePermission,
|
|
92
|
-
{
|
|
93
|
-
permission: azureDevOpsGitTagReadPermission,
|
|
94
|
-
resourceRef: stringifyEntityRef(entity),
|
|
95
|
-
errorPage: null
|
|
96
|
-
},
|
|
97
|
-
/* @__PURE__ */ React.createElement(GitTagTable, null)
|
|
98
|
-
);
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export { EntityPageAzureGitTags };
|
|
102
|
-
//# sourceMappingURL=index-1Rl7C23d.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-1Rl7C23d.esm.js","sources":["../../src/components/AzureGitTagsIcon/AzureGitTagsIcon.tsx","../../src/hooks/useGitTags.ts","../../src/components/GitTagTable/GitTagTable.tsx","../../src/components/EntityPageAzureGitTags/EntityPageAzureGitTags.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\nimport React from 'react';\n\n// From https://github.com/microsoft/fluentui-system-icons/blob/30a3e3c458883a1d63a43a951407f30e6b32b60c/assets/Tag/SVG/ic_fluent_tag_32_regular.svg\nexport const AzureGitTagsIcon = (props: SvgIconProps) => (\n <SvgIcon {...props} viewBox=\"0 0 32 32\">\n <path d=\"M22.5 12C23.8807 12 25 10.8807 25 9.5C25 8.11929 23.8807 7 22.5 7C21.1193 7 20 8.11929 20 9.5C20 10.8807 21.1193 12 22.5 12ZM18.6842 3C17.6695 3 16.6927 3.38568 15.9516 4.07892L3.77041 15.4742C2.01578 17.1157 1.96966 19.8841 3.66863 21.5831L9.99455 27.909C11.6543 29.5687 14.3452 29.5687 16.005 27.909L27.8282 16.0858C28.5783 15.3356 28.9998 14.3182 28.9998 13.2574V6.5C28.9998 4.567 27.4328 3 25.4998 3H18.6842ZM17.3179 5.53946C17.6884 5.19284 18.1769 5 18.6842 5H25.4998C26.3282 5 26.9998 5.67157 26.9998 6.5V13.2574C26.9998 13.7878 26.789 14.2965 26.414 14.6716L14.5907 26.4948C13.7121 27.3735 12.2874 27.3735 11.4088 26.4948L5.08284 20.1689C4.18339 19.2694 4.20781 17.8038 5.13673 16.9348L17.3179 5.53946Z\" />\n </SvgIcon>\n);\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { GitTag } from '@backstage-community/plugin-azure-devops-common';\n\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { azureDevOpsApiRef } from '../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getAnnotationValuesFromEntity } from '../utils';\n\nexport function useGitTags(entity: Entity): {\n items?: GitTag[];\n loading: boolean;\n error?: Error;\n} {\n const api = useApi(azureDevOpsApiRef);\n\n const { value, loading, error } = useAsync(() => {\n const { project, repo, host, org } = getAnnotationValuesFromEntity(entity);\n return api.getGitTags(\n project,\n repo as string,\n stringifyEntityRef(entity),\n host,\n org,\n );\n }, [api]);\n\n return {\n items: value?.items,\n loading,\n error,\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport {\n Link,\n ResponseErrorPanel,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport { GitTag } from '@backstage-community/plugin-azure-devops-common';\nimport React from 'react';\n\nimport { AzureGitTagsIcon } from '../AzureGitTagsIcon';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { useGitTags } from '../../hooks/useGitTags';\n\nconst columns: TableColumn[] = [\n {\n title: 'Tag',\n field: 'name',\n highlight: false,\n defaultSort: 'desc',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.link ?? ''}>{row.name}</Link>\n </Box>\n ),\n },\n {\n title: 'Commit',\n field: 'peeledObjectId',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.commitLink ?? ''}>{row.peeledObjectId}</Link>\n </Box>\n ),\n },\n {\n title: 'Created By',\n field: 'createdBy',\n width: 'auto',\n },\n];\n\nexport const GitTagTable = () => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useGitTags(entity);\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzureGitTagsIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Repos - Git Tags ({items ? items.length : 0})\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { azureDevOpsGitTagReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { GitTagTable } from '../GitTagTable/GitTagTable';\nimport React from 'react';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzureGitTags = () => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsGitTagReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <GitTagTable />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAqBO,MAAM,gBAAmB,GAAA,CAAC,KAC/B,qBAAA,KAAA,CAAA,aAAA,CAAC,OAAS,EAAA,EAAA,GAAG,KAAO,EAAA,OAAA,EAAQ,WAC1B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,MAAK,EAAA,EAAA,CAAA,EAAE,ysBAAwsB,CACltB,CAAA;;ACAK,SAAS,WAAW,MAIzB,EAAA;AACA,EAAM,MAAA,GAAA,GAAM,OAAO,iBAAiB,CAAA,CAAA;AAEpC,EAAA,MAAM,EAAE,KAAO,EAAA,OAAA,EAAS,KAAM,EAAA,GAAI,SAAS,MAAM;AAC/C,IAAA,MAAM,EA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A,0BAAA,EACW,KAAQ,GAAA,KAAA,CAAM,MAAS,GAAA,CAAA,EAAE,GACpD,CAAA;AAAA,MAEF,IAAA,EAAM,wBAAS,EAAC;AAAA,KAAA;AAAA,GAClB,CAAA;AAEJ,CAAA;;AClEO,MAAM,yBAAyB,MAAM;AAC1C,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAC7B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,+BAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA,IAAA;AAAA,KAAA;AAAA,wCAEV,WAAY,EAAA,IAAA,CAAA;AAAA,GACf,CAAA;AAEJ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-BJ_pWnMh.esm.js","sources":["../../src/hooks/useReadme.ts","../../src/components/ReadmeCard/ReadmeCard.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Readme } from '@backstage-community/plugin-azure-devops-common';\n\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { azureDevOpsApiRef } from '../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getAnnotationValuesFromEntity } from '../utils';\n\nexport function useReadme(entity: Entity): {\n item?: Readme;\n loading: boolean;\n error?: Error;\n} {\n const api = useApi(azureDevOpsApiRef);\n\n const { value, loading, error } = useAsync(() => {\n const { project, repo, host, org, readmePath } =\n getAnnotationValuesFromEntity(entity);\n const entityRef = stringifyEntityRef(entity);\n return api.getReadme({\n project,\n repo: repo as string,\n entityRef,\n host,\n org,\n path: readmePath,\n });\n }, [api]);\n\n return {\n item: value,\n loading,\n error,\n };\n}\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport { makeStyles } from '@material-ui/core/styles';\nimport {\n InfoCard,\n Progress,\n MarkdownContent,\n EmptyState,\n ErrorPanel,\n} from '@backstage/core-components';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport React from 'react';\n\nimport { useReadme } from '../../hooks';\n\nconst useStyles = makeStyles(theme => ({\n readMe: {\n overflowY: 'auto',\n paddingRight: theme.spacing(1),\n '&::-webkit-scrollbar-track': {\n backgroundColor: '#F5F5F5',\n borderRadius: '5px',\n },\n '&::-webkit-scrollbar': {\n width: '5px',\n backgroundColor: '#F5F5F5',\n borderRadius: '5px',\n },\n '&::-webkit-scrollbar-thumb': {\n border: '1px solid #555555',\n backgroundColor: '#555',\n borderRadius: '4px',\n },\n },\n}));\n\ntype Props = {\n maxHeight?: number;\n};\n\ntype ErrorProps = {\n error: Error;\n};\n\nfunction isNotFoundError(error: any): boolean {\n return error?.response?.status === 404;\n}\n\nconst ReadmeCardError = ({ error }: ErrorProps) => {\n if (isNotFoundError(error)) {\n return (\n <EmptyState\n title=\"No README available for this entity\"\n missing=\"field\"\n description=\"You can add a README to your entity by following the Azure DevOps documentation.\"\n action={\n <Button\n variant=\"contained\"\n color=\"primary\"\n href=\"https://docs.microsoft.com/en-us/azure/devops/repos/git/create-a-readme?view=azure-devops\"\n >\n Read more\n </Button>\n }\n />\n );\n }\n return <ErrorPanel title={error.message} error={error} />;\n};\n\nexport const ReadmeCard = (props: Props) => {\n const classes = useStyles();\n const { entity } = useEntity();\n const { loading, error, item: value } = useReadme(entity);\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ReadmeCardError error={error} />;\n }\n\n return (\n <InfoCard\n title=\"Readme\"\n deepLink={{\n link: value!.url,\n title: 'Readme',\n }}\n >\n <Box className={classes.readMe} sx={{ maxHeight: props.maxHeight }}>\n <MarkdownContent content={value?.content ?? ''} />\n </Box>\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAwBO,SAAS,UAAU,MAIxB,EAAA;AACA,EAAM,MAAA,GAAA,GAAM,OAAO,iBAAiB,CAAA,CAAA;AAEpC,EAAA,MAAM,EAAE,KAAO,EAAA,OAAA,EAAS,KAAM,EAAA,GAAI,SAAS,MAAM;AAC/C,IAAM,MAAA,EAAE,SAAS,IAAM,EAAA,IAAA,EAAM,KAAK,UAAW,EAAA,GAC3C,8BAA8B,MAAM,CAAA,CAAA;AACtC,IAAM,MAAA,SAAA,GAAY,mBAAmB,MAAM,CAAA,CAAA;AAC3C,IAAA,OAAO,IAAI,SAAU,CAAA;AAAA,MACnB,OAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA;AAAA,MACA,IAAA;AAAA,MACA,GAAA;AAAA,MACA,IAAM,EAAA,UAAA;AAAA,KACP,CAAA,CAAA;AAAA,GACH,EAAG,CAAC,GAAG,CAAC,CAAA,CAAA;AAER,EAAO,OAAA;AAAA,IACL,IAAM,EAAA,KAAA;AAAA,IACN,OAAA;AAAA,IACA,KAAA;AAAA,GACF,CAAA;AACF;;ACnBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,MAAQ,EAAA;AAAA,IACN,SAAW,EAAA,MAAA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AAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,KAAO,EAAA,KAAA,CAAM,SAAS,KAAc,EAAA,CAAA,CAAA;AACzD,CAAA,CAAA;AAEa,MAAA,UAAA,GAAa,CAAC,KAAiB,KAAA;AAtF5C,EAAA,IAAA,EAAA,CAAA;AAuFE,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAC1B,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAC7B,EAAA,MAAM,EAAE,OAAS,EAAA,KAAA,EAAO,MAAM,KAAM,EAAA,GAAI,UAAU,MAAM,CAAA,CAAA;AAExD,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,2CAAQ,QAAS,EAAA,IAAA,CAAA,CAAA;AAAA,aACR,KAAO,EAAA;AAChB,IAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,mBAAgB,KAAc,EAAA,CAAA,CAAA;AAAA,GACxC;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,QAAA;AAAA,MACN,QAAU,EAAA;AAAA,QACR,MAAM,KAAO,CAAA,GAAA;AAAA,QACb,KAAO,EAAA,QAAA;AAAA,OACT;AAAA,KAAA;AAAA,wCAEC,GAAI,EAAA,EAAA,SAAA,EAAW,QAAQ,MAAQ,EAAA,EAAA,EAAI,EAAE,SAAW,EAAA,KAAA,CAAM,SAAU,EAAA,EAAA,sCAC9D,eAAgB,EAAA,EAAA,OAAA,EAAA,CAAS,oCAAO,OAAP,KAAA,IAAA,GAAA,EAAA,GAAkB,IAAI,CAClD,CAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { PullRequestStatus, AZURE_DEVOPS_DEFAULT_TOP, azureDevOpsPullRequestReadPermission } from '@backstage-community/plugin-azure-devops-common';
|
|
2
|
-
import Box from '@material-ui/core/Box';
|
|
3
|
-
import Chip from '@material-ui/core/Chip';
|
|
4
|
-
import { ResponseErrorPanel, Table, Link } from '@backstage/core-components';
|
|
5
|
-
import React, { useState } from 'react';
|
|
6
|
-
import { A as AzurePullRequestsIcon } from './AzurePullRequestsIcon-DOAkj-X3.esm.js';
|
|
7
|
-
import { DateTime } from 'luxon';
|
|
8
|
-
import Button from '@material-ui/core/Button';
|
|
9
|
-
import ButtonGroup from '@material-ui/core/ButtonGroup';
|
|
10
|
-
import { useEntity } from '@backstage/plugin-catalog-react';
|
|
11
|
-
import { stringifyEntityRef } from '@backstage/catalog-model';
|
|
12
|
-
import { a as azureDevOpsApiRef } from './AzureDevOpsApi-GBxs-uQ7.esm.js';
|
|
13
|
-
import '@backstage/errors';
|
|
14
|
-
import { useApi } from '@backstage/core-plugin-api';
|
|
15
|
-
import useAsync from 'react-use/esm/useAsync';
|
|
16
|
-
import 'humanize-duration';
|
|
17
|
-
import { g as getAnnotationValuesFromEntity } from './getAnnotationValuesFromEntity-G8YVs-3R.esm.js';
|
|
18
|
-
import { RequirePermission } from '@backstage/plugin-permission-react';
|
|
19
|
-
import '@material-ui/core/SvgIcon';
|
|
20
|
-
|
|
21
|
-
function usePullRequests(entity, defaultLimit, requestedStatus, defaultTeamsLimit) {
|
|
22
|
-
const top = defaultLimit != null ? defaultLimit : AZURE_DEVOPS_DEFAULT_TOP;
|
|
23
|
-
const teamsLimit = defaultTeamsLimit != null ? defaultTeamsLimit : void 0;
|
|
24
|
-
const status = requestedStatus != null ? requestedStatus : PullRequestStatus.Active;
|
|
25
|
-
const options = {
|
|
26
|
-
top,
|
|
27
|
-
status,
|
|
28
|
-
teamsLimit
|
|
29
|
-
};
|
|
30
|
-
const api = useApi(azureDevOpsApiRef);
|
|
31
|
-
const { value, loading, error } = useAsync(() => {
|
|
32
|
-
const { project, repo, host, org } = getAnnotationValuesFromEntity(entity);
|
|
33
|
-
const entityRef = stringifyEntityRef(entity);
|
|
34
|
-
return api.getPullRequests(
|
|
35
|
-
project,
|
|
36
|
-
repo,
|
|
37
|
-
entityRef,
|
|
38
|
-
host,
|
|
39
|
-
org,
|
|
40
|
-
options
|
|
41
|
-
);
|
|
42
|
-
}, [api, top, status]);
|
|
43
|
-
return {
|
|
44
|
-
items: value == null ? void 0 : value.items,
|
|
45
|
-
loading,
|
|
46
|
-
error
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const PullRequestStatusButtonGroup = ({
|
|
51
|
-
status,
|
|
52
|
-
setStatus
|
|
53
|
-
}) => {
|
|
54
|
-
return /* @__PURE__ */ React.createElement(ButtonGroup, { "aria-label": "outlined button group" }, /* @__PURE__ */ React.createElement(
|
|
55
|
-
Button,
|
|
56
|
-
{
|
|
57
|
-
color: status === PullRequestStatus.Active ? "primary" : "default",
|
|
58
|
-
onClick: () => {
|
|
59
|
-
setStatus(PullRequestStatus.Active);
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"Active"
|
|
63
|
-
), /* @__PURE__ */ React.createElement(
|
|
64
|
-
Button,
|
|
65
|
-
{
|
|
66
|
-
color: status === PullRequestStatus.Completed ? "primary" : "default",
|
|
67
|
-
onClick: () => {
|
|
68
|
-
setStatus(PullRequestStatus.Completed);
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"Completed"
|
|
72
|
-
), /* @__PURE__ */ React.createElement(
|
|
73
|
-
Button,
|
|
74
|
-
{
|
|
75
|
-
color: status === PullRequestStatus.Abandoned ? "primary" : "default",
|
|
76
|
-
onClick: () => {
|
|
77
|
-
setStatus(PullRequestStatus.Abandoned);
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
"Abandoned"
|
|
81
|
-
));
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
const columns = [
|
|
85
|
-
{
|
|
86
|
-
title: "ID",
|
|
87
|
-
field: "pullRequestId",
|
|
88
|
-
highlight: false,
|
|
89
|
-
width: "auto"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
title: "Title",
|
|
93
|
-
field: "title",
|
|
94
|
-
width: "auto",
|
|
95
|
-
render: (row) => {
|
|
96
|
-
var _a;
|
|
97
|
-
return /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, /* @__PURE__ */ React.createElement(Link, { to: (_a = row.link) != null ? _a : "" }, row.title), row.isDraft && /* @__PURE__ */ React.createElement(Box, { paddingLeft: 1 }, /* @__PURE__ */ React.createElement(
|
|
98
|
-
Chip,
|
|
99
|
-
{
|
|
100
|
-
label: "Draft",
|
|
101
|
-
variant: "outlined",
|
|
102
|
-
color: "secondary",
|
|
103
|
-
size: "small"
|
|
104
|
-
}
|
|
105
|
-
)));
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
title: "Source",
|
|
110
|
-
field: "sourceRefName",
|
|
111
|
-
width: "auto"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
title: "Target",
|
|
115
|
-
field: "targetRefName",
|
|
116
|
-
width: "auto"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
title: "Created By",
|
|
120
|
-
field: "createdBy",
|
|
121
|
-
width: "auto"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
title: "Created",
|
|
125
|
-
field: "creationDate",
|
|
126
|
-
width: "auto",
|
|
127
|
-
render: (row) => (row.creationDate ? DateTime.fromISO(row.creationDate) : DateTime.now()).toRelative()
|
|
128
|
-
}
|
|
129
|
-
];
|
|
130
|
-
const PullRequestTable = ({ defaultLimit }) => {
|
|
131
|
-
const [pullRequestStatusState, setPullRequestStatusState] = useState(PullRequestStatus.Active);
|
|
132
|
-
const { entity } = useEntity();
|
|
133
|
-
const { items, loading, error } = usePullRequests(
|
|
134
|
-
entity,
|
|
135
|
-
defaultLimit,
|
|
136
|
-
pullRequestStatusState
|
|
137
|
-
);
|
|
138
|
-
if (error) {
|
|
139
|
-
return /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error });
|
|
140
|
-
}
|
|
141
|
-
return /* @__PURE__ */ React.createElement(
|
|
142
|
-
Table,
|
|
143
|
-
{
|
|
144
|
-
isLoading: loading,
|
|
145
|
-
columns,
|
|
146
|
-
options: {
|
|
147
|
-
search: true,
|
|
148
|
-
paging: true,
|
|
149
|
-
pageSize: 5,
|
|
150
|
-
showEmptyDataSourceMessage: !loading
|
|
151
|
-
},
|
|
152
|
-
title: /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, /* @__PURE__ */ React.createElement(AzurePullRequestsIcon, { style: { fontSize: 30 } }), /* @__PURE__ */ React.createElement(Box, { mr: 1 }), "Azure Repos - Pull Requests (", items ? items.length : 0, ")", /* @__PURE__ */ React.createElement(Box, { position: "absolute", right: 320, top: 20 }, /* @__PURE__ */ React.createElement(
|
|
153
|
-
PullRequestStatusButtonGroup,
|
|
154
|
-
{
|
|
155
|
-
status: pullRequestStatusState,
|
|
156
|
-
setStatus: setPullRequestStatusState
|
|
157
|
-
}
|
|
158
|
-
))),
|
|
159
|
-
data: items != null ? items : []
|
|
160
|
-
}
|
|
161
|
-
);
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
const EntityPageAzurePullRequests = (props) => {
|
|
165
|
-
const { entity } = useEntity();
|
|
166
|
-
return /* @__PURE__ */ React.createElement(
|
|
167
|
-
RequirePermission,
|
|
168
|
-
{
|
|
169
|
-
permission: azureDevOpsPullRequestReadPermission,
|
|
170
|
-
resourceRef: stringifyEntityRef(entity),
|
|
171
|
-
errorPage: null
|
|
172
|
-
},
|
|
173
|
-
/* @__PURE__ */ React.createElement(PullRequestTable, { defaultLimit: props.defaultLimit })
|
|
174
|
-
);
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
export { EntityPageAzurePullRequests };
|
|
178
|
-
//# sourceMappingURL=index-Bo-6jkQA.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-Bo-6jkQA.esm.js","sources":["../../src/hooks/usePullRequests.ts","../../src/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.tsx","../../src/components/PullRequestTable/PullRequestTable.tsx","../../src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AZURE_DEVOPS_DEFAULT_TOP,\n PullRequest,\n PullRequestOptions,\n PullRequestStatus,\n} from '@backstage-community/plugin-azure-devops-common';\n\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { azureDevOpsApiRef } from '../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getAnnotationValuesFromEntity } from '../utils';\n\nexport function usePullRequests(\n entity: Entity,\n defaultLimit?: number,\n requestedStatus?: PullRequestStatus,\n defaultTeamsLimit?: number,\n): {\n items?: PullRequest[];\n loading: boolean;\n error?: Error;\n} {\n const top = defaultLimit ?? AZURE_DEVOPS_DEFAULT_TOP;\n const teamsLimit = defaultTeamsLimit ?? undefined;\n const status = requestedStatus ?? PullRequestStatus.Active;\n const options: PullRequestOptions = {\n top,\n status,\n teamsLimit,\n };\n\n const api = useApi(azureDevOpsApiRef);\n\n const { value, loading, error } = useAsync(() => {\n const { project, repo, host, org } = getAnnotationValuesFromEntity(entity);\n const entityRef = stringifyEntityRef(entity);\n return api.getPullRequests(\n project,\n repo as string,\n entityRef,\n host,\n org,\n options,\n );\n }, [api, top, status]);\n\n return {\n items: value?.items,\n loading,\n error,\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Button from '@material-ui/core/Button';\nimport ButtonGroup from '@material-ui/core/ButtonGroup';\n\nimport { PullRequestStatus } from '@backstage-community/plugin-azure-devops-common';\nimport React from 'react';\n\nexport const PullRequestStatusButtonGroup = ({\n status,\n setStatus,\n}: {\n status: PullRequestStatus;\n setStatus: (pullRequestStatus: PullRequestStatus) => void;\n}) => {\n return (\n <ButtonGroup aria-label=\"outlined button group\">\n <Button\n color={status === PullRequestStatus.Active ? 'primary' : 'default'}\n onClick={() => {\n setStatus(PullRequestStatus.Active);\n }}\n >\n Active\n </Button>\n <Button\n color={status === PullRequestStatus.Completed ? 'primary' : 'default'}\n onClick={() => {\n setStatus(PullRequestStatus.Completed);\n }}\n >\n Completed\n </Button>\n <Button\n color={status === PullRequestStatus.Abandoned ? 'primary' : 'default'}\n onClick={() => {\n setStatus(PullRequestStatus.Abandoned);\n }}\n >\n Abandoned\n </Button>\n </ButtonGroup>\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport Chip from '@material-ui/core/Chip';\nimport {\n Link,\n ResponseErrorPanel,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport {\n PullRequest,\n PullRequestStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport React, { useState } from 'react';\n\nimport { AzurePullRequestsIcon } from '../AzurePullRequestsIcon';\nimport { DateTime } from 'luxon';\nimport { PullRequestStatusButtonGroup } from '../PullRequestStatusButtonGroup';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { usePullRequests } from '../../hooks/usePullRequests';\n\nconst columns: TableColumn[] = [\n {\n title: 'ID',\n field: 'pullRequestId',\n highlight: false,\n width: 'auto',\n },\n {\n title: 'Title',\n field: 'title',\n width: 'auto',\n render: (row: Partial<PullRequest>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.link ?? ''}>{row.title}</Link>\n {row.isDraft && (\n <Box paddingLeft={1}>\n <Chip\n label=\"Draft\"\n variant=\"outlined\"\n color=\"secondary\"\n size=\"small\"\n />\n </Box>\n )}\n </Box>\n ),\n },\n {\n title: 'Source',\n field: 'sourceRefName',\n width: 'auto',\n },\n {\n title: 'Target',\n field: 'targetRefName',\n width: 'auto',\n },\n {\n title: 'Created By',\n field: 'createdBy',\n width: 'auto',\n },\n {\n title: 'Created',\n field: 'creationDate',\n width: 'auto',\n render: (row: Partial<PullRequest>) =>\n (row.creationDate\n ? DateTime.fromISO(row.creationDate)\n : DateTime.now()\n ).toRelative(),\n },\n];\n\ntype PullRequestTableProps = {\n defaultLimit?: number;\n};\n\nexport const PullRequestTable = ({ defaultLimit }: PullRequestTableProps) => {\n const [pullRequestStatusState, setPullRequestStatusState] =\n useState<PullRequestStatus>(PullRequestStatus.Active);\n const { entity } = useEntity();\n\n const { items, loading, error } = usePullRequests(\n entity,\n defaultLimit,\n pullRequestStatusState,\n );\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzurePullRequestsIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Repos - Pull Requests ({items ? items.length : 0})\n <Box position=\"absolute\" right={320} top={20}>\n <PullRequestStatusButtonGroup\n status={pullRequestStatusState}\n setStatus={setPullRequestStatusState}\n />\n </Box>\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { azureDevOpsPullRequestReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { PullRequestTable } from '../PullRequestTable/PullRequestTable';\nimport React from 'react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\n\nexport const EntityPageAzurePullRequests = (props: {\n defaultLimit?: number;\n}) => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsPullRequestReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <PullRequestTable defaultLimit={props.defaultLimit} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA6BO,SAAS,eACd,CAAA,MAAA,EACA,YACA,EAAA,eAAA,EACA,iBAKA,EAAA;AACA,EAAA,MAAM,MAAM,YAAgB,IAAA,IAAA,GAAA,YAAA,GAAA,wBAAA,CAAA;AAC5B,EAAA,MAAM,aAAa,iBAAqB,IAAA,IAAA,GAAA,iBAAA,GAAA,KAAA,CAAA,CAAA;AACxC,EAAM,MAAA,MAAA,GAAS,4CAAmB,iBAAkB,CAAA,MAAA,CAAA;AACpD,EAAA,MAAM,OAA8B,GAAA;AA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SAAW,EAAA,IAAA;AAAA,KAAA;AAAA,oBAEV,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA,EAAiB,YAAc,EAAA,KAAA,CAAM,YAAc,EAAA,CAAA;AAAA,GACtD,CAAA;AAEJ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-Bwu2-Sgs.esm.js","sources":["../../src/utils/getDurationFromDates.ts","../../src/hooks/useBuildRuns.ts","../../src/components/AzurePipelinesIcon/AzurePipelinesIcon.tsx","../../src/components/BuildTable/BuildTable.tsx","../../src/components/EntityPageAzurePipelines/EntityPageAzurePipelines.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DateTime, Interval } from 'luxon';\nimport humanizeDuration from 'humanize-duration';\n\nexport const getDurationFromDates = (\n startTime?: string,\n finishTime?: string,\n): string => {\n if (!startTime || (!startTime && !finishTime)) {\n return '';\n }\n\n const start = DateTime.fromISO(startTime);\n const finish = finishTime ? DateTime.fromISO(finishTime) : DateTime.now();\n\n const formatted = Interval.fromDateTimes(start, finish)\n .toDuration()\n .valueOf();\n\n const shortEnglishHumanizer = humanizeDuration.humanizer({\n language: 'shortEn',\n languages: {\n shortEn: {\n y: () => 'y',\n mo: () => 'mo',\n w: () => 'w',\n d: () => 'd',\n h: () => 'h',\n m: () => 'm',\n s: () => 's',\n ms: () => 'ms',\n },\n },\n });\n\n return shortEnglishHumanizer(formatted, {\n largest: 2,\n round: true,\n spacer: '',\n });\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AZURE_DEVOPS_DEFAULT_TOP,\n BuildRun,\n BuildRunOptions,\n} from '@backstage-community/plugin-azure-devops-common';\n\nimport { azureDevOpsApiRef } from '../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getAnnotationValuesFromEntity } from '../utils';\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\n\nexport function useBuildRuns(\n entity: Entity,\n defaultLimit?: number,\n): {\n items?: BuildRun[];\n loading: boolean;\n error?: Error;\n} {\n const top = defaultLimit ?? AZURE_DEVOPS_DEFAULT_TOP;\n const options: BuildRunOptions = {\n top: top,\n };\n\n const api = useApi(azureDevOpsApiRef);\n\n const { value, loading, error } = useAsync(() => {\n const { project, repo, definition, host, org } =\n getAnnotationValuesFromEntity(entity);\n return api.getBuildRuns(\n project,\n stringifyEntityRef(entity),\n repo,\n definition,\n host,\n org,\n options,\n );\n }, [api]);\n\n return {\n items: value?.items,\n loading,\n error,\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\nimport React from 'react';\n\nexport const AzurePipelinesIcon = (props: SvgIconProps) => (\n <SvgIcon {...props} viewBox=\"0 0 512 512\">\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M461.81 53.81a4.4 4.4 0 00-3.3-3.39c-54.38-13.3-180 34.09-248.13 102.17a294.9 294.9 0 00-33.09 39.08c-21-1.9-42-.3-59.88 7.5-50.49 22.2-65.18 80.18-69.28 105.07a9 9 0 009.8 10.4l81.07-8.9a180.29 180.29 0 001.1 18.3 18.15 18.15 0 005.3 11.09l31.39 31.39a18.15 18.15 0 0011.1 5.3 179.91 179.91 0 0018.19 1.1l-8.89 81a9 9 0 0010.39 9.79c24.9-4 83-18.69 105.07-69.17 7.8-17.9 9.4-38.79 7.6-59.69a293.91 293.91 0 0039.19-33.09c68.38-68 115.47-190.86 102.37-247.95zM298.66 213.67a42.7 42.7 0 1160.38 0 42.65 42.65 0 01-60.38 0z\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M109.64 352a45.06 45.06 0 00-26.35 12.84C65.67 382.52 64 448 64 448s65.52-1.67 83.15-19.31A44.73 44.73 0 00160 402.32\"\n />\n </SvgIcon>\n);\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport Typography from '@material-ui/core/Typography';\nimport {\n BuildResult,\n BuildRun,\n BuildStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport {\n Link,\n ResponseErrorPanel,\n StatusAborted,\n StatusError,\n StatusOK,\n StatusPending,\n StatusRunning,\n StatusWarning,\n Table,\n TableColumn,\n} from '@backstage/core-components';\n\nimport { AzurePipelinesIcon } from '../AzurePipelinesIcon';\nimport { DateTime } from 'luxon';\nimport React from 'react';\nimport { getDurationFromDates } from '../../utils/getDurationFromDates';\n\nexport const getBuildResultComponent = (result: number | undefined) => {\n switch (result) {\n case BuildResult.Succeeded:\n return (\n <Typography component=\"span\">\n <StatusOK /> Succeeded\n </Typography>\n );\n case BuildResult.PartiallySucceeded:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Partially Succeeded\n </Typography>\n );\n case BuildResult.Failed:\n return (\n <Typography component=\"span\">\n <StatusError /> Failed\n </Typography>\n );\n case BuildResult.Canceled:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Canceled\n </Typography>\n );\n case BuildResult.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\nexport const getBuildStateComponent = (\n status: number | undefined,\n result: number | undefined,\n) => {\n switch (status) {\n case BuildStatus.InProgress:\n return (\n <Typography component=\"span\">\n <StatusRunning /> In Progress\n </Typography>\n );\n case BuildStatus.Completed:\n return getBuildResultComponent(result);\n case BuildStatus.Cancelling:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Cancelling\n </Typography>\n );\n case BuildStatus.Postponed:\n return (\n <Typography component=\"span\">\n <StatusPending /> Postponed\n </Typography>\n );\n case BuildStatus.NotStarted:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Not Started\n </Typography>\n );\n case BuildStatus.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\nconst columns: TableColumn[] = [\n {\n title: 'ID',\n field: 'id',\n highlight: false,\n width: 'auto',\n },\n {\n title: 'Build',\n field: 'title',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Link to={row.link || ''}>{row.title}</Link>\n ),\n },\n {\n title: 'Source',\n field: 'source',\n width: 'auto',\n },\n {\n title: 'State',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography variant=\"button\">\n {getBuildStateComponent(row.status, row.result)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Duration',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography>\n {getDurationFromDates(row.startTime, row.finishTime)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Age',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) =>\n (row.queueTime\n ? DateTime.fromISO(row.queueTime)\n : DateTime.now()\n ).toRelative(),\n },\n];\n\ntype BuildTableProps = {\n items?: BuildRun[];\n loading: boolean;\n error?: Error;\n};\n\nexport const BuildTable = ({ items, loading, error }: BuildTableProps) => {\n if (error) {\n return (\n <div>\n <ResponseErrorPanel error={error} />\n </div>\n );\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzurePipelinesIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Pipelines - Builds ({items ? items.length : 0})\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BuildTable } from '../BuildTable/BuildTable';\nimport React from 'react';\nimport { useBuildRuns } from '../../hooks';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { azureDevOpsPipelineReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzurePipelines = (props: { defaultLimit?: number }) => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useBuildRuns(entity, props.defaultLimit);\n\n return (\n <RequirePermission\n permission={azureDevOpsPipelineReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <BuildTable items={items} loading={loading} error={error} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAmBa,MAAA,oBAAA,GAAuB,CAClC,SAAA,EACA,UACW,KAAA;AACX,EAAA,IAAI,CAAC,SAAA,IAAc,CAAC,SAAA,IAAa,CAAC,UAAa,EAAA;AAC7C,IAAO,OAAA,EAAA,CAAA;AAAA,GACT;AAEA,EAAM,MAAA,KAAA,GAAQ,QAAS,CAAA,OAAA,CAAQ,SAAS,CAAA,CAAA;AACxC,EAAA,MAAM,SAAS,UAAa,GAAA,QAAA,CAAS,QAAQ,UAAU,CAAA,GAAI,SAAS,GAAI,EAAA,CAAA;AAExE,EAAM,MAAA,SAAA,GAAY,SAAS,aAAc,CAAA,KAAA,EAAO,MAAM,CACnD,CAAA,UAAA,GACA,OAAQ,EAAA,CAAA;AAEX,EAAM,MAAA,qBAAA,GAAwB,iBAAiB,SAAU,CAAA;AAAA,IACvD,QAAU,EAAA,SAAA;AAAA,IACV,SAAW,EAAA;AAAA,MACT,OAAS,EAAA;AAAA,QACP,GAAG,MAAM,GAAA;AAAA,QACT,IAAI,MAAM,IAAA;AAAA,QACV,GAAG,MAAM,GAAA;AAAA,QACT,GAAG,MAAM,GAAA;AAAA,QACT,GAAG,MAAM,GAAA;AAAA,QACT,GAAG,MAAM,GAAA;AAAA,QACT,GAAG,MAAM,GAAA;AAAA,QACT,IAAI,MAAM,IAAA;AAAA,OACZ;AAAA,KACF;AA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AAEzE,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,iCAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA,IAAA;AAAA,KAAA;AAAA,oBAEV,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,KAAc,EAAA,OAAA,EAAkB,KAAc,EAAA,CAAA;AAAA,GAC5D,CAAA;AAEJ;;;;"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export { F as FilterType, P as PullRequestsPage } from './PullRequestsPage-CkhRQsgx.esm.js';
|
|
2
|
-
import 'luxon';
|
|
3
|
-
import 'humanize-duration';
|
|
4
|
-
import '@backstage-community/plugin-azure-devops-common';
|
|
5
|
-
import '@backstage/core-components';
|
|
6
|
-
import 'react';
|
|
7
|
-
import '@material-ui/core/Paper';
|
|
8
|
-
import '@material-ui/core/Typography';
|
|
9
|
-
import '@material-ui/core/styles';
|
|
10
|
-
import '@material-ui/core/Card';
|
|
11
|
-
import '@material-ui/core/CardContent';
|
|
12
|
-
import '@material-ui/core/CardHeader';
|
|
13
|
-
import '@material-ui/icons/DoneAll';
|
|
14
|
-
import '@material-ui/icons/Cancel';
|
|
15
|
-
import '@material-ui/icons/GroupWork';
|
|
16
|
-
import '@material-ui/icons/WatchLater';
|
|
17
|
-
import './AzureDevOpsApi-GBxs-uQ7.esm.js';
|
|
18
|
-
import '@backstage/core-plugin-api';
|
|
19
|
-
import '@backstage/errors';
|
|
20
|
-
import 'react-use/esm/useAsync';
|
|
21
|
-
import 'react-use/esm/useAsyncRetry';
|
|
22
|
-
import 'react-use/esm/useInterval';
|
|
23
|
-
import '@backstage/catalog-model';
|
|
24
|
-
import '@backstage/plugin-permission-react';
|
|
25
|
-
//# sourceMappingURL=index-W1pvc5vi.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-W1pvc5vi.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|