@backstage-community/plugin-multi-source-security-viewer 0.15.2 → 0.16.0
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 +17 -0
- package/dist/api/azure.esm.js +1 -1
- package/dist/api/azure.esm.js.map +1 -1
- package/dist/api/github.esm.js.map +1 -1
- package/dist/api/gitlab.esm.js.map +1 -1
- package/dist/api/jenkins.esm.js.map +1 -1
- package/dist/components/DialogLauncher/DialogLauncher.esm.js.map +1 -1
- package/dist/components/EmptyState/EmptyState.esm.js +1 -1
- package/dist/components/EmptyState/EmptyState.esm.js.map +1 -1
- package/dist/components/EmptyState/EmptyStateNoData.esm.js.map +1 -1
- package/dist/components/EmptyState/EmptyStateNoMatch.esm.js.map +1 -1
- package/dist/components/EmptyState/EmptyStateSpinner.esm.js.map +1 -1
- package/dist/components/Icons/CriticalIcon.esm.js.map +1 -1
- package/dist/components/Icons/EqualsIcon.esm.js.map +1 -1
- package/dist/components/Icons/IconWithValue.esm.js.map +1 -1
- package/dist/components/Icons/LogsIcon.esm.js.map +1 -1
- package/dist/components/Icons/OutputIcon.esm.js.map +1 -1
- package/dist/components/Icons/SBOMLink.esm.js.map +1 -1
- package/dist/components/PermissionAlert/PermissionAlert.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunList.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunOutput.esm.js +3 -3
- package/dist/components/PipelineRunList/PipelineRunOutput.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunSBOMLink.esm.js +1 -1
- package/dist/components/PipelineRunList/PipelineRunSBOMLink.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunTable.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunTableBody.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunTableColumns.esm.js +1 -1
- package/dist/components/PipelineRunList/PipelineRunTableColumns.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunTablePagination.esm.js +1 -1
- package/dist/components/PipelineRunList/PipelineRunTablePagination.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunTableRow.esm.js +2 -2
- package/dist/components/PipelineRunList/PipelineRunTableRow.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunTableRowActions.esm.js +1 -1
- package/dist/components/PipelineRunList/PipelineRunTableRowActions.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunToolbar.esm.js +1 -1
- package/dist/components/PipelineRunList/PipelineRunToolbar.esm.js.map +1 -1
- package/dist/components/PipelineRunLogs/PipelineRunLogs.esm.js.map +1 -1
- package/dist/components/PipelineRunLogs/PipelineRunLogsDownloader.esm.js +1 -1
- package/dist/components/PipelineRunLogs/PipelineRunLogsDownloader.esm.js.map +1 -1
- package/dist/components/PipelineRunLogs/PipelineRunStepViewer.esm.js.map +1 -1
- package/dist/components/PipelineRunLogs/PipelineRunStepper.esm.js.map +1 -1
- package/dist/components/Router.esm.js.map +1 -1
- package/dist/components/SecurityViewer/SecurityViewerGithubActionsDetail.esm.js.map +1 -1
- package/dist/components/SecurityViewer/SecurityViewerJenkinsDetail.esm.js.map +1 -1
- package/dist/components/SecurityViewer/SecurityViewerMultiCIPipelines.esm.js +1 -1
- package/dist/components/SecurityViewer/SecurityViewerMultiCIPipelines.esm.js.map +1 -1
- package/dist/components/SecurityViewer/SecurityViewerPipelineDetailList.esm.js.map +1 -1
- package/dist/components/SecurityViewer/SecurityViewerPipelineSummaryList.esm.js.map +1 -1
- package/dist/components/SecurityViewer/SecurityViewerTabbedMultiCISummaryList.esm.js +1 -1
- package/dist/components/SecurityViewer/SecurityViewerTabbedMultiCISummaryList.esm.js.map +1 -1
- package/dist/hooks/useDarkTheme.esm.js.map +1 -1
- package/dist/hooks/useMssvViewPermisson.esm.js.map +1 -1
- package/dist/hooks/usePipelineDetail.esm.js.map +1 -1
- package/dist/hooks/usePipelineSummary.esm.js.map +1 -1
- package/dist/models/pipelineRunResult.esm.js.map +1 -1
- package/dist/plugin.esm.js +1 -1
- package/dist/plugin.esm.js.map +1 -1
- package/dist/routes.esm.js.map +1 -1
- package/dist/types/pipelinerun.esm.js.map +1 -1
- package/dist/utils/downloadLogFile.esm.js.map +1 -1
- package/dist/utils/logs.esm.js.map +1 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @backstage-community/plugin-multi-source-security-viewer
|
|
2
2
|
|
|
3
|
+
## 0.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7d45b9d: Backstage version bump to v1.50.4
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [7d45b9d]
|
|
12
|
+
- @backstage-community/plugin-multi-source-security-viewer-common@0.14.0
|
|
13
|
+
|
|
14
|
+
## 0.15.3
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 58cda68: Updated dependency `@immobiliarelabs/backstage-plugin-gitlab` to `^7.0.0`.
|
|
19
|
+
|
|
3
20
|
## 0.15.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/api/azure.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createApiRef } from '@backstage/core-plugin-api';
|
|
2
|
-
import { getAnnotationValuesFromEntity,
|
|
2
|
+
import { getAnnotationValuesFromEntity, BuildResult, BuildStatus } from '@backstage-community/plugin-azure-devops-common';
|
|
3
3
|
import { stringifyEntityRef } from '@backstage/catalog-model';
|
|
4
4
|
import { PipelineRunResult } from '../models/pipelineRunResult.esm.js';
|
|
5
5
|
import { RunStatus } from '../types/pipelinerun.esm.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azure.esm.js","sources":["../../src/api/azure.ts"],"sourcesContent":["/*\n * Copyright 2025 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 */\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport { AzureDevOpsApi } from '@backstage-community/plugin-azure-devops';\nimport { getAnnotationValuesFromEntity } from '@backstage-community/plugin-azure-devops-common';\nimport {\n BuildResult,\n BuildStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { MssvApi, MssvApiResponse } from './mssv';\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { PipelineRunResult } from '../models/pipelineRunResult';\nimport { RunStatus } from '../types/pipelinerun';\n\n// Apiref to map with client\nexport const mssvAzureDevopsApiRef = createApiRef<MssvApi>({\n id: 'plugin.mssv-api-azuredevops.service',\n});\n\nconst mapStatus = (status: string | BuildResult | BuildStatus): RunStatus => {\n const AzureDevopsRunStatus = { ...BuildStatus, ...BuildResult };\n const runStatus =\n AzureDevopsRunStatus[status as keyof typeof AzureDevopsRunStatus];\n switch (runStatus) {\n case BuildResult.Succeeded:\n return RunStatus.Succeeded;\n case BuildResult.Failed:\n return RunStatus.Failed;\n case BuildResult.Canceled:\n return RunStatus.Cancelled;\n case BuildStatus.InProgress:\n return RunStatus.Running;\n default:\n return RunStatus.Unknown;\n }\n};\n\nexport class MssvAzureDevopsClient implements MssvApi {\n private readonly azureDevopsApi: AzureDevOpsApi;\n\n constructor(options: { azureDevopsApi: AzureDevOpsApi }) {\n this.azureDevopsApi = options.azureDevopsApi;\n }\n\n async getPipelineSummary(options: {\n entity: Entity;\n page: number;\n pageSize: number;\n }): Promise<MssvApiResponse> {\n const { entity, page, pageSize } = options;\n const { project, repo, definition, host, org } =\n getAnnotationValuesFromEntity(entity);\n\n const [sliceStart, sliceEnd] = [\n page * pageSize,\n page * pageSize + pageSize,\n ];\n\n const buildRuns = (await this.azureDevopsApi.getBuildRuns(\n project,\n stringifyEntityRef(entity),\n repo,\n definition,\n host,\n org,\n )) ?? { items: [] };\n\n const buildRunsSlice = buildRuns.items.slice(sliceStart, sliceEnd);\n const buildRunsWithLogs = await Promise.all(\n buildRunsSlice\n .map(async run => {\n if (!run?.id) {\n return undefined;\n }\n\n const logs = await this.azureDevopsApi\n .getBuildRunLog(\n project,\n stringifyEntityRef(entity),\n run.id,\n host,\n org,\n )\n .then(res => res?.log.join(' \\n'))\n .catch(() => ''); // fallback on empty string. It disables logs button and updates tooltip\n\n const status = mapStatus(run?.result ?? run?.status ?? 'Unknown');\n\n return {\n run,\n logs,\n status,\n };\n })\n .filter(Boolean), // remove undefined values\n );\n\n const results =\n buildRunsWithLogs.map(\n pr =>\n new PipelineRunResult({\n id: pr?.run?.id?.toString(),\n displayName: pr?.run?.title,\n status: pr?.status,\n logs: pr?.logs,\n }),\n ) || [];\n\n return {\n results,\n totalCount: buildRuns.items.length,\n };\n }\n\n async getPipelineDetail(): Promise<MssvApiResponse> {\n return { results: [], totalCount: 0 };\n }\n}\n"],"names":[],"mappings":";;;;;;AA4BO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"azure.esm.js","sources":["../../src/api/azure.ts"],"sourcesContent":["/*\n * Copyright 2025 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 */\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport { AzureDevOpsApi } from '@backstage-community/plugin-azure-devops';\nimport { getAnnotationValuesFromEntity } from '@backstage-community/plugin-azure-devops-common';\nimport {\n BuildResult,\n BuildStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { MssvApi, MssvApiResponse } from './mssv';\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { PipelineRunResult } from '../models/pipelineRunResult';\nimport { RunStatus } from '../types/pipelinerun';\n\n// Apiref to map with client\nexport const mssvAzureDevopsApiRef = createApiRef<MssvApi>({\n id: 'plugin.mssv-api-azuredevops.service',\n});\n\nconst mapStatus = (status: string | BuildResult | BuildStatus): RunStatus => {\n const AzureDevopsRunStatus = { ...BuildStatus, ...BuildResult };\n const runStatus =\n AzureDevopsRunStatus[status as keyof typeof AzureDevopsRunStatus];\n switch (runStatus) {\n case BuildResult.Succeeded:\n return RunStatus.Succeeded;\n case BuildResult.Failed:\n return RunStatus.Failed;\n case BuildResult.Canceled:\n return RunStatus.Cancelled;\n case BuildStatus.InProgress:\n return RunStatus.Running;\n default:\n return RunStatus.Unknown;\n }\n};\n\nexport class MssvAzureDevopsClient implements MssvApi {\n private readonly azureDevopsApi: AzureDevOpsApi;\n\n constructor(options: { azureDevopsApi: AzureDevOpsApi }) {\n this.azureDevopsApi = options.azureDevopsApi;\n }\n\n async getPipelineSummary(options: {\n entity: Entity;\n page: number;\n pageSize: number;\n }): Promise<MssvApiResponse> {\n const { entity, page, pageSize } = options;\n const { project, repo, definition, host, org } =\n getAnnotationValuesFromEntity(entity);\n\n const [sliceStart, sliceEnd] = [\n page * pageSize,\n page * pageSize + pageSize,\n ];\n\n const buildRuns = (await this.azureDevopsApi.getBuildRuns(\n project,\n stringifyEntityRef(entity),\n repo,\n definition,\n host,\n org,\n )) ?? { items: [] };\n\n const buildRunsSlice = buildRuns.items.slice(sliceStart, sliceEnd);\n const buildRunsWithLogs = await Promise.all(\n buildRunsSlice\n .map(async run => {\n if (!run?.id) {\n return undefined;\n }\n\n const logs = await this.azureDevopsApi\n .getBuildRunLog(\n project,\n stringifyEntityRef(entity),\n run.id,\n host,\n org,\n )\n .then(res => res?.log.join(' \\n'))\n .catch(() => ''); // fallback on empty string. It disables logs button and updates tooltip\n\n const status = mapStatus(run?.result ?? run?.status ?? 'Unknown');\n\n return {\n run,\n logs,\n status,\n };\n })\n .filter(Boolean), // remove undefined values\n );\n\n const results =\n buildRunsWithLogs.map(\n pr =>\n new PipelineRunResult({\n id: pr?.run?.id?.toString(),\n displayName: pr?.run?.title,\n status: pr?.status,\n logs: pr?.logs,\n }),\n ) || [];\n\n return {\n results,\n totalCount: buildRuns.items.length,\n };\n }\n\n async getPipelineDetail(): Promise<MssvApiResponse> {\n return { results: [], totalCount: 0 };\n }\n}\n"],"names":[],"mappings":";;;;;;AA4BO,MAAM,wBAAwB,YAAA,CAAsB;AAAA,EACzD,EAAA,EAAI;AACN,CAAC;AAED,MAAM,SAAA,GAAY,CAAC,MAAA,KAA0D;AAC3E,EAAA,MAAM,oBAAA,GAAuB,EAAE,GAAG,WAAA,EAAa,GAAG,WAAA,EAAY;AAC9D,EAAA,MAAM,SAAA,GACJ,qBAAqB,MAA2C,CAAA;AAClE,EAAA,QAAQ,SAAA;AAAW,IACjB,KAAK,WAAA,CAAY,SAAA;AACf,MAAA,OAAO,SAAA,CAAU,SAAA;AAAA,IACnB,KAAK,WAAA,CAAY,MAAA;AACf,MAAA,OAAO,SAAA,CAAU,MAAA;AAAA,IACnB,KAAK,WAAA,CAAY,QAAA;AACf,MAAA,OAAO,SAAA,CAAU,SAAA;AAAA,IACnB,KAAK,WAAA,CAAY,UAAA;AACf,MAAA,OAAO,SAAA,CAAU,OAAA;AAAA,IACnB;AACE,MAAA,OAAO,SAAA,CAAU,OAAA;AAAA;AAEvB,CAAA;AAEO,MAAM,qBAAA,CAAyC;AAAA,EACnC,cAAA;AAAA,EAEjB,YAAY,OAAA,EAA6C;AACvD,IAAA,IAAA,CAAK,iBAAiB,OAAA,CAAQ,cAAA;AAAA,EAChC;AAAA,EAEA,MAAM,mBAAmB,OAAA,EAII;AAC3B,IAAA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A,UACA,IAAA;AAAA,UACA;AAAA,SACF;AAAA,MACF,CAAC,CAAA,CACA,MAAA,CAAO,OAAO;AAAA;AAAA,KACnB;AAEA,IAAA,MAAM,UACJ,iBAAA,CAAkB,GAAA;AAAA,MAChB,CAAA,EAAA,KACE,IAAI,iBAAA,CAAkB;AAAA,QACpB,EAAA,EAAI,EAAA,EAAI,GAAA,EAAK,EAAA,EAAI,QAAA,EAAS;AAAA,QAC1B,WAAA,EAAa,IAAI,GAAA,EAAK,KAAA;AAAA,QACtB,QAAQ,EAAA,EAAI,MAAA;AAAA,QACZ,MAAM,EAAA,EAAI;AAAA,OACX;AAAA,SACA,EAAC;AAER,IAAA,OAAO;AAAA,MACL,OAAA;AAAA,MACA,UAAA,EAAY,UAAU,KAAA,CAAM;AAAA,KAC9B;AAAA,EACF;AAAA,EAEA,MAAM,iBAAA,GAA8C;AAClD,IAAA,OAAO,EAAE,OAAA,EAAS,EAAC,EAAG,YAAY,CAAA,EAAE;AAAA,EACtC;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github.esm.js","sources":["../../src/api/github.ts"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport {\n GithubActionsApi,\n GITHUB_ACTIONS_ANNOTATION,\n BuildStatus,\n} from '@backstage-community/plugin-github-actions';\nimport { MssvApi, MssvApiResponse } from './mssv';\nimport { Entity } from '@backstage/catalog-model';\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport { PipelineRunResult } from '../models/pipelineRunResult';\nimport { RunStatus } from '../types/pipelinerun';\n\n// Apiref to map with client\nexport const mssvGithubActionsApiRef = createApiRef<MssvApi>({\n id: 'plugin.mssv-api-githubactions.service',\n});\n\nconst mapStatus = (status: string): RunStatus => {\n const runStatus = BuildStatus[status as keyof typeof BuildStatus];\n switch (runStatus) {\n case BuildStatus.success:\n return RunStatus.Succeeded;\n case BuildStatus.failure:\n return RunStatus.Failed;\n case BuildStatus.pending:\n return RunStatus.Pending;\n case BuildStatus.running:\n return RunStatus.Running;\n default:\n return RunStatus.Unknown;\n }\n};\n\nexport class MssvGithubActionsClient implements MssvApi {\n private readonly githubActionsApi: GithubActionsApi;\n\n constructor(options: { githubActionsApi: GithubActionsApi }) {\n this.githubActionsApi = options.githubActionsApi;\n }\n\n async getPipelineSummary(options: {\n entity: Entity;\n page: number;\n pageSize: number;\n }): Promise<MssvApiResponse> {\n const { entity, page, pageSize } = options;\n const [owner, repo] = (\n entity?.metadata.annotations?.[GITHUB_ACTIONS_ANNOTATION] ?? '/'\n ).split('/');\n\n if (!owner || !repo) {\n return Promise.reject('No repo/owner provided');\n }\n\n const project = await this.githubActionsApi.listWorkflowRuns({\n owner,\n repo,\n page: page + 1, // non zero-based\n pageSize,\n });\n\n const projectWithLogs = await Promise.all(\n project.workflow_runs.map(async run => {\n const jobsList = await this.githubActionsApi.listJobsForWorkflowRun({\n owner,\n repo,\n id: run.id,\n });\n\n const logs = await Promise.all(\n jobsList.jobs.map(async job => {\n return await this.githubActionsApi\n .downloadJobLogsForWorkflowRun({\n owner,\n repo,\n runId: job.id,\n })\n .catch(() => ''); // fallback on empty string. It disables logs button and updates tooltip\n }),\n ).then(res => res.join(' ')); // return as one string\n\n const status = mapStatus(run?.status ?? 'UNKNOWN');\n\n return {\n run,\n logs,\n status,\n };\n }),\n );\n\n const results = projectWithLogs.map(\n pr =>\n new PipelineRunResult({\n id: pr?.run?.id.toString(),\n displayName: pr?.run?.display_title,\n status: pr?.status,\n logs: pr?.logs,\n }),\n );\n\n return { results, totalCount: project?.total_count ?? 0 };\n }\n\n async getPipelineDetail(options: {\n entity: Entity;\n ref: string;\n page: number;\n pageSize: number;\n }): Promise<MssvApiResponse> {\n const { entity, ref } = options;\n const [owner, repo] = (\n entity?.metadata.annotations?.[GITHUB_ACTIONS_ANNOTATION] ?? '/'\n ).split('/');\n\n if (!owner || !repo) {\n return Promise.reject('No repo/owner provided');\n }\n\n const run = await this.githubActionsApi.getWorkflowRun({\n owner,\n repo,\n id: parseInt(ref, 10),\n });\n\n const jobsList = await this.githubActionsApi.listJobsForWorkflowRun({\n owner,\n repo,\n id: parseInt(ref, 10),\n });\n\n const logs = await Promise.all(\n jobsList.jobs.map(async job => {\n return await this.githubActionsApi\n .downloadJobLogsForWorkflowRun({\n owner,\n repo,\n runId: job.id,\n })\n .catch(() => ''); // fallback on empty string. It disables logs button and updates tooltip\n }),\n ).then(res => res.join(' '));\n\n // This a detail view where only 1 item is expected\n const results = [\n new PipelineRunResult({\n id: run?.id.toString(),\n displayName: run?.display_title,\n status: mapStatus(run?.status ?? 'UNKNOWN'),\n logs,\n }),\n ];\n\n return { results, totalCount: results?.length ?? 0 };\n }\n}\n"],"names":[],"mappings":";;;;;AA2BO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"github.esm.js","sources":["../../src/api/github.ts"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport {\n GithubActionsApi,\n GITHUB_ACTIONS_ANNOTATION,\n BuildStatus,\n} from '@backstage-community/plugin-github-actions';\nimport { MssvApi, MssvApiResponse } from './mssv';\nimport { Entity } from '@backstage/catalog-model';\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport { PipelineRunResult } from '../models/pipelineRunResult';\nimport { RunStatus } from '../types/pipelinerun';\n\n// Apiref to map with client\nexport const mssvGithubActionsApiRef = createApiRef<MssvApi>({\n id: 'plugin.mssv-api-githubactions.service',\n});\n\nconst mapStatus = (status: string): RunStatus => {\n const runStatus = BuildStatus[status as keyof typeof BuildStatus];\n switch (runStatus) {\n case BuildStatus.success:\n return RunStatus.Succeeded;\n case BuildStatus.failure:\n return RunStatus.Failed;\n case BuildStatus.pending:\n return RunStatus.Pending;\n case BuildStatus.running:\n return RunStatus.Running;\n default:\n return RunStatus.Unknown;\n }\n};\n\nexport class MssvGithubActionsClient implements MssvApi {\n private readonly githubActionsApi: GithubActionsApi;\n\n constructor(options: { githubActionsApi: GithubActionsApi }) {\n this.githubActionsApi = options.githubActionsApi;\n }\n\n async getPipelineSummary(options: {\n entity: Entity;\n page: number;\n pageSize: number;\n }): Promise<MssvApiResponse> {\n const { entity, page, pageSize } = options;\n const [owner, repo] = (\n entity?.metadata.annotations?.[GITHUB_ACTIONS_ANNOTATION] ?? '/'\n ).split('/');\n\n if (!owner || !repo) {\n return Promise.reject('No repo/owner provided');\n }\n\n const project = await this.githubActionsApi.listWorkflowRuns({\n owner,\n repo,\n page: page + 1, // non zero-based\n pageSize,\n });\n\n const projectWithLogs = await Promise.all(\n project.workflow_runs.map(async run => {\n const jobsList = await this.githubActionsApi.listJobsForWorkflowRun({\n owner,\n repo,\n id: run.id,\n });\n\n const logs = await Promise.all(\n jobsList.jobs.map(async job => {\n return await this.githubActionsApi\n .downloadJobLogsForWorkflowRun({\n owner,\n repo,\n runId: job.id,\n })\n .catch(() => ''); // fallback on empty string. It disables logs button and updates tooltip\n }),\n ).then(res => res.join(' ')); // return as one string\n\n const status = mapStatus(run?.status ?? 'UNKNOWN');\n\n return {\n run,\n logs,\n status,\n };\n }),\n );\n\n const results = projectWithLogs.map(\n pr =>\n new PipelineRunResult({\n id: pr?.run?.id.toString(),\n displayName: pr?.run?.display_title,\n status: pr?.status,\n logs: pr?.logs,\n }),\n );\n\n return { results, totalCount: project?.total_count ?? 0 };\n }\n\n async getPipelineDetail(options: {\n entity: Entity;\n ref: string;\n page: number;\n pageSize: number;\n }): Promise<MssvApiResponse> {\n const { entity, ref } = options;\n const [owner, repo] = (\n entity?.metadata.annotations?.[GITHUB_ACTIONS_ANNOTATION] ?? '/'\n ).split('/');\n\n if (!owner || !repo) {\n return Promise.reject('No repo/owner provided');\n }\n\n const run = await this.githubActionsApi.getWorkflowRun({\n owner,\n repo,\n id: parseInt(ref, 10),\n });\n\n const jobsList = await this.githubActionsApi.listJobsForWorkflowRun({\n owner,\n repo,\n id: parseInt(ref, 10),\n });\n\n const logs = await Promise.all(\n jobsList.jobs.map(async job => {\n return await this.githubActionsApi\n .downloadJobLogsForWorkflowRun({\n owner,\n repo,\n runId: job.id,\n })\n .catch(() => ''); // fallback on empty string. It disables logs button and updates tooltip\n }),\n ).then(res => res.join(' '));\n\n // This a detail view where only 1 item is expected\n const results = [\n new PipelineRunResult({\n id: run?.id.toString(),\n displayName: run?.display_title,\n status: mapStatus(run?.status ?? 'UNKNOWN'),\n logs,\n }),\n ];\n\n return { results, totalCount: results?.length ?? 0 };\n }\n}\n"],"names":[],"mappings":";;;;;AA2BO,MAAM,0BAA0B,YAAA,CAAsB;AAAA,EAC3D,EAAA,EAAI;AACN,CAAC;AAED,MAAM,SAAA,GAAY,CAAC,MAAA,KAA8B;AAC/C,EAAA,MAAM,SAAA,GAAY,YAAY,MAAkC,CAAA;AAChE,EAAA,QAAQ,SAAA;AAAW,IACjB,KAAK,WAAA,CAAY,OAAA;AACf,MAAA,OAAO,SAAA,CAAU,SAAA;AAAA,IACnB,KAAK,WAAA,CAAY,OAAA;AACf,MAAA,OAAO,SAAA,CAAU,MAAA;AAAA,IACnB,KAAK,WAAA,CAAY,OAAA;AACf,MAAA,OAAO,SAAA,CAAU,OAAA;AAAA,IACnB,KAAK,WAAA,CAAY,OAAA;A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\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 */\nimport { GitlabCIClient } from '@immobiliarelabs/backstage-plugin-gitlab';\nimport { MssvApi, MssvApiResponse } from './mssv';\nimport { Entity } from '@backstage/catalog-model';\nimport {\n DiscoveryApi,\n IdentityApi,\n OAuthApi,\n createApiRef,\n} from '@backstage/core-plugin-api';\nimport { PipelineRunResult } from '../models/pipelineRunResult';\nimport { GitlabPipelineStatus, RunStatus } from '../types/pipelinerun';\n\n// Apiref to map with client\nexport const mssvGitlabCIApiRef = createApiRef<MssvApi>({\n id: 'plugin.mssv-api-gitlabci.service',\n});\n\nconst mapStatus = (status: string): RunStatus => {\n const runStatus =\n GitlabPipelineStatus[status as keyof typeof GitlabPipelineStatus];\n switch (runStatus) {\n case GitlabPipelineStatus.success:\n return RunStatus.Succeeded;\n case GitlabPipelineStatus.failed:\n return RunStatus.Failed;\n case GitlabPipelineStatus.pending:\n return RunStatus.Pending;\n case GitlabPipelineStatus.running:\n return RunStatus.Running;\n default:\n return RunStatus.Unknown;\n }\n};\n\nconst GITLAB_ANNOTATION_PROJECT_ID = 'gitlab.com/project-id';\nconst GITLAB_ANNOTATION_PROJECT_SLUG = 'gitlab.com/project-slug';\nconst GITLAB_ANNOTATION_INSTANCE = 'gitlab.com/instance';\n\ntype APIOptions = {\n discoveryApi: DiscoveryApi;\n identityApi: IdentityApi;\n codeOwnersPath?: string;\n readmePath?: string;\n gitlabAuthApi: OAuthApi;\n useOAuth?: boolean;\n};\n\nexport class CustomGitlabCiClient extends GitlabCIClient {\n constructor(options: APIOptions) {\n // gitlabInstance is omitted as it is set through the entity\n super(options as any);\n }\n\n getPipelineJobs(\n projectId: number | string,\n pipelineId: number,\n ): Promise<any[] | undefined> {\n return this.callApi(\n `projects/${projectId}/pipelines/${pipelineId}/jobs`,\n {},\n );\n }\n\n getJobLogs(\n projectId: number | string,\n jobId: number,\n ): Promise<string | undefined> {\n return this.callApi(`projects/${projectId}/jobs/${jobId}/trace`, {});\n }\n}\n\nexport class MssvGitlabCIClient implements Partial<MssvApi> {\n private readonly gitlabCiApi: CustomGitlabCiClient;\n\n constructor(options: { gitlabCiApi: CustomGitlabCiClient }) {\n this.gitlabCiApi = options.gitlabCiApi;\n }\n\n async getPipelineSummary(options: {\n entity: Entity;\n page: number;\n pageSize: number;\n }): Promise<MssvApiResponse> {\n const { entity, page, pageSize } = options;\n\n this.gitlabCiApi.gitlabInstance =\n entity.metadata.annotations?.[GITLAB_ANNOTATION_INSTANCE] ?? 'gitlab.com';\n\n const projectId =\n entity.metadata.annotations?.[GITLAB_ANNOTATION_PROJECT_ID];\n\n const projectSlug = encodeURIComponent(\n entity.metadata.annotations?.[GITLAB_ANNOTATION_PROJECT_SLUG] ?? '',\n );\n\n const [sliceStart, sliceEnd] = [\n page * pageSize,\n page * pageSize + pageSize,\n ];\n\n const summary =\n (await this.gitlabCiApi.getPipelineSummary(projectId ?? projectSlug)) ??\n [];\n\n const summarySlice = summary.slice(sliceStart, sliceEnd);\n const summaryWithLogs = await Promise.all(\n summarySlice.map(async run => {\n const pipelineJobs =\n (await this.gitlabCiApi.getPipelineJobs(run.project_id, run.id)) ??\n [];\n\n const logs = await Promise.all(\n pipelineJobs.map(async job => {\n return await this.gitlabCiApi\n .getJobLogs(run.project_id, job.id)\n .catch(() => ''); // fallback on empty string. It disables logs button and updates tooltip\n }) ?? [],\n ).then(res => res.join(' ')); // return as one\n return { run, logs };\n }),\n );\n\n const results =\n summaryWithLogs.map(\n pr =>\n new PipelineRunResult({\n id: pr?.run?.id.toString(),\n displayName: pr?.run?.id.toString(),\n status: mapStatus(pr?.run?.status ?? 'UNKOWN'),\n logs: pr?.logs,\n }),\n ) || [];\n\n return { results, totalCount: summary?.length ?? 0 };\n }\n\n async getPipelineDetail(): Promise<MssvApiResponse> {\n return { results: [], totalCount: 0 };\n }\n}\n"],"names":[],"mappings":";;;;;AA4BO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"gitlab.esm.js","sources":["../../src/api/gitlab.ts"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { GitlabCIClient } from '@immobiliarelabs/backstage-plugin-gitlab';\nimport { MssvApi, MssvApiResponse } from './mssv';\nimport { Entity } from '@backstage/catalog-model';\nimport {\n DiscoveryApi,\n IdentityApi,\n OAuthApi,\n createApiRef,\n} from '@backstage/core-plugin-api';\nimport { PipelineRunResult } from '../models/pipelineRunResult';\nimport { GitlabPipelineStatus, RunStatus } from '../types/pipelinerun';\n\n// Apiref to map with client\nexport const mssvGitlabCIApiRef = createApiRef<MssvApi>({\n id: 'plugin.mssv-api-gitlabci.service',\n});\n\nconst mapStatus = (status: string): RunStatus => {\n const runStatus =\n GitlabPipelineStatus[status as keyof typeof GitlabPipelineStatus];\n switch (runStatus) {\n case GitlabPipelineStatus.success:\n return RunStatus.Succeeded;\n case GitlabPipelineStatus.failed:\n return RunStatus.Failed;\n case GitlabPipelineStatus.pending:\n return RunStatus.Pending;\n case GitlabPipelineStatus.running:\n return RunStatus.Running;\n default:\n return RunStatus.Unknown;\n }\n};\n\nconst GITLAB_ANNOTATION_PROJECT_ID = 'gitlab.com/project-id';\nconst GITLAB_ANNOTATION_PROJECT_SLUG = 'gitlab.com/project-slug';\nconst GITLAB_ANNOTATION_INSTANCE = 'gitlab.com/instance';\n\ntype APIOptions = {\n discoveryApi: DiscoveryApi;\n identityApi: IdentityApi;\n codeOwnersPath?: string;\n readmePath?: string;\n gitlabAuthApi: OAuthApi;\n useOAuth?: boolean;\n};\n\nexport class CustomGitlabCiClient extends GitlabCIClient {\n constructor(options: APIOptions) {\n // gitlabInstance is omitted as it is set through the entity\n super(options as any);\n }\n\n getPipelineJobs(\n projectId: number | string,\n pipelineId: number,\n ): Promise<any[] | undefined> {\n return this.callApi(\n `projects/${projectId}/pipelines/${pipelineId}/jobs`,\n {},\n );\n }\n\n getJobLogs(\n projectId: number | string,\n jobId: number,\n ): Promise<string | undefined> {\n return this.callApi(`projects/${projectId}/jobs/${jobId}/trace`, {});\n }\n}\n\nexport class MssvGitlabCIClient implements Partial<MssvApi> {\n private readonly gitlabCiApi: CustomGitlabCiClient;\n\n constructor(options: { gitlabCiApi: CustomGitlabCiClient }) {\n this.gitlabCiApi = options.gitlabCiApi;\n }\n\n async getPipelineSummary(options: {\n entity: Entity;\n page: number;\n pageSize: number;\n }): Promise<MssvApiResponse> {\n const { entity, page, pageSize } = options;\n\n this.gitlabCiApi.gitlabInstance =\n entity.metadata.annotations?.[GITLAB_ANNOTATION_INSTANCE] ?? 'gitlab.com';\n\n const projectId =\n entity.metadata.annotations?.[GITLAB_ANNOTATION_PROJECT_ID];\n\n const projectSlug = encodeURIComponent(\n entity.metadata.annotations?.[GITLAB_ANNOTATION_PROJECT_SLUG] ?? '',\n );\n\n const [sliceStart, sliceEnd] = [\n page * pageSize,\n page * pageSize + pageSize,\n ];\n\n const summary =\n (await this.gitlabCiApi.getPipelineSummary(projectId ?? projectSlug)) ??\n [];\n\n const summarySlice = summary.slice(sliceStart, sliceEnd);\n const summaryWithLogs = await Promise.all(\n summarySlice.map(async run => {\n const pipelineJobs =\n (await this.gitlabCiApi.getPipelineJobs(run.project_id, run.id)) ??\n [];\n\n const logs = await Promise.all(\n pipelineJobs.map(async job => {\n return await this.gitlabCiApi\n .getJobLogs(run.project_id, job.id)\n .catch(() => ''); // fallback on empty string. It disables logs button and updates tooltip\n }) ?? [],\n ).then(res => res.join(' ')); // return as one\n return { run, logs };\n }),\n );\n\n const results =\n summaryWithLogs.map(\n pr =>\n new PipelineRunResult({\n id: pr?.run?.id.toString(),\n displayName: pr?.run?.id.toString(),\n status: mapStatus(pr?.run?.status ?? 'UNKOWN'),\n logs: pr?.logs,\n }),\n ) || [];\n\n return { results, totalCount: summary?.length ?? 0 };\n }\n\n async getPipelineDetail(): Promise<MssvApiResponse> {\n return { results: [], totalCount: 0 };\n }\n}\n"],"names":[],"mappings":";;;;;AA4BO,MAAM,qBAAqB,YAAA,CAAsB;AAAA,EACtD,EAAA,EAAI;AACN,CAAC;AAED,MAAM,SAAA,GAAY,CAAC,MAAA,KAA8B;AAC/C,EAAA,MAAM,SAAA,GACJ,qBAAqB,MAA2C,CAAA;AAClE,EAAA,QAAQ,SAAA;AAAW,IACjB,KAAK,oBAAA,CAAqB,OAAA;AACxB,MAAA,OAAO,SAAA,CAAU,SAAA;AAAA,IACnB,KAAK,oBAAA,CAAqB,MAAA;AACxB,MAAA,OAAO,SAAA,CAAU,MAAA;AAAA,IACnB,KAAK,oBAAA,CAAqB,OAAA;AACxB,MAAA,OAAO,SAAA,CAAU,OAAA;AAAA,IACnB,KAAK,oBAAA,CAAqB,OAAA;AACxB,MAAA,OAAO,SAAA,CAAU,OAAA;AAAA,IACnB;AACE,MAAA,OAAO,SAAA,CAAU,OAAA;AAAA;AAEvB,CAAA;AAEA,MAAM,4BAAA,GAA+B,uBAAA;AACrC,MAAM,8BAAA,GAAiC,yBAAA;AACvC,MAAM,0BAAA,GAA6B,qBAAA;AAW5B,MAAM,6BAA6B,cAAA,CAAe;AAAA,EACvD,YAAY,OAAA,EAAqB;AAE/B,IAAA,KAAA,CAAM,OAAc,CAAA;AAAA,EACtB;AAAA,EAEA,eAAA,CACE,WACA,UAAA,EAC4B;AA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
1
|
-
{"version":3,"file":"jenkins.esm.js","sources":["../../src/api/jenkins.ts"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { JenkinsApi } from '@backstage-community/plugin-jenkins';\nimport { Entity, getCompoundEntityRef } from '@backstage/catalog-model';\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport { MssvApi, MssvApiResponse } from './mssv';\nimport { PipelineRunResult } from '../models/pipelineRunResult';\nimport { JenkinsRunStatus, RunStatus } from '../types/pipelinerun';\n\n// Apiref to map with client\nexport const mssvJenkinsApiRef = createApiRef<MssvApi>({\n id: 'plugin.mssv-api-jenkins.service',\n});\n\nconst mapStatus = (status: string): RunStatus => {\n const runStatus = JenkinsRunStatus[status as keyof typeof JenkinsRunStatus];\n switch (runStatus) {\n case JenkinsRunStatus.SUCCESS:\n return RunStatus.Succeeded;\n case JenkinsRunStatus.FAILURE:\n return RunStatus.Failed;\n case JenkinsRunStatus.RUNNING:\n return RunStatus.Running;\n case JenkinsRunStatus['IN PROGRESS']:\n return RunStatus['In Progress'];\n case JenkinsRunStatus.NOT_BUILT:\n return RunStatus.FailedToStart;\n case JenkinsRunStatus.ABORTED:\n return RunStatus.Cancelled;\n case JenkinsRunStatus.PENDING:\n return RunStatus.Pending;\n default:\n return RunStatus.Unknown;\n }\n};\n\nexport class MssvJenkinsClient implements MssvApi {\n private readonly jenkinsApi: JenkinsApi;\n\n constructor(options: { jenkinsApi: JenkinsApi }) {\n this.jenkinsApi = options.jenkinsApi;\n }\n\n async getPipelineSummary(options: {\n entity: Entity;\n page: number;\n pageSize: number;\n }): Promise<MssvApiResponse> {\n const { entity, page, pageSize } = options;\n\n const projects = await this.jenkinsApi.getProjects({\n entity: getCompoundEntityRef(entity),\n filter: {}, // TODO: TO CHECK\n });\n\n const [sliceStart, sliceEnd] = [\n page * pageSize,\n page * pageSize + pageSize,\n ];\n\n const projectsSlice = projects.slice(sliceStart, sliceEnd);\n\n // Fetch logs for each projects last build\n const projectWithLogs = await Promise.all(\n projectsSlice.map(async project => {\n const { consoleText: logs } = await this.jenkinsApi\n .getBuildConsoleText({\n jobFullName: project.displayName,\n entity: getCompoundEntityRef(entity),\n buildNumber: (project.lastBuild?.number ?? 0).toString(),\n })\n .catch(() => ({ consoleText: '' })) // fallback on empty string. It disables logs button and updates tooltip\n .then(res => res);\n\n const run = await this.jenkinsApi.getBuild({\n jobFullName: project.displayName,\n entity: getCompoundEntityRef(entity),\n buildNumber: (project.lastBuild?.number ?? 0).toString(),\n });\n\n const status = mapStatus(project?.status);\n\n return {\n project,\n run,\n logs,\n status,\n };\n }),\n );\n\n const results = projectWithLogs.map(\n pr =>\n new PipelineRunResult({\n id: pr?.project?.displayName,\n displayName: pr?.project?.displayName,\n logs: pr?.logs,\n status: pr?.status,\n }),\n );\n\n return { results, totalCount: projects?.length ?? 0 };\n }\n\n async getPipelineDetail(options: {\n entity: Entity;\n ref: string;\n page: number;\n pageSize: number;\n }): Promise<MssvApiResponse> {\n const { ref, entity, page, pageSize } = options;\n const job = await this.jenkinsApi.getJobBuilds({\n entity: getCompoundEntityRef(entity),\n jobFullName: ref,\n });\n\n // Mimic pagination as Jenkins doesn't provide paginated responses\n const [sliceStart, sliceEnd] = [\n page * pageSize,\n page * pageSize + pageSize,\n ];\n\n const builds = job?.builds ?? [];\n const buildsSlice = builds.slice(sliceStart, sliceEnd);\n // Fetch logs for each project last build\n const buildWithLogs = await Promise.all(\n buildsSlice.map(async run => {\n const { consoleText: logs } = await this.jenkinsApi\n .getBuildConsoleText({\n buildNumber: run.number.toString(),\n jobFullName: ref,\n entity: getCompoundEntityRef(entity),\n })\n .then(res => res);\n\n return {\n run,\n logs,\n };\n }),\n );\n\n // Map builds to PipelineRun\n const results =\n buildsSlice.map(run => {\n const buildLogEntry = buildWithLogs.find(b => b?.run?.id === run?.id);\n const logs = buildLogEntry ? buildLogEntry?.logs : '';\n const status = mapStatus(run?.result ?? 'UNKNOWN');\n return new PipelineRunResult({\n id: run?.id?.toString(),\n displayName: run?.id?.toString(),\n logs,\n status,\n });\n }) || [];\n\n return { results, totalCount: builds?.length ?? 0 };\n }\n}\n"],"names":[],"mappings":";;;;;AAuBO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"jenkins.esm.js","sources":["../../src/api/jenkins.ts"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { JenkinsApi } from '@backstage-community/plugin-jenkins';\nimport { Entity, getCompoundEntityRef } from '@backstage/catalog-model';\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport { MssvApi, MssvApiResponse } from './mssv';\nimport { PipelineRunResult } from '../models/pipelineRunResult';\nimport { JenkinsRunStatus, RunStatus } from '../types/pipelinerun';\n\n// Apiref to map with client\nexport const mssvJenkinsApiRef = createApiRef<MssvApi>({\n id: 'plugin.mssv-api-jenkins.service',\n});\n\nconst mapStatus = (status: string): RunStatus => {\n const runStatus = JenkinsRunStatus[status as keyof typeof JenkinsRunStatus];\n switch (runStatus) {\n case JenkinsRunStatus.SUCCESS:\n return RunStatus.Succeeded;\n case JenkinsRunStatus.FAILURE:\n return RunStatus.Failed;\n case JenkinsRunStatus.RUNNING:\n return RunStatus.Running;\n case JenkinsRunStatus['IN PROGRESS']:\n return RunStatus['In Progress'];\n case JenkinsRunStatus.NOT_BUILT:\n return RunStatus.FailedToStart;\n case JenkinsRunStatus.ABORTED:\n return RunStatus.Cancelled;\n case JenkinsRunStatus.PENDING:\n return RunStatus.Pending;\n default:\n return RunStatus.Unknown;\n }\n};\n\nexport class MssvJenkinsClient implements MssvApi {\n private readonly jenkinsApi: JenkinsApi;\n\n constructor(options: { jenkinsApi: JenkinsApi }) {\n this.jenkinsApi = options.jenkinsApi;\n }\n\n async getPipelineSummary(options: {\n entity: Entity;\n page: number;\n pageSize: number;\n }): Promise<MssvApiResponse> {\n const { entity, page, pageSize } = options;\n\n const projects = await this.jenkinsApi.getProjects({\n entity: getCompoundEntityRef(entity),\n filter: {}, // TODO: TO CHECK\n });\n\n const [sliceStart, sliceEnd] = [\n page * pageSize,\n page * pageSize + pageSize,\n ];\n\n const projectsSlice = projects.slice(sliceStart, sliceEnd);\n\n // Fetch logs for each projects last build\n const projectWithLogs = await Promise.all(\n projectsSlice.map(async project => {\n const { consoleText: logs } = await this.jenkinsApi\n .getBuildConsoleText({\n jobFullName: project.displayName,\n entity: getCompoundEntityRef(entity),\n buildNumber: (project.lastBuild?.number ?? 0).toString(),\n })\n .catch(() => ({ consoleText: '' })) // fallback on empty string. It disables logs button and updates tooltip\n .then(res => res);\n\n const run = await this.jenkinsApi.getBuild({\n jobFullName: project.displayName,\n entity: getCompoundEntityRef(entity),\n buildNumber: (project.lastBuild?.number ?? 0).toString(),\n });\n\n const status = mapStatus(project?.status);\n\n return {\n project,\n run,\n logs,\n status,\n };\n }),\n );\n\n const results = projectWithLogs.map(\n pr =>\n new PipelineRunResult({\n id: pr?.project?.displayName,\n displayName: pr?.project?.displayName,\n logs: pr?.logs,\n status: pr?.status,\n }),\n );\n\n return { results, totalCount: projects?.length ?? 0 };\n }\n\n async getPipelineDetail(options: {\n entity: Entity;\n ref: string;\n page: number;\n pageSize: number;\n }): Promise<MssvApiResponse> {\n const { ref, entity, page, pageSize } = options;\n const job = await this.jenkinsApi.getJobBuilds({\n entity: getCompoundEntityRef(entity),\n jobFullName: ref,\n });\n\n // Mimic pagination as Jenkins doesn't provide paginated responses\n const [sliceStart, sliceEnd] = [\n page * pageSize,\n page * pageSize + pageSize,\n ];\n\n const builds = job?.builds ?? [];\n const buildsSlice = builds.slice(sliceStart, sliceEnd);\n // Fetch logs for each project last build\n const buildWithLogs = await Promise.all(\n buildsSlice.map(async run => {\n const { consoleText: logs } = await this.jenkinsApi\n .getBuildConsoleText({\n buildNumber: run.number.toString(),\n jobFullName: ref,\n entity: getCompoundEntityRef(entity),\n })\n .then(res => res);\n\n return {\n run,\n logs,\n };\n }),\n );\n\n // Map builds to PipelineRun\n const results =\n buildsSlice.map(run => {\n const buildLogEntry = buildWithLogs.find(b => b?.run?.id === run?.id);\n const logs = buildLogEntry ? buildLogEntry?.logs : '';\n const status = mapStatus(run?.result ?? 'UNKNOWN');\n return new PipelineRunResult({\n id: run?.id?.toString(),\n displayName: run?.id?.toString(),\n logs,\n status,\n });\n }) || [];\n\n return { results, totalCount: builds?.length ?? 0 };\n }\n}\n"],"names":[],"mappings":";;;;;AAuBO,MAAM,oBAAoB,YAAA,CAAsB;AAAA,EACrD,EAAA,EAAI;AACN,CAAC;AAED,MAAM,SAAA,GAAY,CAAC,MAAA,KAA8B;AAC/C,EAAA,MAAM,SAAA,GAAY,iBAAiB,MAAuC,CAAA;AAC1E,EAAA,QAAQ,SAAA;AAAW,IACjB,KAAK,gBAAA,CAAiB,OAAA;AACpB,MAAA,OAAO,SAAA,CAAU,SAAA;AAAA,IACnB,KAAK,gBAAA,CAAiB,OAAA;AACpB,MAAA,OAAO,SAAA,CAAU,MAAA;AAAA,IACnB,KAAK,gBAAA,CAAiB,OAAA;AACpB,MAAA,OAAO,SAAA,CAAU,OAAA;AAAA,IACnB,KAAK,iBAAiB,aAAa,CAAA;AACjC,MAAA,OAAO,UAAU,aAAa,CAAA;AAAA,IAChC,KAA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A,EAAI,QAAA,EAAS;AAAA,QAC/B,IAAA;AAAA,QACA;AAAA,OACD,CAAA;AAAA,IACH,CAAC,KAAK,EAAC;AAET,IAAA,OAAO,EAAE,OAAA,EAAS,UAAA,EAAY,MAAA,EAAQ,UAAU,CAAA,EAAE;AAAA,EACpD;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogLauncher.esm.js","sources":["../../../src/components/DialogLauncher/DialogLauncher.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { ErrorBoundary } from '@backstage/core-components';\nimport {\n Box,\n Dialog,\n DialogContent,\n DialogProps,\n DialogTitle,\n IconButton,\n} from '@material-ui/core';\nimport CloseIcon from '@material-ui/icons/Close';\nimport type { FC } from 'react';\nimport { Fragment } from 'react';\n\ntype DialogLauncherProps = {\n component: FC<any>;\n componentProps?: Record<string, any>;\n title: string;\n open: boolean;\n onClose: () => void;\n} & DialogProps;\n\nexport const DialogLauncher: FC<DialogLauncherProps> = ({\n open,\n onClose,\n component: Component,\n componentProps = {},\n title,\n ...rest\n}) => {\n return (\n <Fragment>\n <Dialog open={open} onClose={onClose} {...rest}>\n <DialogTitle>\n <Box\n display=\"flex\"\n justifyContent={{ xs: 'center', sm: 'space-between' }}\n alignItems=\"center\"\n >\n {title}\n <IconButton onClick={onClose}>\n <CloseIcon />\n </IconButton>\n </Box>\n </DialogTitle>\n <DialogContent>\n <ErrorBoundary>\n <Component {...componentProps} />\n </ErrorBoundary>\n </DialogContent>\n </Dialog>\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;;AAoCO,MAAM,iBAA0C,CAAC;AAAA,EACtD,IAAA;AAAA,EACA,OAAA;AAAA,EACA,
|
|
1
|
+
{"version":3,"file":"DialogLauncher.esm.js","sources":["../../../src/components/DialogLauncher/DialogLauncher.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { ErrorBoundary } from '@backstage/core-components';\nimport {\n Box,\n Dialog,\n DialogContent,\n DialogProps,\n DialogTitle,\n IconButton,\n} from '@material-ui/core';\nimport CloseIcon from '@material-ui/icons/Close';\nimport type { FC } from 'react';\nimport { Fragment } from 'react';\n\ntype DialogLauncherProps = {\n component: FC<any>;\n componentProps?: Record<string, any>;\n title: string;\n open: boolean;\n onClose: () => void;\n} & DialogProps;\n\nexport const DialogLauncher: FC<DialogLauncherProps> = ({\n open,\n onClose,\n component: Component,\n componentProps = {},\n title,\n ...rest\n}) => {\n return (\n <Fragment>\n <Dialog open={open} onClose={onClose} {...rest}>\n <DialogTitle>\n <Box\n display=\"flex\"\n justifyContent={{ xs: 'center', sm: 'space-between' }}\n alignItems=\"center\"\n >\n {title}\n <IconButton onClick={onClose}>\n <CloseIcon />\n </IconButton>\n </Box>\n </DialogTitle>\n <DialogContent>\n <ErrorBoundary>\n <Component {...componentProps} />\n </ErrorBoundary>\n </DialogContent>\n </Dialog>\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;;AAoCO,MAAM,iBAA0C,CAAC;AAAA,EACtD,IAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA,EAAW,SAAA;AAAA,EACX,iBAAiB,EAAC;AAAA,EAClB,KAAA;AAAA,EACA,GAAG;AACL,CAAA,KAAM;AACJ,EAAA,2BACG,QAAA,EAAA,EACC,QAAA,kBAAA,IAAA,CAAC,UAAO,IAAA,EAAY,OAAA,EAAmB,GAAG,IAAA,EACxC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,WAAA,EAAA,EACC,QAAA,kBAAA,IAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAQ,MAAA;AAAA,QACR,cAAA,EAAgB,EAAE,EAAA,EAAI,QAAA,EAAU,IAAI,eAAA,EAAgB;AAAA,QACpD,UAAA,EAAW,QAAA;AAAA,QAEV,QAAA,EAAA;AAAA,UAAA,KAAA;AAAA,8BACA,UAAA,EAAA,EAAW,OAAA,EAAS,OAAA,EACnB,QAAA,kBAAA,GAAA,CAAC,aAAU,CAAA,EACb;AAAA;AAAA;AAAA,KACF,EACF,CAAA;AAAA,oBACA,GAAA,CAAC,iBACC,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EACC,8BAAC,SAAA,EAAA,EAAW,GAAG,cAAA,EAAgB,CAAA,EACjC,CAAA,EACF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { Fragment } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { Box, Typography, Button, makeStyles } from '@material-ui/core';
|
|
4
4
|
|
|
5
5
|
const useStyles = makeStyles((theme) => ({
|
|
6
6
|
box: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.esm.js","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { ComponentType, FC } from 'react';\n\nimport { Fragment } from 'react';\nimport { Box, Button, makeStyles, Theme, Typography } from '@material-ui/core';\n\ntype EmptyStateProps = {\n icon: ComponentType<any>;\n title: string;\n helperText: string;\n action?: {\n text: string;\n fn: () => void;\n };\n};\n\nconst useStyles = makeStyles((theme: Theme) => ({\n box: {\n display: 'flex',\n justifyContent: 'center',\n marginBottom: theme.spacing(4),\n },\n icon: {\n margin: theme.spacing(4, 0, 2, 0),\n fontSize: theme.typography.h1?.fontSize ?? '4rem',\n fill: 'var(--pf-t--color--gray--50)',\n },\n title: {\n textAlign: 'center',\n marginBottom: theme.spacing(2),\n },\n helperText: {\n marginBottom: theme.spacing(4),\n },\n actionText: {\n textTransform: 'none',\n color: 'var(--pf-t--color--blue--40)',\n },\n}));\n\nexport const EmptyState: FC<EmptyStateProps> = ({\n icon: Icon,\n title,\n helperText,\n action,\n}) => {\n const classes = useStyles();\n\n return (\n <Fragment>\n <Box className={classes.box}>\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n }}\n >\n <Icon className={classes.icon} />\n <Typography className={classes.title} variant=\"h6\">\n {title}\n </Typography>\n <Typography className={classes.helperText} variant=\"body1\">\n {helperText}\n </Typography>\n {action && (\n <Button onClick={action.fn} className={classes.actionText}>\n {action.text}\n </Button>\n )}\n </Box>\n </Box>\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;AA8BA,MAAM,SAAA,GAAY,
|
|
1
|
+
{"version":3,"file":"EmptyState.esm.js","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { ComponentType, FC } from 'react';\n\nimport { Fragment } from 'react';\nimport { Box, Button, makeStyles, Theme, Typography } from '@material-ui/core';\n\ntype EmptyStateProps = {\n icon: ComponentType<any>;\n title: string;\n helperText: string;\n action?: {\n text: string;\n fn: () => void;\n };\n};\n\nconst useStyles = makeStyles((theme: Theme) => ({\n box: {\n display: 'flex',\n justifyContent: 'center',\n marginBottom: theme.spacing(4),\n },\n icon: {\n margin: theme.spacing(4, 0, 2, 0),\n fontSize: theme.typography.h1?.fontSize ?? '4rem',\n fill: 'var(--pf-t--color--gray--50)',\n },\n title: {\n textAlign: 'center',\n marginBottom: theme.spacing(2),\n },\n helperText: {\n marginBottom: theme.spacing(4),\n },\n actionText: {\n textTransform: 'none',\n color: 'var(--pf-t--color--blue--40)',\n },\n}));\n\nexport const EmptyState: FC<EmptyStateProps> = ({\n icon: Icon,\n title,\n helperText,\n action,\n}) => {\n const classes = useStyles();\n\n return (\n <Fragment>\n <Box className={classes.box}>\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n }}\n >\n <Icon className={classes.icon} />\n <Typography className={classes.title} variant=\"h6\">\n {title}\n </Typography>\n <Typography className={classes.helperText} variant=\"body1\">\n {helperText}\n </Typography>\n {action && (\n <Button onClick={action.fn} className={classes.actionText}>\n {action.text}\n </Button>\n )}\n </Box>\n </Box>\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;AA8BA,MAAM,SAAA,GAAY,UAAA,CAAW,CAAC,KAAA,MAAkB;AAAA,EAC9C,GAAA,EAAK;AAAA,IACH,OAAA,EAAS,MAAA;AAAA,IACT,cAAA,EAAgB,QAAA;AAAA,IAChB,YAAA,EAA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AAA;AAAA,4BACC,UAAA,EAAA,EAAW,SAAA,EAAW,QAAQ,UAAA,EAAY,OAAA,EAAQ,SAChD,QAAA,EAAA,UAAA,EACH,CAAA;AAAA,QACC,MAAA,oBACC,GAAA,CAAC,MAAA,EAAA,EAAO,OAAA,EAAS,MAAA,CAAO,IAAI,SAAA,EAAW,OAAA,CAAQ,UAAA,EAC5C,QAAA,EAAA,MAAA,CAAO,IAAA,EACV;AAAA;AAAA;AAAA,KAGN,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyStateNoData.esm.js","sources":["../../../src/components/EmptyState/EmptyStateNoData.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FunctionComponent } from 'react';\nimport { EmptyState } from './EmptyState';\nimport SettingsIcon from '@mui/icons-material/Settings';\n\nexport const EmptyStateNoData: FunctionComponent = () => (\n <EmptyState\n icon={SettingsIcon}\n title=\"No Pipeline Runs\"\n helperText=\"No pipeline runs available. Create a new pipeline run to get started.\"\n />\n);\n"],"names":[],"mappings":";;;;AAmBO,MAAM,mBAAsC,sBACjD,GAAA;AAAA,EAAC,UAAA;AAAA,EAAA;AAAA,IACC,
|
|
1
|
+
{"version":3,"file":"EmptyStateNoData.esm.js","sources":["../../../src/components/EmptyState/EmptyStateNoData.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FunctionComponent } from 'react';\nimport { EmptyState } from './EmptyState';\nimport SettingsIcon from '@mui/icons-material/Settings';\n\nexport const EmptyStateNoData: FunctionComponent = () => (\n <EmptyState\n icon={SettingsIcon}\n title=\"No Pipeline Runs\"\n helperText=\"No pipeline runs available. Create a new pipeline run to get started.\"\n />\n);\n"],"names":[],"mappings":";;;;AAmBO,MAAM,mBAAsC,sBACjD,GAAA;AAAA,EAAC,UAAA;AAAA,EAAA;AAAA,IACC,IAAA,EAAM,YAAA;AAAA,IACN,KAAA,EAAM,kBAAA;AAAA,IACN,UAAA,EAAW;AAAA;AACb;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyStateNoMatch.esm.js","sources":["../../../src/components/EmptyState/EmptyStateNoMatch.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FunctionComponent } from 'react';\nimport SearchIcon from '@mui/icons-material/Search';\nimport { EmptyState } from './EmptyState';\n\ntype EmptyStateNoMatchFoundProps = {\n actionFn: () => void;\n};\n\nexport const EmptyStateNoMatchFound: FunctionComponent<\n EmptyStateNoMatchFoundProps\n> = ({ actionFn }) => (\n <EmptyState\n icon={SearchIcon}\n title=\"No results found\"\n helperText=\"No results match the filter criteria. Remove all filters or clean all filters to show results.\"\n action={{ text: 'Clear all filters', fn: actionFn }}\n />\n);\n"],"names":[],"mappings":";;;;AAuBO,MAAM,
|
|
1
|
+
{"version":3,"file":"EmptyStateNoMatch.esm.js","sources":["../../../src/components/EmptyState/EmptyStateNoMatch.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FunctionComponent } from 'react';\nimport SearchIcon from '@mui/icons-material/Search';\nimport { EmptyState } from './EmptyState';\n\ntype EmptyStateNoMatchFoundProps = {\n actionFn: () => void;\n};\n\nexport const EmptyStateNoMatchFound: FunctionComponent<\n EmptyStateNoMatchFoundProps\n> = ({ actionFn }) => (\n <EmptyState\n icon={SearchIcon}\n title=\"No results found\"\n helperText=\"No results match the filter criteria. Remove all filters or clean all filters to show results.\"\n action={{ text: 'Clear all filters', fn: actionFn }}\n />\n);\n"],"names":[],"mappings":";;;;AAuBO,MAAM,sBAAA,GAET,CAAC,EAAE,QAAA,EAAS,qBACd,GAAA;AAAA,EAAC,UAAA;AAAA,EAAA;AAAA,IACC,IAAA,EAAM,UAAA;AAAA,IACN,KAAA,EAAM,kBAAA;AAAA,IACN,UAAA,EAAW,gGAAA;AAAA,IACX,MAAA,EAAQ,EAAE,IAAA,EAAM,mBAAA,EAAqB,IAAI,QAAA;AAAS;AACpD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyStateSpinner.esm.js","sources":["../../../src/components/EmptyState/EmptyStateSpinner.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\n\nimport { Fragment } from 'react';\nimport { Box, CircularProgress } from '@material-ui/core';\n\nexport const EmptyStateSpinner: FC = () => {\n return (\n <Fragment>\n <Box\n sx={{\n display: 'flex',\n justifyContent: 'center',\n margin: '5rem 0 5rem 0',\n }}\n >\n <CircularProgress data-testid=\"spinner\" />\n </Box>\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;AAoBO,MAAM,oBAAwB,MAAM;AACzC,EAAA,2BACG,
|
|
1
|
+
{"version":3,"file":"EmptyStateSpinner.esm.js","sources":["../../../src/components/EmptyState/EmptyStateSpinner.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\n\nimport { Fragment } from 'react';\nimport { Box, CircularProgress } from '@material-ui/core';\n\nexport const EmptyStateSpinner: FC = () => {\n return (\n <Fragment>\n <Box\n sx={{\n display: 'flex',\n justifyContent: 'center',\n margin: '5rem 0 5rem 0',\n }}\n >\n <CircularProgress data-testid=\"spinner\" />\n </Box>\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;AAoBO,MAAM,oBAAwB,MAAM;AACzC,EAAA,2BACG,QAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,EAAA,EAAI;AAAA,QACF,OAAA,EAAS,MAAA;AAAA,QACT,cAAA,EAAgB,QAAA;AAAA,QAChB,MAAA,EAAQ;AAAA,OACV;AAAA,MAEA,QAAA,kBAAA,GAAA,CAAC,gBAAA,EAAA,EAAiB,aAAA,EAAY,SAAA,EAAU;AAAA;AAAA,GAC1C,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalIcon.esm.js","sources":["../../../src/components/Icons/CriticalIcon.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\nimport { t_color_red_50 as criticalColor } from '@patternfly/react-tokens';\nimport { SvgIconProps } from '@material-ui/core';\n\nexport const CriticalRiskIcon: FC<SvgIconProps> = ({ className }) => {\n return (\n <svg\n viewBox=\"0 0 925 1024\"\n fill={criticalColor.value}\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n <path d=\"M897.86597,252.24865 L491.105712,7.96742801 C473.40731,-2.65897781 451.300057,-2.65597516 433.611654,7.97743687 L27.1213875,252.245648 C10.3059556,262.353595 0.0163032058,280.549701 0.0163032058,300.182078 L0.0163032058,967.971163 C-1.04266102,1010.81008 49.7156241,1038.89994 85.4314175,1015.41816 C85.4304175,1015.42016 432.807682,798.630273 432.807682,798.630273 C450.891071,787.348287 473.816296,787.342282 491.906685,798.624268 L839.584939,1015.4612 C875.297732,1039.03406 926.031018,1010.73602 924.984054,968.003192 C924.985054,968.005193 924.985054,300.192087 924.985054,300.192087 C924.985054,280.552703 914.688401,262.353595 897.86597,252.24865\" />\n </svg>\n );\n};\n"],"names":["criticalColor"],"mappings":";;;AAmBO,MAAM,
|
|
1
|
+
{"version":3,"file":"CriticalIcon.esm.js","sources":["../../../src/components/Icons/CriticalIcon.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\nimport { t_color_red_50 as criticalColor } from '@patternfly/react-tokens';\nimport { SvgIconProps } from '@material-ui/core';\n\nexport const CriticalRiskIcon: FC<SvgIconProps> = ({ className }) => {\n return (\n <svg\n viewBox=\"0 0 925 1024\"\n fill={criticalColor.value}\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n <path d=\"M897.86597,252.24865 L491.105712,7.96742801 C473.40731,-2.65897781 451.300057,-2.65597516 433.611654,7.97743687 L27.1213875,252.245648 C10.3059556,262.353595 0.0163032058,280.549701 0.0163032058,300.182078 L0.0163032058,967.971163 C-1.04266102,1010.81008 49.7156241,1038.89994 85.4314175,1015.41816 C85.4304175,1015.42016 432.807682,798.630273 432.807682,798.630273 C450.891071,787.348287 473.816296,787.342282 491.906685,798.624268 L839.584939,1015.4612 C875.297732,1039.03406 926.031018,1010.73602 924.984054,968.003192 C924.985054,968.005193 924.985054,300.192087 924.985054,300.192087 C924.985054,280.552703 914.688401,262.353595 897.86597,252.24865\" />\n </svg>\n );\n};\n"],"names":["criticalColor"],"mappings":";;;AAmBO,MAAM,gBAAA,GAAqC,CAAC,EAAE,SAAA,EAAU,KAAM;AACnE,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAQ,cAAA;AAAA,MACR,MAAMA,cAAA,CAAc,KAAA;AAAA,MACpB,KAAA,EAAM,4BAAA;AAAA,MACN,SAAA;AAAA,MAEA,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,+oBAAA,EAAgpB;AAAA;AAAA,GAC1pB;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EqualsIcon.esm.js","sources":["../../../src/components/Icons/EqualsIcon.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\nimport { t_color_yellow_40 as mediumColor } from '@patternfly/react-tokens';\nimport { SvgIconProps } from '@material-ui/core';\n\nexport const EqualsIcon: FC<SvgIconProps> = ({ className }) => {\n return (\n <svg\n viewBox=\"0 -960 960 960\"\n fill={mediumColor.value}\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n <path d=\"M160-280v-120h640v120H160Zm0-280v-120h640v120H160Z\" />\n </svg>\n );\n};\n"],"names":["mediumColor"],"mappings":";;;AAmBO,MAAM,
|
|
1
|
+
{"version":3,"file":"EqualsIcon.esm.js","sources":["../../../src/components/Icons/EqualsIcon.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\nimport { t_color_yellow_40 as mediumColor } from '@patternfly/react-tokens';\nimport { SvgIconProps } from '@material-ui/core';\n\nexport const EqualsIcon: FC<SvgIconProps> = ({ className }) => {\n return (\n <svg\n viewBox=\"0 -960 960 960\"\n fill={mediumColor.value}\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n <path d=\"M160-280v-120h640v120H160Zm0-280v-120h640v120H160Z\" />\n </svg>\n );\n};\n"],"names":["mediumColor"],"mappings":";;;AAmBO,MAAM,UAAA,GAA+B,CAAC,EAAE,SAAA,EAAU,KAAM;AAC7D,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAQ,gBAAA;AAAA,MACR,MAAMA,iBAAA,CAAY,KAAA;AAAA,MAClB,KAAA,EAAM,4BAAA;AAAA,MACN,SAAA;AAAA,MAEA,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,oDAAA,EAAqD;AAAA;AAAA,GAC/D;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconWithValue.esm.js","sources":["../../../src/components/Icons/IconWithValue.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { ComponentType, FC } from 'react';\n\nimport { Fragment } from 'react';\nimport { SvgIconProps } from '@mui/material/SvgIcon';\nimport { isNumber } from 'lodash';\nimport Tooltip from '@mui/material/Tooltip';\nimport { Box, Typography } from '@material-ui/core';\n\ntype PipelineRunIconProps = {\n iconComponent: ComponentType;\n tooltip: string;\n iconProps?: SvgIconProps;\n value: string | number; // if value is a number, it will be displayed with the icon\n};\n\nexport interface IconWithValueProps\n extends Omit<PipelineRunIconProps, 'iconComponent'> {}\n\nexport const IconWithValue: FC<PipelineRunIconProps> = ({\n iconComponent: IconComponent,\n tooltip,\n iconProps,\n value,\n}) => {\n return (\n <Fragment>\n <Tooltip title={tooltip} arrow placement=\"left\">\n <Box display=\"flex\" alignItems=\"center\" style={{ gap: '.5em' }}>\n {isNumber(value) ? (\n <>\n <IconComponent {...iconProps} /> {value}\n </>\n ) : (\n <Typography variant=\"body2\">{value}</Typography>\n )}\n </Box>\n </Tooltip>\n </Fragment>\n );\n};\n"],"names":["Fragment"],"mappings":";;;;;;AAiCO,MAAM,gBAA0C,CAAC;AAAA,EACtD,
|
|
1
|
+
{"version":3,"file":"IconWithValue.esm.js","sources":["../../../src/components/Icons/IconWithValue.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { ComponentType, FC } from 'react';\n\nimport { Fragment } from 'react';\nimport { SvgIconProps } from '@mui/material/SvgIcon';\nimport { isNumber } from 'lodash';\nimport Tooltip from '@mui/material/Tooltip';\nimport { Box, Typography } from '@material-ui/core';\n\ntype PipelineRunIconProps = {\n iconComponent: ComponentType;\n tooltip: string;\n iconProps?: SvgIconProps;\n value: string | number; // if value is a number, it will be displayed with the icon\n};\n\nexport interface IconWithValueProps\n extends Omit<PipelineRunIconProps, 'iconComponent'> {}\n\nexport const IconWithValue: FC<PipelineRunIconProps> = ({\n iconComponent: IconComponent,\n tooltip,\n iconProps,\n value,\n}) => {\n return (\n <Fragment>\n <Tooltip title={tooltip} arrow placement=\"left\">\n <Box display=\"flex\" alignItems=\"center\" style={{ gap: '.5em' }}>\n {isNumber(value) ? (\n <>\n <IconComponent {...iconProps} /> {value}\n </>\n ) : (\n <Typography variant=\"body2\">{value}</Typography>\n )}\n </Box>\n </Tooltip>\n </Fragment>\n );\n};\n"],"names":["Fragment"],"mappings":";;;;;;AAiCO,MAAM,gBAA0C,CAAC;AAAA,EACtD,aAAA,EAAe,aAAA;AAAA,EACf,OAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,KAAM;AACJ,EAAA,uBACE,GAAA,CAACA,QAAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,OAAA,EAAA,EAAQ,OAAO,OAAA,EAAS,KAAA,EAAK,IAAA,EAAC,SAAA,EAAU,MAAA,EACvC,QAAA,kBAAA,GAAA,CAAC,OAAI,OAAA,EAAQ,MAAA,EAAO,UAAA,EAAW,QAAA,EAAS,KAAA,EAAO,EAAE,GAAA,EAAK,MAAA,EAAO,EAC1D,QAAA,EAAA,QAAA,CAAS,KAAK,CAAA,mBACb,IAAA,CAAAA,UAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,aAAA,EAAA,EAAe,GAAG,SAAA,EAAW,CAAA;AAAA,IAAE,GAAA;AAAA,IAAE;AAAA,GAAA,EACpC,CAAA,uBAEC,UAAA,EAAA,EAAW,OAAA,EAAQ,SAAS,QAAA,EAAA,KAAA,EAAM,CAAA,EAEvC,GACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogsIcon.esm.js","sources":["../../../src/components/Icons/LogsIcon.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\nimport { Theme, createStyles, makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n icon: {\n fill: theme.palette.text.primary,\n },\n disabledButton: {\n fill: theme.palette.grey[600],\n },\n }),\n);\n\nexport const ViewLogsIcon: FC<{ disabled?: boolean }> = ({ disabled }) => {\n const classes = useStyles();\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"24\"\n height=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n className={disabled ? classes.disabledButton : classes.icon}\n >\n <path d=\"M4.5 21C4.0875 21 3.73438 20.8531 3.44063 20.5594C3.14688 20.2656 3 19.9125 3 19.5V4.5C3 4.0875 3.14688 3.73438 3.44063 3.44063C3.73438 3.14688 4.0875 3 4.5 3H19.5C19.9125 3 20.2656 3.14688 20.5594 3.44063C20.8531 3.73438 21 4.0875 21 4.5V19.5C21 19.9125 20.8531 20.2656 20.5594 20.5594C20.2656 20.8531 19.9125 21 19.5 21H4.5ZM4.5 19.5H19.5V6.5H4.5V19.5ZM12.001 16.875C10.667 16.875 9.475 16.5154 8.425 15.7962C7.375 15.077 6.60833 14.1437 6.125 12.9962C6.60833 11.8487 7.37466 10.9167 8.42398 10.2C9.47329 9.48333 10.665 9.125 11.999 9.125C13.333 9.125 14.525 9.48459 15.575 10.2038C16.625 10.923 17.3917 11.8563 17.875 13.0038C17.3917 14.1513 16.6253 15.0833 15.576 15.8C14.5267 16.5167 13.335 16.875 12.001 16.875ZM11.9971 14.25C11.649 14.25 11.3542 14.1282 11.1125 13.8846C10.8708 13.6409 10.75 13.3451 10.75 12.9971C10.75 12.649 10.8718 12.3542 11.1155 12.1125C11.3591 11.8708 11.6549 11.75 12.003 11.75C12.351 11.75 12.6458 11.8718 12.8875 12.1155C13.1292 12.3591 13.25 12.6549 13.25 13.003C13.25 13.351 13.1282 13.6458 12.8846 13.8875C12.6409 14.1292 12.3451 14.25 11.9971 14.25ZM12 15C12.56 15 13.0333 14.8067 13.42 14.42C13.8067 14.0333 14 13.56 14 13C14 12.44 13.8067 11.9667 13.42 11.58C13.0333 11.1933 12.56 11 12 11C11.44 11 10.9667 11.1933 10.58 11.58C10.1933 11.9667 10 12.44 10 13C10 13.56 10.1933 14.0333 10.58 14.42C10.9667 14.8067 11.44 15 12 15Z\" />\n </svg>\n );\n};\n"],"names":[],"mappings":";;;AAkBA,MAAM,
|
|
1
|
+
{"version":3,"file":"LogsIcon.esm.js","sources":["../../../src/components/Icons/LogsIcon.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\nimport { Theme, createStyles, makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n icon: {\n fill: theme.palette.text.primary,\n },\n disabledButton: {\n fill: theme.palette.grey[600],\n },\n }),\n);\n\nexport const ViewLogsIcon: FC<{ disabled?: boolean }> = ({ disabled }) => {\n const classes = useStyles();\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"24\"\n height=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n className={disabled ? classes.disabledButton : classes.icon}\n >\n <path d=\"M4.5 21C4.0875 21 3.73438 20.8531 3.44063 20.5594C3.14688 20.2656 3 19.9125 3 19.5V4.5C3 4.0875 3.14688 3.73438 3.44063 3.44063C3.73438 3.14688 4.0875 3 4.5 3H19.5C19.9125 3 20.2656 3.14688 20.5594 3.44063C20.8531 3.73438 21 4.0875 21 4.5V19.5C21 19.9125 20.8531 20.2656 20.5594 20.5594C20.2656 20.8531 19.9125 21 19.5 21H4.5ZM4.5 19.5H19.5V6.5H4.5V19.5ZM12.001 16.875C10.667 16.875 9.475 16.5154 8.425 15.7962C7.375 15.077 6.60833 14.1437 6.125 12.9962C6.60833 11.8487 7.37466 10.9167 8.42398 10.2C9.47329 9.48333 10.665 9.125 11.999 9.125C13.333 9.125 14.525 9.48459 15.575 10.2038C16.625 10.923 17.3917 11.8563 17.875 13.0038C17.3917 14.1513 16.6253 15.0833 15.576 15.8C14.5267 16.5167 13.335 16.875 12.001 16.875ZM11.9971 14.25C11.649 14.25 11.3542 14.1282 11.1125 13.8846C10.8708 13.6409 10.75 13.3451 10.75 12.9971C10.75 12.649 10.8718 12.3542 11.1155 12.1125C11.3591 11.8708 11.6549 11.75 12.003 11.75C12.351 11.75 12.6458 11.8718 12.8875 12.1155C13.1292 12.3591 13.25 12.6549 13.25 13.003C13.25 13.351 13.1282 13.6458 12.8846 13.8875C12.6409 14.1292 12.3451 14.25 11.9971 14.25ZM12 15C12.56 15 13.0333 14.8067 13.42 14.42C13.8067 14.0333 14 13.56 14 13C14 12.44 13.8067 11.9667 13.42 11.58C13.0333 11.1933 12.56 11 12 11C11.44 11 10.9667 11.1933 10.58 11.58C10.1933 11.9667 10 12.44 10 13C10 13.56 10.1933 14.0333 10.58 14.42C10.9667 14.8067 11.44 15 12 15Z\" />\n </svg>\n );\n};\n"],"names":[],"mappings":";;;AAkBA,MAAM,SAAA,GAAY,UAAA;AAAA,EAAW,CAAC,UAC5B,YAAA,CAAa;AAAA,IACX,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK;AAAA,KAC3B;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,IAAA,EAAM,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,GAAG;AAAA;AAC9B,GACD;AACH,CAAA;AAEO,MAAM,YAAA,GAA2C,CAAC,EAAE,QAAA,EAAS,KAAM;AACxE,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAQ,WAAA;AAAA,MACR,KAAA,EAAM,IAAA;AAAA,MACN,MAAA,EAAO,IAAA;AAAA,MACP,KAAA,EAAM,4BAAA;AAAA,MACN,IAAA,EAAK,MAAA;AAAA,MACL,SAAA,EAAW,QAAA,GAAW,OAAA,CAAQ,cAAA,GAAiB,OAAA,CAAQ,IAAA;AAAA,MAEvD,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,u1CAAA,EAAw1C;AAAA;AAAA,GACl2C;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutputIcon.esm.js","sources":["../../../src/components/Icons/OutputIcon.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\nimport { Theme, createStyles, makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n icon: {\n fill: theme.palette.text.primary,\n },\n disabledButton: {\n fill: theme.palette.grey[600],\n },\n }),\n);\n\nexport const OutputIcon: FC<{ disabled?: boolean }> = ({ disabled }) => {\n const classes = useStyles();\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"24\"\n height=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={disabled ? classes.disabledButton : classes.icon}\n >\n <path d=\"M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H19C19.55 3 20.0208 3.19583 20.4125 3.5875C20.8042 3.97917 21 4.45 21 5V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM5 19H19V7H5V19ZM7 12V10H17V12H7ZM7 16V14H13V16H7Z\" />\n </svg>\n );\n};\n"],"names":[],"mappings":";;;AAkBA,MAAM,
|
|
1
|
+
{"version":3,"file":"OutputIcon.esm.js","sources":["../../../src/components/Icons/OutputIcon.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\nimport { Theme, createStyles, makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n icon: {\n fill: theme.palette.text.primary,\n },\n disabledButton: {\n fill: theme.palette.grey[600],\n },\n }),\n);\n\nexport const OutputIcon: FC<{ disabled?: boolean }> = ({ disabled }) => {\n const classes = useStyles();\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"24\"\n height=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={disabled ? classes.disabledButton : classes.icon}\n >\n <path d=\"M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H19C19.55 3 20.0208 3.19583 20.4125 3.5875C20.8042 3.97917 21 4.45 21 5V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM5 19H19V7H5V19ZM7 12V10H17V12H7ZM7 16V14H13V16H7Z\" />\n </svg>\n );\n};\n"],"names":[],"mappings":";;;AAkBA,MAAM,SAAA,GAAY,UAAA;AAAA,EAAW,CAAC,UAC5B,YAAA,CAAa;AAAA,IACX,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK;AAAA,KAC3B;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,IAAA,EAAM,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,GAAG;AAAA;AAC9B,GACD;AACH,CAAA;AAEO,MAAM,UAAA,GAAyC,CAAC,EAAE,QAAA,EAAS,KAAM;AACtE,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAQ,WAAA;AAAA,MACR,KAAA,EAAM,IAAA;AAAA,MACN,MAAA,EAAO,IAAA;AAAA,MACP,KAAA,EAAM,4BAAA;AAAA,MACN,SAAA,EAAW,QAAA,GAAW,OAAA,CAAQ,cAAA,GAAiB,OAAA,CAAQ,IAAA;AAAA,MAEvD,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,oVAAA,EAAqV;AAAA;AAAA,GAC/V;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SBOMLink.esm.js","sources":["../../../src/components/Icons/SBOMLink.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\nimport { Theme, createStyles, makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n icon: {\n fill: theme.palette.text.primary,\n },\n disabledButton: {\n fill: theme.palette.grey[600],\n },\n }),\n);\n\nexport const SBOMLinkIcon: FC<{ disabled?: boolean }> = ({ disabled }) => {\n const classes = useStyles();\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"24\"\n height=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={disabled ? classes.disabledButton : classes.icon}\n >\n <path d=\"M11 17H7C5.61667 17 4.4375 16.5125 3.4625 15.5375C2.4875 14.5625 2 13.3833 2 12C2 10.6167 2.4875 9.4375 3.4625 8.4625C4.4375 7.4875 5.61667 7 7 7H11V9H7C6.16667 9 5.45833 9.29167 4.875 9.875C4.29167 10.4583 4 11.1667 4 12C4 12.8333 4.29167 13.5417 4.875 14.125C5.45833 14.7083 6.16667 15 7 15H11V17ZM8 13V11H16V13H8ZM13 17V15H17C17.8333 15 18.5417 14.7083 19.125 14.125C19.7083 13.5417 20 12.8333 20 12C20 11.1667 19.7083 10.4583 19.125 9.875C18.5417 9.29167 17.8333 9 17 9H13V7H17C18.3833 7 19.5625 7.4875 20.5375 8.4625C21.5125 9.4375 22 10.6167 22 12C22 13.3833 21.5125 14.5625 20.5375 15.5375C19.5625 16.5125 18.3833 17 17 17H13Z\" />\n </svg>\n );\n};\n"],"names":[],"mappings":";;;AAkBA,MAAM,
|
|
1
|
+
{"version":3,"file":"SBOMLink.esm.js","sources":["../../../src/components/Icons/SBOMLink.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\nimport { Theme, createStyles, makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n icon: {\n fill: theme.palette.text.primary,\n },\n disabledButton: {\n fill: theme.palette.grey[600],\n },\n }),\n);\n\nexport const SBOMLinkIcon: FC<{ disabled?: boolean }> = ({ disabled }) => {\n const classes = useStyles();\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"24\"\n height=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={disabled ? classes.disabledButton : classes.icon}\n >\n <path d=\"M11 17H7C5.61667 17 4.4375 16.5125 3.4625 15.5375C2.4875 14.5625 2 13.3833 2 12C2 10.6167 2.4875 9.4375 3.4625 8.4625C4.4375 7.4875 5.61667 7 7 7H11V9H7C6.16667 9 5.45833 9.29167 4.875 9.875C4.29167 10.4583 4 11.1667 4 12C4 12.8333 4.29167 13.5417 4.875 14.125C5.45833 14.7083 6.16667 15 7 15H11V17ZM8 13V11H16V13H8ZM13 17V15H17C17.8333 15 18.5417 14.7083 19.125 14.125C19.7083 13.5417 20 12.8333 20 12C20 11.1667 19.7083 10.4583 19.125 9.875C18.5417 9.29167 17.8333 9 17 9H13V7H17C18.3833 7 19.5625 7.4875 20.5375 8.4625C21.5125 9.4375 22 10.6167 22 12C22 13.3833 21.5125 14.5625 20.5375 15.5375C19.5625 16.5125 18.3833 17 17 17H13Z\" />\n </svg>\n );\n};\n"],"names":[],"mappings":";;;AAkBA,MAAM,SAAA,GAAY,UAAA;AAAA,EAAW,CAAC,UAC5B,YAAA,CAAa;AAAA,IACX,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK;AAAA,KAC3B;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,IAAA,EAAM,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,GAAG;AAAA;AAC9B,GACD;AACH,CAAA;AAEO,MAAM,YAAA,GAA2C,CAAC,EAAE,QAAA,EAAS,KAAM;AACxE,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAQ,WAAA;AAAA,MACR,KAAA,EAAM,IAAA;AAAA,MACN,MAAA,EAAO,IAAA;AAAA,MACP,KAAA,EAAM,4BAAA;AAAA,MACN,SAAA,EAAW,QAAA,GAAW,OAAA,CAAQ,cAAA,GAAiB,OAAA,CAAQ,IAAA;AAAA,MAEvD,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,2nBAAA,EAA4nB;AAAA;AAAA,GACtoB;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PermissionAlert.esm.js","sources":["../../../src/components/PermissionAlert/PermissionAlert.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 */\nimport { Alert, AlertTitle } from '@material-ui/lab';\n\nconst PermissionAlert = () => {\n return (\n <Alert severity=\"warning\" data-testid=\"no-permission-alert\">\n <AlertTitle>Permission required</AlertTitle>\n To view security information, contact your administrator to give you the\n mssv.view.read permission.\n </Alert>\n );\n};\nexport default PermissionAlert;\n"],"names":[],"mappings":";;;AAiBA,MAAM,kBAAkB,MAAM;AAC5B,EAAA,
|
|
1
|
+
{"version":3,"file":"PermissionAlert.esm.js","sources":["../../../src/components/PermissionAlert/PermissionAlert.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 */\nimport { Alert, AlertTitle } from '@material-ui/lab';\n\nconst PermissionAlert = () => {\n return (\n <Alert severity=\"warning\" data-testid=\"no-permission-alert\">\n <AlertTitle>Permission required</AlertTitle>\n To view security information, contact your administrator to give you the\n mssv.view.read permission.\n </Alert>\n );\n};\nexport default PermissionAlert;\n"],"names":[],"mappings":";;;AAiBA,MAAM,kBAAkB,MAAM;AAC5B,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAM,QAAA,EAAS,SAAA,EAAU,eAAY,qBAAA,EACpC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,cAAW,QAAA,EAAA,qBAAA,EAAmB,CAAA;AAAA,IAAa;AAAA,GAAA,EAG9C,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineRunList.esm.js","sources":["../../../src/components/PipelineRunList/PipelineRunList.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\n\nimport { useState, useRef, useMemo, useEffect, Fragment } from 'react';\nimport { debounce } from 'lodash';\nimport { PipelineRunTable } from './PipelineRunTable';\nimport { PipelineRunToolbar } from './PipelineRunToolbar';\nimport { Box } from '@material-ui/core';\nimport { PipelineRunResult } from '../../models/pipelineRunResult';\n\ntype PipelineRunListProps = {\n data: PipelineRunResult[] | null;\n totalCount: number;\n loading: boolean;\n error: Error | null;\n onUpdatePagination: (start: number, end: number) => void;\n};\n\nexport const PipelineRunList: FC<PipelineRunListProps> = ({\n data,\n totalCount,\n loading,\n error,\n onUpdatePagination,\n}) => {\n const [namefilter, setNameFilter] = useState('');\n const [page, setPage] = useState(0);\n const [rowsPerPage, setRowsPerPage] = useState(5);\n const [count, setCount] = useState(0);\n const searchInputRef = useRef<HTMLInputElement | null>(null);\n\n const handleChangePage = (newPage: number) => {\n setPage(newPage);\n onUpdatePagination(newPage, rowsPerPage);\n };\n\n const handleChangeRowsPerPage = (rows: number) => {\n setRowsPerPage(rows);\n setPage(0); // Set to zero when changing the number of rows\n onUpdatePagination(0, page * rows + rows);\n };\n\n const filteredData = useMemo(() => {\n return data?.filter((row: PipelineRunResult) =>\n row?.id?.toString().toLocaleLowerCase().includes(namefilter),\n );\n }, [data, namefilter]);\n\n const onSearch = debounce((n: string) => {\n setNameFilter(n);\n });\n\n const filterClearAction = () => {\n onSearch('');\n if (searchInputRef.current) {\n searchInputRef.current.value = '';\n }\n };\n\n useEffect(() => {\n if (!loading) {\n // Keep count while fetching paginated data\n setCount(prev => (totalCount > 0 ? totalCount : prev));\n }\n }, [loading, totalCount]);\n\n return (\n <Fragment>\n <Box>\n <Box>\n <PipelineRunToolbar\n onSearch={onSearch}\n searchInputRef={searchInputRef}\n totalCount={totalCount > 0 ? totalCount : count} // Initial count\n page={page}\n rowSize={[5, 10, 20]}\n rowsPerPage={rowsPerPage}\n handleChangePage={handleChangePage}\n handleChangeRowsPerPage={handleChangeRowsPerPage}\n />\n </Box>\n <Box>\n <PipelineRunTable\n data={filteredData ?? []}\n filterInput={namefilter}\n filterClearAction={filterClearAction}\n isLoading={loading}\n error={error}\n />\n </Box>\n </Box>\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAgCO,MAAM,kBAA4C,CAAC;AAAA,EACxD,IAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,
|
|
1
|
+
{"version":3,"file":"PipelineRunList.esm.js","sources":["../../../src/components/PipelineRunList/PipelineRunList.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\n\nimport { useState, useRef, useMemo, useEffect, Fragment } from 'react';\nimport { debounce } from 'lodash';\nimport { PipelineRunTable } from './PipelineRunTable';\nimport { PipelineRunToolbar } from './PipelineRunToolbar';\nimport { Box } from '@material-ui/core';\nimport { PipelineRunResult } from '../../models/pipelineRunResult';\n\ntype PipelineRunListProps = {\n data: PipelineRunResult[] | null;\n totalCount: number;\n loading: boolean;\n error: Error | null;\n onUpdatePagination: (start: number, end: number) => void;\n};\n\nexport const PipelineRunList: FC<PipelineRunListProps> = ({\n data,\n totalCount,\n loading,\n error,\n onUpdatePagination,\n}) => {\n const [namefilter, setNameFilter] = useState('');\n const [page, setPage] = useState(0);\n const [rowsPerPage, setRowsPerPage] = useState(5);\n const [count, setCount] = useState(0);\n const searchInputRef = useRef<HTMLInputElement | null>(null);\n\n const handleChangePage = (newPage: number) => {\n setPage(newPage);\n onUpdatePagination(newPage, rowsPerPage);\n };\n\n const handleChangeRowsPerPage = (rows: number) => {\n setRowsPerPage(rows);\n setPage(0); // Set to zero when changing the number of rows\n onUpdatePagination(0, page * rows + rows);\n };\n\n const filteredData = useMemo(() => {\n return data?.filter((row: PipelineRunResult) =>\n row?.id?.toString().toLocaleLowerCase().includes(namefilter),\n );\n }, [data, namefilter]);\n\n const onSearch = debounce((n: string) => {\n setNameFilter(n);\n });\n\n const filterClearAction = () => {\n onSearch('');\n if (searchInputRef.current) {\n searchInputRef.current.value = '';\n }\n };\n\n useEffect(() => {\n if (!loading) {\n // Keep count while fetching paginated data\n setCount(prev => (totalCount > 0 ? totalCount : prev));\n }\n }, [loading, totalCount]);\n\n return (\n <Fragment>\n <Box>\n <Box>\n <PipelineRunToolbar\n onSearch={onSearch}\n searchInputRef={searchInputRef}\n totalCount={totalCount > 0 ? totalCount : count} // Initial count\n page={page}\n rowSize={[5, 10, 20]}\n rowsPerPage={rowsPerPage}\n handleChangePage={handleChangePage}\n handleChangeRowsPerPage={handleChangeRowsPerPage}\n />\n </Box>\n <Box>\n <PipelineRunTable\n data={filteredData ?? []}\n filterInput={namefilter}\n filterClearAction={filterClearAction}\n isLoading={loading}\n error={error}\n />\n </Box>\n </Box>\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAgCO,MAAM,kBAA4C,CAAC;AAAA,EACxD,IAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,KAAM;AACJ,EAAA,MAAM,CAAC,UAAA,EAAY,aAAa,CAAA,GAAI,SAAS,EAAE,CAAA;AAC/C,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,CAAC,CAAA;AAClC,EAAA,MAAM,CAAC,WAAA,EAAa,cAA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CAAA;AAAA,IACvD;AAAA,EACF,CAAA,EAAG,CAAC,OAAA,EAAS,UAAU,CAAC,CAAA;AAExB,EAAA,uBACE,GAAA,CAAC,QAAA,EAAA,EACC,QAAA,kBAAA,IAAA,CAAC,GAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,GAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,MAAC,kBAAA;AAAA,MAAA;AAAA,QACC,QAAA;AAAA,QACA,cAAA;AAAA,QACA,UAAA,EAAY,UAAA,GAAa,CAAA,GAAI,UAAA,GAAa,KAAA;AAAA,QAC1C,IAAA;AAAA,QACA,OAAA,EAAS,CAAC,CAAA,EAAG,EAAA,EAAI,EAAE,CAAA;AAAA,QACnB,WAAA;AAAA,QACA,gBAAA;AAAA,QACA;AAAA;AAAA,KACF,EACF,CAAA;AAAA,wBACC,GAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,MAAC,gBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAM,gBAAgB,EAAC;AAAA,QACvB,WAAA,EAAa,UAAA;AAAA,QACb,iBAAA;AAAA,QACA,SAAA,EAAW,OAAA;AAAA,QACX;AAAA;AAAA,KACF,EACF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -4,7 +4,7 @@ import { Output } from '@aonic-ui/pipelines';
|
|
|
4
4
|
import { Box } from '@material-ui/core';
|
|
5
5
|
import { ErrorBoundary } from '@backstage/core-components';
|
|
6
6
|
|
|
7
|
-
const PipelineRunOutput = ({ pr }) => {
|
|
7
|
+
const PipelineRunOutput$1 = ({ pr }) => {
|
|
8
8
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Box, { "data-testid": "dialog-output", children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(
|
|
9
9
|
Output,
|
|
10
10
|
{
|
|
@@ -18,7 +18,7 @@ const PipelineRunOutput = ({ pr }) => {
|
|
|
18
18
|
}
|
|
19
19
|
) }) }) });
|
|
20
20
|
};
|
|
21
|
-
var PipelineRunOutput
|
|
21
|
+
var PipelineRunOutput = memo(PipelineRunOutput$1);
|
|
22
22
|
|
|
23
|
-
export { PipelineRunOutput
|
|
23
|
+
export { PipelineRunOutput as default };
|
|
24
24
|
//# sourceMappingURL=PipelineRunOutput.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineRunOutput.esm.js","sources":["../../../src/components/PipelineRunList/PipelineRunOutput.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\n\nimport { memo, Fragment } from 'react';\nimport { Output } from '@aonic-ui/pipelines';\nimport { PipelineRunResult } from '../../models/pipelineRunResult';\nimport { Box } from '@material-ui/core';\nimport { ErrorBoundary } from '@backstage/core-components';\n\ntype PipelineRunOutputProps = {\n pr: PipelineRunResult;\n};\n\nconst PipelineRunOutput: FC<PipelineRunOutputProps> = ({ pr }) => {\n return (\n <Fragment>\n <Box data-testid=\"dialog-output\">\n <ErrorBoundary>\n <Output\n pipelineRunName={pr.id}\n pipelineRunStatus={pr.status}\n enterpriseContractPolicies={pr.enterpriseContractPolicies}\n acsImageScanResult={pr.acsImageScanResult}\n acsImageCheckResults={pr.acsImageCheckResults}\n acsDeploymentCheckResults={pr.acsDeploymentCheckResults}\n results={[]}\n />\n </ErrorBoundary>\n </Box>\n </Fragment>\n );\n};\n\nexport default memo(PipelineRunOutput);\n"],"names":[],"mappings":";;;;;;AA2BA,
|
|
1
|
+
{"version":3,"file":"PipelineRunOutput.esm.js","sources":["../../../src/components/PipelineRunList/PipelineRunOutput.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport type { FC } from 'react';\n\nimport { memo, Fragment } from 'react';\nimport { Output } from '@aonic-ui/pipelines';\nimport { PipelineRunResult } from '../../models/pipelineRunResult';\nimport { Box } from '@material-ui/core';\nimport { ErrorBoundary } from '@backstage/core-components';\n\ntype PipelineRunOutputProps = {\n pr: PipelineRunResult;\n};\n\nconst PipelineRunOutput: FC<PipelineRunOutputProps> = ({ pr }) => {\n return (\n <Fragment>\n <Box data-testid=\"dialog-output\">\n <ErrorBoundary>\n <Output\n pipelineRunName={pr.id}\n pipelineRunStatus={pr.status}\n enterpriseContractPolicies={pr.enterpriseContractPolicies}\n acsImageScanResult={pr.acsImageScanResult}\n acsImageCheckResults={pr.acsImageCheckResults}\n acsDeploymentCheckResults={pr.acsDeploymentCheckResults}\n results={[]}\n />\n </ErrorBoundary>\n </Box>\n </Fragment>\n );\n};\n\nexport default memo(PipelineRunOutput);\n"],"names":["PipelineRunOutput"],"mappings":";;;;;;AA2BA,MAAMA,mBAAA,GAAgD,CAAC,EAAE,EAAA,EAAG,KAAM;AAChE,EAAA,2BACG,QAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,OAAI,aAAA,EAAY,eAAA,EACf,8BAAC,aAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,iBAAiB,EAAA,CAAG,EAAA;AAAA,MACpB,mBAAmB,EAAA,CAAG,MAAA;AAAA,MACtB,4BAA4B,EAAA,CAAG,0BAAA;AAAA,MAC/B,oBAAoB,EAAA,CAAG,kBAAA;AAAA,MACvB,sBAAsB,EAAA,CAAG,oBAAA;AAAA,MACzB,2BAA2B,EAAA,CAAG,yBAAA;AAAA,MAC9B,SAAS;AAAC;AAAA,GACZ,EACF,GACF,CAAA,EACF,CAAA;AAEJ,CAAA;AAEA,wBAAe,KAAKA,mBAAiB,CAAA;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useState, useMemo, Fragment } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { Box, IconButton, makeStyles } from '@material-ui/core';
|
|
4
4
|
import { Link } from 'react-router-dom';
|
|
5
5
|
import { DialogLauncher } from '../DialogLauncher/DialogLauncher.esm.js';
|
|
6
6
|
import { PipelineRunLogs } from '../PipelineRunLogs/PipelineRunLogs.esm.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineRunSBOMLink.esm.js","sources":["../../../src/components/PipelineRunList/PipelineRunSBOMLink.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 type { FC } from 'react';\n\nimport { useState, useMemo, Fragment } from 'react';\nimport { IconButton, makeStyles, Box } from '@material-ui/core';\nimport { Link } from 'react-router-dom';\nimport { DialogLauncher } from '../DialogLauncher/DialogLauncher';\nimport { PipelineRunResult } from '../../models/pipelineRunResult';\nimport { PipelineRunLogs } from '../PipelineRunLogs/PipelineRunLogs';\nimport Tooltip from '@mui/material/Tooltip';\nimport { SBOMLinkIcon } from '../Icons/SBOMLink';\n\nconst useStyles = makeStyles(() => ({\n icon: {\n cursor: 'pointer',\n padding: 0,\n },\n}));\n\ninterface PipelineRunSBOMLinkProps {\n pr: PipelineRunResult;\n}\n\nexport const PipelineRunSBOMLink: FC<PipelineRunSBOMLinkProps> = ({ pr }) => {\n const classes = useStyles();\n const [openSBOMLogs, setOpenSBOMLogs] = useState(false);\n const step = useMemo(\n () =>\n pr.steps.findIndex(\n s => s.name?.trim().toLowerCase() === 'show-sbom-rhdh',\n ),\n [pr.steps],\n );\n\n return (\n <Fragment>\n <DialogLauncher\n key={`${pr.id}-logs`}\n title={pr.id}\n open={openSBOMLogs}\n onClose={() => setOpenSBOMLogs(false)}\n component={PipelineRunLogs}\n componentProps={{\n step,\n pr,\n }}\n fullWidth\n maxWidth=\"xl\"\n />\n <Tooltip title=\"Link to SBOM\" arrow placement=\"left\">\n <Box>\n <IconButton\n className={classes.icon}\n disabled={pr.isBuild ? step === -1 : !pr.tpaLink}\n onClick={pr.isBuild ? () => setOpenSBOMLogs(true) : undefined}\n >\n {pr.isBuild ? (\n <SBOMLinkIcon disabled={step === -1} />\n ) : (\n <Link className={classes.icon} to={pr.tpaLink} target=\"_blank\">\n <SBOMLinkIcon disabled={!pr.tpaLink} />\n </Link>\n )}\n </IconButton>\n </Box>\n </Tooltip>\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA2BA,MAAM,SAAA,GAAY,WAAW,OAAO;AAAA,EAClC,
|
|
1
|
+
{"version":3,"file":"PipelineRunSBOMLink.esm.js","sources":["../../../src/components/PipelineRunList/PipelineRunSBOMLink.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 type { FC } from 'react';\n\nimport { useState, useMemo, Fragment } from 'react';\nimport { IconButton, makeStyles, Box } from '@material-ui/core';\nimport { Link } from 'react-router-dom';\nimport { DialogLauncher } from '../DialogLauncher/DialogLauncher';\nimport { PipelineRunResult } from '../../models/pipelineRunResult';\nimport { PipelineRunLogs } from '../PipelineRunLogs/PipelineRunLogs';\nimport Tooltip from '@mui/material/Tooltip';\nimport { SBOMLinkIcon } from '../Icons/SBOMLink';\n\nconst useStyles = makeStyles(() => ({\n icon: {\n cursor: 'pointer',\n padding: 0,\n },\n}));\n\ninterface PipelineRunSBOMLinkProps {\n pr: PipelineRunResult;\n}\n\nexport const PipelineRunSBOMLink: FC<PipelineRunSBOMLinkProps> = ({ pr }) => {\n const classes = useStyles();\n const [openSBOMLogs, setOpenSBOMLogs] = useState(false);\n const step = useMemo(\n () =>\n pr.steps.findIndex(\n s => s.name?.trim().toLowerCase() === 'show-sbom-rhdh',\n ),\n [pr.steps],\n );\n\n return (\n <Fragment>\n <DialogLauncher\n key={`${pr.id}-logs`}\n title={pr.id}\n open={openSBOMLogs}\n onClose={() => setOpenSBOMLogs(false)}\n component={PipelineRunLogs}\n componentProps={{\n step,\n pr,\n }}\n fullWidth\n maxWidth=\"xl\"\n />\n <Tooltip title=\"Link to SBOM\" arrow placement=\"left\">\n <Box>\n <IconButton\n className={classes.icon}\n disabled={pr.isBuild ? step === -1 : !pr.tpaLink}\n onClick={pr.isBuild ? () => setOpenSBOMLogs(true) : undefined}\n >\n {pr.isBuild ? (\n <SBOMLinkIcon disabled={step === -1} />\n ) : (\n <Link className={classes.icon} to={pr.tpaLink} target=\"_blank\">\n <SBOMLinkIcon disabled={!pr.tpaLink} />\n </Link>\n )}\n </IconButton>\n </Box>\n </Tooltip>\n </Fragment>\n );\n};\n"],"names":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IAAA,KAAS,EAAA,GAAK,CAAC,EAAA,CAAG,OAAA;AAAA,QACzC,SAAS,EAAA,CAAG,OAAA,GAAU,MAAM,eAAA,CAAgB,IAAI,CAAA,GAAI,MAAA;AAAA,QAEnD,QAAA,EAAA,EAAA,CAAG,OAAA,mBACF,GAAA,CAAC,YAAA,EAAA,EAAa,QAAA,EAAU,SAAS,EAAA,EAAI,CAAA,mBAErC,GAAA,CAAC,IAAA,EAAA,EAAK,SAAA,EAAW,OAAA,CAAQ,MAAM,EAAA,EAAI,EAAA,CAAG,OAAA,EAAS,MAAA,EAAO,QAAA,EACpD,QAAA,kBAAA,GAAA,CAAC,gBAAa,QAAA,EAAU,CAAC,EAAA,CAAG,OAAA,EAAS,CAAA,EACvC;AAAA;AAAA,OAGN,CAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineRunTable.esm.js","sources":["../../../src/components/PipelineRunList/PipelineRunTable.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { PipelineRunTableColumns } from './PipelineRunTableColumns';\nimport { PipelineRunTableBody } from './PipelineRunTableBody';\nimport { EmptyStateSpinner } from '../EmptyState/EmptyStateSpinner';\nimport { EmptyStateNoData } from '../EmptyState/EmptyStateNoData';\nimport { Table } from '@material-ui/core';\nimport { PipelineRunResult } from '../../models/pipelineRunResult';\nimport { EmptyStateNoMatchFound } from '../EmptyState/EmptyStateNoMatch';\n\ntype PipelineRunTableProps = {\n data: PipelineRunResult[] | null;\n filterInput: string;\n filterClearAction: () => void;\n isLoading: boolean;\n error: Error | null;\n};\n\nexport const PipelineRunTable = ({\n data,\n filterInput,\n filterClearAction,\n isLoading,\n error,\n}: PipelineRunTableProps) => {\n if (error) {\n return <div>Error: {error.message}</div>;\n }\n\n if (isLoading) {\n return <EmptyStateSpinner />;\n }\n\n if (data?.length === 0 && filterInput) {\n return <EmptyStateNoMatchFound actionFn={filterClearAction} />;\n }\n\n if (data?.length === 0) {\n return <EmptyStateNoData />;\n }\n\n return (\n <Table>\n <PipelineRunTableColumns />\n <PipelineRunTableBody data={data} />\n </Table>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA+BO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,IAAA;AAAA,EACA,WAAA;AAAA,EACA,iBAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,
|
|
1
|
+
{"version":3,"file":"PipelineRunTable.esm.js","sources":["../../../src/components/PipelineRunList/PipelineRunTable.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { PipelineRunTableColumns } from './PipelineRunTableColumns';\nimport { PipelineRunTableBody } from './PipelineRunTableBody';\nimport { EmptyStateSpinner } from '../EmptyState/EmptyStateSpinner';\nimport { EmptyStateNoData } from '../EmptyState/EmptyStateNoData';\nimport { Table } from '@material-ui/core';\nimport { PipelineRunResult } from '../../models/pipelineRunResult';\nimport { EmptyStateNoMatchFound } from '../EmptyState/EmptyStateNoMatch';\n\ntype PipelineRunTableProps = {\n data: PipelineRunResult[] | null;\n filterInput: string;\n filterClearAction: () => void;\n isLoading: boolean;\n error: Error | null;\n};\n\nexport const PipelineRunTable = ({\n data,\n filterInput,\n filterClearAction,\n isLoading,\n error,\n}: PipelineRunTableProps) => {\n if (error) {\n return <div>Error: {error.message}</div>;\n }\n\n if (isLoading) {\n return <EmptyStateSpinner />;\n }\n\n if (data?.length === 0 && filterInput) {\n return <EmptyStateNoMatchFound actionFn={filterClearAction} />;\n }\n\n if (data?.length === 0) {\n return <EmptyStateNoData />;\n }\n\n return (\n <Table>\n <PipelineRunTableColumns />\n <PipelineRunTableBody data={data} />\n </Table>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA+BO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,IAAA;AAAA,EACA,WAAA;AAAA,EACA,iBAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,KAA6B;AAC3B,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,4BAAQ,KAAA,EAAA,EAAI,QAAA,EAAA;AAAA,MAAA,SAAA;AAAA,MAAQ,KAAA,CAAM;AAAA,KAAA,EAAQ,CAAA;AAAA,EACpC;AAEA,EAAA,IAAI,SAAA,EAAW;AACb,IAAA,2BAAQ,iBAAA,EAAA,EAAkB,CAAA;AAAA,EAC5B;AAEA,EAAA,IAAI,IAAA,EAAM,MAAA,KAAW,CAAA,IAAK,WAAA,EAAa;AACrC,IAAA,uBAAO,GAAA,CAAC,sBAAA,EAAA,EAAuB,QAAA,EAAU,iBAAA,EAAmB,CAAA;AAAA,EAC9D;AAEA,EAAA,IAAI,IAAA,EAAM,WAAW,CAAA,EAAG;AACtB,IAAA,2BAAQ,gBAAA,EAAA,EAAiB,CAAA;AAAA,EAC3B;AAEA,EAAA,4BACG,KAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,uBAAA,EAAA,EAAwB,CAAA;AAAA,oBACzB,GAAA,CAAC,wBAAqB,IAAA,EAAY;AAAA,GAAA,EACpC,CAAA;AAEJ;;;;"}
|