@backstage-community/plugin-multi-source-security-viewer 0.2.3 → 0.3.2

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.
Files changed (78) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +1 -0
  3. package/dist/components/DialogLauncher/DialogLauncher.esm.js +17 -11
  4. package/dist/components/DialogLauncher/DialogLauncher.esm.js.map +1 -1
  5. package/dist/components/EmptyState/EmptyState.esm.js +12 -9
  6. package/dist/components/EmptyState/EmptyState.esm.js.map +1 -1
  7. package/dist/components/EmptyState/EmptyStateNoData.esm.js +2 -2
  8. package/dist/components/EmptyState/EmptyStateNoData.esm.js.map +1 -1
  9. package/dist/components/EmptyState/EmptyStateNoMatch.esm.js +2 -2
  10. package/dist/components/EmptyState/EmptyStateNoMatch.esm.js.map +1 -1
  11. package/dist/components/EmptyState/EmptyStateSpinner.esm.js +7 -6
  12. package/dist/components/EmptyState/EmptyStateSpinner.esm.js.map +1 -1
  13. package/dist/components/Icons/CriticalIcon.esm.js +5 -5
  14. package/dist/components/Icons/CriticalIcon.esm.js.map +1 -1
  15. package/dist/components/Icons/EqualsIcon.esm.js +5 -5
  16. package/dist/components/Icons/EqualsIcon.esm.js.map +1 -1
  17. package/dist/components/Icons/IconWithValue.esm.js +7 -2
  18. package/dist/components/Icons/IconWithValue.esm.js.map +1 -1
  19. package/dist/components/Icons/LogsIcon.esm.js +6 -8
  20. package/dist/components/Icons/LogsIcon.esm.js.map +1 -1
  21. package/dist/components/Icons/OutputIcon.esm.js +5 -5
  22. package/dist/components/Icons/OutputIcon.esm.js.map +1 -1
  23. package/dist/components/Icons/SBOMLink.esm.js +6 -8
  24. package/dist/components/Icons/SBOMLink.esm.js.map +1 -1
  25. package/dist/components/PermissionAlert/PermissionAlert.esm.js +5 -2
  26. package/dist/components/PermissionAlert/PermissionAlert.esm.js.map +1 -1
  27. package/dist/components/PipelineRunList/PipelineRunList.esm.js +34 -30
  28. package/dist/components/PipelineRunList/PipelineRunList.esm.js.map +1 -1
  29. package/dist/components/PipelineRunList/PipelineRunOutput.esm.js +5 -4
  30. package/dist/components/PipelineRunList/PipelineRunOutput.esm.js.map +1 -1
  31. package/dist/components/PipelineRunList/PipelineRunSBOMLink.esm.js +31 -29
  32. package/dist/components/PipelineRunList/PipelineRunSBOMLink.esm.js.map +1 -1
  33. package/dist/components/PipelineRunList/PipelineRunTable.esm.js +12 -6
  34. package/dist/components/PipelineRunList/PipelineRunTable.esm.js.map +1 -1
  35. package/dist/components/PipelineRunList/PipelineRunTableBody.esm.js +2 -2
  36. package/dist/components/PipelineRunList/PipelineRunTableBody.esm.js.map +1 -1
  37. package/dist/components/PipelineRunList/PipelineRunTableColumns.esm.js +4 -3
  38. package/dist/components/PipelineRunList/PipelineRunTableColumns.esm.js.map +1 -1
  39. package/dist/components/PipelineRunList/PipelineRunTablePagination.esm.js +98 -86
  40. package/dist/components/PipelineRunList/PipelineRunTablePagination.esm.js.map +1 -1
  41. package/dist/components/PipelineRunList/PipelineRunTableRow.esm.js +44 -34
  42. package/dist/components/PipelineRunList/PipelineRunTableRow.esm.js.map +1 -1
  43. package/dist/components/PipelineRunList/PipelineRunTableRowActions.esm.js +64 -56
  44. package/dist/components/PipelineRunList/PipelineRunTableRowActions.esm.js.map +1 -1
  45. package/dist/components/PipelineRunList/PipelineRunToolbar.esm.js +41 -34
  46. package/dist/components/PipelineRunList/PipelineRunToolbar.esm.js.map +1 -1
  47. package/dist/components/PipelineRunLogs/PipelineRunLogs.esm.js +21 -21
  48. package/dist/components/PipelineRunLogs/PipelineRunLogs.esm.js.map +1 -1
  49. package/dist/components/PipelineRunLogs/PipelineRunLogsDownloader.esm.js +38 -27
  50. package/dist/components/PipelineRunLogs/PipelineRunLogsDownloader.esm.js.map +1 -1
  51. package/dist/components/PipelineRunLogs/PipelineRunStepViewer.esm.js +7 -6
  52. package/dist/components/PipelineRunLogs/PipelineRunStepViewer.esm.js.map +1 -1
  53. package/dist/components/PipelineRunLogs/PipelineRunStepper.esm.js +7 -6
  54. package/dist/components/PipelineRunLogs/PipelineRunStepper.esm.js.map +1 -1
  55. package/dist/components/Router.esm.js +36 -32
  56. package/dist/components/Router.esm.js.map +1 -1
  57. package/dist/components/SecurityViewer/SecurityViewerGithubActionsDetail.esm.js +2 -2
  58. package/dist/components/SecurityViewer/SecurityViewerGithubActionsDetail.esm.js.map +1 -1
  59. package/dist/components/SecurityViewer/SecurityViewerJenkinsDetail.esm.js +2 -2
  60. package/dist/components/SecurityViewer/SecurityViewerJenkinsDetail.esm.js.map +1 -1
  61. package/dist/components/SecurityViewer/SecurityViewerMultiCIPipelines.esm.js +24 -16
  62. package/dist/components/SecurityViewer/SecurityViewerMultiCIPipelines.esm.js.map +1 -1
  63. package/dist/components/SecurityViewer/SecurityViewerPipelineDetailList.esm.js +6 -5
  64. package/dist/components/SecurityViewer/SecurityViewerPipelineDetailList.esm.js.map +1 -1
  65. package/dist/components/SecurityViewer/SecurityViewerPipelineSummaryList.esm.js +6 -5
  66. package/dist/components/SecurityViewer/SecurityViewerPipelineSummaryList.esm.js.map +1 -1
  67. package/dist/components/SecurityViewer/SecurityViewerTabbedMultiCISummaryList.esm.js +13 -9
  68. package/dist/components/SecurityViewer/SecurityViewerTabbedMultiCISummaryList.esm.js.map +1 -1
  69. package/dist/hooks/useDarkTheme.esm.js +2 -2
  70. package/dist/hooks/useDarkTheme.esm.js.map +1 -1
  71. package/dist/hooks/usePipelineDetail.esm.js +2 -2
  72. package/dist/hooks/usePipelineDetail.esm.js.map +1 -1
  73. package/dist/hooks/usePipelineSummary.esm.js +2 -2
  74. package/dist/hooks/usePipelineSummary.esm.js.map +1 -1
  75. package/dist/index.d.ts +2 -3
  76. package/dist/plugin.esm.js +1 -1
  77. package/dist/plugin.esm.js.map +1 -1
  78. package/package.json +14 -14
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { Fragment } from 'react';
2
3
  import { downloadLogFile } from '@janus-idp/shared-react';
3
4
  import { makeStyles, createStyles, Box, Link } from '@material-ui/core';
4
5
  import DownloadIcon from '@mui/icons-material/FileDownloadOutlined';
@@ -11,35 +12,45 @@ const useStyles = makeStyles(
11
12
  }
12
13
  })
13
14
  );
14
- const PipelineRunLogsDownloader = ({ pr, activeStep }) => {
15
+ const PipelineRunLogsDownloader = ({
16
+ pr,
17
+ activeStep
18
+ }) => {
15
19
  const classes = useStyles();
16
20
  const fullLogsFilename = `${pr.id || "pipelinerun"}-logs.txt`;
17
21
  const stepLogsFilename = `${pr.id || "pipelinerun"}-step-${pr?.steps[activeStep]?.name || activeStep}-logs.txt`;
18
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Box, { display: "flex", justifyContent: "flex-end", alignItems: "center" }, /* @__PURE__ */ React.createElement(
19
- Link,
20
- {
21
- component: "button",
22
- variant: "body2",
23
- disabled: !pr.logs,
24
- "data-testid": "download-logfile",
25
- download: true,
26
- onClick: () => downloadLogFile(pr.logs, fullLogsFilename)
27
- },
28
- /* @__PURE__ */ React.createElement(DownloadIcon, { className: classes.downloadLink }),
29
- " Download"
30
- ), /* @__PURE__ */ React.createElement(
31
- Link,
32
- {
33
- component: "button",
34
- variant: "body2",
35
- download: true,
36
- "data-testid": "download-logstep",
37
- disabled: !pr?.steps[activeStep]?.logs,
38
- onClick: () => downloadLogFile(pr.steps[activeStep].logs, stepLogsFilename)
39
- },
40
- /* @__PURE__ */ React.createElement(DownloadIcon, { className: classes.downloadLink }),
41
- " Download all tasks logs"
42
- )));
22
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Box, { display: "flex", justifyContent: "flex-end", alignItems: "center", children: [
23
+ /* @__PURE__ */ jsxs(
24
+ Link,
25
+ {
26
+ component: "button",
27
+ variant: "body2",
28
+ disabled: !pr.logs,
29
+ "data-testid": "download-logfile",
30
+ download: true,
31
+ onClick: () => downloadLogFile(pr.logs, fullLogsFilename),
32
+ children: [
33
+ /* @__PURE__ */ jsx(DownloadIcon, { className: classes.downloadLink }),
34
+ " Download"
35
+ ]
36
+ }
37
+ ),
38
+ /* @__PURE__ */ jsxs(
39
+ Link,
40
+ {
41
+ component: "button",
42
+ variant: "body2",
43
+ download: true,
44
+ "data-testid": "download-logstep",
45
+ disabled: !pr?.steps[activeStep]?.logs,
46
+ onClick: () => downloadLogFile(pr.steps[activeStep].logs, stepLogsFilename),
47
+ children: [
48
+ /* @__PURE__ */ jsx(DownloadIcon, { className: classes.downloadLink }),
49
+ " Download all tasks logs"
50
+ ]
51
+ }
52
+ )
53
+ ] }) });
43
54
  };
