@backstage-community/plugin-tekton 3.41.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/README.md +52 -22
- package/app-config.dynamic.yaml +5 -0
- package/dist/alpha.d.ts +2 -55
- package/dist/alpha.esm.js +2 -18
- package/dist/alpha.esm.js.map +1 -1
- package/dist/components/PipelineRunLogs/PipelineRunLogDownloader.esm.js +3 -0
- package/dist/components/PipelineRunLogs/PipelineRunLogDownloader.esm.js.map +1 -1
- package/dist/components/PipelineRunLogs/PipelineRunLogs.esm.js +3 -3
- package/dist/components/PipelineRunLogs/PipelineRunLogs.esm.js.map +1 -1
- package/dist/hooks/usePodLogsOfPipelineRun.esm.js +2 -2
- package/dist/hooks/usePodLogsOfPipelineRun.esm.js.map +1 -1
- package/dist/index.d.ts +50 -27
- package/dist/index.esm.js +1 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/legacy/plugin.esm.js +16 -0
- package/dist/legacy/plugin.esm.js.map +1 -0
- package/dist/legacy.d.ts +33 -0
- package/dist/legacy.esm.js +3 -0
- package/dist/legacy.esm.js.map +1 -0
- package/dist/plugin.esm.js +18 -12
- package/dist/plugin.esm.js.map +1 -1
- package/dist/plugins/tekton/package.json.esm.js +176 -0
- package/dist/plugins/tekton/package.json.esm.js.map +1 -0
- package/dist/translations.d.ts +6 -6
- package/dist/translations.esm.js +2 -3
- package/dist/translations.esm.js.map +1 -1
- package/package.json +50 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @backstage-community/plugin-tekton
|
|
2
2
|
|
|
3
|
+
## 4.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 929477e: **Breaking:** The new frontend system (NFS) plugin is now the default export. The `/alpha` subpath no longer exports the NFS plugin — it now re-exports only translations. Legacy frontend system APIs moved to `/legacy`.
|
|
8
|
+
|
|
9
|
+
**If you use the new frontend system**, import the plugin from the package root instead of `/alpha`.
|
|
10
|
+
|
|
11
|
+
**If you use the legacy frontend system**, update imports of `TektonCI`, `tektonPlugin`, and `isTektonCIAvailable` to the `/legacy` subpath.
|
|
12
|
+
|
|
13
|
+
**If you use RHDH / dynamic plugins (scalprum)**, the `TektonCI` component and `tektonTranslations` resource are now exposed under the `Legacy` module.
|
|
14
|
+
|
|
15
|
+
Translations are now available from `/translations` and `/alpha`.
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 77c4615: Backstage version bump to v1.54.5
|
|
20
|
+
Added New Frontend System development entrypoints and e2e coverage for both NFS and legacy.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- 5611e85: Updated dependency `react-router-dom` to `^6.30.5`.
|
|
25
|
+
- Updated dependencies [77c4615]
|
|
26
|
+
- @backstage-community/plugin-tekton-common@1.24.0
|
|
27
|
+
- @backstage-community/plugin-tekton-react@0.9.0
|
|
28
|
+
|
|
29
|
+
## 3.41.1
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- f805ea0: Added spacing to the pipeline run log viewer dialog between the task sidebar and log content area
|
|
34
|
+
- 4b8f04b: Hide the CI/CD tab on entity pages when the tekton annotation is not present
|
|
35
|
+
|
|
3
36
|
## 3.41.0
|
|
4
37
|
|
|
5
38
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -119,26 +119,56 @@ The Tekton plugin enables you to visualize the `PipelineRun` resources available
|
|
|
119
119
|
yarn workspace app add @backstage-community/plugin-tekton
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
122
|
+
### New frontend system
|
|
123
|
+
|
|
124
|
+
If you are using Backstage's [new frontend system](https://backstage.io/docs/frontend-system/), add the default export and the translations module to your app `features` array. The Tekton entity tab is registered automatically for entities with the `tekton.dev/cicd` annotation.
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
import tektonPlugin, {
|
|
128
|
+
tektonTranslationsModule,
|
|
129
|
+
} from '@backstage-community/plugin-tekton';
|
|
130
|
+
|
|
131
|
+
export const app = createApp({
|
|
132
|
+
features: [
|
|
133
|
+
// ...
|
|
134
|
+
tektonPlugin,
|
|
135
|
+
tektonTranslationsModule,
|
|
136
|
+
],
|
|
137
|
+
});
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Legacy frontend system
|
|
141
|
+
|
|
142
|
+
If you are using the legacy frontend system, import the plugin from the `/legacy` subpath and add the Tekton CI/CD component to `packages/app/src/components/catalog/EntityPage.tsx`. Register translations with `.addTranslationResource(tektonTranslations)` in `App.tsx`.
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
// packages/app/src/App.tsx
|
|
146
|
+
import { tektonTranslations } from '@backstage-community/plugin-tekton/legacy';
|
|
147
|
+
|
|
148
|
+
createApp({
|
|
149
|
+
__experimentalTranslations: {
|
|
150
|
+
availableLanguages: ['en', 'de', 'es', 'fr', 'it', 'ja'],
|
|
151
|
+
resources: [tektonTranslations],
|
|
152
|
+
},
|
|
153
|
+
// ...
|
|
154
|
+
});
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
```tsx title="packages/app/src/components/catalog/EntityPage.tsx"
|
|
158
|
+
import {
|
|
159
|
+
isTektonCIAvailable,
|
|
160
|
+
TektonCI,
|
|
161
|
+
} from '@backstage-community/plugin-tekton/legacy';
|
|
162
|
+
|
|
163
|
+
const cicdContent = (
|
|
164
|
+
<EntitySwitch>
|
|
165
|
+
{/* ... */}
|
|
166
|
+
<EntitySwitch.Case if={isTektonCIAvailable}>
|
|
167
|
+
<TektonCI />
|
|
168
|
+
</EntitySwitch.Case>
|
|
169
|
+
</EntitySwitch>
|
|
170
|
+
);
|
|
171
|
+
```
|
|
142
172
|
|
|
143
173
|
#### Permissions
|
|
144
174
|
|
|
@@ -164,9 +194,9 @@ Tekton is a front-end plugin that enables you to view the `PipelineRun` resource
|
|
|
164
194
|
|
|
165
195
|
1. Open your Backstage application and select a component from the **Catalog** page.
|
|
166
196
|
|
|
167
|
-
1.
|
|
197
|
+
1. Open the **Tekton** tab (new frontend system) or the **CI/CD** tab (legacy frontend system / RHDH).
|
|
168
198
|
|
|
169
|
-
The
|
|
199
|
+
The tab displays the list of PipelineRun resources associated with a Kubernetes cluster. The list contains pipeline run details, such as **NAME**, **STATUS**, **TASK STATUS**, **STARTED**, and **DURATION**.
|
|
170
200
|
|
|
171
201
|

