@backstage-community/plugin-tekton 3.27.3 → 3.27.5
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 +12 -0
- package/dist/components/Charts/PipelineBars.esm.js.map +1 -1
- package/dist/components/Icons/CriticalRiskIcon.esm.js.map +1 -1
- package/dist/components/Icons/EqualsIcon.esm.js.map +1 -1
- package/dist/components/Icons/LinkToSbomIcon.esm.js.map +1 -1
- package/dist/components/Icons/OutputIcon.esm.js.map +1 -1
- package/dist/components/Icons/SignedBadge.esm.js.map +1 -1
- package/dist/components/Icons/ViewLogsIcon.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunColumnHeader.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunList.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunListSearchBar.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunOutput.esm.js +1 -1
- package/dist/components/PipelineRunList/PipelineRunOutput.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunRow.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunRowActions.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunSBOMLink.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunTableBody.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunTaskStatus.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineRunVulnerabilities.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PipelineTableHeader.esm.js.map +1 -1
- package/dist/components/PipelineRunList/PlrStatus.esm.js.map +1 -1
- package/dist/components/PipelineRunList/ResourceBadge.esm.js.map +1 -1
- package/dist/components/PipelineRunLogs/PipelineRunLogDialog.esm.js.map +1 -1
- package/dist/components/PipelineRunLogs/PipelineRunLogDownloader.esm.js.map +1 -1
- package/dist/components/PipelineRunLogs/PipelineRunLogViewer.esm.js.map +1 -1
- package/dist/components/PipelineRunLogs/PipelineRunLogs.esm.js.map +1 -1
- package/dist/components/PipelineRunLogs/PodLogsDownloadLink.esm.js +1 -1
- package/dist/components/PipelineRunLogs/PodLogsDownloadLink.esm.js.map +1 -1
- package/dist/components/PipelineRunLogs/TaskStatusStepper.esm.js.map +1 -1
- package/dist/components/PipelineRunOutput/PipelineRunOutputDialog.esm.js.map +1 -1
- package/dist/components/Router.esm.js.map +1 -1
- package/dist/components/Tekton/TektonCIComponent.esm.js.map +1 -1
- package/dist/components/common/ClusterSelector.esm.js.map +1 -1
- package/dist/components/common/ErrorPanel.esm.js.map +1 -1
- package/dist/components/common/PermissionAlert.esm.js.map +1 -1
- package/dist/components/common/StatusSelector.esm.js.map +1 -1
- package/dist/components/common/TableExpandCollapse.esm.js.map +1 -1
- package/dist/components/pipeline-topology/PipelineLayout.esm.js.map +1 -1
- package/dist/components/pipeline-topology/PipelineRunVisualization.esm.js.map +1 -1
- package/dist/components/pipeline-topology/PipelineTaskNode.esm.js.map +1 -1
- package/dist/components/pipeline-topology/PipelineVisualization.esm.js.map +1 -1
- package/dist/components/pipeline-topology/PipelineVisualizationStepList.esm.js.map +1 -1
- package/dist/components/pipeline-topology/PipelineVisualizationView.esm.js.map +1 -1
- package/dist/components/pipeline-topology/TaskGroupEdge.esm.js.map +1 -1
- package/dist/components/pipeline-topology/dag.esm.js.map +1 -1
- package/dist/components/pipeline-topology/pipelineComponentFactory.esm.js.map +1 -1
- package/dist/consts/pipeline-topology-const.esm.js.map +1 -1
- package/dist/consts/tekton-const.esm.js.map +1 -1
- package/dist/hooks/TektonResourcesContext.esm.js.map +1 -1
- package/dist/hooks/useAllWatchResources.esm.js.map +1 -1
- package/dist/hooks/useDarkTheme.esm.js.map +1 -1
- package/dist/hooks/usePipelineRunScanResults.esm.js.map +1 -1
- package/dist/hooks/usePodLogsOfPipelineRun.esm.js +1 -1
- package/dist/hooks/usePodLogsOfPipelineRun.esm.js.map +1 -1
- package/dist/hooks/useResourcesClusters.esm.js.map +1 -1
- package/dist/hooks/useTektonObjectsResponse.esm.js +3 -7
- package/dist/hooks/useTektonObjectsResponse.esm.js.map +1 -1
- package/dist/hooks/useTektonViewPermission.esm.js.map +1 -1
- package/dist/models.esm.js +0 -2
- package/dist/models.esm.js.map +1 -1
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +1 -1
- package/dist/plugin.esm.js +2 -58
- package/dist/plugin.esm.js.map +1 -1
- package/dist/translation.esm.js.map +1 -1
- package/dist/types/types.esm.js +1 -12
- package/dist/types/types.esm.js.map +1 -1
- package/dist/utils/download-log-file-utils.esm.js.map +1 -1
- package/dist/utils/isTektonCIAvailable.esm.js.map +1 -1
- package/dist/utils/log-downloader-utils.esm.js.map +1 -1
- package/dist/utils/pipeline-step-utils.esm.js.map +1 -1
- package/dist/utils/pipeline-topology-utils.esm.js.map +1 -1
- package/dist/utils/pipelineRun-utils.esm.js.map +1 -1
- package/dist/utils/taskRun-utils.esm.js.map +1 -1
- package/dist/utils/tekton-utils.esm.js.map +1 -1
- package/package.json +2 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineTableHeader.esm.js","sources":["../../../src/components/PipelineRunList/PipelineTableHeader.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 { MouseEvent } from 'react';\n\nimport {\n makeStyles,\n TableCell,\n TableHead,\n TableRow,\n TableSortLabel,\n} from '@material-ui/core';\n\nimport { Order } from '../../types/types';\nimport { getPipelineRunColumnHeader } from './PipelineRunColumnHeader';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\ntype EnhancedTableProps = {\n onRequestSort: (\n event: MouseEvent<unknown>,\n property: string,\n id: string,\n ) => void;\n order: Order;\n orderBy: string;\n orderById: string;\n};\n\nconst useStyles = makeStyles(theme => ({\n header: {\n padding: theme.spacing(1, 2, 1, 2.5),\n borderTop: `1px solid ${theme.palette.grey.A100}`,\n borderBottom: `1px solid ${theme.palette.grey.A100}`,\n // withStyles hasn't a generic overload for theme\n fontWeight: 'bold',\n position: 'static',\n wordBreak: 'normal',\n },\n}));\n\nexport const EnhancedTableHead = ({\n order,\n orderBy,\n orderById,\n onRequestSort,\n}: EnhancedTableProps) => {\n const createSortHandler =\n (property: string, id: string) => (event: MouseEvent<unknown>) => {\n onRequestSort(event, property, id);\n };\n const classes = useStyles();\n const { t } = useTranslationRef(tektonTranslationRef);\n const pipelineRunColumnHeader = getPipelineRunColumnHeader(t);\n\n return (\n <TableHead>\n <TableRow>\n {pipelineRunColumnHeader.map(headCell => {\n return (\n <TableCell\n className={classes.header}\n key={headCell.id as string}\n align=\"left\"\n padding=\"normal\"\n sortDirection={\n orderBy === headCell.field ? headCell.defaultSort : false\n }\n >\n {headCell.field ? (\n <TableSortLabel\n active={\n orderBy === headCell.field && orderById === headCell.id\n }\n direction={order}\n onClick={createSortHandler(\n headCell.field as string,\n headCell.id as string,\n )}\n >\n {headCell.title}\n </TableSortLabel>\n ) : (\n <> {headCell.title}</>\n )}\n </TableCell>\n );\n })}\n </TableRow>\n </TableHead>\n );\n};\n"],"names":[],"mappings":";;;;;;AAyCA,MAAM,SAAA,GAAY,WAAW,
|
|
1
|
+
{"version":3,"file":"PipelineTableHeader.esm.js","sources":["../../../src/components/PipelineRunList/PipelineTableHeader.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 { MouseEvent } from 'react';\n\nimport {\n makeStyles,\n TableCell,\n TableHead,\n TableRow,\n TableSortLabel,\n} from '@material-ui/core';\n\nimport { Order } from '../../types/types';\nimport { getPipelineRunColumnHeader } from './PipelineRunColumnHeader';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\ntype EnhancedTableProps = {\n onRequestSort: (\n event: MouseEvent<unknown>,\n property: string,\n id: string,\n ) => void;\n order: Order;\n orderBy: string;\n orderById: string;\n};\n\nconst useStyles = makeStyles(theme => ({\n header: {\n padding: theme.spacing(1, 2, 1, 2.5),\n borderTop: `1px solid ${theme.palette.grey.A100}`,\n borderBottom: `1px solid ${theme.palette.grey.A100}`,\n // withStyles hasn't a generic overload for theme\n fontWeight: 'bold',\n position: 'static',\n wordBreak: 'normal',\n },\n}));\n\nexport const EnhancedTableHead = ({\n order,\n orderBy,\n orderById,\n onRequestSort,\n}: EnhancedTableProps) => {\n const createSortHandler =\n (property: string, id: string) => (event: MouseEvent<unknown>) => {\n onRequestSort(event, property, id);\n };\n const classes = useStyles();\n const { t } = useTranslationRef(tektonTranslationRef);\n const pipelineRunColumnHeader = getPipelineRunColumnHeader(t);\n\n return (\n <TableHead>\n <TableRow>\n {pipelineRunColumnHeader.map(headCell => {\n return (\n <TableCell\n className={classes.header}\n key={headCell.id as string}\n align=\"left\"\n padding=\"normal\"\n sortDirection={\n orderBy === headCell.field ? headCell.defaultSort : false\n }\n >\n {headCell.field ? (\n <TableSortLabel\n active={\n orderBy === headCell.field && orderById === headCell.id\n }\n direction={order}\n onClick={createSortHandler(\n headCell.field as string,\n headCell.id as string,\n )}\n >\n {headCell.title}\n </TableSortLabel>\n ) : (\n <> {headCell.title}</>\n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A;AAAA,QACR,aAAA,EACE,OAAA,KAAY,QAAA,CAAS,KAAA,GAAQ,SAAS,WAAA,GAAc,KAAA;AAAA,QAGrD,mBAAS,KAAA,mBACR,GAAA;AAAA,UAAC,cAAA;AAAA,UAAA;AAAA,YACC,MAAA,EACE,OAAA,KAAY,QAAA,CAAS,KAAA,IAAS,cAAc,QAAA,CAAS,EAAA;AAAA,YAEvD,SAAA,EAAW,KAAA;AAAA,YACX,OAAA,EAAS,iBAAA;AAAA,cACP,QAAA,CAAS,KAAA;AAAA,cACT,QAAA,CAAS;AAAA,aACX;AAAA,YAEC,QAAA,EAAA,QAAA,CAAS;AAAA;AAAA,4BAGZ,IAAA,CAAA,QAAA,EAAA,EAAE,QAAA,EAAA;AAAA,UAAA,GAAA;AAAA,UAAE,QAAA,CAAS;AAAA,SAAA,EAAM;AAAA,OAAA;AAAA,MArBhB,QAAA,CAAS;AAAA,KAuBhB;AAAA,EAEJ,CAAC,GACH,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlrStatus.esm.js","sources":["../../../src/components/PipelineRunList/PlrStatus.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 {\n pipelineRunFilterReducer,\n PipelineRunKind,\n Status,\n} from '@janus-idp/shared-react';\n\nimport './PlrStatus.css';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\ntype PlrStatusProps = { obj: PipelineRunKind };\n\nconst PlrStatus = ({ obj }: PlrStatusProps) => {\n const plrStatus = pipelineRunFilterReducer(obj);\n const { t } = useTranslationRef(tektonTranslationRef);\n return (\n <Status\n status={plrStatus}\n displayStatusText={t(`pipelineRunStatus.${plrStatus}` as any, {\n defaultValue: plrStatus,\n })}\n className=\"bs-tkn-plrstatus\"\n />\n );\n};\n\nexport default PlrStatus;\n"],"names":[],"mappings":";;;;;;AA2BA,MAAM,
|
|
1
|
+
{"version":3,"file":"PlrStatus.esm.js","sources":["../../../src/components/PipelineRunList/PlrStatus.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 {\n pipelineRunFilterReducer,\n PipelineRunKind,\n Status,\n} from '@janus-idp/shared-react';\n\nimport './PlrStatus.css';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\ntype PlrStatusProps = { obj: PipelineRunKind };\n\nconst PlrStatus = ({ obj }: PlrStatusProps) => {\n const plrStatus = pipelineRunFilterReducer(obj);\n const { t } = useTranslationRef(tektonTranslationRef);\n return (\n <Status\n status={plrStatus}\n displayStatusText={t(`pipelineRunStatus.${plrStatus}` as any, {\n defaultValue: plrStatus,\n })}\n className=\"bs-tkn-plrstatus\"\n />\n );\n};\n\nexport default PlrStatus;\n"],"names":[],"mappings":";;;;;;AA2BA,MAAM,SAAA,GAAY,CAAC,EAAE,GAAA,EAAI,KAAsB;AAC7C,EAAA,MAAM,SAAA,GAAY,yBAAyB,GAAG,CAAA;AAC9C,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,oBAAoB,CAAA;AACpD,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,MAAA,EAAQ,SAAA;AAAA,MACR,iBAAA,EAAmB,CAAA,CAAE,CAAA,kBAAA,EAAqB,SAAS,CAAA,CAAA,EAAW;AAAA,QAC5D,YAAA,EAAc;AAAA,OACf,CAAA;AAAA,MACD,SAAA,EAAU;AAAA;AAAA,GACZ;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceBadge.esm.js","sources":["../../../src/components/PipelineRunList/ResourceBadge.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 { ReactNode } from 'react';\n\nimport { Split, SplitItem } from '@patternfly/react-core';\n\nimport './ResourceBadge.css';\n\nconst ResourceBadge = ({\n color,\n abbr,\n name,\n suffix,\n}: {\n color: string;\n abbr: string;\n name: string;\n suffix?: ReactNode;\n}) => {\n return (\n <Split className=\"bs-tkn-pipeline-visualization__label\">\n <SplitItem style={{ marginRight: 'var(--pf-t--global--spacer--sm)' }}>\n <span className=\"badge\" style={{ backgroundColor: color }}>\n {abbr}\n </span>\n </SplitItem>\n <SplitItem>\n <span>{name}</span>\n </SplitItem>\n {suffix ? (\n <SplitItem style={{ marginLeft: 'var(--pf-t--global--spacer--sm)' }}>\n {suffix}\n </SplitItem>\n ) : null}\n </Split>\n );\n};\n\nexport default ResourceBadge;\n"],"names":[],"mappings":";;;;AAqBA,MAAM,gBAAgB,CAAC;AAAA,EACrB,KAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,
|
|
1
|
+
{"version":3,"file":"ResourceBadge.esm.js","sources":["../../../src/components/PipelineRunList/ResourceBadge.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 { ReactNode } from 'react';\n\nimport { Split, SplitItem } from '@patternfly/react-core';\n\nimport './ResourceBadge.css';\n\nconst ResourceBadge = ({\n color,\n abbr,\n name,\n suffix,\n}: {\n color: string;\n abbr: string;\n name: string;\n suffix?: ReactNode;\n}) => {\n return (\n <Split className=\"bs-tkn-pipeline-visualization__label\">\n <SplitItem style={{ marginRight: 'var(--pf-t--global--spacer--sm)' }}>\n <span className=\"badge\" style={{ backgroundColor: color }}>\n {abbr}\n </span>\n </SplitItem>\n <SplitItem>\n <span>{name}</span>\n </SplitItem>\n {suffix ? (\n <SplitItem style={{ marginLeft: 'var(--pf-t--global--spacer--sm)' }}>\n {suffix}\n </SplitItem>\n ) : null}\n </Split>\n );\n};\n\nexport default ResourceBadge;\n"],"names":[],"mappings":";;;;AAqBA,MAAM,gBAAgB,CAAC;AAAA,EACrB,KAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA,KAKM;AACJ,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAM,SAAA,EAAU,sCAAA,EACf,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,aAAU,KAAA,EAAO,EAAE,WAAA,EAAa,iCAAA,IAC/B,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,OAAA,EAAQ,OAAO,EAAE,eAAA,EAAiB,KAAA,EAAM,EACrD,gBACH,CAAA,EACF,CAAA;AAAA,oBACA,GAAA,CAAC,SAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAM,gBAAK,CAAA,EACd,CAAA;AAAA,IACC,MAAA,uBACE,SAAA,EAAA,EAAU,KAAA,EAAO,EAAE,UAAA,EAAY,iCAAA,EAAkC,EAC/D,QAAA,EAAA,MAAA,EACH,CAAA,GACE;AAAA,GAAA,EACN,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineRunLogDialog.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunLogDialog.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, useEffect, memo } from 'react';\n\nimport { ErrorBoundary } from '@backstage/core-components';\n\nimport { V1Pod } from '@kubernetes/client-node';\nimport {\n Box,\n createStyles,\n Dialog,\n DialogContent,\n DialogTitle,\n IconButton,\n makeStyles,\n Theme,\n} from '@material-ui/core';\nimport CloseIcon from '@mui/icons-material/Close';\n\nimport { PipelineRunKind, TaskRunKind } from '@janus-idp/shared-react';\n\nimport { tektonGroupColor } from '../../types/types';\nimport ResourceBadge from '../PipelineRunList/ResourceBadge';\nimport PipelineRunLogDownloader from './PipelineRunLogDownloader';\nimport PipelineRunLogs from './PipelineRunLogs';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n titleContainer: {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1),\n },\n closeButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n color: theme.palette.grey[500],\n },\n }),\n);\n\ntype PipelineRunLogDialogProps = {\n open: boolean;\n closeDialog: () => void;\n pipelineRun: PipelineRunKind;\n taskRuns: TaskRunKind[];\n pods: V1Pod[];\n activeTask?: string;\n forSBOM?: boolean;\n};\nconst PipelineRunLogDialog = ({\n open,\n closeDialog,\n pipelineRun,\n pods,\n taskRuns,\n activeTask,\n forSBOM,\n}: PipelineRunLogDialogProps) => {\n const classes = useStyles();\n\n const [task, setTask] = useState(activeTask);\n const { t } = useTranslationRef(tektonTranslationRef);\n\n useEffect(() => {\n // If we trigger this dialog for the SBOM task, update the current active task.\n if (forSBOM && activeTask) {\n setTask(activeTask);\n }\n }, [forSBOM, activeTask]);\n\n return (\n <Dialog\n data-testid=\"pipelinerun-logs-dialog\"\n maxWidth=\"xl\"\n fullWidth\n open={open}\n onClose={closeDialog}\n >\n <DialogTitle id=\"pipelinerun-logs\" title={t('pipelineRunLogs.title')}>\n <Box className={classes.titleContainer}>\n <ResourceBadge\n color={tektonGroupColor}\n abbr=\"PLR\"\n name={pipelineRun?.metadata?.name ?? ''}\n />\n <IconButton\n aria-label=\"close\"\n className={classes.closeButton}\n onClick={closeDialog}\n >\n <CloseIcon />\n </IconButton>\n </Box>\n </DialogTitle>\n <DialogContent>\n <ErrorBoundary>\n <PipelineRunLogDownloader\n pods={pods}\n activeTask={task}\n pipelineRun={pipelineRun}\n />\n <PipelineRunLogs\n pipelineRun={pipelineRun}\n taskRuns={taskRuns}\n pods={pods}\n activeTask={task}\n setActiveTask={setTask}\n />\n </ErrorBoundary>\n </DialogContent>\n </Dialog>\n );\n};\n\nexport default memo(PipelineRunLogDialog);\n"],"names":[],"mappings":";;;;;;;;;;;;AAyCA,MAAM,
|
|
1
|
+
{"version":3,"file":"PipelineRunLogDialog.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunLogDialog.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, useEffect, memo } from 'react';\n\nimport { ErrorBoundary } from '@backstage/core-components';\n\nimport { V1Pod } from '@kubernetes/client-node';\nimport {\n Box,\n createStyles,\n Dialog,\n DialogContent,\n DialogTitle,\n IconButton,\n makeStyles,\n Theme,\n} from '@material-ui/core';\nimport CloseIcon from '@mui/icons-material/Close';\n\nimport { PipelineRunKind, TaskRunKind } from '@janus-idp/shared-react';\n\nimport { tektonGroupColor } from '../../types/types';\nimport ResourceBadge from '../PipelineRunList/ResourceBadge';\nimport PipelineRunLogDownloader from './PipelineRunLogDownloader';\nimport PipelineRunLogs from './PipelineRunLogs';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n titleContainer: {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1),\n },\n closeButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n color: theme.palette.grey[500],\n },\n }),\n);\n\ntype PipelineRunLogDialogProps = {\n open: boolean;\n closeDialog: () => void;\n pipelineRun: PipelineRunKind;\n taskRuns: TaskRunKind[];\n pods: V1Pod[];\n activeTask?: string;\n forSBOM?: boolean;\n};\nconst PipelineRunLogDialog = ({\n open,\n closeDialog,\n pipelineRun,\n pods,\n taskRuns,\n activeTask,\n forSBOM,\n}: PipelineRunLogDialogProps) => {\n const classes = useStyles();\n\n const [task, setTask] = useState(activeTask);\n const { t } = useTranslationRef(tektonTranslationRef);\n\n useEffect(() => {\n // If we trigger this dialog for the SBOM task, update the current active task.\n if (forSBOM && activeTask) {\n setTask(activeTask);\n }\n }, [forSBOM, activeTask]);\n\n return (\n <Dialog\n data-testid=\"pipelinerun-logs-dialog\"\n maxWidth=\"xl\"\n fullWidth\n open={open}\n onClose={closeDialog}\n >\n <DialogTitle id=\"pipelinerun-logs\" title={t('pipelineRunLogs.title')}>\n <Box className={classes.titleContainer}>\n <ResourceBadge\n color={tektonGroupColor}\n abbr=\"PLR\"\n name={pipelineRun?.metadata?.name ?? ''}\n />\n <IconButton\n aria-label=\"close\"\n className={classes.closeButton}\n onClick={closeDialog}\n >\n <CloseIcon />\n </IconButton>\n </Box>\n </DialogTitle>\n <DialogContent>\n <ErrorBoundary>\n <PipelineRunLogDownloader\n pods={pods}\n activeTask={task}\n pipelineRun={pipelineRun}\n />\n <PipelineRunLogs\n pipelineRun={pipelineRun}\n taskRuns={taskRuns}\n pods={pods}\n activeTask={task}\n setActiveTask={setTask}\n />\n </ErrorBoundary>\n </DialogContent>\n </Dialog>\n );\n};\n\nexport default memo(PipelineRunLogDialog);\n"],"names":[],"mappings":";;;;;;;;;;;;AAyCA,MAAM,SAAA,GAAY,UAAA;AAAA,EAAW,CAAC,UAC5B,YAAA,CAAa;AAAA,IACX,cAAA,EAAgB;AAAA,MACd,OAAA,EAAS,MAAA;AAAA,MACT,UAAA,EAAY,QAAA;AAAA,MACZ,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA,KACtB;AAAA,IACA,WAAA,EAAa;AAAA,MACX,QAAA,EAAU,UAAA;AAAA,MACV,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,MACtB,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,MACpB,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,GAAG;AAAA;AAC/B,GACD;AACH,CAAA;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AA;AAAA,cACnB,OAAA,EAAS,WAAA;AAAA,cAET,8BAAC,SAAA,EAAA,EAAU;AAAA;AAAA;AACb,SAAA,EACF,CAAA,EACF,CAAA;AAAA,wBACA,GAAA,CAAC,aAAA,EAAA,EACC,QAAA,kBAAA,IAAA,CAAC,aAAA,EAAA,EACC,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,wBAAA;AAAA,YAAA;AAAA,cACC,IAAA;AAAA,cACA,UAAA,EAAY,IAAA;AAAA,cACZ;AAAA;AAAA,WACF;AAAA,0BACA,GAAA;AAAA,YAAC,eAAA;AAAA,YAAA;AAAA,cACC,WAAA;AAAA,cACA,QAAA;AAAA,cACA,IAAA;AAAA,cACA,UAAA,EAAY,IAAA;AAAA,cACZ,aAAA,EAAe;AAAA;AAAA;AACjB,SAAA,EACF,CAAA,EACF;AAAA;AAAA;AAAA,GACF;AAEJ,CAAA;AAEA,6BAAe,KAAK,oBAAoB,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineRunLogDownloader.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunLogDownloader.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 { useMemo } from 'react';\n\nimport { V1Pod } from '@kubernetes/client-node';\nimport { Flex, FlexItem } from '@patternfly/react-core';\n\nimport { PipelineRunKind } from '@janus-idp/shared-react';\n\nimport {\n TEKTON_PIPELINE_RUN,\n TEKTON_PIPELINE_TASK,\n TEKTON_PIPELINE_TASKRUN,\n} from '../../consts/tekton-const';\nimport PodLogsDownloadLink from './PodLogsDownloadLink';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst PipelineRunLogDownloader: FC<{\n pods: V1Pod[];\n pipelineRun: PipelineRunKind;\n activeTask: string | undefined;\n}> = ({ pods, pipelineRun, activeTask }) => {\n const filteredPods: V1Pod[] = pods?.filter(\n (p: V1Pod) =>\n p?.metadata?.labels?.[TEKTON_PIPELINE_RUN] ===\n pipelineRun?.metadata?.name,\n );\n\n const sortedPods: V1Pod[] = useMemo(\n () =>\n Array.from(filteredPods)?.sort(\n (a: V1Pod, b: V1Pod) =>\n new Date(a?.status?.startTime as Date).getTime() -\n new Date(b?.status?.startTime as Date).getTime(),\n ),\n [filteredPods],\n );\n const { t } = useTranslationRef(tektonTranslationRef);\n\n const activeTaskPod: V1Pod =\n sortedPods.find(\n (sp: V1Pod) =>\n sp.metadata?.labels?.[TEKTON_PIPELINE_TASKRUN] === activeTask,\n ) ?? sortedPods[sortedPods.length - 1];\n\n return sortedPods.length > 0 ? (\n <Flex\n data-testid=\"pipelinerun-logs-downloader\"\n justifyContent={{ default: 'justifyContentFlexEnd' }}\n >\n <FlexItem>\n <PodLogsDownloadLink\n data-testid=\"download-task-logs\"\n pods={activeTaskPod ? [activeTaskPod] : []}\n fileName={`${\n activeTaskPod?.metadata?.labels?.[TEKTON_PIPELINE_TASK] ?? 'task'\n }.log`}\n downloadTitle={t('pipelineRunLogs.downloader.downloadTaskLogs')}\n />\n </FlexItem>\n <FlexItem>\n <PodLogsDownloadLink\n data-testid=\"download-pipelinerun-logs\"\n pods={sortedPods}\n fileName={`${pipelineRun?.metadata?.name ?? 'pipelinerun'}.log`}\n downloadTitle={t(\n 'pipelineRunLogs.downloader.downloadPipelineRunLogs',\n )}\n />\n </FlexItem>\n </Flex>\n ) : null;\n};\nexport default PipelineRunLogDownloader;\n"],"names":[],"mappings":";;;;;;;;AAiCA,MAAM,2BAID,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"PipelineRunLogDownloader.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunLogDownloader.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 { useMemo } from 'react';\n\nimport { V1Pod } from '@kubernetes/client-node';\nimport { Flex, FlexItem } from '@patternfly/react-core';\n\nimport { PipelineRunKind } from '@janus-idp/shared-react';\n\nimport {\n TEKTON_PIPELINE_RUN,\n TEKTON_PIPELINE_TASK,\n TEKTON_PIPELINE_TASKRUN,\n} from '../../consts/tekton-const';\nimport PodLogsDownloadLink from './PodLogsDownloadLink';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst PipelineRunLogDownloader: FC<{\n pods: V1Pod[];\n pipelineRun: PipelineRunKind;\n activeTask: string | undefined;\n}> = ({ pods, pipelineRun, activeTask }) => {\n const filteredPods: V1Pod[] = pods?.filter(\n (p: V1Pod) =>\n p?.metadata?.labels?.[TEKTON_PIPELINE_RUN] ===\n pipelineRun?.metadata?.name,\n );\n\n const sortedPods: V1Pod[] = useMemo(\n () =>\n Array.from(filteredPods)?.sort(\n (a: V1Pod, b: V1Pod) =>\n new Date(a?.status?.startTime as Date).getTime() -\n new Date(b?.status?.startTime as Date).getTime(),\n ),\n [filteredPods],\n );\n const { t } = useTranslationRef(tektonTranslationRef);\n\n const activeTaskPod: V1Pod =\n sortedPods.find(\n (sp: V1Pod) =>\n sp.metadata?.labels?.[TEKTON_PIPELINE_TASKRUN] === activeTask,\n ) ?? sortedPods[sortedPods.length - 1];\n\n return sortedPods.length > 0 ? (\n <Flex\n data-testid=\"pipelinerun-logs-downloader\"\n justifyContent={{ default: 'justifyContentFlexEnd' }}\n >\n <FlexItem>\n <PodLogsDownloadLink\n data-testid=\"download-task-logs\"\n pods={activeTaskPod ? [activeTaskPod] : []}\n fileName={`${\n activeTaskPod?.metadata?.labels?.[TEKTON_PIPELINE_TASK] ?? 'task'\n }.log`}\n downloadTitle={t('pipelineRunLogs.downloader.downloadTaskLogs')}\n />\n </FlexItem>\n <FlexItem>\n <PodLogsDownloadLink\n data-testid=\"download-pipelinerun-logs\"\n pods={sortedPods}\n fileName={`${pipelineRun?.metadata?.name ?? 'pipelinerun'}.log`}\n downloadTitle={t(\n 'pipelineRunLogs.downloader.downloadPipelineRunLogs',\n )}\n />\n </FlexItem>\n </Flex>\n ) : null;\n};\nexport default PipelineRunLogDownloader;\n"],"names":[],"mappings":";;;;;;;;AAiCA,MAAM,2BAID,CAAC,EAAE,IAAA,EAAM,WAAA,EAAa,YAAW,KAAM;AAC1C,EAAA,MAAM,eAAwB,IAAA,EAAM,MAAA;AAAA,IAClC,CAAC,MACC,CAAA,EAAG,QAAA,EAAU,SAAS,mBAAmB,CAAA,KACzC,aAAa,QAAA,EAAU;AAAA,GAC3B;AAEA,EAAA,MAAM,UAAA,GAAsB,OAAA;AAAA,IAC1B,MACE,KAAA,CAAM,IAAA,CAAK,YAAY,CAAA,EAAG,IAAA;AAAA,MACxB,CAAC,CAAA,EAAU,CAAA,KACT,IAAI,IAAA,CAAK,GAAG,MAAA,EAAQ,SAAiB,CAAA,CAAE,OAAA,KACvC,IAAI,IAAA,CAAK,GAAG,MAAA,EAAQ,SAAiB,EAAE,OAAA;AAAQ,KACnD;AAAA,IACF,CAAC,YAAY;AAAA,GACf;AACA,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,oBAAoB,CAAA;AAEpD,EAAA,MAAM,gBACJ,UAAA,CAAW,IAAA;AAAA,IACT,CAAC,EAAA,KACC,EAAA,CAAG,QAAA,EAAU,MAAA,GAAS,uBAAuB,CAAA,KAAM;AAAA,GACvD,IAAK,UAAA,CAAW,UAAA,CAAW,MAAA,GAAS,CAAC,CAAA;AAEvC,EAAA,OAAO,UAAA,CAAW,SAAS,CAAA,mBACzB,IAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,aAAA,EAAY,6BAAA;AAAA,MACZ,cAAA,EAAgB,EAAE,OAAA,EAAS,uBAAA,EAAwB;AAAA,MAEnD,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,QAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,UAAC,mBAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAY,oBAAA;AAAA,YACZ,IAAA,EAAM,aAAA,GAAgB,CAAC,aAAa,IAAI,EAAC;AAAA,YACzC,UAAU,CAAA,EACR,aAAA,EAAe,UAAU,MAAA,GAAS,oBAAoB,KAAK,MAC7D,CAAA,IAAA,CAAA;AAAA,YACA,aAAA,EAAe,EAAE,6CAA6C;AAAA;AAAA,SAChE,EACF,CAAA;AAAA,4BACC,QAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,UAAC,mBAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAY,2BAAA;AAAA,YACZ,IAAA,EAAM,UAAA;AAAA,YACN,QAAA,EAAU,CAAA,EAAG,WAAA,EAAa,QAAA,EAAU,QAAQ,aAAa,CAAA,IAAA,CAAA;AAAA,YACzD,aAAA,EAAe,CAAA;AAAA,cACb;AAAA;AACF;AAAA,SACF,EACF;AAAA;AAAA;AAAA,GACF,GACE,IAAA;AACN;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineRunLogViewer.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunLogViewer.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 { DismissableBanner, LogViewer } from '@backstage/core-components';\nimport { V1Container, V1Pod } from '@kubernetes/client-node';\nimport { Paper } from '@material-ui/core';\nimport { Skeleton } from '@material-ui/lab';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { usePodLogsOfPipelineRun } from '../../hooks/usePodLogsOfPipelineRun';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\ntype PipelineRunLogViewerProps = { pod: V1Pod };\n\nconst PipelineRunLogViewer = ({ pod }: PipelineRunLogViewerProps) => {\n const { value, error, loading } = usePodLogsOfPipelineRun({\n pod,\n });\n const { t } = useTranslationRef(tektonTranslationRef);\n\n const containersList = pod?.spec?.containers || [];\n let text = '';\n\n text = containersList.reduce(\n (acc: string, container: V1Container, idx: number) => {\n if (container?.name && value?.[idx]?.text) {\n return acc\n .concat(\n `${container.name.toLocaleUpperCase('en-US')}\\n${value[idx].text}`,\n )\n .concat(idx === containersList.length - 1 ? '' : '\\n');\n }\n return acc;\n },\n '',\n );\n\n return (\n <>\n {error && (\n <DismissableBanner\n message={error?.message}\n variant=\"error\"\n fixed={false}\n id=\"pod-logs\"\n />\n )}\n <Paper\n elevation={1}\n style={{ height: '100%', width: '100%', minHeight: '30rem' }}\n >\n {loading && (\n <Skeleton\n data-testid=\"logs-skeleton\"\n variant=\"rect\"\n width=\"100%\"\n height=\"100%\"\n />\n )}\n {pod && !loading && (\n <LogViewer text={text || t('pipelineRunLogs.noLogs')} />\n )}\n </Paper>\n </>\n );\n};\n\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n retry: 5,\n refetchOnWindowFocus: false,\n },\n },\n});\n\nconst PipelineRunLogViewerWithQueryClient = ({\n pod,\n}: PipelineRunLogViewerProps) => {\n return (\n <QueryClientProvider client={queryClient}>\n <PipelineRunLogViewer pod={pod} />\n </QueryClientProvider>\n );\n};\n\nexport { PipelineRunLogViewerWithQueryClient as PipelineRunLogViewer };\n"],"names":[],"mappings":";;;;;;;;;AA0BA,MAAM,
|
|
1
|
+
{"version":3,"file":"PipelineRunLogViewer.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunLogViewer.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 { DismissableBanner, LogViewer } from '@backstage/core-components';\nimport { V1Container, V1Pod } from '@kubernetes/client-node';\nimport { Paper } from '@material-ui/core';\nimport { Skeleton } from '@material-ui/lab';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { usePodLogsOfPipelineRun } from '../../hooks/usePodLogsOfPipelineRun';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\ntype PipelineRunLogViewerProps = { pod: V1Pod };\n\nconst PipelineRunLogViewer = ({ pod }: PipelineRunLogViewerProps) => {\n const { value, error, loading } = usePodLogsOfPipelineRun({\n pod,\n });\n const { t } = useTranslationRef(tektonTranslationRef);\n\n const containersList = pod?.spec?.containers || [];\n let text = '';\n\n text = containersList.reduce(\n (acc: string, container: V1Container, idx: number) => {\n if (container?.name && value?.[idx]?.text) {\n return acc\n .concat(\n `${container.name.toLocaleUpperCase('en-US')}\\n${value[idx].text}`,\n )\n .concat(idx === containersList.length - 1 ? '' : '\\n');\n }\n return acc;\n },\n '',\n );\n\n return (\n <>\n {error && (\n <DismissableBanner\n message={error?.message}\n variant=\"error\"\n fixed={false}\n id=\"pod-logs\"\n />\n )}\n <Paper\n elevation={1}\n style={{ height: '100%', width: '100%', minHeight: '30rem' }}\n >\n {loading && (\n <Skeleton\n data-testid=\"logs-skeleton\"\n variant=\"rect\"\n width=\"100%\"\n height=\"100%\"\n />\n )}\n {pod && !loading && (\n <LogViewer text={text || t('pipelineRunLogs.noLogs')} />\n )}\n </Paper>\n </>\n );\n};\n\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n retry: 5,\n refetchOnWindowFocus: false,\n },\n },\n});\n\nconst PipelineRunLogViewerWithQueryClient = ({\n pod,\n}: PipelineRunLogViewerProps) => {\n return (\n <QueryClientProvider client={queryClient}>\n <PipelineRunLogViewer pod={pod} />\n </QueryClientProvider>\n );\n};\n\nexport { PipelineRunLogViewerWithQueryClient as PipelineRunLogViewer };\n"],"names":[],"mappings":";;;;;;;;;AA0BA,MAAM,oBAAA,GAAuB,CAAC,EAAE,GAAA,EAAI,KAAiC;AACnE,EAAA,MAAM,EAAE,KAAA,EAAO,KAAA,EAAO,OAAA,KAAY,uBAAA,CAAwB;AAAA,IACxD;AAAA,GACD,CAAA;AACD,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,oBAAoB,CAAA;AAEpD,EAAA,MAAM,cAAA,GAAiB,GAAA,EAAK,IAAA,EAAM,UAAA,IAAc,EAAC;AACjD,EAAA,IAAI,IAAA,GAAO,EAAA;AAEX,EAAA,IAAA,GAAO,cAAA,CAAe,MAAA;AAAA,IACpB,CAAC,GAAA,EAAa,SAAA,EAAwB,GAAA,KAAgB;AACpD,MAAA,IAAI,SAAA,EAAW,IAAA,IAAQ,KAAA,GAAQ,GAAG,GAAG,IAAA,EAAM;AACzC,QAAA,OAAO,GAAA,CACJ,MAAA;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EAAsB;AAAA;AACxB;AAEJ,CAAC,CAAA;AAED,MAAM,sCAAsC,CAAC;AAAA,EAC3C;AACF,CAAA,KAAiC;AAC/B,EAAA,2BACG,mBAAA,EAAA,EAAoB,MAAA,EAAQ,aAC3B,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAU,CAAA,EAClC,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineRunLogs.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunLogs.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, useEffect, useMemo } from 'react';\n\nimport { LogViewer, Progress } from '@backstage/core-components';\n\nimport { V1Pod } from '@kubernetes/client-node';\nimport { Paper } from '@material-ui/core';\nimport Grid from '@material-ui/core/Grid';\n\nimport {\n getTaskRunsForPipelineRun,\n pipelineRunFilterReducer,\n PipelineRunKind,\n TaskRunKind,\n} from '@janus-idp/shared-react';\n\nimport { getActiveTaskRun, getSortedTaskRuns } from '../../utils/taskRun-utils';\nimport { PipelineRunLogViewer } from './PipelineRunLogViewer';\nimport { TaskStatusStepper } from './TaskStatusStepper';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\ntype PipelineRunLogsProps = {\n pipelineRun: PipelineRunKind;\n taskRuns: TaskRunKind[];\n pods: V1Pod[];\n activeTask?: string;\n setActiveTask: (t: string) => void;\n};\nexport const PipelineRunLogs = ({\n pipelineRun,\n taskRuns,\n pods,\n activeTask,\n setActiveTask,\n}: PipelineRunLogsProps) => {\n const PLRTaskRuns = getTaskRunsForPipelineRun(pipelineRun, taskRuns);\n const sortedTaskRuns = getSortedTaskRuns(PLRTaskRuns);\n const taskRunFromYaml = PLRTaskRuns?.reduce(\n (acc: { [value: string]: TaskRunKind }, value) => {\n if (value?.metadata?.name) {\n acc[value.metadata.name] = value;\n }\n return acc;\n },\n {},\n );\n\n const completed = pipelineRunFilterReducer(pipelineRun);\n const [lastActiveStepId, setLastActiveStepId] = useState<string>('');\n const { t } = useTranslationRef(tektonTranslationRef);\n\n useEffect(() => {\n const mostRecentFailedOrActiveStep = sortedTaskRuns.find(tr =>\n ['Failed', 'Running'].includes(tr.status),\n );\n\n if (completed && !mostRecentFailedOrActiveStep && !activeTask) {\n setLastActiveStepId(sortedTaskRuns[sortedTaskRuns.length - 1]?.id);\n return;\n }\n\n setLastActiveStepId(\n !activeTask ? (mostRecentFailedOrActiveStep?.id as string) : '',\n );\n }, [sortedTaskRuns, completed, activeTask]);\n\n const currentStepId = activeTask || lastActiveStepId;\n const activeItem = getActiveTaskRun(sortedTaskRuns, currentStepId);\n const podName =\n activeItem && taskRunFromYaml?.[currentStepId]?.status?.podName;\n const podData = useMemo(\n () =>\n pods.find(pod => {\n return pod?.metadata?.name === podName;\n }),\n [pods, podName],\n );\n\n return (\n <Grid container>\n <Grid item xs={3}>\n <Paper>\n <TaskStatusStepper\n steps={sortedTaskRuns}\n currentStepId={currentStepId}\n onUserStepChange={setActiveTask}\n />\n </Paper>\n </Grid>\n <Grid item xs={9}>\n {!currentStepId && <Progress />}\n <div style={{ height: '80vh' }}>\n {!podData ? (\n <Paper\n elevation={1}\n style={{ height: '100%', width: '100%', minHeight: '30rem' }}\n >\n <LogViewer text={t('pipelineRunLogs.noLogs')} />\n </Paper>\n ) : (\n <PipelineRunLogViewer pod={podData} />\n )}\n </div>\n </Grid>\n </Grid>\n );\n};\n\nexport default PipelineRunLogs;\n"],"names":["PipelineRunLogViewer"],"mappings":";;;;;;;;;;;;AA2CO,MAAM,kBAAkB,CAAC;AAAA,EAC9B,WAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,
|
|
1
|
+
{"version":3,"file":"PipelineRunLogs.esm.js","sources":["../../../src/components/PipelineRunLogs/PipelineRunLogs.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, useEffect, useMemo } from 'react';\n\nimport { LogViewer, Progress } from '@backstage/core-components';\n\nimport { V1Pod } from '@kubernetes/client-node';\nimport { Paper } from '@material-ui/core';\nimport Grid from '@material-ui/core/Grid';\n\nimport {\n getTaskRunsForPipelineRun,\n pipelineRunFilterReducer,\n PipelineRunKind,\n TaskRunKind,\n} from '@janus-idp/shared-react';\n\nimport { getActiveTaskRun, getSortedTaskRuns } from '../../utils/taskRun-utils';\nimport { PipelineRunLogViewer } from './PipelineRunLogViewer';\nimport { TaskStatusStepper } from './TaskStatusStepper';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\ntype PipelineRunLogsProps = {\n pipelineRun: PipelineRunKind;\n taskRuns: TaskRunKind[];\n pods: V1Pod[];\n activeTask?: string;\n setActiveTask: (t: string) => void;\n};\nexport const PipelineRunLogs = ({\n pipelineRun,\n taskRuns,\n pods,\n activeTask,\n setActiveTask,\n}: PipelineRunLogsProps) => {\n const PLRTaskRuns = getTaskRunsForPipelineRun(pipelineRun, taskRuns);\n const sortedTaskRuns = getSortedTaskRuns(PLRTaskRuns);\n const taskRunFromYaml = PLRTaskRuns?.reduce(\n (acc: { [value: string]: TaskRunKind }, value) => {\n if (value?.metadata?.name) {\n acc[value.metadata.name] = value;\n }\n return acc;\n },\n {},\n );\n\n const completed = pipelineRunFilterReducer(pipelineRun);\n const [lastActiveStepId, setLastActiveStepId] = useState<string>('');\n const { t } = useTranslationRef(tektonTranslationRef);\n\n useEffect(() => {\n const mostRecentFailedOrActiveStep = sortedTaskRuns.find(tr =>\n ['Failed', 'Running'].includes(tr.status),\n );\n\n if (completed && !mostRecentFailedOrActiveStep && !activeTask) {\n setLastActiveStepId(sortedTaskRuns[sortedTaskRuns.length - 1]?.id);\n return;\n }\n\n setLastActiveStepId(\n !activeTask ? (mostRecentFailedOrActiveStep?.id as string) : '',\n );\n }, [sortedTaskRuns, completed, activeTask]);\n\n const currentStepId = activeTask || lastActiveStepId;\n const activeItem = getActiveTaskRun(sortedTaskRuns, currentStepId);\n const podName =\n activeItem && taskRunFromYaml?.[currentStepId]?.status?.podName;\n const podData = useMemo(\n () =>\n pods.find(pod => {\n return pod?.metadata?.name === podName;\n }),\n [pods, podName],\n );\n\n return (\n <Grid container>\n <Grid item xs={3}>\n <Paper>\n <TaskStatusStepper\n steps={sortedTaskRuns}\n currentStepId={currentStepId}\n onUserStepChange={setActiveTask}\n />\n </Paper>\n </Grid>\n <Grid item xs={9}>\n {!currentStepId && <Progress />}\n <div style={{ height: '80vh' }}>\n {!podData ? (\n <Paper\n elevation={1}\n style={{ height: '100%', width: '100%', minHeight: '30rem' }}\n >\n <LogViewer text={t('pipelineRunLogs.noLogs')} />\n </Paper>\n ) : (\n <PipelineRunLogViewer pod={podData} />\n )}\n </div>\n </Grid>\n </Grid>\n );\n};\n\nexport default PipelineRunLogs;\n"],"names":["PipelineRunLogViewer"],"mappings":";;;;;;;;;;;;AA2CO,MAAM,kBAAkB,CAAC;AAAA,EAC9B,WAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,K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A,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useState, useContext } from 'react';
|
|
3
3
|
import { useApi } from '@backstage/core-plugin-api';
|
|
4
|
+
import { kubernetesProxyApiRef } from '@backstage/plugin-kubernetes-react';
|
|
4
5
|
import { makeStyles, Link, createStyles } from '@material-ui/core';
|
|
5
6
|
import DownloadIcon from '@mui/icons-material/FileDownloadOutlined';
|
|
6
7
|
import classNames from 'classnames';
|
|
7
8
|
import { TektonResourcesContext } from '../../hooks/TektonResourcesContext.esm.js';
|
|
8
|
-
import { kubernetesProxyApiRef } from '../../types/types.esm.js';
|
|
9
9
|
import { getPodLogs } from '../../utils/log-downloader-utils.esm.js';
|
|
10
10
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
11
11
|
import { tektonTranslationRef } from '../../translation.esm.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PodLogsDownloadLink.esm.js","sources":["../../../src/components/PipelineRunLogs/PodLogsDownloadLink.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, ReactElement } from 'react';\n\nimport { useState, useContext } from 'react';\n\nimport { useApi } from '@backstage/core-plugin-api';\n\nimport { V1Pod } from '@kubernetes/client-node';\nimport { createStyles, Link, makeStyles, Theme } from '@material-ui/core';\nimport DownloadIcon from '@mui/icons-material/FileDownloadOutlined';\nimport classNames from 'classnames';\n\nimport { TektonResourcesContext } from '../../hooks/TektonResourcesContext';\nimport { ContainerScope } from '../../hooks/usePodLogsOfPipelineRun';\nimport {
|
|
1
|
+
{"version":3,"file":"PodLogsDownloadLink.esm.js","sources":["../../../src/components/PipelineRunLogs/PodLogsDownloadLink.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, ReactElement } from 'react';\n\nimport { useState, useContext } from 'react';\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport { kubernetesProxyApiRef } from '@backstage/plugin-kubernetes-react';\n\nimport { V1Pod } from '@kubernetes/client-node';\nimport { createStyles, Link, makeStyles, Theme } from '@material-ui/core';\nimport DownloadIcon from '@mui/icons-material/FileDownloadOutlined';\nimport classNames from 'classnames';\n\nimport { TektonResourcesContext } from '../../hooks/TektonResourcesContext';\nimport { ContainerScope } from '../../hooks/usePodLogsOfPipelineRun';\nimport { TektonResourcesContextData } from '../../types/types';\nimport { getPodLogs } from '../../utils/log-downloader-utils';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\nimport { downloadLogFile } from '../../utils/download-log-file-utils';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n downloadAction: {\n position: 'relative',\n marginBottom: 'var(--pf-t--global--spacer--sm)',\n color: 'var(--pf-t--global--icon--color--100)',\n cursor: 'pointer',\n },\n buttonDisabled: {\n color: theme.palette.grey[400],\n cursor: 'not-allowed',\n },\n }),\n);\n\nconst PodLogsDownloadLink: FC<{\n pods: V1Pod[];\n fileName: string;\n downloadTitle: string;\n}> = ({ pods, fileName, downloadTitle, ...props }): ReactElement => {\n const classes = useStyles();\n const [downloading, setDownloading] = useState<boolean>(false);\n const kubernetesProxyApi = useApi(kubernetesProxyApiRef);\n const { t } = useTranslationRef(tektonTranslationRef);\n\n const { clusters, selectedCluster = 0 } =\n useContext<TektonResourcesContextData>(TektonResourcesContext);\n const currCluster = clusters.length > 0 ? clusters[selectedCluster] : '';\n\n const getLogs = (podScope: ContainerScope): Promise<{ text: string }> => {\n const { podName, podNamespace, containerName, clusterName } = podScope;\n return kubernetesProxyApi.getPodLogs({\n podName: podName,\n namespace: podNamespace,\n containerName: containerName,\n clusterName: clusterName,\n });\n };\n\n return (\n <Link\n component=\"button\"\n variant=\"body2\"\n underline=\"none\"\n disabled={downloading}\n title={\n downloading\n ? t('pipelineRunLogs.podLogsDownloadLink.downloading')\n : downloadTitle\n }\n onClick={() => {\n setDownloading(true);\n getPodLogs(pods, getLogs, currCluster)\n .then((logs: string) => {\n setDownloading(false);\n downloadLogFile(logs || '', fileName);\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.warn('Download failed', err);\n setDownloading(false);\n });\n }}\n className={classNames(classes.downloadAction, {\n [classes.buttonDisabled]: downloading,\n })}\n {...props}\n >\n <DownloadIcon style={{ verticalAlign: '-0.180em' }} />\n {downloadTitle || t('pipelineRunLogs.podLogsDownloadLink.title')}\n </Link>\n );\n};\nexport default PodLogsDownloadLink;\n"],"names":[],"mappings":";;;;;;;;;;;;;AAmCA,MAAM,SAAA,GAAY,UAAA;AAAA,EAAW,CAAC,UAC5B,YAAA,CAAa;AAAA,IACX,cAAA,EAAgB;AAAA,MACd,QAAA,EAAU,UAAA;AAAA,MACV,YAAA,EAAc,iCAAA;AAAA,MACd,KAAA,EAAO,uCAAA;AAAA,MACP,MAAA,EAAQ;AAAA,KACV;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,GAAG,CAAA;AAAA,MAC7B,MAA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CAAe,KAAK,CAAA;AACpB,UAAA,eAAA,CAAgB,IAAA,IAAQ,IAAI,QAAQ,CAAA;AAAA,QACtC,CAAC,CAAA,CACA,KAAA,CAAM,CAAA,GAAA,KAAO;AAEZ,UAAA,OAAA,CAAQ,IAAA,CAAK,mBAAmB,GAAG,CAAA;AACnC,UAAA,cAAA,CAAe,KAAK,CAAA;AAAA,QACtB,CAAC,CAAA;AAAA,MACL,CAAA;AAAA,MACA,SAAA,EAAW,UAAA,CAAW,OAAA,CAAQ,cAAA,EAAgB;AAAA,QAC5C,CAAC,OAAA,CAAQ,cAAc,GAAG;AAAA,OAC3B,CAAA;AAAA,MACA,GAAG,KAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,YAAA,EAAA,EAAa,KAAA,EAAO,EAAE,aAAA,EAAe,YAAW,EAAG,CAAA;AAAA,QACnD,aAAA,IAAiB,EAAE,2CAA2C;AAAA;AAAA;AAAA,GACjE;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskStatusStepper.esm.js","sources":["../../../src/components/PipelineRunLogs/TaskStatusStepper.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, memo } from 'react';\nimport useInterval from 'react-use/lib/useInterval';\n\nimport {\n CircularProgress,\n createStyles,\n makeStyles,\n StepButton,\n StepIconProps,\n Theme,\n} from '@material-ui/core';\nimport Step from '@material-ui/core/Step';\nimport StepLabel from '@material-ui/core/StepLabel';\nimport Stepper from '@material-ui/core/Stepper';\nimport Typography from '@material-ui/core/Typography';\nimport Cancel from '@material-ui/icons/Cancel';\nimport Check from '@material-ui/icons/Check';\nimport FiberManualRecordIcon from '@material-ui/icons/FiberManualRecord';\nimport classNames from 'classnames';\n\nimport { ComputedStatus } from '@janus-idp/shared-react';\n\nimport { TaskStep } from '../../utils/taskRun-utils';\nimport { calculateDuration } from '../../utils/tekton-utils';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n width: '100%',\n },\n titleContainer: {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1),\n },\n closeButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n color: theme.palette.grey[500],\n },\n labelWrapper: {\n display: 'flex',\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n stepWrapper: {\n width: '100%',\n },\n }),\n);\n\nconst StepTimeTicker = ({ step }: { step: TaskStep }) => {\n const [time, setTime] = useState('');\n const { t } = useTranslationRef(tektonTranslationRef);\n\n useInterval(() => {\n if (!step.startedAt) {\n setTime('');\n return;\n }\n\n setTime(calculateDuration(t, step.startedAt, step.endedAt));\n }, 1000);\n\n return <Typography variant=\"caption\">{time}</Typography>;\n};\n\nconst useStepIconStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n color: theme.palette.text.disabled,\n display: 'flex',\n height: 22,\n alignItems: 'center',\n },\n completed: {\n color: theme.palette.status.ok,\n },\n error: {\n color: theme.palette.status.error,\n },\n }),\n);\n\nconst TaskStepIconComponent = ({ active, completed, error }: StepIconProps) => {\n const classes = useStepIconStyles();\n\n const getMiddle = () => {\n if (active) {\n return <CircularProgress size=\"24px\" />;\n }\n if (completed) {\n return <Check />;\n }\n if (error) {\n return <Cancel />;\n }\n return <FiberManualRecordIcon />;\n };\n\n return (\n <div\n className={classNames(classes.root, {\n [classes.completed]: completed,\n [classes.error]: error,\n })}\n >\n {getMiddle()}\n </div>\n );\n};\n\ntype TaskStatusStepperProps = {\n steps: TaskStep[];\n currentStepId: string | undefined;\n onUserStepChange: (id: string) => void;\n classes?: {\n root?: string;\n };\n};\n\nexport const TaskStatusStepper = memo((props: TaskStatusStepperProps) => {\n const { steps, currentStepId, onUserStepChange } = props;\n const classes = useStyles(props);\n const { t } = useTranslationRef(tektonTranslationRef);\n\n return (\n <div className={classes.root}>\n <Stepper\n activeStep={steps.findIndex(s => s.id === currentStepId)}\n orientation=\"vertical\"\n nonLinear\n >\n {steps.map((step, _) => {\n const isCancelled = step.status === ComputedStatus.Cancelled;\n const isActive = step.status === ComputedStatus.Running;\n const isCompleted = step.status === ComputedStatus.Succeeded;\n const isFailed = step.status === ComputedStatus.Failed;\n const isSkipped = step.status === ComputedStatus.Skipped;\n\n return (\n <Step key={step.id} expanded>\n <StepButton onClick={() => onUserStepChange(step.id)}>\n <StepLabel\n StepIconProps={{\n completed: isCompleted,\n error: isFailed || isCancelled,\n active: isActive,\n }}\n StepIconComponent={TaskStepIconComponent}\n className={classes.stepWrapper}\n >\n <div className={classes.labelWrapper}>\n <Typography variant=\"subtitle2\">{step.name}</Typography>\n {isSkipped ? (\n <Typography variant=\"caption\">\n {t('pipelineRunLogs.taskStatusStepper.skipped')}\n </Typography>\n ) : (\n <StepTimeTicker step={step} />\n )}\n </div>\n </StepLabel>\n </StepButton>\n </Step>\n );\n })}\n </Stepper>\n </div>\n );\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA0CA,MAAM,
|
|
1
|
+
{"version":3,"file":"TaskStatusStepper.esm.js","sources":["../../../src/components/PipelineRunLogs/TaskStatusStepper.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, memo } from 'react';\nimport useInterval from 'react-use/lib/useInterval';\n\nimport {\n CircularProgress,\n createStyles,\n makeStyles,\n StepButton,\n StepIconProps,\n Theme,\n} from '@material-ui/core';\nimport Step from '@material-ui/core/Step';\nimport StepLabel from '@material-ui/core/StepLabel';\nimport Stepper from '@material-ui/core/Stepper';\nimport Typography from '@material-ui/core/Typography';\nimport Cancel from '@material-ui/icons/Cancel';\nimport Check from '@material-ui/icons/Check';\nimport FiberManualRecordIcon from '@material-ui/icons/FiberManualRecord';\nimport classNames from 'classnames';\n\nimport { ComputedStatus } from '@janus-idp/shared-react';\n\nimport { TaskStep } from '../../utils/taskRun-utils';\nimport { calculateDuration } from '../../utils/tekton-utils';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n width: '100%',\n },\n titleContainer: {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1),\n },\n closeButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n color: theme.palette.grey[500],\n },\n labelWrapper: {\n display: 'flex',\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n stepWrapper: {\n width: '100%',\n },\n }),\n);\n\nconst StepTimeTicker = ({ step }: { step: TaskStep }) => {\n const [time, setTime] = useState('');\n const { t } = useTranslationRef(tektonTranslationRef);\n\n useInterval(() => {\n if (!step.startedAt) {\n setTime('');\n return;\n }\n\n setTime(calculateDuration(t, step.startedAt, step.endedAt));\n }, 1000);\n\n return <Typography variant=\"caption\">{time}</Typography>;\n};\n\nconst useStepIconStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n color: theme.palette.text.disabled,\n display: 'flex',\n height: 22,\n alignItems: 'center',\n },\n completed: {\n color: theme.palette.status.ok,\n },\n error: {\n color: theme.palette.status.error,\n },\n }),\n);\n\nconst TaskStepIconComponent = ({ active, completed, error }: StepIconProps) => {\n const classes = useStepIconStyles();\n\n const getMiddle = () => {\n if (active) {\n return <CircularProgress size=\"24px\" />;\n }\n if (completed) {\n return <Check />;\n }\n if (error) {\n return <Cancel />;\n }\n return <FiberManualRecordIcon />;\n };\n\n return (\n <div\n className={classNames(classes.root, {\n [classes.completed]: completed,\n [classes.error]: error,\n })}\n >\n {getMiddle()}\n </div>\n );\n};\n\ntype TaskStatusStepperProps = {\n steps: TaskStep[];\n currentStepId: string | undefined;\n onUserStepChange: (id: string) => void;\n classes?: {\n root?: string;\n };\n};\n\nexport const TaskStatusStepper = memo((props: TaskStatusStepperProps) => {\n const { steps, currentStepId, onUserStepChange } = props;\n const classes = useStyles(props);\n const { t } = useTranslationRef(tektonTranslationRef);\n\n return (\n <div className={classes.root}>\n <Stepper\n activeStep={steps.findIndex(s => s.id === currentStepId)}\n orientation=\"vertical\"\n nonLinear\n >\n {steps.map((step, _) => {\n const isCancelled = step.status === ComputedStatus.Cancelled;\n const isActive = step.status === ComputedStatus.Running;\n const isCompleted = step.status === ComputedStatus.Succeeded;\n const isFailed = step.status === ComputedStatus.Failed;\n const isSkipped = step.status === ComputedStatus.Skipped;\n\n return (\n <Step key={step.id} expanded>\n <StepButton onClick={() => onUserStepChange(step.id)}>\n <StepLabel\n StepIconProps={{\n completed: isCompleted,\n error: isFailed || isCancelled,\n active: isActive,\n }}\n StepIconComponent={TaskStepIconComponent}\n className={classes.stepWrapper}\n >\n <div className={classes.labelWrapper}>\n <Typography variant=\"subtitle2\">{step.name}</Typography>\n {isSkipped ? (\n <Typography variant=\"caption\">\n {t('pipelineRunLogs.taskStatusStepper.skipped')}\n </Typography>\n ) : (\n <StepTimeTicker step={step} />\n )}\n </div>\n </StepLabel>\n </StepButton>\n </Step>\n );\n })}\n </Stepper>\n </div>\n );\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;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AAiB,IAAA,CAAK,EAAE,CAAA,EACjD,QAAA,kBAAA,GAAA;AAAA,UAAC,SAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAe;AAAA,cACb,SAAA,EAAW,WAAA;AAAA,cACX,OAAO,QAAA,IAAY,WAAA;AAAA,cACnB,MAAA,EAAQ;AAAA,aACV;AAAA,YACA,iBAAA,EAAmB,qBAAA;AAAA,YACnB,WAAW,OAAA,CAAQ,WAAA;AAAA,YAEnB,QAAA,kBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,YAAA,EACtB,QAAA,EAAA;AAAA,8BAAA,GAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,WAAA,EAAa,QAAA,EAAA,IAAA,CAAK,IAAA,EAAK,CAAA;AAAA,cAC1C,SAAA,mBACC,GAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,SAAA,EACjB,QAAA,EAAA,CAAA,CAAE,2CAA2C,CAAA,EAChD,CAAA,mBAEA,GAAA,CAAC,cAAA,EAAA,EAAe,IAAA,EAAY;AAAA,aAAA,EAEhC;AAAA;AAAA,SACF,EACF,CAAA,EAAA,EAtBS,IAAA,CAAK,EAuBhB,CAAA;AAAA,MAEJ,CAAC;AAAA;AAAA,GACH,EACF,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineRunOutputDialog.esm.js","sources":["../../../src/components/PipelineRunOutput/PipelineRunOutputDialog.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 { memo } from 'react';\n\nimport { ErrorBoundary } from '@backstage/core-components';\n\nimport {\n Box,\n createStyles,\n Dialog,\n DialogContent,\n DialogTitle,\n IconButton,\n makeStyles,\n Theme,\n} from '@material-ui/core';\nimport CloseIcon from '@mui/icons-material/Close';\n\nimport { PipelineRunKind, TaskRunKind } from '@janus-idp/shared-react';\n\nimport { tektonGroupColor } from '../../types/types';\nimport PipelineRunOutput from '../PipelineRunList/PipelineRunOutput';\nimport ResourceBadge from '../PipelineRunList/ResourceBadge';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n titleContainer: {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1),\n },\n closeButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n color: theme.palette.grey[500],\n },\n }),\n);\n\ntype PipelineRunOutputDialogProps = {\n open: boolean;\n closeDialog: () => void;\n pipelineRun: PipelineRunKind;\n taskRuns: TaskRunKind[];\n};\nconst PipelineRunOutputDialog = ({\n open,\n closeDialog,\n pipelineRun,\n taskRuns,\n}: PipelineRunOutputDialogProps) => {\n const classes = useStyles();\n const { t } = useTranslationRef(tektonTranslationRef);\n\n return (\n <Dialog\n data-testid=\"pipelinerun-output-dialog\"\n maxWidth=\"xl\"\n fullWidth\n open={open}\n onClose={closeDialog}\n >\n <DialogTitle id=\"pipelinerun-output\" title={t('pipelineRunOutput.title')}>\n <Box className={classes.titleContainer}>\n <ResourceBadge\n color={tektonGroupColor}\n abbr=\"PLR\"\n name={pipelineRun?.metadata?.name ?? ''}\n />{' '}\n <IconButton\n aria-label=\"close\"\n className={classes.closeButton}\n onClick={closeDialog}\n >\n <CloseIcon />\n </IconButton>\n </Box>\n </DialogTitle>\n <DialogContent>\n <ErrorBoundary>\n <PipelineRunOutput pipelineRun={pipelineRun} taskRuns={taskRuns} />\n </ErrorBoundary>\n </DialogContent>\n </Dialog>\n );\n};\n\nexport default memo(PipelineRunOutputDialog);\n"],"names":[],"mappings":";;;;;;;;;;;AAuCA,MAAM,
|
|
1
|
+
{"version":3,"file":"PipelineRunOutputDialog.esm.js","sources":["../../../src/components/PipelineRunOutput/PipelineRunOutputDialog.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 { memo } from 'react';\n\nimport { ErrorBoundary } from '@backstage/core-components';\n\nimport {\n Box,\n createStyles,\n Dialog,\n DialogContent,\n DialogTitle,\n IconButton,\n makeStyles,\n Theme,\n} from '@material-ui/core';\nimport CloseIcon from '@mui/icons-material/Close';\n\nimport { PipelineRunKind, TaskRunKind } from '@janus-idp/shared-react';\n\nimport { tektonGroupColor } from '../../types/types';\nimport PipelineRunOutput from '../PipelineRunList/PipelineRunOutput';\nimport ResourceBadge from '../PipelineRunList/ResourceBadge';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n titleContainer: {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1),\n },\n closeButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n color: theme.palette.grey[500],\n },\n }),\n);\n\ntype PipelineRunOutputDialogProps = {\n open: boolean;\n closeDialog: () => void;\n pipelineRun: PipelineRunKind;\n taskRuns: TaskRunKind[];\n};\nconst PipelineRunOutputDialog = ({\n open,\n closeDialog,\n pipelineRun,\n taskRuns,\n}: PipelineRunOutputDialogProps) => {\n const classes = useStyles();\n const { t } = useTranslationRef(tektonTranslationRef);\n\n return (\n <Dialog\n data-testid=\"pipelinerun-output-dialog\"\n maxWidth=\"xl\"\n fullWidth\n open={open}\n onClose={closeDialog}\n >\n <DialogTitle id=\"pipelinerun-output\" title={t('pipelineRunOutput.title')}>\n <Box className={classes.titleContainer}>\n <ResourceBadge\n color={tektonGroupColor}\n abbr=\"PLR\"\n name={pipelineRun?.metadata?.name ?? ''}\n />{' '}\n <IconButton\n aria-label=\"close\"\n className={classes.closeButton}\n onClick={closeDialog}\n >\n <CloseIcon />\n </IconButton>\n </Box>\n </DialogTitle>\n <DialogContent>\n <ErrorBoundary>\n <PipelineRunOutput pipelineRun={pipelineRun} taskRuns={taskRuns} />\n </ErrorBoundary>\n </DialogContent>\n </Dialog>\n );\n};\n\nexport default memo(PipelineRunOutputDialog);\n"],"names":[],"mappings":";;;;;;;;;;;AAuCA,MAAM,SAAA,GAAY,UAAA;AAAA,EAAW,CAAC,UAC5B,YAAA,CAAa;AAAA,IACX,cAAA,EAAgB;AAAA,MACd,OAAA,EAAS,MAAA;AAAA,MACT,UAAA,EAAY,QAAA;AAAA,MACZ,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA,KACtB;AAAA,IACA,WAAA,EAAa;AAAA,MACX,QAAA,EAAU,UAAA;AAAA,MACV,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,MACtB,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,MACpB,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,GAAG;AAAA;AAC/B,GACD;AACH,CAAA;AAQA,MAAM,0BAA0B,CAAC;AAAA,EAC/B,IAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA;AACF,CAAA,KAAoC;AAClC,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,oBAAoB,CAAA;AAEpD,EAAA,uBACE,IAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,aAAA,EAAY,2BAAA;AAAA,MACZ,QAAA,EAAS,IAAA;AAAA,MACT,SAAA,EAAS,IAAA;AAAA,MACT,IAAA;AAAA,MACA,OAAA,EAAS,WAAA;AAAA,MAET,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,WAAA,EAAA,EAAY,EAAA,EAAG,oBAAA,EAAqB,KAAA,EAAO,CAAA,CAAE,yBAAyB,CAAA,EACrE,QAAA,kBAAA,IAAA,CAAC,GAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,cAAA,EACtB,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,aAAA;AAAA,YAAA;AAAA,cACC,KAAA,EAAO,gBAAA;AAAA,cACP,IAAA,EAAK,KAAA;AAAA,cACL,IAAA,EAAM,WAAA,EAAa,QAAA,EAAU,IAAA,IAAQ;AAAA;AAAA,WACvC;AAAA,UAAG,GAAA;AAAA,0BACH,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,YAAA,EAAW,OAAA;AAAA,cACX,WAAW,OAAA,CAAQ,WAAA;AAAA,cACnB,OAAA,EAAS,WAAA;AAAA,cAET,8BAAC,SAAA,EAAA,EAAU;AAAA;AAAA;AACb,SAAA,EACF,CAAA,EACF,CAAA;AAAA,wBACA,GAAA,CAAC,iBACC,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EACC,8BAAC,iBAAA,EAAA,EAAkB,WAAA,EAA0B,QAAA,EAAoB,CAAA,EACnE,CAAA,EACF;AAAA;AAAA;AAAA,GACF;AAEJ,CAAA;AAEA,gCAAe,KAAK,uBAAuB,CAAA;;;;"}
|
|
@@ -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 { Route, Routes } from 'react-router-dom';\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\n\nimport { TektonCIComponent } from './Tekton/TektonCIComponent';\nimport { isTektonCIAvailable } from '../utils/isTektonCIAvailable';\n\n/** @public */\nexport const Router = () => {\n const { entity } = useEntity();\n if (isTektonCIAvailable(entity)) {\n return (\n <Routes>\n <Route path=\"/\" element={<TektonCIComponent />} />\n </Routes>\n );\n }\n return null;\n};\n"],"names":[],"mappings":";;;;;;AAuBO,MAAM,SAAS,MAAM;AAC1B,
|
|
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';\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\n\nimport { TektonCIComponent } from './Tekton/TektonCIComponent';\nimport { isTektonCIAvailable } from '../utils/isTektonCIAvailable';\n\n/** @public */\nexport const Router = () => {\n const { entity } = useEntity();\n if (isTektonCIAvailable(entity)) {\n return (\n <Routes>\n <Route path=\"/\" element={<TektonCIComponent />} />\n </Routes>\n );\n }\n return null;\n};\n"],"names":[],"mappings":";;;;;;AAuBO,MAAM,SAAS,MAAM;AAC1B,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,IAAI,mBAAA,CAAoB,MAAM,CAAA,EAAG;AAC/B,IAAA,uBACE,GAAA,CAAC,MAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAM,IAAA,EAAK,KAAI,OAAA,kBAAS,GAAA,CAAC,iBAAA,EAAA,EAAkB,CAAA,EAAI,CAAA,EAClD,CAAA;AAAA,EAEJ;AACA,EAAA,OAAO,IAAA;AACT;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TektonCIComponent.esm.js","sources":["../../../src/components/Tekton/TektonCIComponent.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 { useLayoutEffect } from 'react';\n\nimport { TektonResourcesContext } from '../../hooks/TektonResourcesContext';\nimport { useDarkTheme } from '../../hooks/useDarkTheme';\nimport { useTektonObjectsResponse } from '../../hooks/useTektonObjectsResponse';\nimport { useTektonViewPermission } from '../../hooks/useTektonViewPermission';\nimport { ModelsPlural } from '../../models';\nimport PermissionAlert from '../common/PermissionAlert';\nimport PipelineRunList from '../PipelineRunList/PipelineRunList';\n\nimport '@patternfly/react-core/dist/styles/base-no-reset.css';\nimport '@patternfly/patternfly/utilities/Accessibility/accessibility.css';\nimport { Progress } from '@backstage/core-components';\n\nconst savedStylesheets = new Set<HTMLLinkElement>();\n\nexport const TektonCIComponent = () => {\n useDarkTheme();\n\n useLayoutEffect(() => {\n const scalprumStyles = Array.from(\n document.querySelectorAll('link[rel=\"stylesheet\"]'),\n ).filter(link =>\n link.attributes\n .getNamedItem('href')\n ?.value?.includes('backstage-plugin-tekton'),\n );\n\n scalprumStyles.forEach(link =>\n savedStylesheets.add(link as HTMLLinkElement),\n );\n\n savedStylesheets.forEach(link => {\n if (!document.head.contains(link)) {\n document.head.appendChild(link);\n }\n });\n return () => {\n savedStylesheets.forEach(link => {\n if (document.head.contains(link)) {\n document.head.removeChild(link);\n }\n });\n };\n }, []);\n\n const watchedResources = [\n ModelsPlural.pipelineruns,\n ModelsPlural.taskruns,\n ModelsPlural.pods,\n ];\n const tektonResourcesContextData = useTektonObjectsResponse(watchedResources);\n const viewPermissionData = useTektonViewPermission();\n\n if (viewPermissionData.loading) {\n return (\n <div data-testid=\"tekton-permission-progress\">\n <Progress />\n </div>\n );\n }\n if (!viewPermissionData.allowed) {\n return <PermissionAlert />;\n }\n return (\n <TektonResourcesContext.Provider value={tektonResourcesContextData}>\n <PipelineRunList />\n </TektonResourcesContext.Provider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AA6BA,MAAM,gBAAA,uBAAuB,
|
|
1
|
+
{"version":3,"file":"TektonCIComponent.esm.js","sources":["../../../src/components/Tekton/TektonCIComponent.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 { useLayoutEffect } from 'react';\n\nimport { TektonResourcesContext } from '../../hooks/TektonResourcesContext';\nimport { useDarkTheme } from '../../hooks/useDarkTheme';\nimport { useTektonObjectsResponse } from '../../hooks/useTektonObjectsResponse';\nimport { useTektonViewPermission } from '../../hooks/useTektonViewPermission';\nimport { ModelsPlural } from '../../models';\nimport PermissionAlert from '../common/PermissionAlert';\nimport PipelineRunList from '../PipelineRunList/PipelineRunList';\n\nimport '@patternfly/react-core/dist/styles/base-no-reset.css';\nimport '@patternfly/patternfly/utilities/Accessibility/accessibility.css';\nimport { Progress } from '@backstage/core-components';\n\nconst savedStylesheets = new Set<HTMLLinkElement>();\n\nexport const TektonCIComponent = () => {\n useDarkTheme();\n\n useLayoutEffect(() => {\n const scalprumStyles = Array.from(\n document.querySelectorAll('link[rel=\"stylesheet\"]'),\n ).filter(link =>\n link.attributes\n .getNamedItem('href')\n ?.value?.includes('backstage-plugin-tekton'),\n );\n\n scalprumStyles.forEach(link =>\n savedStylesheets.add(link as HTMLLinkElement),\n );\n\n savedStylesheets.forEach(link => {\n if (!document.head.contains(link)) {\n document.head.appendChild(link);\n }\n });\n return () => {\n savedStylesheets.forEach(link => {\n if (document.head.contains(link)) {\n document.head.removeChild(link);\n }\n });\n };\n }, []);\n\n const watchedResources = [\n ModelsPlural.pipelineruns,\n ModelsPlural.taskruns,\n ModelsPlural.pods,\n ];\n const tektonResourcesContextData = useTektonObjectsResponse(watchedResources);\n const viewPermissionData = useTektonViewPermission();\n\n if (viewPermissionData.loading) {\n return (\n <div data-testid=\"tekton-permission-progress\">\n <Progress />\n </div>\n );\n }\n if (!viewPermissionData.allowed) {\n return <PermissionAlert />;\n }\n return (\n <TektonResourcesContext.Provider value={tektonResourcesContextData}>\n <PipelineRunList />\n </TektonResourcesContext.Provider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AA6BA,MAAM,gBAAA,uBAAuB,GAAA,EAAqB;AAE3C,MAAM,oBAAoB,MAAM;AACrC,EAAA,YAAA,EAAa;AAEb,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,MAAM,iBAAiB,KAAA,CAAM,IAAA;AAAA,MAC3B,QAAA,CAAS,iBAAiB,wBAAwB;AAAA,KACpD,CAAE,MAAA;AAAA,MAAO,CAAA,IAA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AAuB,QAAA,EAAvB,EAAgC,OAAO,0BAAA,EACtC,QAAA,kBAAA,GAAA,CAAC,mBAAgB,CAAA,EACnB,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterSelector.esm.js","sources":["../../../src/components/common/ClusterSelector.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 { useContext, useState } from 'react';\n\nimport { Select, SelectedItems } from '@backstage/core-components';\nimport { BackstageTheme } from '@backstage/theme';\n\nimport { makeStyles, Typography } from '@material-ui/core';\n\nimport { TektonResourcesContext } from '../../hooks/TektonResourcesContext';\n\nimport './ClusterSelector.css';\n\nconst useStyles = makeStyles<BackstageTheme>(theme => ({\n label: {\n color: theme.palette.text.primary,\n fontSize: '1rem',\n paddingRight: '10px',\n fontWeight: 'bold',\n },\n}));\n\nexport const ClusterSelector = () => {\n const classes = useStyles();\n const {\n clusters: k8sClusters,\n selectedCluster,\n setSelectedCluster: setClusterContext,\n } = useContext(TektonResourcesContext);\n const clusterOptions = k8sClusters.map(cluster => ({\n value: cluster,\n label: cluster,\n }));\n\n const curCluster =\n selectedCluster && k8sClusters?.length > 0\n ? k8sClusters[selectedCluster]\n : k8sClusters?.[0];\n\n const [clusterSelected, setClusterSelected] =\n useState<SelectedItems>(curCluster);\n\n const onClusterChange = (arg: SelectedItems) => {\n const index = k8sClusters.findIndex(cluster => cluster === arg);\n setClusterContext(index);\n setClusterSelected(arg);\n };\n return (\n <div className=\"bs-tkn-cluster-selector\">\n <Typography className={classes.label}>Cluster</Typography>\n <Select\n onChange={onClusterChange}\n label=\"\"\n items={clusterOptions}\n selected={clusterSelected}\n margin=\"dense\"\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA0BA,MAAM,SAAA,GAAY,WAA2B,
|
|
1
|
+
{"version":3,"file":"ClusterSelector.esm.js","sources":["../../../src/components/common/ClusterSelector.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 { useContext, useState } from 'react';\n\nimport { Select, SelectedItems } from '@backstage/core-components';\nimport { BackstageTheme } from '@backstage/theme';\n\nimport { makeStyles, Typography } from '@material-ui/core';\n\nimport { TektonResourcesContext } from '../../hooks/TektonResourcesContext';\n\nimport './ClusterSelector.css';\n\nconst useStyles = makeStyles<BackstageTheme>(theme => ({\n label: {\n color: theme.palette.text.primary,\n fontSize: '1rem',\n paddingRight: '10px',\n fontWeight: 'bold',\n },\n}));\n\nexport const ClusterSelector = () => {\n const classes = useStyles();\n const {\n clusters: k8sClusters,\n selectedCluster,\n setSelectedCluster: setClusterContext,\n } = useContext(TektonResourcesContext);\n const clusterOptions = k8sClusters.map(cluster => ({\n value: cluster,\n label: cluster,\n }));\n\n const curCluster =\n selectedCluster && k8sClusters?.length > 0\n ? k8sClusters[selectedCluster]\n : k8sClusters?.[0];\n\n const [clusterSelected, setClusterSelected] =\n useState<SelectedItems>(curCluster);\n\n const onClusterChange = (arg: SelectedItems) => {\n const index = k8sClusters.findIndex(cluster => cluster === arg);\n setClusterContext(index);\n setClusterSelected(arg);\n };\n return (\n <div className=\"bs-tkn-cluster-selector\">\n <Typography className={classes.label}>Cluster</Typography>\n <Select\n onChange={onClusterChange}\n label=\"\"\n items={clusterOptions}\n selected={clusterSelected}\n margin=\"dense\"\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA0BA,MAAM,SAAA,GAAY,WAA2B,CAAA,KAAA,MAAU;AAAA,EACrD,KAAA,EAAO;AAAA,IACL,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,OAAA;AAAA,IAC1B,QAAA,EAAU,MAAA;AAAA,IACV,YAAA,EAAc,MAAA;AAAA,IACd,UAAA,EAAY;AAAA;AAEhB,CAAA,CAAE,CAAA;AAEK,MAAM,kBAAkB,MAAM;AACnC,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM;AAAA,IACJ,QAAA,EAAU,WAAA;AAAA,IACV,eAAA;AAAA,IACA,kBAAA,EAAoB;AAAA,GACtB,GAAI,WAAW,sBAAsB,CAAA;AACrC,EAAA,MAAM,cAAA,GAAiB,WAAA,CAAY,GAAA,CAAI,CAAA,OAAA,MAAY;AAAA,IACjD,KAAA,EAAO,OAAA;AAAA,IACP,KAAA,EAAO;AAAA,GACT,CAAE,CAAA;AAEF,EAAA,MAAM,UAAA,GACJ,mBAAmB,WAAA,EAAa,MAAA,GAAS,IACrC,WAAA,CAAY,eAAe,CAAA,GAC3B,WAAA,GAAc,CAAC,CAAA;AAErB,EAAA,MAAM,CAAC,eAAA,EAAiB,kBAAkB,CAAA,GACxC,SAAwB,UAAU,CAAA;AAEpC,EAAA,MAAM,eAAA,GAAkB,CAAC,GAAA,KAAuB;AAC9C,IAAA,MAAM,KAAA,GAAQ,WAAA,CAAY,SAAA,CAAU,CAAA,OAAA,KAAW,YAAY,GAAG,CAAA;AAC9D,IAAA,iBAAA,CAAkB,KAAK,CAAA;AACvB,IAAA,kBAAA,CAAmB,GAAG,CAAA;AAAA,EACxB,CAAA;AACA,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,yBAAA,EACb,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,SAAA,EAAW,OAAA,CAAQ,KAAA,EAAO,QAAA,EAAA,SAAA,EAAO,CAAA;AAAA,oBAC7C,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,QAAA,EAAU,eAAA;AAAA,QACV,KAAA,EAAM,EAAA;AAAA,QACN,KAAA,EAAO,cAAA;AAAA,QACP,QAAA,EAAU,eAAA;AAAA,QACV,MAAA,EAAO;AAAA;AAAA;AACT,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorPanel.esm.js","sources":["../../../src/components/common/ErrorPanel.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 { WarningPanel } from '@backstage/core-components';\nimport { useEntity } from '@backstage/plugin-catalog-react';\n\nimport { Typography } from '@material-ui/core';\n\nimport { ClusterError, ClusterErrors } from '../../types/types';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\ntype ErrorPanelProps = { allErrors: ClusterErrors };\n\nexport const ErrorPanel = ({ allErrors }: ErrorPanelProps) => {\n const {\n entity: {\n metadata: { name: entityName },\n },\n } = useEntity();\n const { t } = useTranslationRef(tektonTranslationRef);\n return (\n <div className=\"warning-panel\" style={{ marginBottom: '16px' }}>\n <WarningPanel\n title={t('errorPanel.title')}\n message={t('errorPanel.description', {\n entityName,\n })}\n >\n <div>\n Errors:\n {allErrors.map((err: ClusterError, _index) => {\n const errMessage = err.message\n ? `${err.message}`\n : `Error fetching Kubernetes resource: '${err.resourcePath}', error: ${err.errorType}, status code: ${err.statusCode}`;\n return (\n <Typography\n variant=\"body2\"\n key={`${err.resourcePath}-${err.statusCode}`}\n >\n {err.errorType === 'FETCH_ERROR'\n ? `Error communicating with Kubernetes: ${err.errorType}, message: ${err.message}`\n : errMessage}\n </Typography>\n );\n })}\n </div>\n </WarningPanel>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA0BO,MAAM,
|
|
1
|
+
{"version":3,"file":"ErrorPanel.esm.js","sources":["../../../src/components/common/ErrorPanel.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 { WarningPanel } from '@backstage/core-components';\nimport { useEntity } from '@backstage/plugin-catalog-react';\n\nimport { Typography } from '@material-ui/core';\n\nimport { ClusterError, ClusterErrors } from '../../types/types';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\ntype ErrorPanelProps = { allErrors: ClusterErrors };\n\nexport const ErrorPanel = ({ allErrors }: ErrorPanelProps) => {\n const {\n entity: {\n metadata: { name: entityName },\n },\n } = useEntity();\n const { t } = useTranslationRef(tektonTranslationRef);\n return (\n <div className=\"warning-panel\" style={{ marginBottom: '16px' }}>\n <WarningPanel\n title={t('errorPanel.title')}\n message={t('errorPanel.description', {\n entityName,\n })}\n >\n <div>\n Errors:\n {allErrors.map((err: ClusterError, _index) => {\n const errMessage = err.message\n ? `${err.message}`\n : `Error fetching Kubernetes resource: '${err.resourcePath}', error: ${err.errorType}, status code: ${err.statusCode}`;\n return (\n <Typography\n variant=\"body2\"\n key={`${err.resourcePath}-${err.statusCode}`}\n >\n {err.errorType === 'FETCH_ERROR'\n ? `Error communicating with Kubernetes: ${err.errorType}, message: ${err.message}`\n : errMessage}\n </Typography>\n );\n })}\n </div>\n </WarningPanel>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA0BO,MAAM,UAAA,GAAa,CAAC,EAAE,SAAA,EAAU,KAAuB;AAC5D,EAAA,MAAM;AAAA,IACJ,MAAA,EAAQ;AAAA,MACN,QAAA,EAAU,EAAE,IAAA,EAAM,UAAA;AAAW;AAC/B,MACE,SAAA,EAAU;AACd,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,oBAAoB,CAAA;AACpD,EAAA,uBACE,GAAA,CAAC,SAAI,SAAA,EAAU,eAAA,EAAgB,OAAO,EAAE,YAAA,EAAc,QAAO,EAC3D,QAAA,kBAAA,GAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,EAAE,kBAAkB,CAAA;AAAA,MAC3B,OAAA,EAAS,EAAE,wBAAA,EAA0B;AAAA,QACnC;AAAA,OACD,CAAA;AAAA,MAED,+BAAC,KAAA,EAAA,EAAI,QAAA,EAAA;AAAA,QAAA,SAAA;AAAA,QAEF,SAAA,CAAU,GAAA,CAAI,CAAC,GAAA,EAAmB,MAAA,KAAW;AAC5C,UAAA,MAAM,UAAA,GAAa,GAAA,CAAI,OAAA,GACnB,CAAA,EAAG,IAAI,OAAO,CAAA,CAAA,GACd,CAAA,qCAAA,EAAwC,GAAA,CAAI,YAAY,CAAA,UAAA,EAAa,GAAA,CAAI,SAAS,CAAA,eAAA,EAAkB,IAAI,UAAU,CAAA,CAAA;AACtH,UAAA,uBACE,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,OAAA,EAAQ,OAAA;AAAA,cAGP,QAAA,EAAA,GAAA,CAAI,cAAc,aAAA,GACf,CAAA,qCAAA,EAAwC,IAAI,SAAS,CAAA,WAAA,EAAc,GAAA,CAAI,OAAO,CAAA,CAAA,GAC9E;AAAA,aAAA;AAAA,YAJC,CAAA,EAAG,GAAA,CAAI,YAAY,CAAA,CAAA,EAAI,IAAI,UAAU,CAAA;AAAA,WAK5C;AAAA,QAEJ,CAAC;AAAA,OAAA,EACH;AAAA;AAAA,GACF,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PermissionAlert.esm.js","sources":["../../../src/components/common/PermissionAlert.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 { Alert, AlertTitle } from '@material-ui/lab';\nimport {\n kubernetesClustersReadPermission,\n kubernetesResourcesReadPermission,\n} from '@backstage/plugin-kubernetes-common';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst permissions = [\n kubernetesClustersReadPermission,\n kubernetesResourcesReadPermission,\n]\n .map(p => p.name)\n .join(', ');\n\nconst PermissionAlert = () => {\n const { t } = useTranslationRef(tektonTranslationRef);\n\n return (\n <Alert severity=\"warning\" data-testid=\"no-permission-alert\">\n <AlertTitle>{t('permissionAlert.title')}</AlertTitle>\n {t('permissionAlert.description', { permissions })}\n </Alert>\n );\n};\nexport default PermissionAlert;\n"],"names":[],"mappings":";;;;;;AAuBA,MAAM,
|
|
1
|
+
{"version":3,"file":"PermissionAlert.esm.js","sources":["../../../src/components/common/PermissionAlert.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 { Alert, AlertTitle } from '@material-ui/lab';\nimport {\n kubernetesClustersReadPermission,\n kubernetesResourcesReadPermission,\n} from '@backstage/plugin-kubernetes-common';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst permissions = [\n kubernetesClustersReadPermission,\n kubernetesResourcesReadPermission,\n]\n .map(p => p.name)\n .join(', ');\n\nconst PermissionAlert = () => {\n const { t } = useTranslationRef(tektonTranslationRef);\n\n return (\n <Alert severity=\"warning\" data-testid=\"no-permission-alert\">\n <AlertTitle>{t('permissionAlert.title')}</AlertTitle>\n {t('permissionAlert.description', { permissions })}\n </Alert>\n );\n};\nexport default PermissionAlert;\n"],"names":[],"mappings":";;;;;;AAuBA,MAAM,WAAA,GAAc;AAAA,EAClB,gCAAA;AAAA,EACA;AACF,CAAA,CACG,IAAI,CAAA,CAAA,KAAK,CAAA,CAAE,IAAI,CAAA,CACf,KAAK,IAAI,CAAA;AAEZ,MAAM,kBAAkB,MAAM;AAC5B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,oBAAoB,CAAA;AAEpD,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAM,QAAA,EAAS,SAAA,EAAU,eAAY,qBAAA,EACpC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,UAAA,EAAA,EAAY,QAAA,EAAA,CAAA,CAAE,uBAAuB,CAAA,EAAE,CAAA;AAAA,IACvC,CAAA,CAAE,6BAAA,EAA+B,EAAE,WAAA,EAAa;AAAA,GAAA,EACnD,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusSelector.esm.js","sources":["../../../src/components/common/StatusSelector.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 { useContext } from 'react';\n\nimport { Select, SelectedItems } from '@backstage/core-components';\n\nimport { makeStyles, Theme, Typography } from '@material-ui/core';\n\nimport './StatusSelector.css';\n\nimport { ComputedStatus } from '@janus-idp/shared-react';\n\nimport { TektonResourcesContext } from '../../hooks/TektonResourcesContext';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst useStyles = makeStyles<Theme>(theme => ({\n label: {\n color: theme.palette.text.primary,\n fontSize: '1rem',\n paddingRight: '10px',\n fontWeight: 'bold',\n },\n}));\n\nexport const StatusSelector = () => {\n const classes = useStyles();\n const { selectedStatus, setSelectedStatus } = useContext(\n TektonResourcesContext,\n );\n\n const onStatusChange = (status: SelectedItems) => {\n setSelectedStatus(status as ComputedStatus);\n };\n const { t } = useTranslationRef(tektonTranslationRef);\n const statusOptions = Object.entries(ComputedStatus)\n .sort(([keyA], [keyB]) => {\n if (keyA === keyB) {\n return 0;\n } else if (keyA < keyB) {\n return -1;\n }\n return 1;\n })\n .map(([key, value]) => ({\n value: key,\n label: t(`pipelineRunStatus.${key}` as any, { defaultValue: value }),\n }));\n\n return (\n <div className=\"bs-tkn-status-selector\">\n <Typography className={classes.label}>\n {t('statusSelector.label')}\n </Typography>\n <Select\n onChange={onStatusChange}\n label=\"\"\n items={statusOptions}\n selected={selectedStatus}\n margin=\"dense\"\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AA6BA,MAAM,SAAA,GAAY,WAAkB,
|
|
1
|
+
{"version":3,"file":"StatusSelector.esm.js","sources":["../../../src/components/common/StatusSelector.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 { useContext } from 'react';\n\nimport { Select, SelectedItems } from '@backstage/core-components';\n\nimport { makeStyles, Theme, Typography } from '@material-ui/core';\n\nimport './StatusSelector.css';\n\nimport { ComputedStatus } from '@janus-idp/shared-react';\n\nimport { TektonResourcesContext } from '../../hooks/TektonResourcesContext';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst useStyles = makeStyles<Theme>(theme => ({\n label: {\n color: theme.palette.text.primary,\n fontSize: '1rem',\n paddingRight: '10px',\n fontWeight: 'bold',\n },\n}));\n\nexport const StatusSelector = () => {\n const classes = useStyles();\n const { selectedStatus, setSelectedStatus } = useContext(\n TektonResourcesContext,\n );\n\n const onStatusChange = (status: SelectedItems) => {\n setSelectedStatus(status as ComputedStatus);\n };\n const { t } = useTranslationRef(tektonTranslationRef);\n const statusOptions = Object.entries(ComputedStatus)\n .sort(([keyA], [keyB]) => {\n if (keyA === keyB) {\n return 0;\n } else if (keyA < keyB) {\n return -1;\n }\n return 1;\n })\n .map(([key, value]) => ({\n value: key,\n label: t(`pipelineRunStatus.${key}` as any, { defaultValue: value }),\n }));\n\n return (\n <div className=\"bs-tkn-status-selector\">\n <Typography className={classes.label}>\n {t('statusSelector.label')}\n </Typography>\n <Select\n onChange={onStatusChange}\n label=\"\"\n items={statusOptions}\n selected={selectedStatus}\n margin=\"dense\"\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AA6BA,MAAM,SAAA,GAAY,WAAkB,CAAA,KAAA,MAAU;AAAA,EAC5C,KAAA,EAAO;AAAA,IACL,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,OAAA;AAAA,IAC1B,QAAA,EAAU,MAAA;AAAA,IACV,YAAA,EAAc,MAAA;AAAA,IACd,UAAA,EAAY;AAAA;AAEhB,CAAA,CAAE,CAAA;AAEK,MAAM,iBAAiB,MAAM;AAClC,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,EAAE,cAAA,EAAgB,iBAAA,EAAkB,GAAI,UAAA;AAAA,IAC5C;AAAA,GACF;AAEA,EAAA,MAAM,cAAA,GAAiB,CAAC,MAAA,KAA0B;AAChD,IAAA,iBAAA,CAAkB,MAAwB,CAAA;AAAA,EAC5C,CAAA;AACA,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,oBAAoB,CAAA;AACpD,EAAA,MAAM,aAAA,GAAgB,MAAA,CAAO,OAAA,CAAQ,cAAc,CAAA,CAChD,IAAA,CAAK,CAAC,CAAC,IAAI,CAAA,EAAG,CAAC,IAAI,CAAA,KAAM;AACxB,IAAA,IAAI,SAAS,IAAA,EAAM;AACjB,MAAA,OAAO,CAAA;AAAA,IACT,CAAA,MAAA,IAAW,OAAO,IAAA,EAAM;AACtB,MAAA,OAAO,EAAA;AAAA,IACT;AACA,IAAA,OAAO,CAAA;AAAA,EACT,CAAC,CAAA,CACA,GAAA,CAAI,CAAC,CAAC,GAAA,EAAK,KAAK,CAAA,MAAO;AAAA,IACtB,KAAA,EAAO,GAAA;AAAA,IACP,KAAA,EAAO,EAAE,CAAA,kBAAA,EAAqB,GAAG,IAAW,EAAE,YAAA,EAAc,OAAO;AAAA,GACrE,CAAE,CAAA;AAEJ,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,wBAAA,EACb,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,cAAW,SAAA,EAAW,OAAA,CAAQ,KAAA,EAC5B,QAAA,EAAA,CAAA,CAAE,sBAAsB,CAAA,EAC3B,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,QAAA,EAAU,cAAA;AAAA,QACV,KAAA,EAAM,EAAA;AAAA,QACN,KAAA,EAAO,aAAA;AAAA,QACP,QAAA,EAAU,cAAA;AAAA,QACV,MAAA,EAAO;AAAA;AAAA;AACT,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableExpandCollapse.esm.js","sources":["../../../src/components/common/TableExpandCollapse.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 { useContext } from 'react';\n\nimport { IconButton, makeStyles, Tooltip } from '@material-ui/core';\nimport Collapse from '@material-ui/icons/UnfoldLess';\nimport Expand from '@material-ui/icons/UnfoldMore';\n\nimport { TektonResourcesContext } from '../../hooks/TektonResourcesContext';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst useStyles = makeStyles({\n expandCollapse: {\n flexGrow: 1,\n textAlign: 'end',\n },\n iconButton: {\n padding: '2px',\n },\n});\n\nexport const TableExpandCollapse = () => {\n const classes = useStyles();\n const { isExpanded, setIsExpanded } = useContext(TektonResourcesContext);\n const { t } = useTranslationRef(tektonTranslationRef);\n\n const handleExpandCollaspse = () => {\n setIsExpanded(!isExpanded);\n };\n return (\n <div className={classes.expandCollapse}>\n <Tooltip title={t('tableExpandCollapse.collapseAll')} placement=\"top\">\n <span>\n <IconButton\n onClick={() => handleExpandCollaspse()}\n disabled={!isExpanded}\n className={classes.iconButton}\n >\n <Collapse />\n </IconButton>\n </span>\n </Tooltip>\n <Tooltip title={t('tableExpandCollapse.expandAll')} placement=\"top\">\n <span>\n <IconButton\n onClick={() => handleExpandCollaspse()}\n disabled={isExpanded}\n className={classes.iconButton}\n >\n <Expand />\n </IconButton>\n </span>\n </Tooltip>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAyBA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"TableExpandCollapse.esm.js","sources":["../../../src/components/common/TableExpandCollapse.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 { useContext } from 'react';\n\nimport { IconButton, makeStyles, Tooltip } from '@material-ui/core';\nimport Collapse from '@material-ui/icons/UnfoldLess';\nimport Expand from '@material-ui/icons/UnfoldMore';\n\nimport { TektonResourcesContext } from '../../hooks/TektonResourcesContext';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { tektonTranslationRef } from '../../translation';\n\nconst useStyles = makeStyles({\n expandCollapse: {\n flexGrow: 1,\n textAlign: 'end',\n },\n iconButton: {\n padding: '2px',\n },\n});\n\nexport const TableExpandCollapse = () => {\n const classes = useStyles();\n const { isExpanded, setIsExpanded } = useContext(TektonResourcesContext);\n const { t } = useTranslationRef(tektonTranslationRef);\n\n const handleExpandCollaspse = () => {\n setIsExpanded(!isExpanded);\n };\n return (\n <div className={classes.expandCollapse}>\n <Tooltip title={t('tableExpandCollapse.collapseAll')} placement=\"top\">\n <span>\n <IconButton\n onClick={() => handleExpandCollaspse()}\n disabled={!isExpanded}\n className={classes.iconButton}\n >\n <Collapse />\n </IconButton>\n </span>\n </Tooltip>\n <Tooltip title={t('tableExpandCollapse.expandAll')} placement=\"top\">\n <span>\n <IconButton\n onClick={() => handleExpandCollaspse()}\n disabled={isExpanded}\n className={classes.iconButton}\n >\n <Expand />\n </IconButton>\n </span>\n </Tooltip>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAyBA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,cAAA,EAAgB;AAAA,IACd,QAAA,EAAU,CAAA;AAAA,IACV,SAAA,EAAW;AAAA,GACb;AAAA,EACA,UAAA,EAAY;AAAA,IACV,OAAA,EAAS;AAAA;AAEb,CAAC,CAAA;AAEM,MAAM,sBAAsB,MAAM;AACvC,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,EAAE,UAAA,EAAY,aAAA,EAAc,GAAI,WAAW,sBAAsB,CAAA;AACvE,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,oBAAoB,CAAA;AAEpD,EAAA,MAAM,wBAAwB,MAAM;AAClC,IAAA,aAAA,CAAc,CAAC,UAAU,CAAA;AAAA,EAC3B,CAAA;AACA,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,cAAA,EACtB,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,OAAA,EAAA,EAAQ,OAAO,CAAA,CAAE,iCAAiC,GAAG,SAAA,EAAU,KAAA,EAC9D,8BAAC,MAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAS,MAAM,qBAAA,EAAsB;AAAA,QACrC,UAAU,CAAC,UAAA;AAAA,QACX,WAAW,OAAA,CAAQ,UAAA;AAAA,QAEnB,8BAAC,QAAA,EAAA,EAAS;AAAA;AAAA,OAEd,CAAA,EACF,CAAA;AAAA,oBACA,GAAA,CAAC,WAAQ,KAAA,EAAO,CAAA,CAAE,+BAA+B,CAAA,EAAG,SAAA,EAAU,KAAA,EAC5D,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAS,MAAM,qBAAA,EAAsB;AAAA,QACrC,QAAA,EAAU,UAAA;AAAA,QACV,WAAW,OAAA,CAAQ,UAAA;AAAA,QAEnB,8BAAC,MAAA,EAAA,EAAO;AAAA;AAAA,OAEZ,CAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineLayout.esm.js","sources":["../../../src/components/pipeline-topology/PipelineLayout.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, useRef, useCallback, useEffect } from 'react';\n\nimport {\n action,\n Controller,\n createTopologyControlButtons,\n defaultControlButtonsOptions,\n EdgeModel,\n GRAPH_LAYOUT_END_EVENT,\n GRAPH_POSITION_CHANGE_EVENT,\n GraphModel,\n Node,\n NodeModel,\n Rect,\n TopologyControlBar,\n TopologyView,\n Visualization,\n VisualizationProvider,\n VisualizationSurface,\n} from '@patternfly/react-topology';\n\nimport {\n DROP_SHADOW_SPACING,\n GRAPH_MIN_WIDTH,\n NODE_HEIGHT,\n PipelineLayout as PipelineLayoutTypes,\n TOOLBAR_HEIGHT,\n} from '../../consts/pipeline-topology-const';\nimport { PipelineMixedNodeModel } from '../../types/pipeline-topology-types';\nimport { getLayoutData } from '../../utils/pipeline-topology-utils';\nimport pipelineComponentFactory, {\n layoutFactory,\n} from './pipelineComponentFactory';\n\ntype PipelineLayoutProps = {\n model: {\n graph: GraphModel;\n nodes: PipelineMixedNodeModel[];\n edges: EdgeModel[];\n };\n};\n\nexport const PipelineLayout = ({ model }: PipelineLayoutProps) => {\n const [vis, setVis] = useState<Controller | null>(null);\n const [maxSize, setMaxSize] = useState<{\n height: number;\n width: number;\n }>({ height: 0, width: 0 });\n const storedGraphModel = useRef<GraphModel | null>(null);\n\n const layout: PipelineLayoutTypes = model.graph.layout as PipelineLayoutTypes;\n\n const onLayoutUpdate = useCallback(\n (nodes: Node[]) => {\n const nodeBounds = nodes.map((node: Node<NodeModel, any>) =>\n node.getBounds(),\n );\n const maxWidth = Math.floor(\n nodeBounds\n .map((bounds: Rect) => bounds.width)\n .reduce((w1: number, w2: number) => Math.max(w1, w2), 0),\n );\n const maxHeight = Math.floor(\n nodeBounds\n .map((bounds: Rect) => bounds.height)\n .reduce((h1: number, h2: number) => Math.max(h1, h2), 0),\n );\n const maxObject =\n nodeBounds.find((nb: Rect) => nb.height === maxHeight) ??\n ({ y: 0 } as Rect);\n\n const maxX = Math.floor(\n nodeBounds\n .map((bounds: Rect) => bounds.x)\n .reduce((x1: number, x2: number) => Math.max(x1, x2), 0),\n );\n const maxY = Math.floor(\n nodeBounds\n .map((bounds: Rect) => bounds.y)\n .reduce((y1: number, y2: number) => Math.max(y1, y2), 0),\n );\n\n let horizontalMargin = 0;\n let verticalMargin = 0;\n if (layout) {\n horizontalMargin = getLayoutData(layout)?.marginx || 0;\n verticalMargin = getLayoutData(layout)?.marginy || 0;\n }\n const finallyTaskHeight =\n maxObject.y + maxHeight + DROP_SHADOW_SPACING + verticalMargin * 2;\n const regularTaskHeight =\n maxY + NODE_HEIGHT + DROP_SHADOW_SPACING + verticalMargin * 2;\n\n setMaxSize({\n height: Math.max(finallyTaskHeight, regularTaskHeight) + TOOLBAR_HEIGHT,\n width: Math.max(\n maxX + maxWidth + DROP_SHADOW_SPACING + horizontalMargin * 2,\n GRAPH_MIN_WIDTH,\n ),\n });\n },\n [setMaxSize, layout],\n );\n\n useEffect(() => {\n if (model.graph.id !== storedGraphModel?.current?.id) {\n storedGraphModel.current = null;\n setVis(null);\n }\n }, [vis, model]);\n\n useEffect(() => {\n let mounted = true;\n if (vis === null) {\n const controller = new Visualization();\n controller.registerLayoutFactory(layoutFactory);\n controller.registerComponentFactory(pipelineComponentFactory);\n controller.fromModel(model);\n controller.addEventListener(GRAPH_POSITION_CHANGE_EVENT, () => {\n storedGraphModel.current = controller.getGraph().toModel();\n });\n controller.addEventListener(GRAPH_LAYOUT_END_EVENT, () => {\n onLayoutUpdate(controller.getGraph().getNodes());\n });\n if (mounted) {\n setVis(controller);\n }\n } else {\n const graph = storedGraphModel.current;\n if (graph) {\n model.graph = graph;\n }\n vis.fromModel(model);\n vis.getGraph().layout();\n }\n return () => {\n mounted = false;\n };\n }, [vis, model, onLayoutUpdate]);\n\n useEffect(() => {\n if (model && vis) {\n const graph = storedGraphModel.current;\n if (graph) {\n model.graph = graph;\n }\n vis.fromModel(model);\n }\n }, [model, vis]);\n\n if (!vis) return null;\n\n const controlBar = (controller: Controller) => (\n <TopologyControlBar\n controlButtons={createTopologyControlButtons({\n ...defaultControlButtonsOptions,\n zoomInCallback: action(() => {\n controller.getGraph().scaleBy(4 / 3);\n }),\n zoomOutCallback: action(() => {\n controller.getGraph().scaleBy(0.75);\n }),\n fitToScreenCallback: action(() => {\n controller.getGraph().fit(80);\n }),\n resetViewCallback: action(() => {\n controller.getGraph().reset();\n controller.getGraph().layout();\n }),\n legend: false,\n })}\n />\n );\n\n return (\n <div\n style={{\n height: Math.min(window.innerHeight, maxSize?.height),\n }}\n >\n <VisualizationProvider controller={vis}>\n <TopologyView controlBar={controlBar(vis)}>\n <VisualizationSurface />\n </TopologyView>\n </VisualizationProvider>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAyDO,MAAM,cAAiB,GAAA,CAAC,EAAE,KAAA,EAAiC,KAAA;AAChE,EAAA,MAAM,CAAC,GAAA,EAAK,MAAM,CAAA,GAAI,SAA4B,IAAI,CAAA;AACtD,EAAM,MAAA,CAAC,OAAS,EAAA,UAAU,CAAI,GAAA,QAAA,CAG3B,EAAE,MAAQ,EAAA,CAAA,EAAG,KAAO,EAAA,CAAA,EAAG,CAAA;AAC1B,EAAM,MAAA,gBAAA,GAAmB,OAA0B,IAAI,CAAA;AAEvD,EAAM,MAAA,MAAA,GAA8B,MAAM,KAAM,CAAA,MAAA;AAEhD,EAAA,MAAM,cAAiB,GAAA,WAAA;AAAA,IACrB,CAAC,KAAkB,KAAA;AACjB,MAAA,MAAM,aAAa,KAAM,CAAA,GAAA;AAAA,QAAI,CAAC,IAC5B,KAAA,IAAA,CAAK,SAAU;AAAA,OACjB;AACA,MAAA,MAAM,WAAW,IAAK,CAAA,KAAA;AAAA,QACpB,WACG,GAAI,CAAA,CAAC,MAAiB,KAAA,MAAA,CAAO,KAAK,CAClC,CAAA,MAAA,CAAO,CAAC,EAAA,EAAY,OAAe,IAAK,CAAA,GAAA,CAAI,EAAI,EAAA,EAAE,GAAG,CAAC;AAAA,OAC3D;AACA,MAAA,MAAM,YAAY,IAAK,CAAA,KAAA;AAAA,QACrB,WACG,GAAI,CAAA,CAAC,MAAiB,KAAA,MAAA,CAAO,MAAM,CACnC,CAAA,MAAA,CAAO,CAAC,EAAA,EAAY,OAAe,IAAK,CAAA,GAAA,CAAI,EAAI,EAAA,EAAE,GAAG,CAAC;AAAA,OAC3D;AACA,MAAM,MAAA,SAAA,GACJ,UAAW,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;AAAA,IAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,QAAQ,IAAK,CAAA,GAAA,CAAI,MAAO,CAAA,WAAA,EAAa,SAAS,MAAM;AAAA,OACtD;AAAA,MAEA,QAAC,kBAAA,GAAA,CAAA,qBAAA,EAAA,EAAsB,UAAY,EAAA,GAAA,EACjC,QAAC,kBAAA,GAAA,CAAA,YAAA,EAAA,EAAa,UAAY,EAAA,UAAA,CAAW,GAAG,CAAA,EACtC,QAAC,kBAAA,GAAA,CAAA,oBAAA,EAAA,EAAqB,GACxB,CACF,EAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"PipelineLayout.esm.js","sources":["../../../src/components/pipeline-topology/PipelineLayout.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, useRef, useCallback, useEffect } from 'react';\n\nimport {\n action,\n Controller,\n createTopologyControlButtons,\n defaultControlButtonsOptions,\n EdgeModel,\n GRAPH_LAYOUT_END_EVENT,\n GRAPH_POSITION_CHANGE_EVENT,\n GraphModel,\n Node,\n NodeModel,\n Rect,\n TopologyControlBar,\n TopologyView,\n Visualization,\n VisualizationProvider,\n VisualizationSurface,\n} from '@patternfly/react-topology';\n\nimport {\n DROP_SHADOW_SPACING,\n GRAPH_MIN_WIDTH,\n NODE_HEIGHT,\n PipelineLayout as PipelineLayoutTypes,\n TOOLBAR_HEIGHT,\n} from '../../consts/pipeline-topology-const';\nimport { PipelineMixedNodeModel } from '../../types/pipeline-topology-types';\nimport { getLayoutData } from '../../utils/pipeline-topology-utils';\nimport pipelineComponentFactory, {\n layoutFactory,\n} from './pipelineComponentFactory';\n\ntype PipelineLayoutProps = {\n model: {\n graph: GraphModel;\n nodes: PipelineMixedNodeModel[];\n edges: EdgeModel[];\n };\n};\n\nexport const PipelineLayout = ({ model }: PipelineLayoutProps) => {\n const [vis, setVis] = useState<Controller | null>(null);\n const [maxSize, setMaxSize] = useState<{\n height: number;\n width: number;\n }>({ height: 0, width: 0 });\n const storedGraphModel = useRef<GraphModel | null>(null);\n\n const layout: PipelineLayoutTypes = model.graph.layout as PipelineLayoutTypes;\n\n const onLayoutUpdate = useCallback(\n (nodes: Node[]) => {\n const nodeBounds = nodes.map((node: Node<NodeModel, any>) =>\n node.getBounds(),\n );\n const maxWidth = Math.floor(\n nodeBounds\n .map((bounds: Rect) => bounds.width)\n .reduce((w1: number, w2: number) => Math.max(w1, w2), 0),\n );\n const maxHeight = Math.floor(\n nodeBounds\n .map((bounds: Rect) => bounds.height)\n .reduce((h1: number, h2: number) => Math.max(h1, h2), 0),\n );\n const maxObject =\n nodeBounds.find((nb: Rect) => nb.height === maxHeight) ??\n ({ y: 0 } as Rect);\n\n const maxX = Math.floor(\n nodeBounds\n .map((bounds: Rect) => bounds.x)\n .reduce((x1: number, x2: number) => Math.max(x1, x2), 0),\n );\n const maxY = Math.floor(\n nodeBounds\n .map((bounds: Rect) => bounds.y)\n .reduce((y1: number, y2: number) => Math.max(y1, y2), 0),\n );\n\n let horizontalMargin = 0;\n let verticalMargin = 0;\n if (layout) {\n horizontalMargin = getLayoutData(layout)?.marginx || 0;\n verticalMargin = getLayoutData(layout)?.marginy || 0;\n }\n const finallyTaskHeight =\n maxObject.y + maxHeight + DROP_SHADOW_SPACING + verticalMargin * 2;\n const regularTaskHeight =\n maxY + NODE_HEIGHT + DROP_SHADOW_SPACING + verticalMargin * 2;\n\n setMaxSize({\n height: Math.max(finallyTaskHeight, regularTaskHeight) + TOOLBAR_HEIGHT,\n width: Math.max(\n maxX + maxWidth + DROP_SHADOW_SPACING + horizontalMargin * 2,\n GRAPH_MIN_WIDTH,\n ),\n });\n },\n [setMaxSize, layout],\n );\n\n useEffect(() => {\n if (model.graph.id !== storedGraphModel?.current?.id) {\n storedGraphModel.current = null;\n setVis(null);\n }\n }, [vis, model]);\n\n useEffect(() => {\n let mounted = true;\n if (vis === null) {\n const controller = new Visualization();\n controller.registerLayoutFactory(layoutFactory);\n controller.registerComponentFactory(pipelineComponentFactory);\n controller.fromModel(model);\n controller.addEventListener(GRAPH_POSITION_CHANGE_EVENT, () => {\n storedGraphModel.current = controller.getGraph().toModel();\n });\n controller.addEventListener(GRAPH_LAYOUT_END_EVENT, () => {\n onLayoutUpdate(controller.getGraph().getNodes());\n });\n if (mounted) {\n setVis(controller);\n }\n } else {\n const graph = storedGraphModel.current;\n if (graph) {\n model.graph = graph;\n }\n vis.fromModel(model);\n vis.getGraph().layout();\n }\n return () => {\n mounted = false;\n };\n }, [vis, model, onLayoutUpdate]);\n\n useEffect(() => {\n if (model && vis) {\n const graph = storedGraphModel.current;\n if (graph) {\n model.graph = graph;\n }\n vis.fromModel(model);\n }\n }, [model, vis]);\n\n if (!vis) return null;\n\n const controlBar = (controller: Controller) => (\n <TopologyControlBar\n controlButtons={createTopologyControlButtons({\n ...defaultControlButtonsOptions,\n zoomInCallback: action(() => {\n controller.getGraph().scaleBy(4 / 3);\n }),\n zoomOutCallback: action(() => {\n controller.getGraph().scaleBy(0.75);\n }),\n fitToScreenCallback: action(() => {\n controller.getGraph().fit(80);\n }),\n resetViewCallback: action(() => {\n controller.getGraph().reset();\n controller.getGraph().layout();\n }),\n legend: false,\n })}\n />\n );\n\n return (\n <div\n style={{\n height: Math.min(window.innerHeight, maxSize?.height),\n }}\n >\n <VisualizationProvider controller={vis}>\n <TopologyView controlBar={controlBar(vis)}>\n <VisualizationSurface />\n </TopologyView>\n </VisualizationProvider>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAyDO,MAAM,cAAA,GAAiB,CAAC,EAAE,K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