44
55
 
45
56
  export { PipelineRunLogsDownloader };
@@ -1 +1 @@
1
- {"version":3,"file":"PipelineRunLogsDownloader.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunLogsDownloader.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 React from 'react';\nimport { downloadLogFile } from '@janus-idp/shared-react';\nimport { Box, createStyles, makeStyles, Link, Theme } from '@material-ui/core';\nimport DownloadIcon from '@mui/icons-material/FileDownloadOutlined';\nimport { PipelineRunResult } from '../../models/pipelineRunResult';\n\ninterface PipelineRunLogsDowloaderProps {\n pr: PipelineRunResult;\n activeStep: number;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n downloadLink: {\n verticalAlign: '-0.180em',\n marginLeft: theme.spacing(2),\n },\n }),\n);\n\nexport const PipelineRunLogsDownloader: React.FC<\n PipelineRunLogsDowloaderProps\n> = ({ pr, activeStep }) => {\n const classes = useStyles();\n const fullLogsFilename = `${pr.id || 'pipelinerun'}-logs.txt`;\n const stepLogsFilename = `${pr.id || 'pipelinerun'}-step-${\n pr?.steps[activeStep]?.name || activeStep\n }-logs.txt`;\n\n return (\n <React.Fragment>\n <Box display=\"flex\" justifyContent=\"flex-end\" alignItems=\"center\">\n <Link\n component=\"button\"\n variant=\"body2\"\n disabled={!pr.logs}\n data-testid=\"download-logfile\"\n download\n onClick={() => downloadLogFile(pr.logs, fullLogsFilename)}\n >\n <DownloadIcon className={classes.downloadLink} /> Download\n </Link>\n <Link\n component=\"button\"\n variant=\"body2\"\n download\n data-testid=\"download-logstep\"\n disabled={!pr?.steps[activeStep]?.logs}\n onClick={() =>\n downloadLogFile(pr.steps[activeStep].logs, stepLogsFilename)\n }\n >\n <DownloadIcon className={classes.downloadLink} /> Download all tasks\n logs\n </Link>\n </Box>\n </React.Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;AA0BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAAW,CAAC,UAC5B,YAAa,CAAA;AAAA,IACX,YAAc,EAAA;AAAA,MACZ,aAAe,EAAA,UAAA;AAAA,MACf,UAAA,EAAY,KAAM,CAAA,OAAA,CAAQ,CAAC;AAAA;AAC7B,GACD;AACH,CAAA;AAEO,MAAM,yBAET,GAAA,CAAC,EAAE,EAAA,EAAI,YAAiB,KAAA;AAC1B,EAAA,MAAM,UAAU,SAAU,EAAA;AAC1B,EAAA,MAAM,gBAAmB,GAAA,CAAA,EAAG,EAAG,CAAA,EAAA,IAAM,aAAa,CAAA,SAAA,CAAA;AAClD,EAAM,MAAA,gBAAA,GAAmB,CAAG,EAAA,EAAA,CAAG,EAAM,IAAA,aAAa,CAChD,MAAA,EAAA,EAAA,EAAI,KAAM,CAAA,UAAU,CAAG,EAAA,IAAA,IAAQ,UACjC,CAAA,SAAA,CAAA;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,KAAM,CAAA,QAAA,EAAN,IACC,kBAAA,KAAA,CAAA,aAAA,CAAC,GAAI,EAAA,EAAA,OAAA,EAAQ,MAAO,EAAA,cAAA,EAAe,UAAW,EAAA,UAAA,EAAW,QACvD,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAU,EAAA,QAAA;AAAA,MACV,OAAQ,EAAA,OAAA;AAAA,MACR,QAAA,EAAU,CAAC,EAAG,CAAA,IAAA;AAAA,MACd,aAAY,EAAA,kBAAA;AAAA,MACZ,QAAQ,EAAA,IAAA;AAAA,MACR,OAAS,EAAA,MAAM,eAAgB,CAAA,EAAA,CAAG,MAAM,gBAAgB;AAAA,KAAA;AAAA,oBAEvD,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA,EAAa,SAAW,EAAA,OAAA,CAAQ,YAAc,EAAA,CAAA;AAAA,IAAE;AAAA,GAEnD,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAU,EAAA,QAAA;AAAA,MACV,OAAQ,EAAA,OAAA;AAAA,MACR,QAAQ,EAAA,IAAA;AAAA,MACR,aAAY,EAAA,kBAAA;AAAA,MACZ,QAAU,EAAA,CAAC,EAAI,EAAA,KAAA,CAAM,UAAU,CAAG,EAAA,IAAA;AAAA,MAClC,OAAA,EAAS,MACP,eAAgB,CAAA,EAAA,CAAG,MAAM,UAAU,CAAA,CAAE,MAAM,gBAAgB;AAAA,KAAA;AAAA,oBAG5D,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA,EAAa,SAAW,EAAA,OAAA,CAAQ,YAAc,EAAA,CAAA;AAAA,IAAE;AAAA,GAGrD,CACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"PipelineRunLogsDownloader.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunLogsDownloader.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 { downloadLogFile } from '@janus-idp/shared-react';\nimport { Box, createStyles, makeStyles, Link, Theme } from '@material-ui/core';\nimport DownloadIcon from '@mui/icons-material/FileDownloadOutlined';\nimport { PipelineRunResult } from '../../models/pipelineRunResult';\n\ninterface PipelineRunLogsDowloaderProps {\n pr: PipelineRunResult;\n activeStep: number;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n downloadLink: {\n verticalAlign: '-0.180em',\n marginLeft: theme.spacing(2),\n },\n }),\n);\n\nexport const PipelineRunLogsDownloader: FC<PipelineRunLogsDowloaderProps> = ({\n pr,\n activeStep,\n}) => {\n const classes = useStyles();\n const fullLogsFilename = `${pr.id || 'pipelinerun'}-logs.txt`;\n const stepLogsFilename = `${pr.id || 'pipelinerun'}-step-${\n pr?.steps[activeStep]?.name || activeStep\n }-logs.txt`;\n\n return (\n <Fragment>\n <Box display=\"flex\" justifyContent=\"flex-end\" alignItems=\"center\">\n <Link\n component=\"button\"\n variant=\"body2\"\n disabled={!pr.logs}\n data-testid=\"download-logfile\"\n download\n onClick={() => downloadLogFile(pr.logs, fullLogsFilename)}\n >\n <DownloadIcon className={classes.downloadLink} /> Download\n </Link>\n <Link\n component=\"button\"\n variant=\"body2\"\n download\n data-testid=\"download-logstep\"\n disabled={!pr?.steps[activeStep]?.logs}\n onClick={() =>\n downloadLogFile(pr.steps[activeStep].logs, stepLogsFilename)\n }\n >\n <DownloadIcon className={classes.downloadLink} /> Download all tasks\n logs\n </Link>\n </Box>\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;;AA4BA,MAAM,SAAY,GA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AAA,QACV,OAAQ,EAAA,OAAA;AAAA,QACR,QAAQ,EAAA,IAAA;AAAA,QACR,aAAY,EAAA,kBAAA;AAAA,QACZ,QAAU,EAAA,CAAC,EAAI,EAAA,KAAA,CAAM,UAAU,CAAG,EAAA,IAAA;AAAA,QAClC,OAAA,EAAS,MACP,eAAgB,CAAA,EAAA,CAAG,MAAM,UAAU,CAAA,CAAE,MAAM,gBAAgB,CAAA;AAAA,QAG7D,QAAA,EAAA;AAAA,0BAAC,GAAA,CAAA,YAAA,EAAA,EAAa,SAAW,EAAA,OAAA,CAAQ,YAAc,EAAA,CAAA;AAAA,UAAE;AAAA;AAAA;AAAA;AAEnD,GAAA,EACF,CACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1,18 +1,19 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { LogViewer } from '@backstage/core-components';
2
3
  import { Paper } from '@material-ui/core';
3
- import React from 'react';
4
+ import { Fragment } from 'react';
4
5
 
5
6
  const PipelineRunStepViewer = ({
6
7
  activeStepLog
7
8
  }) => {
8
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
9
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
9
10
  Paper,
10
11
  {
11
12
  "data-testid": "step-log",
12
- style: { height: "100%", width: "100%", minHeight: "30rem" }
13
- },
14
- /* @__PURE__ */ React.createElement(LogViewer, { text: activeStepLog })
15
- ));
13
+ style: { height: "100%", width: "100%", minHeight: "30rem" },
14
+ children: /* @__PURE__ */ jsx(LogViewer, { text: activeStepLog })
15
+ }
16
+ ) });
16
17
  };
17
18
 
18
19
  export { PipelineRunStepViewer };
