@backstage-community/plugin-tekton 3.26.3 → 3.26.4
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
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "/**\n* NOTE: These styles are derived from janus-idp/shared-react/src/components/pipeline/HorizontalStackedBars.css.\n* At the time of this writing there are plans to migrate that library somewhere else.\n* This is a TEMPORARY fix. Once the library is migrated and updated we should check if these styles can be removed.\n* If the issue still persists, report it in the new library.\n* **/\n\n.bs-shared-horizontal-stacked-bars {\n --bar-gap: 3px;\n display: block;\n height: 100%;\n overflow: hidden;\n width: 100%;\n cursor: pointer;\n}\n\n.bs-shared-horizontal-stacked-bars.is-inline {\n display: inline-block;\n}\n\n.bs-shared-horizontal-stacked-bars__bars {\n display: flex !important;\n flex-direction: row;\n height: 100%;\n outline: none;\n width: calc(100% + var(--bar-gap));\n}\n\n.bs-shared-horizontal-stacked-bars__data-bar {\n --bar-gap-neg: calc(var(--bar-gap) * -1);\n box-shadow: inset var(--bar-gap-neg) 0 0 #fff;\n height: 100%;\n transition: flex-grow 300ms linear;\n}\n";
|
|
4
|
+
styleInject(css_248z);
|
|
5
|
+
|
|
6
|
+
export { css_248z as default };
|
|
7
|
+
//# sourceMappingURL=PipelineBars.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PipelineBars.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useContext, useState } from 'react';
|
|
3
|
+
import './PipelineBars.css.esm.js';
|
|
3
4
|
import { Tooltip } from '@patternfly/react-core';
|
|
4
5
|
import { getTaskRunsForPipelineRun, HorizontalStackedBars, ComputedStatus, getRunStatusColor, TaskStatusTooltip } from '@janus-idp/shared-react';
|
|
5
6
|
import { TektonResourcesContext } from '../../hooks/TektonResourcesContext.esm.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineBars.esm.js","sources":["../../../src/components/Charts/PipelineBars.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';\
|
|
1
|
+
{"version":3,"file":"PipelineBars.esm.js","sources":["../../../src/components/Charts/PipelineBars.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';\nimport './PipelineBars.css';\nimport { Tooltip } from '@patternfly/react-core';\n\nimport {\n ComputedStatus,\n getRunStatusColor,\n getTaskRunsForPipelineRun,\n HorizontalStackedBars,\n PipelineRunKind,\n TaskStatusTooltip,\n TaskStatusTypes,\n} from '@janus-idp/shared-react';\n\nimport { TektonResourcesContext } from '../../hooks/TektonResourcesContext';\nimport { getTaskStatusOfPLR } from '../../utils/tekton-utils';\nimport PipelineRunLogDialog from '../PipelineRunLogs/PipelineRunLogDialog';\n\ntype PipelineBarProps = { pipelineRun: PipelineRunKind };\n\nconst PipelineBars = ({ pipelineRun }: PipelineBarProps) => {\n const { watchResourcesData } = useContext(TektonResourcesContext);\n const [open, setOpen] = useState<boolean>(false);\n const pods = watchResourcesData?.pods?.data || [];\n const taskRuns = watchResourcesData?.taskruns?.data || [];\n const plrTasks = getTaskRunsForPipelineRun(pipelineRun, taskRuns);\n const taskStatus = getTaskStatusOfPLR(pipelineRun, plrTasks);\n\n const openDialog = () => {\n setOpen(true);\n };\n\n const closeDialog = () => {\n setOpen(false);\n };\n\n return (\n <>\n <PipelineRunLogDialog\n open={open}\n closeDialog={closeDialog}\n pods={pods}\n taskRuns={taskRuns}\n pipelineRun={pipelineRun}\n />\n <Tooltip content={<TaskStatusTooltip taskStatus={taskStatus} />}>\n <HorizontalStackedBars\n id={`${pipelineRun?.metadata?.name}`}\n onClick={openDialog}\n height=\"1em\"\n inline\n values={Object.keys(ComputedStatus).map(status => ({\n color: getRunStatusColor(\n ComputedStatus[status as keyof typeof ComputedStatus],\n ).color,\n name: status,\n size: taskStatus[\n ComputedStatus[\n status as keyof typeof ComputedStatus\n ] as keyof TaskStatusTypes\n ],\n }))}\n />\n </Tooltip>\n </>\n );\n};\n\nexport default PipelineBars;\n"],"names":[],"mappings":";;;;;;;;;AAmCA,MAAM,YAAe,GAAA,CAAC,EAAE,WAAA,EAAoC,KAAA;AAC1D,EAAA,MAAM,EAAE,kBAAA,EAAuB,GAAA,UAAA,CAAW,sBAAsB,CAAA;AAChE,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAkB,KAAK,CAAA;AAC/C,EAAA,MAAM,IAAO,GAAA,kBAAA,EAAoB,IAAM,EAAA,IAAA,IAAQ,EAAC;AAChD,EAAA,MAAM,QAAW,GAAA,kBAAA,EAAoB,QAAU,EAAA,IAAA,IAAQ,EAAC;AACxD,EAAM,MAAA,QAAA,GAAW,yBAA0B,CAAA,WAAA,EAAa,QAAQ,CAAA;AAChE,EAAM,MAA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