|
|
172
202
|
|
package/app-config.dynamic.yaml
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
dynamicPlugins:
|
|
2
2
|
frontend:
|
|
3
3
|
backstage-community.plugin-tekton:
|
|
4
|
+
translationResources:
|
|
5
|
+
- importName: tektonTranslations
|
|
6
|
+
module: Legacy
|
|
7
|
+
ref: tektonTranslationRef
|
|
4
8
|
mountPoints:
|
|
5
9
|
- mountPoint: entity.page.ci/cards
|
|
6
10
|
importName: TektonCI
|
|
11
|
+
module: Legacy
|
|
7
12
|
config:
|
|
8
13
|
layout:
|
|
9
14
|
gridColumn: '1 / -1'
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,55 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
4
|
-
import * as _backstage_filter_predicates from '@backstage/filter-predicates';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* The Tekton backstage NFS plugin.
|
|
8
|
-
* @alpha
|
|
9
|
-
*/
|
|
10
|
-
declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{}, {}, {
|
|
11
|
-
"entity-content:tekton/tektonEntityContent": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
12
|
-
kind: "entity-content";
|
|
13
|
-
name: "tektonEntityContent";
|
|
14
|
-
config: {
|
|
15
|
-
path: string | undefined;
|
|
16
|
-
title: string | undefined;
|
|
17
|
-
filter: _backstage_filter_predicates.FilterPredicate | undefined;
|
|
18
|
-
group: string | false | undefined;
|
|
19
|
-
icon: string | undefined;
|
|
20
|
-
};
|
|
21
|
-
configInput: {
|
|
22
|
-
path?: string | undefined;
|
|
23
|
-
title?: string | undefined;
|
|
24
|
-
filter?: _backstage_filter_predicates.FilterPredicate | undefined;
|
|
25
|
-
group?: string | false | undefined;
|
|
26
|
-
icon?: string | undefined;
|
|
27
|
-
};
|
|
28
|
-
output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
|
|
29
|
-
optional: true;
|
|
30
|
-
}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
31
|
-
optional: true;
|
|
32
|
-
}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
33
|
-
optional: true;
|
|
34
|
-
}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-content-group", {
|
|
35
|
-
optional: true;
|
|
36
|
-
}> | _backstage_frontend_plugin_api.ExtensionDataRef<string | react.ReactElement<any, string | react.JSXElementConstructor<any>>, "catalog.entity-content-icon", {
|
|
37
|
-
optional: true;
|
|
38
|
-
}>;
|
|
39
|
-
inputs: {};
|
|
40
|
-
params: {
|
|
41
|
-
defaultPath?: [Error: `Use the 'path' param instead`];
|
|
42
|
-
path: string;
|
|
43
|
-
defaultTitle?: [Error: `Use the 'title' param instead`];
|
|
44
|
-
title: string;
|
|
45
|
-
defaultGroup?: [Error: `Use the 'group' param instead`];
|
|
46
|
-
group?: ("overview" | "documentation" | "development" | "deployment" | "operation" | "observability") | (string & {});
|
|
47
|
-
icon?: string | react.ReactElement;
|
|
48
|
-
loader: () => Promise<JSX.Element>;
|
|
49
|
-
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
50
|
-
filter?: string | _backstage_filter_predicates.FilterPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
|
|
51
|
-
};
|
|
52
|
-
}>;
|
|
53
|
-
}>;
|
|
54
|
-
|
|
55
|
-
export { _default as default };
|
|
1
|
+
export { tektonTranslationRef, tektonTranslations, default as tektonTranslationsModule } from './translations.js';
|
|
2
|
+
import '@backstage/frontend-plugin-api';
|
package/dist/alpha.esm.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
|
4
|
-
|
|
5
|
-
const tektonEntityContent = EntityContentBlueprint.make({
|
|
6
|
-
name: "tektonEntityContent",
|
|
7
|
-
params: {
|
|
8
|
-
path: "/tekton",
|
|
9
|
-
title: "Tekton",
|
|
10
|
-
loader: () => import('./components/Router.esm.js').then((m) => /* @__PURE__ */ jsx(m.Router, {}))
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
var alpha = createFrontendPlugin({
|
|
14
|
-
pluginId: "tekton",
|
|
15
|
-
extensions: [tektonEntityContent]
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export { alpha as default };
|
|
1
|
+
export { tektonTranslations, default as tektonTranslationsModule } from './translations.esm.js';
|
|
2
|
+
export { tektonTranslationRef } from './translations/ref.esm.js';
|
|
19
3
|
//# sourceMappingURL=alpha.esm.js.map
|
package/dist/alpha.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.esm.js","sources":[
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
|
+
import { useTheme } from '@mui/material/styles';
|
|
3
4
|
import { Flex, FlexItem } from '@patternfly/react-core';
|
|
4
5
|
import { TEKTON_PIPELINE_RUN, TEKTON_PIPELINE_TASKRUN, TEKTON_PIPELINE_TASK } from '../../consts/tekton-const.esm.js';
|
|
5
6
|
import PodLogsDownloadLink from './PodLogsDownloadLink.esm.js';
|
|
@@ -17,6 +18,7 @@ const PipelineRunLogDownloader = ({ pods, pipelineRun, activeTask }) => {
|
|
|
17
18
|
),
|
|
18
19
|
[filteredPods]
|
|
19
20
|
);
|
|
21
|
+
const theme = useTheme();
|
|
20
22
|
const { t } = useTranslationRef(tektonTranslationRef);
|
|
21
23
|
const activeTaskPod = sortedPods.find(
|
|
22
24
|
(sp) => sp.metadata?.labels?.[TEKTON_PIPELINE_TASKRUN] === activeTask
|
|
@@ -26,6 +28,7 @@ const PipelineRunLogDownloader = ({ pods, pipelineRun, activeTask }) => {
|
|
|
26
28
|
{
|
|
27
29
|
"data-testid": "pipelinerun-logs-downloader",
|
|
28
30
|
justifyContent: { default: "justifyContentFlexEnd" },
|
|
31
|
+
style: { marginBottom: theme.spacing(2) },
|
|
29
32
|
children: [
|
|
30
33
|
/* @__PURE__ */ jsx(FlexItem, { children: /* @__PURE__ */ jsx(
|
|
31
34
|
PodLogsDownloadLink,
|
|
@@ -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 '@backstage-community/plugin-tekton-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 '../../translations/index.ts';\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":"
|
|
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 { useTheme } from '@mui/material/styles';\nimport { Flex, FlexItem } from '@patternfly/react-core';\n\nimport { PipelineRunKind } from '@backstage-community/plugin-tekton-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 '../../translations/index.ts';\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 theme = useTheme();\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 style={{ marginBottom: theme.spacing(2) }}\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":";;;;;;;;;;AAkCA,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,QAAQ,QAAA,EAAS;AACvB,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,MACnD,OAAO,EAAE,YAAA,EAAc,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA,EAAE;AAAA,MAExC,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;;;;"}
|
|
@@ -53,8 +53,8 @@ const PipelineRunLogs = ({
|
|
|
53
53
|
}),
|
|
54
54
|
[pods, podName]
|
|
55
55
|
);
|
|
56
|
-
return /* @__PURE__ */ jsxs(Grid, { container: true, children: [
|
|
57
|
-
/* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsx(Paper, { children: /* @__PURE__ */ jsx(
|
|
56
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, sx: { gap: 2 }, children: [
|
|
57
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsx(Paper, { sx: { paddingX: 2 }, children: /* @__PURE__ */ jsx(
|
|
58
58
|
TaskStatusStepper,
|
|
59
59
|
{
|
|
60
60
|
steps: sortedTaskRuns,
|
|
@@ -62,7 +62,7 @@ const PipelineRunLogs = ({
|
|
|
62
62
|
onUserStepChange: setActiveTask
|
|
63
63
|
}
|
|
64
64
|
) }) }),
|
|
65
|
-
/* @__PURE__ */ jsxs(Grid, { item: true, xs:
|
|
65
|
+
/* @__PURE__ */ jsxs(Grid, { item: true, xs: true, children: [
|
|
66
66
|
!currentStepId && /* @__PURE__ */ jsx(Progress, {}),
|
|
67
67
|
/* @__PURE__ */ jsx("div", { style: { height: "80vh" }, children: !podData ? /* @__PURE__ */ jsx(
|
|
68
68
|
Paper,
|
|
@@ -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 Grid from '@mui/material/Grid';\nimport Paper from '@mui/material/Paper';\n\nimport {\n getTaskRunsForPipelineRun,\n pipelineRunFilterReducer,\n PipelineRunKind,\n TaskRunKind,\n} from '@backstage-community/plugin-tekton-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 '../../translations/index.ts';\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
|
|
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 Grid from '@mui/material/Grid';\nimport Paper from '@mui/material/Paper';\n\nimport {\n getTaskRunsForPipelineRun,\n pipelineRunFilterReducer,\n PipelineRunKind,\n TaskRunKind,\n} from '@backstage-community/plugin-tekton-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 '../../translations/index.ts';\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 sx={{ gap: 2 }}>\n <Grid item xs={3}>\n <Paper sx={{ paddingX: 2 }}>\n <TaskStatusStepper\n steps={sortedTaskRuns}\n currentStepId={currentStepId}\n onUserStepChange={setActiveTask}\n />\n </Paper>\n </Grid>\n <Grid item xs>\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,KAA4B;AAC1B,EAAA,MAAM,WAAA,GAAc,yBAAA,CAA0B,WAAA,EAAa,QAAQ,CAAA;AACnE,EAAA,MAAM,cAAA,GAAiB,kBAAkB,WAAW,CAAA;AACpD,EAAA,MAAM,kBAAkB,WAAA,EAAa,MAAA;AAAA,IACnC,CAAC,KAAuC,KAAA,KAAU;AAChD,MAAA,IAAI,KAAA,EAAO,UAAU,IAAA,EAAM;AACzB,QAAA,GAAA,CAAI,KAAA,CAAM,QAAA,CAAS,IAAI,CAAA,GAAI,KAAA;AAAA,MAC7B;AACA,MAAA,OAAO,GAAA;AAAA,IACT,CAAA;AAAA,IACA;AAAC,GACH;AAEA,EAAA,MAAM,SAAA,GAAY,yBAAyB,WAAW,CAAA;AACtD,EAAA,MAAM,CAAC,gBAAA,EAAkB,mBAAmB,CAAA,GAAI,SAAiB,EAAE,CAAA;AACnE,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,oBAAoB,CAAA;AAEpD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,+BAA+B,cAAA,CAAe,IAAA;AAAA,MAAK,QACvD,CAAC,QAAA,EAAU,SAAS,CAAA,CAAE,QAAA,CAAS,GAAG,MAAM;AAAA,KAC1C;AAEA,IAAA,IAAI,SAAA,IAAa,CAAC,4BAAA,IAAgC,CAAC,UAAA,EAAY;AAC7D,MAAA,mBAAA,CAAoB,cAAA,CAAe,cAAA,CAAe,MAAA,GAAS,CAAC,GAAG,EAAE,CAAA;AACjE,MAAA;AAAA,IACF;AAEA,IAAA,mBAAA;AAAA,MACE,CAAC,UAAA,GAAc,4BAAA,EAA8B,EAAA,GAAgB;AAAA,KAC/D;AAAA,EACF,CAAA,EAAG,CAAC,cAAA,EAAgB,SAAA,EAAW,UAAU,CAAC,CAAA;AAE1C,EAAA,MAAM,gBAAgB,UAAA,IAAc,gBAAA;AACpC,EAAA,MAAM,UAAA,GAAa,gBAAA,CAAiB,cAAA,EAAgB,aAAa,CAAA;AACjE,EAAA,MAAM,OAAA,GACJ,UAAA,IAAc,eAAA,GAAkB,aAAa,GAAG,MAAA,EAAQ,OAAA;AAC1D,EAAA,MAAM,OAAA,GAAU,OAAA;AAAA,IACd,MACE,IAAA,CAAK,IAAA,CAAK,CAAA,GAAA,KAAO;AACf,MAAA,OAAO,GAAA,EAAK,UAAU,IAAA,KAAS,OAAA;AAAA,IACjC,CAAC,CAAA;AAAA,IACH,CAAC,MAAM,OAAO;AAAA,GAChB;AAEA,EAAA,uBACE,IAAA,CAAC,QAAK,SAAA,EAAS,IAAA,EAAC,IAAI,EAAE,GAAA,EAAK,GAAE,EAC3B,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,EAAA,EAAI,CAAA,EACb,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAM,EAAA,EAAI,EAAE,QAAA,EAAU,CAAA,EAAE,EACvB,QAAA,kBAAA,GAAA;AAAA,MAAC,iBAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,cAAA;AAAA,QACP,aAAA;AAAA,QACA,gBAAA,EAAkB;AAAA;AAAA,OAEtB,CAAA,EACF,CAAA;AAAA,oBACA,IAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,IAAE,IAAA,EACV,QAAA,EAAA;AAAA,MAAA,CAAC,aAAA,wBAAkB,QAAA,EAAA,EAAS,CAAA;AAAA,sBAC7B,GAAA,CAAC,SAAI,KAAA,EAAO,EAAE,QAAQ,MAAA,EAAO,EAC1B,WAAC,OAAA,mBACA,GAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAW,CAAA;AAAA,UACX,OAAO,EAAE,MAAA,EAAQ,QAAQ,KAAA,EAAO,MAAA,EAAQ,WAAW,OAAA,EAAQ;AAAA,UAE3D,QAAA,kBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,IAAA,EAAM,CAAA,CAAE,wBAAwB,CAAA,EAAG;AAAA;AAAA,OAChD,mBAEA,GAAA,CAACA,mCAAA,EAAA,EAAqB,GAAA,EAAK,SAAS,CAAA,EAExC;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -16,7 +16,7 @@ const usePodLogsOfPipelineRun = ({
|
|
|
16
16
|
const containersList = pod?.spec?.containers || [];
|
|
17
17
|
const podKey = pod?.metadata?.name;
|
|
18
18
|
const stopPolling = pod?.status?.phase === "Succeeded" || pod?.status?.phase === "Failed";
|
|
19
|
-
const { data, error, isLoading
|
|
19
|
+
const { data, error, isLoading } = useQuery({
|
|
20
20
|
queryKey: ["podLogs", podKey, currCluster],
|
|
21
21
|
queryFn: async () => {
|
|
22
22
|
const requests = containersList.map((container) => {
|
|
@@ -40,7 +40,7 @@ const usePodLogsOfPipelineRun = ({
|
|
|
40
40
|
return {
|
|
41
41
|
value: data,
|
|
42
42
|
error,
|
|
43
|
-
loading: isLoading
|
|
43
|
+
loading: isLoading
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePodLogsOfPipelineRun.esm.js","sources":["../../src/hooks/usePodLogsOfPipelineRun.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useContext } from 'react';\nimport { useQuery } from '@tanstack/react-query';\nimport { kubernetesProxyApiRef } from '@backstage/plugin-kubernetes-react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { V1Container, V1Pod } from '@kubernetes/client-node';\n\nimport { TektonResourcesContextData } from '../types/types';\nimport { TektonResourcesContext } from './TektonResourcesContext';\n\nexport interface ContainerScope {\n podName: string;\n podNamespace: string;\n clusterName: string;\n containerName: string;\n}\n\ninterface PodLogsOptions {\n pod: V1Pod;\n intervalMs?: number;\n}\n\nexport const usePodLogsOfPipelineRun = ({\n pod,\n intervalMs = 5000,\n}: PodLogsOptions) => {\n const kubernetesProxyApi = useApi(kubernetesProxyApiRef);\n const { clusters, selectedCluster } = useContext<TektonResourcesContextData>(\n TektonResourcesContext,\n );\n const currCluster =\n (clusters.length > 0 && clusters[selectedCluster || 0]) || '';\n const containersList = pod?.spec?.containers || [];\n\n const podKey = pod?.metadata?.name;\n const stopPolling =\n pod?.status?.phase === 'Succeeded' || pod?.status?.phase === 'Failed';\n\n const { data, error, isLoading
|
|
1
|
+
{"version":3,"file":"usePodLogsOfPipelineRun.esm.js","sources":["../../src/hooks/usePodLogsOfPipelineRun.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useContext } from 'react';\nimport { useQuery } from '@tanstack/react-query';\nimport { kubernetesProxyApiRef } from '@backstage/plugin-kubernetes-react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { V1Container, V1Pod } from '@kubernetes/client-node';\n\nimport { TektonResourcesContextData } from '../types/types';\nimport { TektonResourcesContext } from './TektonResourcesContext';\n\nexport interface ContainerScope {\n podName: string;\n podNamespace: string;\n clusterName: string;\n containerName: string;\n}\n\ninterface PodLogsOptions {\n pod: V1Pod;\n intervalMs?: number;\n}\n\nexport const usePodLogsOfPipelineRun = ({\n pod,\n intervalMs = 5000,\n}: PodLogsOptions) => {\n const kubernetesProxyApi = useApi(kubernetesProxyApiRef);\n const { clusters, selectedCluster } = useContext<TektonResourcesContextData>(\n TektonResourcesContext,\n );\n const currCluster =\n (clusters.length > 0 && clusters[selectedCluster || 0]) || '';\n const containersList = pod?.spec?.containers || [];\n\n const podKey = pod?.metadata?.name;\n const stopPolling =\n pod?.status?.phase === 'Succeeded' || pod?.status?.phase === 'Failed';\n\n const { data, error, isLoading } = useQuery({\n queryKey: ['podLogs', podKey, currCluster],\n queryFn: async () => {\n const requests = containersList\n .map((container: V1Container) => {\n if (pod?.metadata?.name && pod?.metadata?.namespace && container) {\n return kubernetesProxyApi.getPodLogs({\n podName: pod.metadata.name,\n namespace: pod.metadata.namespace,\n containerName: container.name,\n clusterName: currCluster,\n });\n }\n\n return Promise.resolve({ text: '' });\n })\n .filter(Boolean);\n\n return Promise.all(requests);\n },\n enabled: !!pod?.metadata?.name && containersList.length > 0,\n refetchInterval: stopPolling ? false : intervalMs,\n staleTime: 60000, // Keep the data fresh for 1 minute instead of constantly refetching.\n });\n\n return {\n value: data,\n error,\n loading: isLoading,\n };\n};\n"],"names":[],"mappings":";;;;;;AAoCO,MAAM,0BAA0B,CAAC;AAAA,EACtC,GAAA;AAAA,EACA,UAAA,GAAa;AACf,CAAA,KAAsB;AACpB,EAAA,MAAM,kBAAA,GAAqB,OAAO,qBAAqB,CAAA;AACvD,EAAA,MAAM,EAAE,QAAA,EAAU,eAAA,EAAgB,GAAI,UAAA;AAAA,IACpC;AAAA,GACF;AACA,EAAA,MAAM,cACH,QAAA,CAAS,MAAA,GAAS,KAAK,QAAA,CAAS,eAAA,IAAmB,CAAC,CAAA,IAAM,EAAA;AAC7D,EAAA,MAAM,cAAA,GAAiB,GAAA,EAAK,IAAA,EAAM,UAAA,IAAc,EAAC;AAEjD,EAAA,MAAM,MAAA,GAAS,KAAK,QAAA,EAAU,IAAA;AAC9B,EAAA,MAAM,cACJ,GAAA,EAAK,MAAA,EAAQ,UAAU,WAAA,IAAe,GAAA,EAAK,QAAQ,KAAA,KAAU,QAAA;AAE/D,EAAA,MAAM,EAAE,IAAA,EAAM,KAAA,EAAO,SAAA,KAAc,QAAA,CAAS;AAAA,IAC1C,QAAA,EAAU,CAAC,SAAA,EAAW,MAAA,EAAQ,WAAW,CAAA;AAAA,IACzC,SAAS,YAAY;AACnB,MAAA,MAAM,QAAA,GAAW,cAAA,CACd,GAAA,CAAI,CAAC,SAAA,KAA2B;AAC/B,QAAA,IAAI,KAAK,QAAA,EAAU,IAAA,IAAQ,GAAA,EAAK,QAAA,EAAU,aAAa,SAAA,EAAW;AAChE,UAAA,OAAO,mBAAmB,UAAA,CAAW;AAAA,YACnC,OAAA,EAAS,IAAI,QAAA,CAAS,IAAA;AAAA,YACtB,SAAA,EAAW,IAAI,QAAA,CAAS,SAAA;AAAA,YACxB,eAAe,SAAA,CAAU,IAAA;AAAA,YACzB,WAAA,EAAa;AAAA,WACd,CAAA;AAAA,QACH;AAEA,QAAA,OAAO,OAAA,CAAQ,OAAA,CAAQ,EAAE,IAAA,EAAM,IAAI,CAAA;AAAA,MACrC,CAAC,CAAA,CACA,MAAA,CAAO,OAAO,CAAA;AAEjB,MAAA,OAAO,OAAA,CAAQ,IAAI,QAAQ,CAAA;AAAA,IAC7B,CAAA;AAAA,IACA,SAAS,CAAC,CAAC,KAAK,QAAA,EAAU,IAAA,IAAQ,eAAe,MAAA,GAAS,CAAA;AAAA,IAC1D,eAAA,EAAiB,cAAc,KAAA,GAAQ,UAAA;AAAA,IACvC,SAAA,EAAW;AAAA;AAAA,GACZ,CAAA;AAED,EAAA,OAAO;AAAA,IACL,KAAA,EAAO,IAAA;AAAA,IACP,KAAA;AAAA,IACA,OAAA,EAAS;AAAA,GACX;AACF;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,33 +1,56 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import '@backstage/frontend-plugin-api';
|
|
1
|
+
import * as _backstage_catalog_model from '@backstage/catalog-model';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
4
|
+
import * as _backstage_filter_predicates from '@backstage/filter-predicates';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
7
|
+
* The Tekton frontend plugin for the new frontend system.
|
|
9
8
|
*
|
|
10
9
|
* @public
|
|
11
10
|
*/
|
|
12
|
-
declare const tektonPlugin:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
11
|
+
declare const tektonPlugin: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{}, {}, {
|
|
12
|
+
"entity-content:tekton/tektonEntityContent": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
13
|
+
kind: "entity-content";
|
|
14
|
+
name: "tektonEntityContent";
|
|
15
|
+
config: {
|
|
16
|
+
path: string | undefined;
|
|
17
|
+
title: string | undefined;
|
|
18
|
+
filter: _backstage_filter_predicates.FilterPredicate | undefined;
|
|
19
|
+
group: string | false | undefined;
|
|
20
|
+
icon: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
configInput: {
|
|
23
|
+
path?: string | undefined;
|
|
24
|
+
title?: string | undefined;
|
|
25
|
+
filter?: _backstage_filter_predicates.FilterPredicate | undefined;
|
|
26
|
+
group?: string | false | undefined;
|
|
27
|
+
icon?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
|
|
30
|
+
optional: true;
|
|
31
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
32
|
+
optional: true;
|
|
33
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
34
|
+
optional: true;
|
|
35
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-content-group", {
|
|
36
|
+
optional: true;
|
|
37
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<string | react.ReactElement<any, string | react.JSXElementConstructor<any>>, "catalog.entity-content-icon", {
|
|
38
|
+
optional: true;
|
|
39
|
+
}>;
|
|
40
|
+
inputs: {};
|
|
41
|
+
params: {
|
|
42
|
+
defaultPath?: [Error: `Use the 'path' param instead`];
|
|
43
|
+
path: string;
|
|
44
|
+
defaultTitle?: [Error: `Use the 'title' param instead`];
|
|
45
|
+
title: string;
|
|
46
|
+
defaultGroup?: [Error: `Use the 'group' param instead`];
|
|
47
|
+
group?: ("overview" | "documentation" | "development" | "deployment" | "operation" | "observability") | (string & {});
|
|
48
|
+
icon?: string | react.ReactElement;
|
|
49
|
+
loader: () => Promise<JSX.Element>;
|
|
50
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
51
|
+
filter?: string | _backstage_filter_predicates.FilterPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
|
|
52
|
+
};
|
|
53
|
+
}>;
|
|
54
|
+
}>;
|
|
32
55
|
|
|
33
|
-
export {
|
|
56
|
+
export { tektonPlugin as default };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { isTektonCIAvailable } from './utils/isTektonCIAvailable.esm.js';
|
|
3
|
-
export { tektonTranslations, default as tektonTranslationsModule } from './translations.esm.js';
|
|
4
|
-
export { tektonTranslationRef } from './translations/ref.esm.js';
|
|
1
|
+
export { default } from './plugin.esm.js';
|
|
5
2
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createPlugin, createComponentExtension } from '@backstage/core-plugin-api';
|
|
2
|
+
|
|
3
|
+
const tektonPlugin = createPlugin({
|
|
4
|
+
id: "tekton"
|
|
5
|
+
});
|
|
6
|
+
const TektonCI = tektonPlugin.provide(
|
|
7
|
+
createComponentExtension({
|
|
8
|
+
name: "TektonCI",
|
|
9
|
+
component: {
|
|
10
|
+
lazy: () => import('../components/Router.esm.js').then((m) => m.Router)
|
|
11
|
+
}
|
|
12
|
+
})
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
export { TektonCI, tektonPlugin };
|
|
16
|
+
//# sourceMappingURL=plugin.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../../src/legacy/plugin.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n createComponentExtension,\n createPlugin,\n} from '@backstage/core-plugin-api';\n\n/**\n * A Tekton plugin (legacy frontend system).\n *\n * @public\n * @remarks Prefer the default export from the package root for the new frontend system.\n */\nexport const tektonPlugin = createPlugin({\n id: 'tekton',\n});\n\n/**\n * Component for the catalog entity CI/CD tab (legacy frontend system).\n *\n * @public\n * @remarks Prefer the default export from the package root for the new frontend system.\n */\nexport const TektonCI = tektonPlugin.provide(\n createComponentExtension({\n name: 'TektonCI',\n component: {\n lazy: () => import('../components/Router').then(m => m.Router),\n },\n }),\n);\n"],"names":[],"mappings":";;AA0BO,MAAM,eAAe,YAAA,CAAa;AAAA,EACvC,EAAA,EAAI;AACN,CAAC;AAQM,MAAM,WAAW,YAAA,CAAa,OAAA;AAAA,EACnC,wBAAA,CAAyB;AAAA,IACvB,IAAA,EAAM,UAAA;AAAA,IACN,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,MAAM,OAAO,6BAAsB,EAAE,IAAA,CAAK,CAAA,CAAA,KAAK,EAAE,MAAM;AAAA;AAC/D,GACD;AACH;;;;"}
|
package/dist/legacy.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
3
|
+
import { Entity } from '@backstage/catalog-model';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A Tekton plugin (legacy frontend system).
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
* @remarks Prefer the default export from the package root for the new frontend system.
|
|
10
|
+
*/
|
|
11
|
+
declare const tektonPlugin: _backstage_core_plugin_api.BackstagePlugin<{}, {}, {}>;
|
|
12
|
+
/**
|
|
13
|
+
* Component for the catalog entity CI/CD tab (legacy frontend system).
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
* @remarks Prefer the default export from the package root for the new frontend system.
|
|
17
|
+
*/
|
|
18
|
+
declare const TektonCI: () => react_jsx_runtime.JSX.Element | null;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Returns true if the entity supports the Tekton CI/CD feature and
|
|
22
|
+
* the Tekton CI/CD card should be shown on the CI/CD tab.
|
|
23
|
+
*
|
|
24
|
+
* This means that the catalog entity has one of this annotations set:
|
|
25
|
+
*
|
|
26
|
+
* 1. `tekton.dev/ci-cd: "true"` or
|
|
27
|
+
* 2. `janus-idp.io/tekton` is defined (any value is accepted).
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
declare const isTektonCIAvailable: (entity: Entity) => boolean;
|
|
32
|
+
|
|
33
|
+
export { TektonCI, isTektonCIAvailable, tektonPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/plugin.esm.js
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
|
3
|
+
import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
|
4
|
+
import { isTektonCIAvailable } from './utils/isTektonCIAvailable.esm.js';
|
|
2
5
|
|
|
3
|
-
const
|
|
4
|
-
|
|
6
|
+
const tektonEntityContent = EntityContentBlueprint.make({
|
|
7
|
+
name: "tektonEntityContent",
|
|
8
|
+
params: {
|
|
9
|
+
path: "/tekton",
|
|
10
|
+
title: "Tekton",
|
|
11
|
+
filter: isTektonCIAvailable,
|
|
12
|
+
loader: () => import('./components/Router.esm.js').then((m) => /* @__PURE__ */ jsx(m.Router, {}))
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
const tektonPlugin = createFrontendPlugin({
|
|
16
|
+
pluginId: "tekton",
|
|
17
|
+
info: { packageJson: () => import('./plugins/tekton/package.json.esm.js') },
|
|
18
|
+
extensions: [tektonEntityContent]
|
|
5
19
|
});
|
|
6
|
-
const TektonCI = tektonPlugin.provide(
|
|
7
|
-
createComponentExtension({
|
|
8
|
-
name: "TektonCI",
|
|
9
|
-
component: {
|
|
10
|
-
lazy: () => import('./components/Router.esm.js').then((m) => m.Router)
|
|
11
|
-
}
|
|
12
|
-
})
|
|
13
|
-
);
|
|
14
20
|
|
|
15
|
-
export {
|
|
21
|
+
export { tektonPlugin as default };
|
|
16
22
|
//# sourceMappingURL=plugin.esm.js.map
|
package/dist/plugin.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport { isTektonCIAvailable } from './utils/isTektonCIAvailable';\n\nconst tektonEntityContent = EntityContentBlueprint.make({\n name: 'tektonEntityContent',\n params: {\n path: '/tekton',\n title: 'Tekton',\n filter: isTektonCIAvailable,\n loader: () => import('./components/Router').then(m => <m.Router />),\n },\n});\n\n/**\n * The Tekton frontend plugin for the new frontend system.\n *\n * @public\n */\nconst tektonPlugin = createFrontendPlugin({\n pluginId: 'tekton',\n info: { packageJson: () => import('../package.json') },\n extensions: [tektonEntityContent],\n});\n\nexport default tektonPlugin;\n"],"names":[],"mappings":";;;;;AAmBA,MAAM,mBAAA,GAAsB,uBAAuB,IAAA,CAAK;AAAA,EACtD,IAAA,EAAM,qBAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,SAAA;AAAA,IACN,KAAA,EAAO,QAAA;AAAA,IACP,MAAA,EAAQ,mBAAA;AAAA,IACR,MAAA,EAAQ,MAAM,OAAO,4BAAqB,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBAAK,GAAA,CAAC,CAAA,CAAE,MAAA,EAAF,EAAS,CAAE;AAAA;AAEtE,CAAC,CAAA;AAOD,MAAM,eAAe,oBAAA,CAAqB;AAAA,EACxC,QAAA,EAAU,QAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,sCAAiB,CAAA,EAAE;AAAA,EACrD,UAAA,EAAY,CAAC,mBAAmB;AAClC,CAAC;;;;"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
var name = "@backstage-community/plugin-tekton";
|
|
2
|
+
var version = "4.0.0";
|
|
3
|
+
var main = "src/index.ts";
|
|
4
|
+
var types = "src/index.ts";
|
|
5
|
+
var license = "Apache-2.0";
|
|
6
|
+
var publishConfig = {
|
|
7
|
+
access: "public"
|
|
8
|
+
};
|
|
9
|
+
var exports$1 = {
|
|
10
|
+
".": "./src/index.ts",
|
|
11
|
+
"./alpha": "./src/alpha.ts",
|
|
12
|
+
"./legacy": "./src/legacy.ts",
|
|
13
|
+
"./translations": "./src/translations/index.ts",
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
};
|
|
16
|
+
var typesVersions = {
|
|
17
|
+
"*": {
|
|
18
|
+
alpha: [
|
|
19
|
+
"src/alpha.ts"
|
|
20
|
+
],
|
|
21
|
+
legacy: [
|
|
22
|
+
"src/legacy.ts"
|
|
23
|
+
],
|
|
24
|
+
translations: [
|
|
25
|
+
"src/translations/index.ts"
|
|
26
|
+
],
|
|
27
|
+
"package.json": [
|
|
28
|
+
"package.json"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var backstage = {
|
|
33
|
+
role: "frontend-plugin",
|
|
34
|
+
pluginId: "tekton",
|
|
35
|
+
pluginPackage: "@backstage-community/plugin-tekton",
|
|
36
|
+
pluginPackages: [
|
|
37
|
+
"@backstage-community/plugin-tekton",
|
|
38
|
+
"@backstage-community/plugin-tekton-common",
|
|
39
|
+
"@backstage-community/plugin-tekton-react"
|
|
40
|
+
]
|
|
41
|
+
};
|
|
42
|
+
var sideEffects = [
|
|
43
|
+
"./**/*.css",
|
|
44
|
+
"./**/*.css.esm.js"
|
|
45
|
+
];
|
|
46
|
+
var scripts = {
|
|
47
|
+
start: "backstage-cli package start",
|
|
48
|
+
"start:legacy": "backstage-cli package start --entrypoint dev/legacy",
|
|
49
|
+
"start:mock": "backstage-cli package start --entrypoint dev/index.mock.tsx",
|
|
50
|
+
"start:legacy:mock": "backstage-cli package start --entrypoint dev/legacy.mock.tsx",
|
|
51
|
+
build: "backstage-cli package build",
|
|
52
|
+
lint: "backstage-cli package lint",
|
|
53
|
+
test: "backstage-cli package test --passWithNoTests --coverage",
|
|
54
|
+
clean: "backstage-cli package clean",
|
|
55
|
+
prepack: "backstage-cli package prepack",
|
|
56
|
+
postpack: "backstage-cli package postpack",
|
|
57
|
+
prepublish: "./fix-style-inject-imports.sh"
|
|
58
|
+
};
|
|
59
|
+
var dependencies = {
|
|
60
|
+
"@aonic-ui/pipelines": "^3.1.0",
|
|
61
|
+
"@backstage-community/plugin-tekton-common": "workspace:^",
|
|
62
|
+
"@backstage-community/plugin-tekton-react": "workspace:^",
|
|
63
|
+
"@backstage/catalog-model": "^1.10.0",
|
|
64
|
+
"@backstage/core-components": "^0.18.13",
|
|
65
|
+
"@backstage/core-plugin-api": "^1.12.9",
|
|
66
|
+
"@backstage/frontend-plugin-api": "^0.18.0",
|
|
67
|
+
"@backstage/plugin-app-react": "^0.2.6",
|
|
68
|
+
"@backstage/plugin-catalog-react": "^3.2.2",
|
|
69
|
+
"@backstage/plugin-kubernetes-common": "^0.9.12",
|
|
70
|
+
"@backstage/plugin-kubernetes-react": "^0.5.23",
|
|
71
|
+
"@backstage/plugin-permission-react": "^0.5.4",
|
|
72
|
+
"@backstage/theme": "^0.7.3",
|
|
73
|
+
"@emotion/cache": "^11.14.0",
|
|
74
|
+
"@emotion/react": "^11.11.4",
|
|
75
|
+
"@kubernetes/client-node": "1.4.0",
|
|
76
|
+
"@mui/icons-material": "^5.18.0",
|
|
77
|
+
"@mui/material": "^5.18.0",
|
|
78
|
+
"@patternfly/patternfly": "^6.0.0",
|
|
79
|
+
"@patternfly/react-core": "^6.0.0",
|
|
80
|
+
"@patternfly/react-table": "^6.3.1",
|
|
81
|
+
"@patternfly/react-tokens": "^6.0.0",
|
|
82
|
+
"@patternfly/react-topology": "^6.0.0",
|
|
83
|
+
"@tanstack/react-query": "^5.62.7",
|
|
84
|
+
classnames: "^2.3.2",
|
|
85
|
+
dagre: "^0.8.5",
|
|
86
|
+
lodash: "^4.17.21",
|
|
87
|
+
"mobx-react": "^7.6.0",
|
|
88
|
+
"react-use": "^17.4.0"
|
|
89
|
+
};
|
|
90
|
+
var peerDependencies = {
|
|
91
|
+
react: "^17.0.0 || ^18.0.0",
|
|
92
|
+
"react-dom": "^17.0.0 || ^18.0.0",
|
|
93
|
+
"react-router-dom": "^6.30.5"
|
|
94
|
+
};
|
|
95
|
+
var devDependencies = {
|
|
96
|
+
"@axe-core/playwright": "^4.11.0",
|
|
97
|
+
"@backstage/catalog-client": "^1.16.1",
|
|
98
|
+
"@backstage/cli": "^0.36.5",
|
|
99
|
+
"@backstage/dev-utils": "^1.1.26",
|
|
100
|
+
"@backstage/frontend-defaults": "^0.5.5",
|
|
101
|
+
"@backstage/plugin-catalog": "^2.0.8",
|
|
102
|
+
"@backstage/plugin-kubernetes": "^0.12.22",
|
|
103
|
+
"@backstage/plugin-permission-common": "^0.9.10",
|
|
104
|
+
"@backstage/test-utils": "^1.7.21",
|
|
105
|
+
"@backstage/ui": "^0.17.1",
|
|
106
|
+
"@playwright/test": "1.61.1",
|
|
107
|
+
"@remixicon/react": "^4.2.0",
|
|
108
|
+
"@testing-library/dom": "^10.4.1",
|
|
109
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
110
|
+
"@testing-library/react": "16.3.2",
|
|
111
|
+
"@types/dagre": "^0.7.52",
|
|
112
|
+
"@types/lodash": "4.17.24",
|
|
113
|
+
"@types/react": "^18",
|
|
114
|
+
"@types/react-dom": "^18",
|
|
115
|
+
"cross-fetch": "4.1.0",
|
|
116
|
+
react: "^18.0.2",
|
|
117
|
+
"react-aria-components": "~1.17.0",
|
|
118
|
+
"react-dom": "^18.0.2",
|
|
119
|
+
"react-router-dom": "^6.30.2"
|
|
120
|
+
};
|
|
121
|
+
var files = [
|
|
122
|
+
"app-config.dynamic.yaml",
|
|
123
|
+
"dist"
|
|
124
|
+
];
|
|
125
|
+
var scalprum = {
|
|
126
|
+
name: "backstage-community.plugin-tekton",
|
|
127
|
+
exposedModules: {
|
|
128
|
+
PluginRoot: "./src/index.ts",
|
|
129
|
+
Legacy: "./src/legacy.ts",
|
|
130
|
+
Alpha: "./src/alpha.ts"
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
var repository = {
|
|
134
|
+
type: "git",
|
|
135
|
+
url: "https://github.com/backstage/community-plugins",
|
|
136
|
+
directory: "workspaces/tekton/plugins/tekton"
|
|
137
|
+
};
|
|
138
|
+
var keywords = [
|
|
139
|
+
"kubernetes",
|
|
140
|
+
"tekton",
|
|
141
|
+
"backstage",
|
|
142
|
+
"plugin"
|
|
143
|
+
];
|
|
144
|
+
var bugs = "https://github.com/backstage/community-plugins/issues";
|
|
145
|
+
var maintainers = [
|
|
146
|
+
"christoph-jerolimov",
|
|
147
|
+
"@debsmita1",
|
|
148
|
+
"@divyanshiGupta"
|
|
149
|
+
];
|
|
150
|
+
var author = "Red Hat";
|
|
151
|
+
var _package = {
|
|
152
|
+
name: name,
|
|
153
|
+
version: version,
|
|
154
|
+
main: main,
|
|
155
|
+
types: types,
|
|
156
|
+
license: license,
|
|
157
|
+
publishConfig: publishConfig,
|
|
158
|
+
exports: exports$1,
|
|
159
|
+
typesVersions: typesVersions,
|
|
160
|
+
backstage: backstage,
|
|
161
|
+
sideEffects: sideEffects,
|
|
162
|
+
scripts: scripts,
|
|
163
|
+
dependencies: dependencies,
|
|
164
|
+
peerDependencies: peerDependencies,
|
|
165
|
+
devDependencies: devDependencies,
|
|
166
|
+
files: files,
|
|
167
|
+
scalprum: scalprum,
|
|
168
|
+
repository: repository,
|
|
169
|
+
keywords: keywords,
|
|
170
|
+
bugs: bugs,
|
|
171
|
+
maintainers: maintainers,
|
|
172
|
+
author: author
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
export { author, backstage, bugs, _package as default, dependencies, devDependencies, exports$1 as exports, files, keywords, license, main, maintainers, name, peerDependencies, publishConfig, repository, scalprum, scripts, sideEffects, types, typesVersions, version };
|
|
176
|
+
//# sourceMappingURL=package.json.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/translations.d.ts
CHANGED
|
@@ -26,15 +26,15 @@ declare const tektonTranslationRef: _backstage_frontend_plugin_api.TranslationRe
|
|
|
26
26
|
readonly "pipelineRunList.rowActions.SBOMNotApplicable": "View SBOM is not applicable for this PipelineRun";
|
|
27
27
|
readonly "pipelineRunList.rowActions.viewOutput": "View output";
|
|
28
28
|
readonly "pipelineRunList.rowActions.outputNotApplicable": "View Output is not applicable for this PipelineRun";
|
|
29
|
-
readonly "pipelineRunList.vulnerabilitySeverityTitle.medium": "Medium";
|
|
30
29
|
readonly "pipelineRunList.vulnerabilitySeverityTitle.critical": "Critical";
|
|
31
30
|
readonly "pipelineRunList.vulnerabilitySeverityTitle.high": "High";
|
|
31
|
+
readonly "pipelineRunList.vulnerabilitySeverityTitle.medium": "Medium";
|
|
32
32
|
readonly "pipelineRunList.vulnerabilitySeverityTitle.low": "Low";
|
|
33
33
|
readonly "pipelineRunList.tableHeaderTitle.name": "NAME";
|
|
34
|
-
readonly "pipelineRunList.tableHeaderTitle.
|
|
34
|
+
readonly "pipelineRunList.tableHeaderTitle.vulnerabilities": "VULNERABILITIES";
|
|
35
35
|
readonly "pipelineRunList.tableHeaderTitle.status": "STATUS";
|
|
36
36
|
readonly "pipelineRunList.tableHeaderTitle.taskStatus": "TASK STATUS";
|
|
37
|
-
readonly "pipelineRunList.tableHeaderTitle.
|
|
37
|
+
readonly "pipelineRunList.tableHeaderTitle.startTime": "STARTED";
|
|
38
38
|
readonly "pipelineRunList.tableHeaderTitle.duration": "DURATION";
|
|
39
39
|
readonly "pipelineRunList.tableHeaderTitle.actions": "ACTIONS";
|
|
40
40
|
readonly "pipelineRunList.tablePagination.rowsPerPage": "Rows per page";
|
|
@@ -48,6 +48,7 @@ declare const tektonTranslationRef: _backstage_frontend_plugin_api.TranslationRe
|
|
|
48
48
|
readonly "pipelineRunLogs.taskStatusStepper.skipped": "Skipped";
|
|
49
49
|
readonly "pipelineRunOutput.title": "PipelineRun Output";
|
|
50
50
|
readonly "pipelineRunOutput.noOutput": "No output";
|
|
51
|
+
readonly "pipelineRunStatus.Skipped": "Skipped";
|
|
51
52
|
readonly "pipelineRunStatus.All": "All";
|
|
52
53
|
readonly "pipelineRunStatus.Cancelling": "Cancelling";
|
|
53
54
|
readonly "pipelineRunStatus.Succeeded": "Succeeded";
|
|
@@ -56,7 +57,6 @@ declare const tektonTranslationRef: _backstage_frontend_plugin_api.TranslationRe
|
|
|
56
57
|
readonly "pipelineRunStatus.In Progress": "In Progress";
|
|
57
58
|
readonly "pipelineRunStatus.FailedToStart": "FailedToStart";
|
|
58
59
|
readonly "pipelineRunStatus.PipelineNotStarted": "PipelineNotStarted";
|
|
59
|
-
readonly "pipelineRunStatus.Skipped": "Skipped";
|
|
60
60
|
readonly "pipelineRunStatus.Cancelled": "Cancelled";
|
|
61
61
|
readonly "pipelineRunStatus.Pending": "Pending";
|
|
62
62
|
readonly "pipelineRunStatus.Idle": "Idle";
|
|
@@ -69,10 +69,10 @@ declare const tektonTranslationRef: _backstage_frontend_plugin_api.TranslationRe
|
|
|
69
69
|
readonly "pipelineRunDuration.second_one": "{{count}} second";
|
|
70
70
|
readonly "pipelineRunDuration.second_other": "{{count}} seconds";
|
|
71
71
|
readonly "pipelineRunParamsAndResults.title": "PipelineRun Parameters and Results";
|
|
72
|
-
readonly "pipelineRunParamsAndResults.results": "Results";
|
|
73
72
|
readonly "pipelineRunParamsAndResults.noParams": "No parameters found";
|
|
74
73
|
readonly "pipelineRunParamsAndResults.noResults": "No results found";
|
|
75
74
|
readonly "pipelineRunParamsAndResults.params": "Parameters";
|
|
75
|
+
readonly "pipelineRunParamsAndResults.results": "Results";
|
|
76
76
|
readonly "pipelineRunParamsAndResults.outputTableColumn.name": "Name";
|
|
77
77
|
readonly "pipelineRunParamsAndResults.outputTableColumn.value": "Value";
|
|
78
78
|
}>;
|
|
@@ -89,4 +89,4 @@ declare const tektonTranslations: _backstage_frontend_plugin_api.TranslationReso
|
|
|
89
89
|
*/
|
|
90
90
|
declare const tektonTranslationsModule: _backstage_frontend_plugin_api.FrontendModule;
|
|
91
91
|
|
|
92
|
-
export { tektonTranslationsModule as default, tektonTranslationRef, tektonTranslations };
|
|
92
|
+
export { tektonTranslationsModule as default, tektonTranslationRef, tektonTranslations, tektonTranslationsModule };
|
package/dist/translations.esm.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createTranslationResource } from '@backstage/
|
|
2
|
-
import { createFrontendModule } from '@backstage/frontend-plugin-api';
|
|
1
|
+
import { createTranslationResource, createFrontendModule } from '@backstage/frontend-plugin-api';
|
|
3
2
|
import { TranslationBlueprint } from '@backstage/plugin-app-react';
|
|
4
3
|
import { tektonTranslationRef } from './translations/ref.esm.js';
|
|
5
4
|
|
|
@@ -25,5 +24,5 @@ const tektonTranslationsModule = createFrontendModule({
|
|
|
25
24
|
]
|
|
26
25
|
});
|
|
27
26
|
|
|
28
|
-
export { tektonTranslationsModule as default, tektonTranslationRef, tektonTranslations };
|
|
27
|
+
export { tektonTranslationsModule as default, tektonTranslationRef, tektonTranslations, tektonTranslationsModule };
|
|
29
28
|
//# sourceMappingURL=translations.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.esm.js","sources":["../src/translations/index.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"translations.esm.js","sources":["../src/translations/index.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createFrontendModule,\n createTranslationResource,\n} from '@backstage/frontend-plugin-api';\nimport { TranslationBlueprint } from '@backstage/plugin-app-react';\nimport { tektonTranslationRef } from './ref';\n\n/**\n * The translation resource for the Tekton plugin\n * @public\n */\nexport const tektonTranslations = createTranslationResource({\n ref: tektonTranslationRef,\n translations: {\n de: () => import('./de'),\n es: () => import('./es'),\n fr: () => import('./fr'),\n it: () => import('./it'),\n ja: () => import('./ja'),\n },\n});\n\nexport { tektonTranslationRef };\n\n/**\n * Translation module for the Tekton plugin.\n * @public\n */\nexport const tektonTranslationsModule = createFrontendModule({\n pluginId: 'app',\n extensions: [\n TranslationBlueprint.make({\n name: 'tekton-translations',\n params: {\n resource: tektonTranslations,\n },\n }),\n ],\n});\n\nexport default tektonTranslationsModule;\n"],"names":[],"mappings":";;;;AA2BO,MAAM,qBAAqB,yBAAA,CAA0B;AAAA,EAC1D,GAAA,EAAK,oBAAA;AAAA,EACL,YAAA,EAAc;AAAA,IACZ,EAAA,EAAI,MAAM,OAAO,0BAAM,CAAA;AAAA,IACvB,EAAA,EAAI,MAAM,OAAO,0BAAM,CAAA;AAAA,IACvB,EAAA,EAAI,MAAM,OAAO,0BAAM,CAAA;AAAA,IACvB,EAAA,EAAI,MAAM,OAAO,0BAAM,CAAA;AAAA,IACvB,EAAA,EAAI,MAAM,OAAO,0BAAM;AAAA;AAE3B,CAAC;AAQM,MAAM,2BAA2B,oBAAA,CAAqB;AAAA,EAC3D,QAAA,EAAU,KAAA;AAAA,EACV,UAAA,EAAY;AAAA,IACV,qBAAqB,IAAA,CAAK;AAAA,MACxB,IAAA,EAAM,qBAAA;AAAA,MACN,MAAA,EAAQ;AAAA,QACN,QAAA,EAAU;AAAA;AACZ,KACD;AAAA;AAEL,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-tekton",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"main": "./dist/index.esm.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -9,16 +9,21 @@
|
|
|
9
9
|
},
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
+
"backstage": "@backstage/FrontendPlugin",
|
|
12
13
|
"import": "./dist/index.esm.js",
|
|
13
14
|
"types": "./dist/index.d.ts",
|
|
14
15
|
"default": "./dist/index.esm.js"
|
|
15
16
|
},
|
|
16
17
|
"./alpha": {
|
|
17
|
-
"backstage": "@backstage/FrontendPlugin",
|
|
18
18
|
"import": "./dist/alpha.esm.js",
|
|
19
19
|
"types": "./dist/alpha.d.ts",
|
|
20
20
|
"default": "./dist/alpha.esm.js"
|
|
21
21
|
},
|
|
22
|
+
"./legacy": {
|
|
23
|
+
"import": "./dist/legacy.esm.js",
|
|
24
|
+
"types": "./dist/legacy.d.ts",
|
|
25
|
+
"default": "./dist/legacy.esm.js"
|
|
26
|
+
},
|
|
22
27
|
"./translations": {
|
|
23
28
|
"backstage": "@backstage/FrontendModule",
|
|
24
29
|
"import": "./dist/translations.esm.js",
|
|
@@ -32,6 +37,9 @@
|
|
|
32
37
|
"alpha": [
|
|
33
38
|
"dist/alpha.d.ts"
|
|
34
39
|
],
|
|
40
|
+
"legacy": [
|
|
41
|
+
"dist/legacy.d.ts"
|
|
42
|
+
],
|
|
35
43
|
"translations": [
|
|
36
44
|
"dist/translations.d.ts"
|
|
37
45
|
],
|
|
@@ -50,7 +58,7 @@
|
|
|
50
58
|
"@backstage-community/plugin-tekton-react"
|
|
51
59
|
],
|
|
52
60
|
"features": {
|
|
53
|
-
"
|
|
61
|
+
".": "@backstage/FrontendPlugin",
|
|
54
62
|
"./translations": "@backstage/FrontendModule"
|
|
55
63
|
}
|
|
56
64
|
},
|
|
@@ -60,6 +68,9 @@
|
|
|
60
68
|
],
|
|
61
69
|
"scripts": {
|
|
62
70
|
"start": "backstage-cli package start",
|
|
71
|
+
"start:legacy": "backstage-cli package start --entrypoint dev/legacy",
|
|
72
|
+
"start:mock": "backstage-cli package start --entrypoint dev/index.mock.tsx",
|
|
73
|
+
"start:legacy:mock": "backstage-cli package start --entrypoint dev/legacy.mock.tsx",
|
|
63
74
|
"build": "backstage-cli package build",
|
|
64
75
|
"lint": "backstage-cli package lint",
|
|
65
76
|
"test": "backstage-cli package test --passWithNoTests --coverage",
|
|
@@ -70,17 +81,17 @@
|
|
|
70
81
|
},
|
|
71
82
|
"dependencies": {
|
|
72
83
|
"@aonic-ui/pipelines": "^3.1.0",
|
|
73
|
-
"@backstage-community/plugin-tekton-common": "^1.
|
|
74
|
-
"@backstage-community/plugin-tekton-react": "^0.
|
|
75
|
-
"@backstage/catalog-model": "^1.
|
|
76
|
-
"@backstage/core-components": "^0.18.
|
|
77
|
-
"@backstage/core-plugin-api": "^1.12.
|
|
78
|
-
"@backstage/frontend-plugin-api": "^0.
|
|
79
|
-
"@backstage/plugin-app-react": "^0.2.
|
|
80
|
-
"@backstage/plugin-catalog-react": "^3.
|
|
84
|
+
"@backstage-community/plugin-tekton-common": "^1.24.0",
|
|
85
|
+
"@backstage-community/plugin-tekton-react": "^0.9.0",
|
|
86
|
+
"@backstage/catalog-model": "^1.10.0",
|
|
87
|
+
"@backstage/core-components": "^0.18.13",
|
|
88
|
+
"@backstage/core-plugin-api": "^1.12.9",
|
|
89
|
+
"@backstage/frontend-plugin-api": "^0.18.0",
|
|
90
|
+
"@backstage/plugin-app-react": "^0.2.6",
|
|
91
|
+
"@backstage/plugin-catalog-react": "^3.2.2",
|
|
81
92
|
"@backstage/plugin-kubernetes-common": "^0.9.12",
|
|
82
|
-
"@backstage/plugin-kubernetes-react": "^0.5.
|
|
83
|
-
"@backstage/plugin-permission-react": "^0.5.
|
|
93
|
+
"@backstage/plugin-kubernetes-react": "^0.5.23",
|
|
94
|
+
"@backstage/plugin-permission-react": "^0.5.4",
|
|
84
95
|
"@backstage/theme": "^0.7.3",
|
|
85
96
|
"@emotion/cache": "^11.14.0",
|
|
86
97
|
"@emotion/react": "^11.11.4",
|
|
@@ -102,25 +113,46 @@
|
|
|
102
113
|
"peerDependencies": {
|
|
103
114
|
"react": "^17.0.0 || ^18.0.0",
|
|
104
115
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
105
|
-
"react-router-dom": "^6.
|
|
116
|
+
"react-router-dom": "^6.30.5"
|
|
106
117
|
},
|
|
107
118
|
"devDependencies": {
|
|
108
119
|
"@axe-core/playwright": "^4.11.0",
|
|
109
|
-
"@backstage/
|
|
110
|
-
"@backstage/
|
|
111
|
-
"@backstage/
|
|
120
|
+
"@backstage/catalog-client": "^1.16.1",
|
|
121
|
+
"@backstage/cli": "^0.36.5",
|
|
122
|
+
"@backstage/dev-utils": "^1.1.26",
|
|
123
|
+
"@backstage/frontend-defaults": "^0.5.5",
|
|
124
|
+
"@backstage/plugin-catalog": "^2.0.8",
|
|
125
|
+
"@backstage/plugin-kubernetes": "^0.12.22",
|
|
126
|
+
"@backstage/plugin-permission-common": "^0.9.10",
|
|
127
|
+
"@backstage/test-utils": "^1.7.21",
|
|
128
|
+
"@backstage/ui": "^0.17.1",
|
|
112
129
|
"@playwright/test": "1.61.1",
|
|
130
|
+
"@remixicon/react": "^4.2.0",
|
|
113
131
|
"@testing-library/dom": "^10.4.1",
|
|
114
132
|
"@testing-library/jest-dom": "6.9.1",
|
|
115
133
|
"@testing-library/react": "16.3.2",
|
|
116
134
|
"@types/dagre": "^0.7.52",
|
|
117
135
|
"@types/lodash": "4.17.24",
|
|
118
|
-
"
|
|
136
|
+
"@types/react": "^18",
|
|
137
|
+
"@types/react-dom": "^18",
|
|
138
|
+
"cross-fetch": "4.1.0",
|
|
139
|
+
"react": "^18.0.2",
|
|
140
|
+
"react-aria-components": "~1.17.0",
|
|
141
|
+
"react-dom": "^18.0.2",
|
|
142
|
+
"react-router-dom": "^6.30.2"
|
|
119
143
|
},
|
|
120
144
|
"files": [
|
|
121
145
|
"app-config.dynamic.yaml",
|
|
122
146
|
"dist"
|
|
123
147
|
],
|
|
148
|
+
"scalprum": {
|
|
149
|
+
"name": "backstage-community.plugin-tekton",
|
|
150
|
+
"exposedModules": {
|
|
151
|
+
"PluginRoot": "./src/index.ts",
|
|
152
|
+
"Legacy": "./src/legacy.ts",
|
|
153
|
+
"Alpha": "./src/alpha.ts"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
124
156
|
"repository": {
|
|
125
157
|
"type": "git",
|
|
126
158
|
"url": "https://github.com/backstage/community-plugins",
|