@@ -1 +1 @@
1
- {"version":3,"file":"PipelineRunStepViewer.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunStepViewer.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 { LogViewer } from '@backstage/core-components';\nimport { Paper } from '@material-ui/core';\nimport React from 'react';\n\ninterface PipelineRunStepViewerProps {\n activeStepLog: string;\n}\n\nexport const PipelineRunStepViewer: React.FC<PipelineRunStepViewerProps> = ({\n activeStepLog,\n}) => {\n return (\n <React.Fragment>\n <Paper\n data-testid=\"step-log\"\n style={{ height: '100%', width: '100%', minHeight: '30rem' }}\n >\n <LogViewer text={activeStepLog} />\n </Paper>\n </React.Fragment>\n );\n};\n"],"names":[],"mappings":";;;;AAuBO,MAAM,wBAA8D,CAAC;AAAA,EAC1E;AACF,CAAM,KAAA;AACJ,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,KAAM,CAAA,QAAA,EAAN,IACC,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,aAAY,EAAA,UAAA;AAAA,MACZ,OAAO,EAAE,MAAA,EAAQ,QAAQ,KAAO,EAAA,MAAA,EAAQ,WAAW,OAAQ;AAAA,KAAA;AAAA,oBAE3D,KAAA,CAAA,aAAA,CAAC,SAAU,EAAA,EAAA,IAAA,EAAM,aAAe,EAAA;AAAA,GAEpC,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"PipelineRunStepViewer.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunStepViewer.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 { LogViewer } from '@backstage/core-components';\nimport { Paper } from '@material-ui/core';\nimport type { FC } from 'react';\nimport { Fragment } from 'react';\n\ninterface PipelineRunStepViewerProps {\n activeStepLog: string;\n}\n\nexport const PipelineRunStepViewer: FC<PipelineRunStepViewerProps> = ({\n activeStepLog,\n}) => {\n return (\n <Fragment>\n <Paper\n data-testid=\"step-log\"\n style={{ height: '100%', width: '100%', minHeight: '30rem' }}\n >\n <LogViewer text={activeStepLog} />\n </Paper>\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;AAwBO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AACF,CAAM,KAAA;AACJ,EAAA,2BACG,QACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,aAAY,EAAA,UAAA;AAAA,MACZ,OAAO,EAAE,MAAA,EAAQ,QAAQ,KAAO,EAAA,MAAA,EAAQ,WAAW,OAAQ,EAAA;AAAA,MAE3D,QAAA,kBAAA,GAAA,CAAC,SAAU,EAAA,EAAA,IAAA,EAAM,aAAe,EAAA;AAAA;AAAA,GAEpC,EAAA,CAAA;AAEJ;;;;"}
@@ -1,18 +1,19 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { Box, Stepper, Step, StepButton, StepLabel } from '@material-ui/core';
2
- import React from 'react';
3
+ import { Fragment } from 'react';
3
4
 
4
5
  const PipelineRunStepper = ({
5
6
  steps,
6
7
  activeStep,
7
8
  handleStepChange
8
9
  }) => {
9
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Box, { sx: { maxWidth: 400 } }, /* @__PURE__ */ React.createElement(Stepper, { activeStep, orientation: "vertical", nonLinear: true }, steps.map((step, index) => /* @__PURE__ */ React.createElement(Step, { key: index }, /* @__PURE__ */ React.createElement(StepButton, { onClick: () => handleStepChange(index) }, /* @__PURE__ */ React.createElement(
10
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Box, { sx: { maxWidth: 400 }, children: /* @__PURE__ */ jsx(Stepper, { activeStep, orientation: "vertical", nonLinear: true, children: steps.map((step, index) => /* @__PURE__ */ jsx(Step, { children: /* @__PURE__ */ jsx(StepButton, { onClick: () => handleStepChange(index), children: /* @__PURE__ */ jsx(
10
11
  StepLabel,
11
12
  {
12
- "data-testid": "step-label"
13
- },
14
- step.name
15
- )))))));
13
+ "data-testid": "step-label",
14
+ children: step.name
15
+ }
16
+ ) }) }, index)) }) }) });
16
17
  };
17
18
 
18
19
  export { PipelineRunStepper };
@@ -1 +1 @@
1
- {"version":3,"file":"PipelineRunStepper.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunStepper.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 { Box, Step, StepButton, StepLabel, Stepper } from '@material-ui/core';\nimport React from 'react';\nimport { PipelineRunLogStep } from '../../types/pipelinerun';\n\ninterface PipelineRunStepperProps {\n steps: PipelineRunLogStep[];\n activeStep: number;\n handleStepChange: (step: number) => void;\n}\n\nexport const PipelineRunStepper: React.FC<PipelineRunStepperProps> = ({\n steps,\n activeStep,\n handleStepChange,\n}) => {\n return (\n <React.Fragment>\n <Box sx={{ maxWidth: 400 }}>\n <Stepper activeStep={activeStep} orientation=\"vertical\" nonLinear>\n {steps.map((step, index) => (\n <Step key={index}>\n <StepButton onClick={() => handleStepChange(index)}>\n <StepLabel\n data-testid=\"step-label\"\n // TODO: Needs EYECATCHER implementation for reporting step status\n // StepIconProps={{\n // completed: index < activeStep,\n // error: index > activeStep,\n // active: index === activeStep,\n // }}\n >\n {step.name}\n </StepLabel>\n </StepButton>\n </Step>\n ))}\n </Stepper>\n </Box>\n </React.Fragment>\n );\n};\n"],"names":[],"mappings":";;;AAyBO,MAAM,qBAAwD,CAAC;AAAA,EACpE,KAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAM,KAAA;AACJ,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,KAAA,CAAM,QAAN,EAAA,IAAA,sCACE,GAAI,EAAA,EAAA,EAAA,EAAI,EAAE,QAAA,EAAU,GAAI,EAAA,EAAA,kBACtB,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAQ,YAAwB,WAAY,EAAA,UAAA,EAAW,SAAS,EAAA,IAAA,EAAA,EAC9D,KAAM,CAAA,GAAA,CAAI,CAAC,IAAA,EAAM,0BACf,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,GAAK,EAAA,KAAA,EAAA,sCACR,UAAW,EAAA,EAAA,OAAA,EAAS,MAAM,gBAAA,CAAiB,KAAK,CAC/C,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,aAAY,EAAA;AAAA,KAAA;AAAA,IAQX,IAAK,CAAA;AAAA,GAEV,CACF,CACD,CACH,CACF,CACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"PipelineRunStepper.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunStepper.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 { Box, Step, StepButton, StepLabel, Stepper } from '@material-ui/core';\nimport type { FC } from 'react';\nimport { Fragment } from 'react';\nimport { PipelineRunLogStep } from '../../types/pipelinerun';\n\ninterface PipelineRunStepperProps {\n steps: PipelineRunLogStep[];\n activeStep: number;\n handleStepChange: (step: number) => void;\n}\n\nexport const PipelineRunStepper: FC<PipelineRunStepperProps> = ({\n steps,\n activeStep,\n handleStepChange,\n}) => {\n return (\n <Fragment>\n <Box sx={{ maxWidth: 400 }}>\n <Stepper activeStep={activeStep} orientation=\"vertical\" nonLinear>\n {steps.map((step, index) => (\n <Step key={index}>\n <StepButton onClick={() => handleStepChange(index)}>\n <StepLabel\n data-testid=\"step-label\"\n // TODO: Needs EYECATCHER implementation for reporting step status\n // StepIconProps={{\n // completed: index < activeStep,\n // error: index > activeStep,\n // active: index === activeStep,\n // }}\n >\n {step.name}\n </StepLabel>\n </StepButton>\n </Step>\n ))}\n </Stepper>\n </Box>\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;AA0BO,MAAM,qBAAkD,CAAC;AAAA,EAC9D,KAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAM,KAAA;AACJ,EAAA,uBACG,GAAA,CAAA,QAAA,EAAA,EACC,QAAC,kBAAA,GAAA,CAAA,GAAA,EAAA,EAAI,EAAI,EAAA,EAAE,QAAU,EAAA,GAAA,EACnB,EAAA,QAAA,kBAAA,GAAA,CAAC,OAAQ,EAAA,EAAA,UAAA,EAAwB,WAAY,EAAA,UAAA,EAAW,SAAS,EAAA,IAAA,EAC9D,QAAM,EAAA,KAAA,CAAA,GAAA,CAAI,CAAC,IAAA,EAAM,KAChB,qBAAA,GAAA,CAAC,IACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAS,MAAM,gBAAA,CAAiB,KAAK,CAC/C,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,aAAY,EAAA,YAAA;AAAA,MAQX,QAAK,EAAA,IAAA,CAAA;AAAA;AAAA,KAEV,CAbS,EAAA,EAAA,KAcX,CACD,CAAA,EACH,GACF,CACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { Routes, Route } from 'react-router-dom';
3
3
  import { jenkinsJobRunRouteRef, githubActionsJobRouteRef } from '../routes.esm.js';
4
4
  import { useEntity } from '@backstage/plugin-catalog-react';
@@ -42,37 +42,41 @@ const Router = () => {
42
42
  }
43
43
  return acc;
44
44
  }, []);
45
- return /* @__PURE__ */ React.createElement(Routes, null, /* @__PURE__ */ React.createElement(
46
- Route,
47
- {
48
- path: "/",
49
- element: /* @__PURE__ */ React.createElement(SecurityViewerMultiCIPipelines, { multiCIConfig })
50
- }
51
- ), /* @__PURE__ */ React.createElement(
52
- Route,
53
- {
54
- path: `${jenkinsJobRunRouteRef.path}`,
55
- element: /* @__PURE__ */ React.createElement(
56
- SecurityViewerMultiCIPipelines,
57
- {
58
- multiCIConfig,
59
- isJenkinsDetail: true
60
- }
61
- )
62
- }
63
- ), /* @__PURE__ */ React.createElement(
64
- Route,
65
- {
66
- path: `${githubActionsJobRouteRef.path}`,
67
- element: /* @__PURE__ */ React.createElement(
68
- SecurityViewerMultiCIPipelines,
69
- {
70
- multiCIConfig,
71
- isGithubActionsDetail: true
72
- }
73
- )
74
- }
75
- ));
45
+ return /* @__PURE__ */ jsxs(Routes, { children: [
46
+ /* @__PURE__ */ jsx(
47
+ Route,
48
+ {
49
+ path: "/",
50
+ element: /* @__PURE__ */ jsx(SecurityViewerMultiCIPipelines, { multiCIConfig })
51
+ }
52
+ ),
53
+ /* @__PURE__ */ jsx(
54
+ Route,
55
+ {
56
+ path: `${jenkinsJobRunRouteRef.path}`,
57
+ element: /* @__PURE__ */ jsx(
58
+ SecurityViewerMultiCIPipelines,
59
+ {
60
+ multiCIConfig,
61
+ isJenkinsDetail: true
62
+ }
63
+ )
64
+ }
65
+ ),
66
+ /* @__PURE__ */ jsx(
67
+ Route,
68
+ {
69
+ path: `${githubActionsJobRouteRef.path}`,
70
+ element: /* @__PURE__ */ jsx(
71
+ SecurityViewerMultiCIPipelines,
72
+ {
73
+ multiCIConfig,
74
+ isGithubActionsDetail: true
75
+ }
76
+ )
77
+ }
78
+ )
79
+ ] });
76
80
  };
77
81
 
78
82
  export { Router };
@@ -1 +1 @@
1
- {"version":3,"file":"Router.esm.js","sources":["../../src/components/Router.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 React from 'react';\nimport { Route, Routes } from 'react-router-dom';\nimport { githubActionsJobRouteRef, jenkinsJobRunRouteRef } from '../routes';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { ApiRef } from '@backstage/core-plugin-api/index';\nimport { Entity } from '@backstage/catalog-model';\nimport { mssvJenkinsApiRef } from '../api/jenkins';\nimport { isJenkinsAvailable } from '@backstage-community/plugin-jenkins';\nimport { mssvGithubActionsApiRef } from '../api/github';\nimport { isGithubActionsAvailable } from '@backstage-community/plugin-github-actions';\nimport { mssvGitlabCIApiRef } from '../api/gitlab';\nimport { isGitlabAvailable } from '@immobiliarelabs/backstage-plugin-gitlab';\nimport { MultiCIConfig } from '../types/multiCI';\nimport { SecurityViewerMultiCIPipelines } from './SecurityViewer/SecurityViewerMultiCIPipelines';\nimport { mssvAzureDevopsApiRef } from '../api/azure';\nimport { isAzurePipelinesAvailable } from '@backstage-community/plugin-azure-devops';\n\ntype ApiItem = {\n title: string;\n apiRef: ApiRef<any>;\n availabilityCallback: (entity: Entity) => boolean;\n};\n\nconst AVAILABLE_APIS: ApiItem[] = [\n {\n title: 'Jenkins',\n apiRef: mssvJenkinsApiRef,\n availabilityCallback: isJenkinsAvailable,\n },\n {\n title: 'Github Actions',\n apiRef: mssvGithubActionsApiRef,\n availabilityCallback: isGithubActionsAvailable,\n },\n {\n title: 'Gitlab CI',\n apiRef: mssvGitlabCIApiRef,\n availabilityCallback: isGitlabAvailable,\n },\n {\n title: 'Azure Pipelines',\n apiRef: mssvAzureDevopsApiRef,\n availabilityCallback: isAzurePipelinesAvailable,\n },\n];\n\nexport const Router = () => {\n const { entity } = useEntity();\n const multiCIConfig = AVAILABLE_APIS.reduce((acc, api: ApiItem) => {\n if (api.availabilityCallback(entity)) {\n acc.push({ title: api.title, apiRef: api.apiRef });\n }\n return acc;\n }, [] as MultiCIConfig[]);\n\n return (\n <Routes>\n <Route\n path=\"/\"\n element={\n <SecurityViewerMultiCIPipelines multiCIConfig={multiCIConfig} />\n }\n />\n <Route\n path={`${jenkinsJobRunRouteRef.path}`}\n element={\n <SecurityViewerMultiCIPipelines\n multiCIConfig={multiCIConfig}\n isJenkinsDetail\n />\n }\n />\n <Route\n path={`${githubActionsJobRouteRef.path}`}\n element={\n <SecurityViewerMultiCIPipelines\n multiCIConfig={multiCIConfig}\n isGithubActionsDetail\n />\n }\n />\n </Routes>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAsCA,MAAM,cAA4B,GAAA;AAAA,EAChC;AAAA,IACE,KAAO,EAAA,SAAA;AAAA,IACP,MAAQ,EAAA,iBAAA;AAAA,IACR,oBAAsB,EAAA;AAAA,GACxB;AAAA,EACA;AAAA,IACE,KAAO,EAAA,gBAAA;AAAA,IACP,MAAQ,EAAA,uBAAA;AAAA,IACR,oBAAsB,EAAA;AAAA,GACxB;AAAA,EACA;AAAA,IACE,KAAO,EAAA,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aAAA;AAAA,QAAC,8BAAA;AAAA,QAAA;AAAA,UACC,aAAA;AAAA,UACA,qBAAqB,EAAA;AAAA;AAAA;AACvB;AAAA,GAGN,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Router.esm.js","sources":["../../src/components/Router.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 { Route, Routes } from 'react-router-dom';\nimport { githubActionsJobRouteRef, jenkinsJobRunRouteRef } from '../routes';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { ApiRef } from '@backstage/core-plugin-api';\nimport { Entity } from '@backstage/catalog-model';\nimport { mssvJenkinsApiRef } from '../api/jenkins';\nimport { isJenkinsAvailable } from '@backstage-community/plugin-jenkins';\nimport { mssvGithubActionsApiRef } from '../api/github';\nimport { isGithubActionsAvailable } from '@backstage-community/plugin-github-actions';\nimport { mssvGitlabCIApiRef } from '../api/gitlab';\nimport { isGitlabAvailable } from '@immobiliarelabs/backstage-plugin-gitlab';\nimport { MultiCIConfig } from '../types/multiCI';\nimport { SecurityViewerMultiCIPipelines } from './SecurityViewer/SecurityViewerMultiCIPipelines';\nimport { mssvAzureDevopsApiRef } from '../api/azure';\nimport { isAzurePipelinesAvailable } from '@backstage-community/plugin-azure-devops';\n\ntype ApiItem = {\n title: string;\n apiRef: ApiRef<any>;\n availabilityCallback: (entity: Entity) => boolean;\n};\n\nconst AVAILABLE_APIS: ApiItem[] = [\n {\n title: 'Jenkins',\n apiRef: mssvJenkinsApiRef,\n availabilityCallback: isJenkinsAvailable,\n },\n {\n title: 'Github Actions',\n apiRef: mssvGithubActionsApiRef,\n availabilityCallback: isGithubActionsAvailable,\n },\n {\n title: 'Gitlab CI',\n apiRef: mssvGitlabCIApiRef,\n availabilityCallback: isGitlabAvailable,\n },\n {\n title: 'Azure Pipelines',\n apiRef: mssvAzureDevopsApiRef,\n availabilityCallback: isAzurePipelinesAvailable,\n },\n];\n\nexport const Router = () => {\n const { entity } = useEntity();\n const multiCIConfig = AVAILABLE_APIS.reduce((acc, api: ApiItem) => {\n if (api.availabilityCallback(entity)) {\n acc.push({ title: api.title, apiRef: api.apiRef });\n }\n return acc;\n }, [] as MultiCIConfig[]);\n\n return (\n <Routes>\n <Route\n path=\"/\"\n element={\n <SecurityViewerMultiCIPipelines multiCIConfig={multiCIConfig} />\n }\n />\n <Route\n path={`${jenkinsJobRunRouteRef.path}`}\n element={\n <SecurityViewerMultiCIPipelines\n multiCIConfig={multiCIConfig}\n isJenkinsDetail\n />\n }\n />\n <Route\n path={`${githubActionsJobRouteRef.path}`}\n element={\n <SecurityViewerMultiCIPipelines\n multiCIConfig={multiCIConfig}\n isGithubActionsDetail\n />\n }\n />\n </Routes>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAqCA,MAAM,cAA4B,GAAA;AAAA,EAChC;AAAA,IACE,KAAO,EAAA,SAAA;AAAA,IACP,MAAQ,EAAA,iBAAA;AAAA,IACR,oBAAsB,EAAA;AAAA,GACxB;AAAA,EACA;AAAA,IACE,KAAO,EAAA,gBAAA;AAAA,IACP,MAAQ,EAAA,uBAAA;AAAA,IACR,oBAAsB,EAAA;AAAA,GACxB;AAAA,EACA;AAAA,IACE,KAAO,EAAA,WAAA;AAAA,IACP,MAAQ,EAAA,kBAAA;AAAA,IACR,oBAAsB,EAAA;AAAA,GACxB;AAAA,EACA;AAAA,IACE,KAAO,EAAA,iBAAA;AAAA,IACP,MAAQ,EAAA,qBAAA;AAAA,IACR,oBAAsB,EAAA;AAAA;AAE1B,CAAA;AAEO,MAAM,SAAS,MAAM;AAC1B,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAA,MAAM,aAAgB,GAAA,cAAA,CAAe,MAAO,CAAA,CAAC,KAAK,GAAiB,KAAA;AACjE,IAAI,IAAA,GAAA,CAAI,oBAAqB,CAAA,MAAM,CAAG,EAAA;AACpC,MAAI,GAAA,CAAA,IAAA,CAAK,EAAE,KAAO,EAAA,GAAA,CAAI,OAAO,MAAQ,EAAA,GAAA,CAAI,QAAQ,CAAA;AAAA;AAEnD,IAAO,OAAA,GAAA;AAAA,GACT,EAAG,EAAqB,CAAA;AAExB,EAAA,4BACG,MACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,IAAK,EAAA,GAAA;AAAA,QACL,OAAA,kBACG,GAAA,CAAA,8BAAA,EAAA,EAA+B,aAA8B,EAAA;AAAA;AAAA,KAElE;AAAA,oBACA,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAM,CAAG,EAAA,qBAAA,CAAsB,IAAI,CAAA,CAAA;AAAA,QACnC,OACE,kBAAA,GAAA;AAAA,UAAC,8BAAA;AAAA,UAAA;AAAA,YACC,aAAA;AAAA,YACA,eAAe,EAAA;AAAA;AAAA;AACjB;AAAA,KAEJ;AAAA,oBACA,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAM,CAAG,EAAA,wBAAA,CAAyB,IAAI,CAAA,CAAA;AAAA,QACtC,OACE,kBAAA,GAAA;AAAA,UAAC,8BAAA;AAAA,UAAA;AAAA,YACC,aAAA;AAAA,YACA,qBAAqB,EAAA;AAAA;AAAA;AACvB;AAAA;AAEJ,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1,12 +1,12 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { useRouteRefParams } from '@backstage/core-plugin-api';
2
- import React from 'react';
3
3
  import { githubActionsJobRouteRef } from '../../routes.esm.js';
4
4
  import { SecurityViewerPipelineDetailList } from './SecurityViewerPipelineDetailList.esm.js';
5
5
  import { mssvGithubActionsApiRef } from '../../api/github.esm.js';
6
6
 
7
7
  const SecurityViewerGithubActionsDetail = () => {
8
8
  const { id } = useRouteRefParams(githubActionsJobRouteRef);
9
- return /* @__PURE__ */ React.createElement(
9
+ return /* @__PURE__ */ jsx(
10
10
  SecurityViewerPipelineDetailList,
11
11
  {
12
12
  jobRef: `${id}`,
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityViewerGithubActionsDetail.esm.js","sources":["../../../src/components/SecurityViewer/SecurityViewerGithubActionsDetail.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 { useRouteRefParams } from '@backstage/core-plugin-api';\nimport React from 'react';\nimport { githubActionsJobRouteRef } from '../../routes';\nimport { SecurityViewerPipelineDetailList } from './SecurityViewerPipelineDetailList';\nimport { mssvGithubActionsApiRef } from '../../api/github';\n\nexport const SecurityViewerGithubActionsDetail = () => {\n const { id } = useRouteRefParams(githubActionsJobRouteRef);\n return (\n <SecurityViewerPipelineDetailList\n jobRef={`${id}`}\n apiRef={mssvGithubActionsApiRef}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAqBO,MAAM,oCAAoC,MAAM;AACrD,EAAA,MAAM,EAAE,EAAA,EAAO,GAAA,iBAAA,CAAkB,wBAAwB,CAAA;AACzD,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,gCAAA;AAAA,IAAA;AAAA,MACC,MAAA,EAAQ,GAAG,EAAE,CAAA,CAAA;AAAA,MACb,MAAQ,EAAA;AAAA;AAAA,GACV;AAEJ;;;;"}
1
+ {"version":3,"file":"SecurityViewerGithubActionsDetail.esm.js","sources":["../../../src/components/SecurityViewer/SecurityViewerGithubActionsDetail.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 { useRouteRefParams } from '@backstage/core-plugin-api';\nimport { githubActionsJobRouteRef } from '../../routes';\nimport { SecurityViewerPipelineDetailList } from './SecurityViewerPipelineDetailList';\nimport { mssvGithubActionsApiRef } from '../../api/github';\n\nexport const SecurityViewerGithubActionsDetail = () => {\n const { id } = useRouteRefParams(githubActionsJobRouteRef);\n return (\n <SecurityViewerPipelineDetailList\n jobRef={`${id}`}\n apiRef={mssvGithubActionsApiRef}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAoBO,MAAM,oCAAoC,MAAM;AACrD,EAAA,MAAM,EAAE,EAAA,EAAO,GAAA,iBAAA,CAAkB,wBAAwB,CAAA;AACzD,EACE,uBAAA,GAAA;AAAA,IAAC,gCAAA;AAAA,IAAA;AAAA,MACC,MAAA,EAAQ,GAAG,EAAE,CAAA,CAAA;AAAA,MACb,MAAQ,EAAA;AAAA;AAAA,GACV;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { SecurityViewerPipelineDetailList } from './SecurityViewerPipelineDetailList.esm.js';
3
3
  import { mssvJenkinsApiRef } from '../../api/jenkins.esm.js';
4
4
  import { jenkinsJobRunRouteRef } from '../../routes.esm.js';
@@ -6,7 +6,7 @@ import { useRouteRefParams } from '@backstage/core-plugin-api';
6
6
 
7
7
  const SecurityViewerJenkinsDetail = () => {
8
8
  const { jobFullName } = useRouteRefParams(jenkinsJobRunRouteRef);
9
- return /* @__PURE__ */ React.createElement(
9
+ return /* @__PURE__ */ jsx(
10
10
  SecurityViewerPipelineDetailList,
11
11
  {
12
12
  jobRef: `${jobFullName}`,
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityViewerJenkinsDetail.esm.js","sources":["../../../src/components/SecurityViewer/SecurityViewerJenkinsDetail.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 React from 'react';\nimport { SecurityViewerPipelineDetailList } from './SecurityViewerPipelineDetailList';\nimport { mssvJenkinsApiRef } from '../../api/jenkins';\nimport { jenkinsJobRunRouteRef } from '../../routes';\nimport { useRouteRefParams } from '@backstage/core-plugin-api';\n\nexport const SecurityViewerJenkinsDetail = () => {\n const { jobFullName } = useRouteRefParams(jenkinsJobRunRouteRef);\n return (\n <SecurityViewerPipelineDetailList\n jobRef={`${jobFullName}`}\n apiRef={mssvJenkinsApiRef}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAqBO,MAAM,8BAA8B,MAAM;AAC/C,EAAA,MAAM,EAAE,WAAA,EAAgB,GAAA,iBAAA,CAAkB,qBAAqB,CAAA;AAC/D,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,gCAAA;AAAA,IAAA;AAAA,MACC,MAAA,EAAQ,GAAG,WAAW,CAAA,CAAA;AAAA,MACtB,MAAQ,EAAA;AAAA;AAAA,GACV;AAEJ;;;;"}
1
+ {"version":3,"file":"SecurityViewerJenkinsDetail.esm.js","sources":["../../../src/components/SecurityViewer/SecurityViewerJenkinsDetail.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 { SecurityViewerPipelineDetailList } from './SecurityViewerPipelineDetailList';\nimport { mssvJenkinsApiRef } from '../../api/jenkins';\nimport { jenkinsJobRunRouteRef } from '../../routes';\nimport { useRouteRefParams } from '@backstage/core-plugin-api';\n\nexport const SecurityViewerJenkinsDetail = () => {\n const { jobFullName } = useRouteRefParams(jenkinsJobRunRouteRef);\n return (\n <SecurityViewerPipelineDetailList\n jobRef={`${jobFullName}`}\n apiRef={mssvJenkinsApiRef}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAoBO,MAAM,8BAA8B,MAAM;AAC/C,EAAA,MAAM,EAAE,WAAA,EAAgB,GAAA,iBAAA,CAAkB,qBAAqB,CAAA;AAC/D,EACE,uBAAA,GAAA;AAAA,IAAC,gCAAA;AAAA,IAAA;AAAA,MACC,MAAA,EAAQ,GAAG,WAAW,CAAA,CAAA;AAAA,MACtB,MAAQ,EAAA;AAAA;AAAA,GACV;AAEJ;;;;"}
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { Fragment } from 'react';
2
3
  import { ErrorBoundary } from '@backstage/core-components';
3
4
  import { makeStyles, Box, Paper, Typography } from '@material-ui/core';
4
5
  import Grid from '@mui/material/Grid';
@@ -30,22 +31,29 @@ const SecurityViewerMultiCIPipelines = ({ multiCIConfig, isJenkinsDetail, isGith
30
31
  const isSummary = !isJenkinsDetail && !isGithubActionsDetail;
31
32
  const { allowed: hasViewPermission, loading: viewPermissionLoading } = useMssvViewPermission();
32
33
  if (!hasViewPermission) {
33
- return viewPermissionLoading ? /* @__PURE__ */ React.createElement(EmptyStateSpinner, null) : /* @__PURE__ */ React.createElement(PermissionAlert, null);
34
+ return viewPermissionLoading ? /* @__PURE__ */ jsx(EmptyStateSpinner, {}) : /* @__PURE__ */ jsx(PermissionAlert, {});
34
35
  }
35
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Box, { className: classes.root }, /* @__PURE__ */ React.createElement(Paper, null, /* @__PURE__ */ React.createElement(Grid, { container: true }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(Box, { className: classes.titleBox }, /* @__PURE__ */ React.createElement(
36
- Typography,
37
- {
38
- variant: "h4",
39
- component: "h4",
40
- className: classes.title
41
- },
42
- "Security Information"
43
- ))), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(ErrorBoundary, null, /* @__PURE__ */ React.createElement(QueryClientProvider, { client: queryClient }, isJenkinsDetail && /* @__PURE__ */ React.createElement(SecurityViewerJenkinsDetail, null), isGithubActionsDetail && /* @__PURE__ */ React.createElement(SecurityViewerGithubActionsDetail, null), isSummary && /* @__PURE__ */ React.createElement(
44
- SecurityViewerTabbedMultiCISummaryList,
45
- {
46
- multiCIConfig
47
- }
48
- ))))))));
36
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Box, { className: classes.root, children: /* @__PURE__ */ jsx(Paper, { children: /* @__PURE__ */ jsxs(Grid, { container: true, children: [
37
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(Box, { className: classes.titleBox, children: /* @__PURE__ */ jsx(
38
+ Typography,
39
+ {
40
+ variant: "h4",
41
+ component: "h4",
42
+ className: classes.title,
43
+ children: "Security Information"
44
+ }
45
+ ) }) }),
46
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxs(QueryClientProvider, { client: queryClient, children: [
47
+ isJenkinsDetail && /* @__PURE__ */ jsx(SecurityViewerJenkinsDetail, {}),
48
+ isGithubActionsDetail && /* @__PURE__ */ jsx(SecurityViewerGithubActionsDetail, {}),
49
+ isSummary && /* @__PURE__ */ jsx(
50
+ SecurityViewerTabbedMultiCISummaryList,
51
+ {
52
+ multiCIConfig
53
+ }
54
+ )
55
+ ] }) }) })
56
+ ] }) }) }) });
49
57
  };
50
58
 
51
59
  export { SecurityViewerMultiCIPipelines };
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityViewerMultiCIPipelines.esm.js","sources":["../../../src/components/SecurityViewer/SecurityViewerMultiCIPipelines.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 React from 'react';\nimport { ErrorBoundary } from '@backstage/core-components';\nimport { Box, Paper, Typography, makeStyles, Theme } from '@material-ui/core';\nimport Grid from '@mui/material/Grid';\nimport { useDarkTheme } from '../../hooks/useDarkTheme';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { SecurityViewerTabbedMultiCISummaryList } from './SecurityViewerTabbedMultiCISummaryList';\nimport { MultiCIConfig } from '../../types/multiCI';\nimport { SecurityViewerJenkinsDetail } from './SecurityViewerJenkinsDetail';\nimport { SecurityViewerGithubActionsDetail } from './SecurityViewerGithubActionsDetail';\nimport { useMssvViewPermission } from '../../hooks/useMssvViewPermisson';\nimport PermissionAlert from '../PermissionAlert/PermissionAlert';\nimport { EmptyStateSpinner } from '../EmptyState/EmptyStateSpinner';\n\nconst useStyles = makeStyles((theme: Theme) => ({\n root: {\n alignItems: 'start',\n },\n title: {\n margin: theme.spacing(0, 0, 2, 2),\n fontWeight: 700,\n },\n titleBox: {\n marginTop: theme.spacing(2),\n },\n}));\n\ntype SecurityViewerMultiCIPipelinesProps = {\n multiCIConfig: MultiCIConfig[];\n isJenkinsDetail?: boolean;\n isGithubActionsDetail?: boolean;\n};\n\nexport const SecurityViewerMultiCIPipelines: React.FC<\n SecurityViewerMultiCIPipelinesProps\n> = ({ multiCIConfig, isJenkinsDetail, isGithubActionsDetail }) => {\n useDarkTheme();\n const classes = useStyles();\n const queryClient = new QueryClient();\n const isSummary = !isJenkinsDetail && !isGithubActionsDetail;\n const { allowed: hasViewPermission, loading: viewPermissionLoading } =\n useMssvViewPermission();\n\n if (!hasViewPermission) {\n return viewPermissionLoading ? <EmptyStateSpinner /> : <PermissionAlert />;\n }\n\n return (\n <React.Fragment>\n <Box className={classes.root}>\n <Paper>\n <Grid container>\n <Grid item xs={12}>\n <Box className={classes.titleBox}>\n <Typography\n variant=\"h4\"\n component=\"h4\"\n className={classes.title}\n >\n Security Information\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={12}>\n <ErrorBoundary>\n <QueryClientProvider client={queryClient}>\n {isJenkinsDetail && <SecurityViewerJenkinsDetail />}\n {isGithubActionsDetail && (\n <SecurityViewerGithubActionsDetail />\n )}\n {isSummary && (\n <SecurityViewerTabbedMultiCISummaryList\n multiCIConfig={multiCIConfig}\n />\n )}\n </QueryClientProvider>\n </ErrorBoundary>\n </Grid>\n </Grid>\n </Paper>\n </Box>\n </React.Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AA6BA,MAAM,SAAA,GAAY,UAAW,CAAA,CAAC,KAAkB,MAAA;AAAA,EAC9C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,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,OAAQ,EAAA,IAAA;AAAA,MACR,SAAU,EAAA,IAAA;AAAA,MACV,WAAW,OAAQ,CAAA;AAAA,KAAA;AAAA,IACpB;AAAA,GAGH,CACF,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAC,EAAI,EAAA,EAAA,EAAA,kBACZ,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAA,sCACE,mBAAoB,EAAA,EAAA,MAAA,EAAQ,WAC1B,EAAA,EAAA,eAAA,oBAAoB,KAAA,CAAA,aAAA,CAAA,2BAAA,EAAA,IAA4B,GAChD,qBACC,oBAAA,KAAA,CAAA,aAAA,CAAC,iCAAkC,EAAA,IAAA,CAAA,EAEpC,SACC,oBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,sCAAA;AAAA,IAAA;AAAA,MACC;AAAA;AAAA,GAGN,CACF,CACF,CACF,CACF,CACF,CACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"SecurityViewerMultiCIPipelines.esm.js","sources":["../../../src/components/SecurityViewer/SecurityViewerMultiCIPipelines.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 { ErrorBoundary } from '@backstage/core-components';\nimport { Box, Paper, Typography, makeStyles, Theme } from '@material-ui/core';\nimport Grid from '@mui/material/Grid';\nimport { useDarkTheme } from '../../hooks/useDarkTheme';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { SecurityViewerTabbedMultiCISummaryList } from './SecurityViewerTabbedMultiCISummaryList';\nimport { MultiCIConfig } from '../../types/multiCI';\nimport { SecurityViewerJenkinsDetail } from './SecurityViewerJenkinsDetail';\nimport { SecurityViewerGithubActionsDetail } from './SecurityViewerGithubActionsDetail';\nimport { useMssvViewPermission } from '../../hooks/useMssvViewPermisson';\nimport PermissionAlert from '../PermissionAlert/PermissionAlert';\nimport { EmptyStateSpinner } from '../EmptyState/EmptyStateSpinner';\n\nconst useStyles = makeStyles((theme: Theme) => ({\n root: {\n alignItems: 'start',\n },\n title: {\n margin: theme.spacing(0, 0, 2, 2),\n fontWeight: 700,\n },\n titleBox: {\n marginTop: theme.spacing(2),\n },\n}));\n\ntype SecurityViewerMultiCIPipelinesProps = {\n multiCIConfig: MultiCIConfig[];\n isJenkinsDetail?: boolean;\n isGithubActionsDetail?: boolean;\n};\n\nexport const SecurityViewerMultiCIPipelines: FC<\n SecurityViewerMultiCIPipelinesProps\n> = ({ multiCIConfig, isJenkinsDetail, isGithubActionsDetail }) => {\n useDarkTheme();\n const classes = useStyles();\n const queryClient = new QueryClient();\n const isSummary = !isJenkinsDetail && !isGithubActionsDetail;\n const { allowed: hasViewPermission, loading: viewPermissionLoading } =\n useMssvViewPermission();\n\n if (!hasViewPermission) {\n return viewPermissionLoading ? <EmptyStateSpinner /> : <PermissionAlert />;\n }\n\n return (\n <Fragment>\n <Box className={classes.root}>\n <Paper>\n <Grid container>\n <Grid item xs={12}>\n <Box className={classes.titleBox}>\n <Typography\n variant=\"h4\"\n component=\"h4\"\n className={classes.title}\n >\n Security Information\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={12}>\n <ErrorBoundary>\n <QueryClientProvider client={queryClient}>\n {isJenkinsDetail && <SecurityViewerJenkinsDetail />}\n {isGithubActionsDetail && (\n <SecurityViewerGithubActionsDetail />\n )}\n {isSummary && (\n <SecurityViewerTabbedMultiCISummaryList\n multiCIConfig={multi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oBAAC,GAAA,CAAA,IAAA,EAAA,EAAK,MAAI,IAAC,EAAA,EAAA,EAAI,IACb,QAAC,kBAAA,GAAA,CAAA,GAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,QACtB,EAAA,QAAA,kBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,OAAQ,EAAA,IAAA;AAAA,QACR,SAAU,EAAA,IAAA;AAAA,QACV,WAAW,OAAQ,CAAA,KAAA;AAAA,QACpB,QAAA,EAAA;AAAA;AAAA,OAGH,CACF,EAAA,CAAA;AAAA,oBACA,GAAA,CAAC,IAAK,EAAA,EAAA,IAAA,EAAI,IAAC,EAAA,EAAA,EAAI,EACb,EAAA,QAAA,kBAAA,GAAA,CAAC,aACC,EAAA,EAAA,QAAA,kBAAA,IAAA,CAAC,mBAAoB,EAAA,EAAA,MAAA,EAAQ,WAC1B,EAAA,QAAA,EAAA;AAAA,MAAA,eAAA,wBAAoB,2BAA4B,EAAA,EAAA,CAAA;AAAA,MAChD,qBAAA,wBACE,iCAAkC,EAAA,EAAA,CAAA;AAAA,MAEpC,SACC,oBAAA,GAAA;AAAA,QAAC,sCAAA;AAAA,QAAA;AAAA,UACC;AAAA;AAAA;AACF,KAAA,EAEJ,GACF,CACF,EAAA;AAAA,GACF,EAAA,CAAA,EACF,GACF,CACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1,10 +1,11 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useState, Fragment } from 'react';
2
3
  import { PipelineRunList } from '../PipelineRunList/PipelineRunList.esm.js';
3
4
  import { usePipelineDetail } from '../../hooks/usePipelineDetail.esm.js';
4
5
 
5
6
  const SecurityViewerPipelineDetailList = ({ jobRef, apiRef }) => {
6
- const [page, setPage] = React.useState(0);
7
- const [pageSize, setPageSize] = React.useState(5);
7
+ const [page, setPage] = useState(0);
8
+ const [pageSize, setPageSize] = useState(5);
8
9
  const [pipelineDetailRuns, totalCount, loading, error] = usePipelineDetail(
9
10
  apiRef,
10
11
  jobRef,
@@ -15,7 +16,7 @@ const SecurityViewerPipelineDetailList = ({ jobRef, apiRef }) => {
15
16
  setPage(newPage);
16
17
  setPageSize(newPageSize);
17
18
  };
18
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
19
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
19
20
  PipelineRunList,
20
21
  {
21
22
  data: pipelineDetailRuns,
@@ -24,7 +25,7 @@ const SecurityViewerPipelineDetailList = ({ jobRef, apiRef }) => {
24
25
  error,
25
26
  onUpdatePagination
26
27
  }
27
- ));
28
+ ) });
28
29
  };
29
30
 
30
31
  export { SecurityViewerPipelineDetailList };
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityViewerPipelineDetailList.esm.js","sources":["../../../src/components/SecurityViewer/SecurityViewerPipelineDetailList.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 React from 'react';\nimport { PipelineRunList } from '../PipelineRunList/PipelineRunList';\nimport { usePipelineDetail } from '../../hooks/usePipelineDetail';\nimport { ApiRef } from '@backstage/core-plugin-api';\nimport { MssvApi } from '../../api/mssv';\n\ntype SecurityViewerPipelineDetailListProps = {\n jobRef: string;\n apiRef: ApiRef<MssvApi>;\n};\n\nexport const SecurityViewerPipelineDetailList: React.FC<\n SecurityViewerPipelineDetailListProps\n> = ({ jobRef, apiRef }) => {\n const [page, setPage] = React.useState(0);\n const [pageSize, setPageSize] = React.useState(5);\n const [pipelineDetailRuns, totalCount, loading, error] = usePipelineDetail(\n apiRef,\n jobRef,\n page,\n pageSize,\n );\n\n const onUpdatePagination = (newPage: number, newPageSize: number) => {\n setPage(newPage);\n setPageSize(newPageSize);\n };\n\n return (\n <React.Fragment>\n <PipelineRunList\n data={pipelineDetailRuns}\n totalCount={totalCount}\n loading={loading}\n error={error}\n onUpdatePagination={onUpdatePagination}\n />\n </React.Fragment>\n );\n};\n"],"names":[],"mappings":";;;;AA0BO,MAAM,gCAET,GAAA,CAAC,EAAE,MAAA,EAAQ,QAAa,KAAA;AAC1B,EAAA,MAAM,CAAC,IAAM,EAAA,OAAO,CAAI,GAAA,KAAA,CAAM,SAAS,CAAC,CAAA;AACxC,EAAA,MAAM,CAAC,QAAU,EAAA,WAAW,CAAI,GAAA,KAAA,CAAM,SAAS,CAAC,CAAA;AAChD,EAAA,MAAM,CAAC,kBAAA,EAAoB,UAAY,EAAA,OAAA,EAAS,KAAK,CAAI,GAAA,iBAAA;AAAA,IACvD,MAAA;AAAA,IACA,MAAA;AAAA,IACA,IAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAM,MAAA,kBAAA,GAAqB,CAAC,OAAA,EAAiB,WAAwB,KAAA;AACnE,IAAA,OAAA,CAAQ,OAAO,CAAA;AACf,IAAA,WAAA,CAAY,WAAW,CAAA;AAAA,GACzB;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,KAAM,CAAA,QAAA,EAAN,IACC,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,eAAA;AAAA,IAAA;AAAA,MACC,IAAM,EAAA,kBAAA;AAAA,MACN,UAAA;AAAA,MACA,OAAA;AAAA,MACA,KAAA;AAAA,MACA;AAAA;AAAA,GAEJ,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"SecurityViewerPipelineDetailList.esm.js","sources":["../../../src/components/SecurityViewer/SecurityViewerPipelineDetailList.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, Fragment } from 'react';\nimport { PipelineRunList } from '../PipelineRunList/PipelineRunList';\nimport { usePipelineDetail } from '../../hooks/usePipelineDetail';\nimport { ApiRef } from '@backstage/core-plugin-api';\nimport { MssvApi } from '../../api/mssv';\n\ntype SecurityViewerPipelineDetailListProps = {\n jobRef: string;\n apiRef: ApiRef<MssvApi>;\n};\n\nexport const SecurityViewerPipelineDetailList: FC<\n SecurityViewerPipelineDetailListProps\n> = ({ jobRef, apiRef }) => {\n const [page, setPage] = useState(0);\n const [pageSize, setPageSize] = useState(5);\n const [pipelineDetailRuns, totalCount, loading, error] = usePipelineDetail(\n apiRef,\n jobRef,\n page,\n pageSize,\n );\n\n const onUpdatePagination = (newPage: number, newPageSize: number) => {\n setPage(newPage);\n setPageSize(newPageSize);\n };\n\n return (\n <Fragment>\n <PipelineRunList\n data={pipelineDetailRuns}\n totalCount={totalCount}\n loading={loading}\n error={error}\n onUpdatePagination={onUpdatePagination}\n />\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;AA4BO,MAAM,gCAET,GAAA,CAAC,EAAE,MAAA,EAAQ,QAAa,KAAA;AAC1B,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,CAAC,CAAA;AAClC,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAAS,CAAC,CAAA;AAC1C,EAAA,MAAM,CAAC,kBAAA,EAAoB,UAAY,EAAA,OAAA,EAAS,KAAK,CAAI,GAAA,iBAAA;AAAA,IACvD,MAAA;AAAA,IACA,MAAA;AAAA,IACA,IAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAM,MAAA,kBAAA,GAAqB,CAAC,OAAA,EAAiB,WAAwB,KAAA;AACnE,IAAA,OAAA,CAAQ,OAAO,CAAA;AACf,IAAA,WAAA,CAAY,WAAW,CAAA;AAAA,GACzB;AAEA,EAAA,2BACG,QACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,eAAA;AAAA,IAAA;AAAA,MACC,IAAM,EAAA,kBAAA;AAAA,MACN,UAAA;AAAA,MACA,OAAA;AAAA,MACA,KAAA;AAAA,MACA;AAAA;AAAA,GAEJ,EAAA,CAAA;AAEJ;;;;"}
@@ -1,12 +1,13 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useState, Fragment } from 'react';
2
3
  import { PipelineRunList } from '../PipelineRunList/PipelineRunList.esm.js';
3
4
  import { usePipelineSummary } from '../../hooks/usePipelineSummary.esm.js';
4
5
 
5
6
  const SecurityViewerPipelineSummary = ({
6
7
  apiRef
7
8
  }) => {
8
- const [page, setPage] = React.useState(0);
9
- const [pageSize, setPageSize] = React.useState(5);
9
+ const [page, setPage] = useState(0);
10
+ const [pageSize, setPageSize] = useState(5);
10
11
  const [pipelineSummary, totalCount, loading, error] = usePipelineSummary(
11
12
  apiRef,
12
13
  page,
@@ -16,7 +17,7 @@ const SecurityViewerPipelineSummary = ({
16
17
  setPage(newPage);
17
18
  setPageSize(newPageSize);
18
19
  };
19
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
20
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
20
21
  PipelineRunList,
21
22
  {
22
23
  data: pipelineSummary,
@@ -25,7 +26,7 @@ const SecurityViewerPipelineSummary = ({
25
26
  error,
26
27
  onUpdatePagination
27
28
  }
28
- ));
29
+ ) });
29
30
  };
30
31
 
31
32
  export { SecurityViewerPipelineSummary };
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityViewerPipelineSummaryList.esm.js","sources":["../../../src/components/SecurityViewer/SecurityViewerPipelineSummaryList.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 React from 'react';\nimport { ApiRef } from '@backstage/core-plugin-api';\nimport { PipelineRunList } from '../PipelineRunList/PipelineRunList';\nimport { usePipelineSummary } from '../../hooks/usePipelineSummary';\nimport { MssvApi } from '../../api/mssv';\n\nexport const SecurityViewerPipelineSummary = ({\n apiRef,\n}: {\n apiRef: ApiRef<MssvApi>;\n}) => {\n const [page, setPage] = React.useState<number>(0);\n const [pageSize, setPageSize] = React.useState<number>(5);\n const [pipelineSummary, totalCount, loading, error] = usePipelineSummary(\n apiRef,\n page,\n pageSize,\n );\n const onUpdatePagination = (newPage: number, newPageSize: number) => {\n setPage(newPage);\n setPageSize(newPageSize);\n };\n\n return (\n <React.Fragment>\n <PipelineRunList\n data={pipelineSummary}\n totalCount={totalCount}\n loading={loading}\n error={error}\n onUpdatePagination={onUpdatePagination}\n />\n </React.Fragment>\n );\n};\n"],"names":[],"mappings":";;;;AAqBO,MAAM,gCAAgC,CAAC;AAAA,EAC5C;AACF,CAEM,KAAA;AACJ,EAAA,MAAM,CAAC,IAAM,EAAA,OAAO,CAAI,GAAA,KAAA,CAAM,SAAiB,CAAC,CAAA;AAChD,EAAA,MAAM,CAAC,QAAU,EAAA,WAAW,CAAI,GAAA,KAAA,CAAM,SAAiB,CAAC,CAAA;AACxD,EAAA,MAAM,CAAC,eAAA,EAAiB,UAAY,EAAA,OAAA,EAAS,KAAK,CAAI,GAAA,kBAAA;AAAA,IACpD,MAAA;AAAA,IACA,IAAA;AAAA,IACA;AAAA,GACF;AACA,EAAM,MAAA,kBAAA,GAAqB,CAAC,OAAA,EAAiB,WAAwB,KAAA;AACnE,IAAA,OAAA,CAAQ,OAAO,CAAA;AACf,IAAA,WAAA,CAAY,WAAW,CAAA;AAAA,GACzB;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,KAAM,CAAA,QAAA,EAAN,IACC,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,eAAA;AAAA,IAAA;AAAA,MACC,IAAM,EAAA,eAAA;AAAA,MACN,UAAA;AAAA,MACA,OAAA;AAAA,MACA,KAAA;AAAA,MACA;AAAA;AAAA,GAEJ,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"SecurityViewerPipelineSummaryList.esm.js","sources":["../../../src/components/SecurityViewer/SecurityViewerPipelineSummaryList.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 { useState, Fragment } from 'react';\nimport { ApiRef } from '@backstage/core-plugin-api';\nimport { PipelineRunList } from '../PipelineRunList/PipelineRunList';\nimport { usePipelineSummary } from '../../hooks/usePipelineSummary';\nimport { MssvApi } from '../../api/mssv';\n\nexport const SecurityViewerPipelineSummary = ({\n apiRef,\n}: {\n apiRef: ApiRef<MssvApi>;\n}) => {\n const [page, setPage] = useState<number>(0);\n const [pageSize, setPageSize] = useState<number>(5);\n const [pipelineSummary, totalCount, loading, error] = usePipelineSummary(\n apiRef,\n page,\n pageSize,\n );\n const onUpdatePagination = (newPage: number, newPageSize: number) => {\n setPage(newPage);\n setPageSize(newPageSize);\n };\n\n return (\n <Fragment>\n <PipelineRunList\n data={pipelineSummary}\n totalCount={totalCount}\n loading={loading}\n error={error}\n onUpdatePagination={onUpdatePagination}\n />\n </Fragment>\n );\n};\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,gCAAgC,CAAC;AAAA,EAC5C;AACF,CAEM,KAAA;AACJ,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAiB,CAAC,CAAA;AAC1C,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAAiB,CAAC,CAAA;AAClD,EAAA,MAAM,CAAC,eAAA,EAAiB,UAAY,EAAA,OAAA,EAAS,KAAK,CAAI,GAAA,kBAAA;AAAA,IACpD,MAAA;AAAA,IACA,IAAA;AAAA,IACA;AAAA,GACF;AACA,EAAM,MAAA,kBAAA,GAAqB,CAAC,OAAA,EAAiB,WAAwB,KAAA;AACnE,IAAA,OAAA,CAAQ,OAAO,CAAA;AACf,IAAA,WAAA,CAAY,WAAW,CAAA;AAAA,GACzB;AAEA,EAAA,2BACG,QACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,eAAA;AAAA,IAAA;AAAA,MACC,IAAM,EAAA,eAAA;AAAA,MACN,UAAA;AAAA,MACA,OAAA;AAAA,MACA,KAAA;AAAA,MACA;AAAA;AAAA,GAEJ,EAAA,CAAA;AAEJ;;;;"}
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { useState, Fragment } from 'react';
2
3
  import { makeStyles, Box, Tabs, Tab } from '@material-ui/core';
3
4
  import { SecurityViewerPipelineSummary } from './SecurityViewerPipelineSummaryList.esm.js';
4
5
 
@@ -9,17 +10,20 @@ const useStyles = makeStyles((theme) => ({
9
10
  }));
10
11
  const SecurityViewerTabbedMultiCISummaryList = ({ multiCIConfig }) => {
11
12
  const classes = useStyles();
12
- const [tabValue, setTabValue] = React.useState(0);
13
+ const [tabValue, setTabValue] = useState(0);
13
14
  const handleChange = (_event, newValue) => {
14
15
  setTabValue(newValue);
15
16
  };
16
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Tabs, { value: tabValue, onChange: handleChange, "aria-label": "Multi CI" }, (multiCIConfig ?? []).map((config, index) => /* @__PURE__ */ React.createElement(Tab, { label: config.title, key: index, "aria-label": config.title }))), /* @__PURE__ */ React.createElement(Box, { className: classes.tabbedContent }, (multiCIConfig ?? []).map((_, index) => /* @__PURE__ */ React.createElement(Box, { key: `security-viewer-box-${index}` }, tabValue === index && /* @__PURE__ */ React.createElement(
17
- SecurityViewerPipelineSummary,
18
- {
19
- key: `security-viewer-summary-${index}`,
20
- apiRef: multiCIConfig[index].apiRef
21
- }
22
- ))))));
17
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Box, { children: [
18
+ /* @__PURE__ */ jsx(Tabs, { value: tabValue, onChange: handleChange, "aria-label": "Multi CI", children: (multiCIConfig ?? []).map((config, index) => /* @__PURE__ */ jsx(Tab, { label: config.title, "aria-label": config.title }, index)) }),
19
+ /* @__PURE__ */ jsx(Box, { className: classes.tabbedContent, children: (multiCIConfig ?? []).map((_, index) => /* @__PURE__ */ jsx(Box, { children: tabValue === index && /* @__PURE__ */ jsx(
20
+ SecurityViewerPipelineSummary,
21
+ {
22
+ apiRef: multiCIConfig[index].apiRef
23
+ },
24
+ `security-viewer-summary-${index}`
25
+ ) }, `security-viewer-box-${index}`)) })
26
+ ] }) });
23
27
  };
24
28
 
25
29
  export { SecurityViewerTabbedMultiCISummaryList };
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityViewerTabbedMultiCISummaryList.esm.js","sources":["../../../src/components/SecurityViewer/SecurityViewerTabbedMultiCISummaryList.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 React from 'react';\nimport { Box, Tabs, Tab, makeStyles, Theme } from '@material-ui/core';\nimport { MultiCIConfig } from '../../types/multiCI';\nimport { SecurityViewerPipelineSummary } from './SecurityViewerPipelineSummaryList';\n\ntype SecurityViewerTabbedMultiCISummaryListProps = {\n multiCIConfig: MultiCIConfig[];\n};\n\nconst useStyles = makeStyles((theme: Theme) => ({\n tabbedContent: {\n marginTop: theme.spacing(4),\n },\n}));\n\nexport const SecurityViewerTabbedMultiCISummaryList: React.FC<\n SecurityViewerTabbedMultiCISummaryListProps\n> = ({ multiCIConfig }) => {\n const classes = useStyles();\n const [tabValue, setTabValue] = React.useState(0);\n const handleChange = (\n _event: React.ChangeEvent<{}> | React.SyntheticEvent,\n newValue: number,\n ) => {\n setTabValue(newValue);\n };\n\n return (\n <React.Fragment>\n <Box>\n <Tabs value={tabValue} onChange={handleChange} aria-label=\"Multi CI\">\n {(multiCIConfig ?? []).map((config, index) => (\n <Tab label={config.title} key={index} aria-label={config.title} />\n ))}\n </Tabs>\n\n <Box className={classes.tabbedContent}>\n {(multiCIConfig ?? []).map((_, index) => (\n <Box key={`security-viewer-box-${index}`}>\n {tabValue === index && (\n <SecurityViewerPipelineSummary\n key={`security-viewer-summary-${index}`}\n apiRef={multiCIConfig[index].apiRef}\n />\n )}\n </Box>\n ))}\n </Box>\n </Box>\n </React.Fragment>\n );\n};\n"],"names":[],"mappings":";;;;AAwBA,MAAM,SAAA,GAAY,UAAW,CAAA,CAAC,KAAkB,MAAA;AAAA,EAC9C,aAAe,EAAA;AAAA,IACb,SAAA,EAAW,KAAM,CAAA,OAAA,CAAQ,CAAC;AAAA;AAE9B,CAAE,CAAA,C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}
1
+ {"version":3,"file":"SecurityViewerTabbedMultiCISummaryList.esm.js","sources":["../../../src/components/SecurityViewer/SecurityViewerTabbedMultiCISummaryList.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, ChangeEvent, SyntheticEvent } from 'react';\n\nimport { useState, Fragment } from 'react';\nimport { Box, Tabs, Tab, makeStyles, Theme } from '@material-ui/core';\nimport { MultiCIConfig } from '../../types/multiCI';\nimport { SecurityViewerPipelineSummary } from './SecurityViewerPipelineSummaryList';\n\ntype SecurityViewerTabbedMultiCISummaryListProps = {\n multiCIConfig: MultiCIConfig[];\n};\n\nconst useStyles = makeStyles((theme: Theme) => ({\n tabbedContent: {\n marginTop: theme.spacing(4),\n },\n}));\n\nexport const SecurityViewerTabbedMultiCISummaryList: FC<\n SecurityViewerTabbedMultiCISummaryListProps\n> = ({ multiCIConfig }) => {\n const classes = useStyles();\n const [tabValue, setTabValue] = useState(0);\n const handleChange = (\n _event: ChangeEvent<{}> | SyntheticEvent,\n newValue: number,\n ) => {\n setTabValue(newValue);\n };\n\n return (\n <Fragment>\n <Box>\n <Tabs value={tabValue} onChange={handleChange} aria-label=\"Multi CI\">\n {(multiCIConfig ?? []).map((config, index) => (\n <Tab label={config.title} key={index} aria-label={config.title} />\n ))}\n </Tabs>\n\n <Box className={classes.tabbedContent}>\n {(multiCIConfig ?? []).map((_, index) => (\n <Box key={`security-viewer-box-${index}`}>\n {tabValue === index && (\n <SecurityViewerPipelineSummary\n key={`security-viewer-summary-${index}`}\n apiRef={multiCIConfig[index].apiRef}\n />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