@backstage/plugin-kubernetes-react 0.6.0-next.2 → 0.6.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @backstage/plugin-kubernetes-react
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cfba1bc: **BREAKING PRODUCERS:** The `FixDialog`, `ContainerCard`, and `PodLogs` components no longer accept an implicit `children` prop. This aligns them with ADR006. If you were passing children to these components, remove them as they were never rendered.
8
+
9
+ ### Patch Changes
10
+
11
+ - 736d84e: Use locale-insensitive Unicode casing for consistent string handling across environments.
12
+ - c0ebaa7: chore(deps): bump `js-yaml` from 4.3.1 to 4.3.2
13
+ - 83f34f2: The pod exec terminal now loads `@xterm/xterm` and its stylesheet when a terminal is opened, instead of including them in the initial bundle.
14
+ - Updated dependencies
15
+ - @backstage/core-components@0.18.14
16
+ - @backstage/catalog-model@1.10.1
17
+ - @backstage/plugin-kubernetes-common@0.9.13
18
+ - @backstage/core-plugin-api@1.12.10
19
+
3
20
  ## 0.6.0-next.2
4
21
 
5
22
  ### Minor Changes
@@ -37,7 +37,7 @@ class GkeClusterLinksFormatter {
37
37
  const namespace = encodeURIComponent(
38
38
  options.object.metadata?.namespace ?? ""
39
39
  );
40
- const validKind = kindMappings[options.kind.toLocaleLowerCase("en-US")];
40
+ const validKind = kindMappings[options.kind.toLowerCase()];
41
41
  let path;
42
42
  if (namespace && name && validKind) {
43
43
  const kindsWithDetails = ["ingress", "pod"];
@@ -1 +1 @@
1
- {"version":3,"file":"GkeClusterLinksFormatter.esm.js","sources":["../../../src/api/formatters/GkeClusterLinksFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 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 ClusterLinksFormatter,\n ClusterLinksFormatterOptions,\n} from '../../types';\nimport { ProfileInfoApi } from '@backstage/core-plugin-api';\n\nconst kindMappings: Record<string, string> = {\n deployment: 'deployment',\n pod: 'pod',\n ingress: 'ingress',\n service: 'service',\n horizontalpodautoscaler: 'deployment',\n};\n\n/** @public */\nexport class GkeClusterLinksFormatter implements ClusterLinksFormatter {\n private readonly googleAuthApi: ProfileInfoApi | undefined;\n\n constructor(googleAuthApi: ProfileInfoApi | undefined) {\n this.googleAuthApi = googleAuthApi;\n }\n async formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL> {\n if (!options.dashboardParameters) {\n throw new Error('GKE dashboard requires a dashboardParameters option');\n }\n const args = options.dashboardParameters;\n if (typeof args.projectId !== 'string') {\n throw new Error(\n 'GKE dashboard requires a \"projectId\" of type string in the dashboardParameters option',\n );\n }\n if (typeof args.region !== 'string') {\n throw new Error(\n 'GKE dashboard requires a \"region\" of type string in the dashboardParameters option',\n );\n }\n if (typeof args.clusterName !== 'string') {\n throw new Error(\n 'GKE dashboard requires a \"clusterName\" of type string in the dashboardParameters option',\n );\n }\n const basePath = new URL('https://console.cloud.google.com/');\n const region = encodeURIComponent(args.region);\n const clusterName = encodeURIComponent(args.clusterName);\n const name = encodeURIComponent(options.object.metadata?.name ?? '');\n const namespace = encodeURIComponent(\n options.object.metadata?.namespace ?? '',\n );\n const validKind = kindMappings[options.kind.toLocaleLowerCase('en-US')];\n let path: string;\n if (namespace && name && validKind) {\n const kindsWithDetails = ['ingress', 'pod'];\n const landingPage = kindsWithDetails.includes(validKind)\n ? 'details'\n : 'overview';\n path = `kubernetes/${validKind}/${region}/${clusterName}/${namespace}/${name}/${landingPage}`;\n } else {\n path = `kubernetes/clusters/details/${region}/${clusterName}/details`;\n }\n const result = new URL(path, basePath);\n result.searchParams.set('project', args.projectId);\n if (this.googleAuthApi) {\n const profile = await this.googleAuthApi.getProfile({ optional: true });\n if (profile?.email) {\n result.searchParams.set('authuser', profile.email);\n }\n }\n return result;\n }\n}\n"],"names":[],"mappings":"AAqBA,MAAM,YAAA,GAAuC;AAAA,EAC3C,UAAA,EAAY,YAAA;AAAA,EACZ,GAAA,EAAK,KAAA;AAAA,EACL,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,uBAAA,EAAyB;AAC3B,CAAA;AAGO,MAAM,wBAAA,CAA0D;AAAA,EACpD,aAAA;AAAA,EAEjB,YAAY,aAAA,EAA2C;AACrD,IAAA,IAAA,CAAK,aAAA,GAAgB,aAAA;AAAA,EACvB;AAAA,EACA,MAAM,kBAAkB,OAAA,EAAqD;AAC3E,IAAA,IAAI,CAAC,QAAQ,mBAAA,EAAqB;AAChC,MAAA,MAAM,IAAI,MAAM,qDAAqD,CAAA;AAAA,IACvE;AACA,IAAA,MAAM,OAAO,OAAA,CAAQ,mBAAA;AACrB,IAAA,IAAI,OAAO,IAAA,CAAK,SAAA,KAAc,QAAA,EAAU;AACtC,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OACF;AAAA,IACF;AACA,IAAA,IAAI,OAAO,IAAA,CAAK,MAAA,KAAW,QAAA,EAAU;AACnC,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OACF;AAAA,IACF;AACA,IAAA,IAAI,OAAO,IAAA,CAAK,WAAA,KAAgB,QAAA,EAAU;AACxC,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OACF;AAAA,IACF;AACA,IAAA,MAAM,QAAA,GAAW,IAAI,GAAA,CAAI,mCAAmC,CAAA;AAC5D,IAAA,MAAM,MAAA,GAAS,kBAAA,CAAmB,IAAA,CAAK,MAAM,CAAA;AAC7C,IAAA,MAAM,WAAA,GAAc,kBAAA,CAAmB,I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,EAAY,OAAA,CAAQ,KAAK,CAAA;AAAA,MACnD;AAAA,IACF;AACA,IAAA,OAAO,MAAA;AAAA,EACT;AACF;;;;"}
1
+ {"version":3,"file":"GkeClusterLinksFormatter.esm.js","sources":["../../../src/api/formatters/GkeClusterLinksFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 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 ClusterLinksFormatter,\n ClusterLinksFormatterOptions,\n} from '../../types';\nimport { ProfileInfoApi } from '@backstage/core-plugin-api';\n\nconst kindMappings: Record<string, string> = {\n deployment: 'deployment',\n pod: 'pod',\n ingress: 'ingress',\n service: 'service',\n horizontalpodautoscaler: 'deployment',\n};\n\n/** @public */\nexport class GkeClusterLinksFormatter implements ClusterLinksFormatter {\n private readonly googleAuthApi: ProfileInfoApi | undefined;\n\n constructor(googleAuthApi: ProfileInfoApi | undefined) {\n this.googleAuthApi = googleAuthApi;\n }\n async formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL> {\n if (!options.dashboardParameters) {\n throw new Error('GKE dashboard requires a dashboardParameters option');\n }\n const args = options.dashboardParameters;\n if (typeof args.projectId !== 'string') {\n throw new Error(\n 'GKE dashboard requires a \"projectId\" of type string in the dashboardParameters option',\n );\n }\n if (typeof args.region !== 'string') {\n throw new Error(\n 'GKE dashboard requires a \"region\" of type string in the dashboardParameters option',\n );\n }\n if (typeof args.clusterName !== 'string') {\n throw new Error(\n 'GKE dashboard requires a \"clusterName\" of type string in the dashboardParameters option',\n );\n }\n const basePath = new URL('https://console.cloud.google.com/');\n const region = encodeURIComponent(args.region);\n const clusterName = encodeURIComponent(args.clusterName);\n const name = encodeURIComponent(options.object.metadata?.name ?? '');\n const namespace = encodeURIComponent(\n options.object.metadata?.namespace ?? '',\n );\n const validKind = kindMappings[options.kind.toLowerCase()];\n let path: string;\n if (namespace && name && validKind) {\n const kindsWithDetails = ['ingress', 'pod'];\n const landingPage = kindsWithDetails.includes(validKind)\n ? 'details'\n : 'overview';\n path = `kubernetes/${validKind}/${region}/${clusterName}/${namespace}/${name}/${landingPage}`;\n } else {\n path = `kubernetes/clusters/details/${region}/${clusterName}/details`;\n }\n const result = new URL(path, basePath);\n result.searchParams.set('project', args.projectId);\n if (this.googleAuthApi) {\n const profile = await this.googleAuthApi.getProfile({ optional: true });\n if (profile?.email) {\n result.searchParams.set('authuser', profile.email);\n }\n }\n return result;\n }\n}\n"],"names":[],"mappings":"AAqBA,MAAM,YAAA,GAAuC;AAAA,EAC3C,UAAA,EAAY,YAAA;AAAA,EACZ,GAAA,EAAK,KAAA;AAAA,EACL,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,uBAAA,EAAyB;AAC3B,CAAA;AAGO,MAAM,wBAAA,CAA0D;AAAA,EACpD,aAAA;AAAA,EAEjB,YAAY,aAAA,EAA2C;AACrD,IAAA,IAAA,CAAK,aAAA,GAAgB,aAAA;AAAA,EACvB;AAAA,EACA,MAAM,kBAAkB,OAAA,EAAqD;AAC3E,IAAA,IAAI,CAAC,QAAQ,mBAAA,EAAqB;AAChC,MAAA,MAAM,IAAI,MAAM,qDAAqD,CAAA;AAAA,IACvE;AACA,IAAA,MAAM,OAAO,OAAA,CAAQ,mBAAA;AACrB,IAAA,IAAI,OAAO,IAAA,CAAK,SAAA,KAAc,QAAA,EAAU;AACtC,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OACF;AAAA,IACF;AACA,IAAA,IAAI,OAAO,IAAA,CAAK,MAAA,KAAW,QAAA,EAAU;AACnC,MAAA,MAAM,IAAI,KAAA;AAAA,QAC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AAA;AACrC,IAAA,MAAA,CAAO,YAAA,CAAa,GAAA,CAAI,SAAA,EAAW,IAAA,CAAK,SAAS,CAAA;AACjD,IAAA,IAAI,KAAK,aAAA,EAAe;AACtB,MAAA,MAAM,OAAA,GAAU,MAAM,IAAA,CAAK,aAAA,CAAc,WAAW,EAAE,QAAA,EAAU,MAAM,CAAA;AACtE,MAAA,IAAI,SAAS,KAAA,EAAO;AAClB,QAAA,MAAA,CAAO,YAAA,CAAa,GAAA,CAAI,UAAA,EAAY,OAAA,CAAQ,KAAK,CAAA;AAAA,MACnD;AAAA,IACF;AACA,IAAA,OAAO,MAAA;AAAA,EACT;AACF;;;;"}
@@ -47,7 +47,7 @@ class HeadlampClusterLinksFormatter {
47
47
  "persistentvolumeclaim"
48
48
  ]);
49
49
  getHeadlampPath(kind, object, clusterName) {
50
- const lowercaseKind = kind.toLocaleLowerCase("en-US");
50
+ const lowercaseKind = kind.toLowerCase();
51
51
  const { name } = object.metadata ?? {};
52
52
  let { namespace } = object.metadata ?? {};
53
53
  if (!name) {
@@ -1 +1 @@
1
- {"version":3,"file":"HeadlampClusterLinksFormatter.esm.js","sources":["../../../src/api/formatters/HeadlampClusterLinksFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 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 ClusterLinksFormatter,\n ClusterLinksFormatterOptions,\n} from '../../types';\n\n/** @public */\nexport class HeadlampClusterLinksFormatter implements ClusterLinksFormatter {\n async formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL> {\n const { dashboardUrl, dashboardParameters, object, kind } = options;\n\n if (!dashboardUrl && !dashboardParameters?.internal) {\n throw new Error(\n 'Dashboard URL is required or dashboardInternal must be true',\n );\n }\n\n const clusterName =\n (dashboardParameters?.clusterName as string) ?? 'default';\n const path = this.getHeadlampPath(kind, object, clusterName);\n if (!path) {\n throw new Error(`Could not find path for kind: ${kind}`);\n }\n\n let baseUrl: URL;\n\n if (dashboardParameters?.internal) {\n baseUrl = new URL(window.location.origin);\n baseUrl.pathname =\n (dashboardParameters.headlampRoute as string) || '/headlamp';\n } else {\n if (!dashboardUrl?.href) {\n throw new Error(\n 'Dashboard URL is required when not using internal dashboard',\n );\n }\n baseUrl = new URL(dashboardUrl.href);\n }\n\n baseUrl.searchParams.set('to', path);\n return baseUrl;\n }\n\n private readonly NAMESPACED_RESOURCES = new Set([\n 'pod',\n 'deployment',\n 'replicaset',\n 'statefulset',\n 'daemonset',\n 'job',\n 'cronjob',\n 'service',\n 'ingress',\n 'configmap',\n 'secret',\n 'serviceaccount',\n 'role',\n 'rolebinding',\n 'networkpolicy',\n 'horizontalpodautoscaler',\n 'poddisruptionbudget',\n 'persistentvolumeclaim',\n ]);\n\n private getHeadlampPath(\n kind: string,\n object: {\n metadata?: {\n name?: string;\n namespace?: string;\n };\n },\n clusterName: string,\n ): string {\n const lowercaseKind = kind.toLocaleLowerCase('en-US');\n const { name } = object.metadata ?? {};\n let { namespace } = object.metadata ?? {};\n\n if (!name) {\n throw new Error(`Resource name is required for kind: ${kind}`);\n }\n\n // Add namespace validation\n if (this.NAMESPACED_RESOURCES.has(lowercaseKind) && !namespace) {\n throw new Error(`Namespace is required for namespaced resource: ${kind}`);\n }\n if (!namespace) {\n namespace = 'default';\n }\n\n const pathMap: Record<string, string> = {\n namespace: `/c/${clusterName}/namespaces/${name}`,\n node: `/c/${clusterName}/nodes/${name}`,\n persistentvolume: `/c/${clusterName}/storage/persistentvolumes/${name}`,\n persistentvolumeclaim: `/c/${clusterName}/storage/persistentvolumeclaims/${namespace}/${name}`,\n pod: `/c/${clusterName}/pods/${namespace}/${name}`,\n deployment: `/c/${clusterName}/deployments/${namespace}/${name}`,\n replicaset: `/c/${clusterName}/replicasets/${namespace}/${name}`,\n statefulset: `/c/${clusterName}/statefulsets/${namespace}/${name}`,\n daemonset: `/c/${clusterName}/daemonsets/${namespace}/${name}`,\n job: `/c/${clusterName}/jobs/${namespace}/${name}`,\n cronjob: `/c/${clusterName}/cronjobs/${namespace}/${name}`,\n service: `/c/${clusterName}/services/${namespace}/${name}`,\n ingress: `/c/${clusterName}/ingresses/${namespace}/${name}`,\n configmap: `/c/${clusterName}/configmaps/${namespace}/${name}`,\n secret: `/c/${clusterName}/secrets/${namespace}/${name}`,\n serviceaccount: `/c/${clusterName}/serviceaccounts/${namespace}/${name}`,\n role: `/c/${clusterName}/roles/${namespace}/${name}`,\n rolebinding: `/c/${clusterName}/rolebindings/${namespace}/${name}`,\n clusterrole: `/c/${clusterName}/clusterroles/${name}`,\n clusterrolebinding: `/c/${clusterName}/clusterrolebindings/${name}`,\n storageclass: `/c/${clusterName}/storage/storageclasses/${name}`,\n networkpolicy: `/c/${clusterName}/networkpolicies/${namespace}/${name}`,\n horizontalpodautoscaler: `/c/${clusterName}/horizontalpodautoscalers/${namespace}/${name}`,\n poddisruptionbudget: `/c/${clusterName}/poddisruptionbudgets/${namespace}/${name}`,\n customresourcedefinition: `/c/${clusterName}/customresourcedefinitions/${name}`,\n };\n\n return pathMap[lowercaseKind] ?? '';\n }\n}\n"],"names":[],"mappings":"AAsBO,MAAM,6BAAA,CAA+D;AAAA,EAC1E,MAAM,kBAAkB,OAAA,EAAqD;AAC3E,IAAA,MAAM,EAAE,YAAA,EAAc,mBAAA,EAAqB,MAAA,EAAQ,MAAK,GAAI,OAAA;AAE5D,IAAA,IAAI,CAAC,YAAA,IAAgB,CAAC,mBAAA,EAAqB,QAAA,EAAU;AACnD,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OACF;AAAA,IACF;AAEA,IAAA,MAAM,WAAA,GACH,qBAAqB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D,eAAe,CAAA,GAAA,EAAM,WAAW,CAAA,iBAAA,EAAoB,SAAS,IAAI,IAAI,CAAA,CAAA;AAAA,MACrE,yBAAyB,CAAA,GAAA,EAAM,WAAW,CAAA,0BAAA,EAA6B,SAAS,IAAI,IAAI,CAAA,CAAA;AAAA,MACxF,qBAAqB,CAAA,GAAA,EAAM,WAAW,CAAA,sBAAA,EAAyB,SAAS,IAAI,IAAI,CAAA,CAAA;AAAA,MAChF,wBAAA,EAA0B,CAAA,GAAA,EAAM,WAAW,CAAA,2BAAA,EAA8B,IAAI,CAAA;AAAA,KAC/E;AAEA,IAAA,OAAO,OAAA,CAAQ,aAAa,CAAA,IAAK,EAAA;AAAA,EACnC;AACF;;;;"}
1
+ {"version":3,"file":"HeadlampClusterLinksFormatter.esm.js","sources":["../../../src/api/formatters/HeadlampClusterLinksFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 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 ClusterLinksFormatter,\n ClusterLinksFormatterOptions,\n} from '../../types';\n\n/** @public */\nexport class HeadlampClusterLinksFormatter implements ClusterLinksFormatter {\n async formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL> {\n const { dashboardUrl, dashboardParameters, object, kind } = options;\n\n if (!dashboardUrl && !dashboardParameters?.internal) {\n throw new Error(\n 'Dashboard URL is required or dashboardInternal must be true',\n );\n }\n\n const clusterName =\n (dashboardParameters?.clusterName as string) ?? 'default';\n const path = this.getHeadlampPath(kind, object, clusterName);\n if (!path) {\n throw new Error(`Could not find path for kind: ${kind}`);\n }\n\n let baseUrl: URL;\n\n if (dashboardParameters?.internal) {\n baseUrl = new URL(window.location.origin);\n baseUrl.pathname =\n (dashboardParameters.headlampRoute as string) || '/headlamp';\n } else {\n if (!dashboardUrl?.href) {\n throw new Error(\n 'Dashboard URL is required when not using internal dashboard',\n );\n }\n baseUrl = new URL(dashboardUrl.href);\n }\n\n baseUrl.searchParams.set('to', path);\n return baseUrl;\n }\n\n private readonly NAMESPACED_RESOURCES = new Set([\n 'pod',\n 'deployment',\n 'replicaset',\n 'statefulset',\n 'daemonset',\n 'job',\n 'cronjob',\n 'service',\n 'ingress',\n 'configmap',\n 'secret',\n 'serviceaccount',\n 'role',\n 'rolebinding',\n 'networkpolicy',\n 'horizontalpodautoscaler',\n 'poddisruptionbudget',\n 'persistentvolumeclaim',\n ]);\n\n private getHeadlampPath(\n kind: string,\n object: {\n metadata?: {\n name?: string;\n namespace?: string;\n };\n },\n clusterName: string,\n ): string {\n const lowercaseKind = kind.toLowerCase();\n const { name } = object.metadata ?? {};\n let { namespace } = object.metadata ?? {};\n\n if (!name) {\n throw new Error(`Resource name is required for kind: ${kind}`);\n }\n\n // Add namespace validation\n if (this.NAMESPACED_RESOURCES.has(lowercaseKind) && !namespace) {\n throw new Error(`Namespace is required for namespaced resource: ${kind}`);\n }\n if (!namespace) {\n namespace = 'default';\n }\n\n const pathMap: Record<string, string> = {\n namespace: `/c/${clusterName}/namespaces/${name}`,\n node: `/c/${clusterName}/nodes/${name}`,\n persistentvolume: `/c/${clusterName}/storage/persistentvolumes/${name}`,\n persistentvolumeclaim: `/c/${clusterName}/storage/persistentvolumeclaims/${namespace}/${name}`,\n pod: `/c/${clusterName}/pods/${namespace}/${name}`,\n deployment: `/c/${clusterName}/deployments/${namespace}/${name}`,\n replicaset: `/c/${clusterName}/replicasets/${namespace}/${name}`,\n statefulset: `/c/${clusterName}/statefulsets/${namespace}/${name}`,\n daemonset: `/c/${clusterName}/daemonsets/${namespace}/${name}`,\n job: `/c/${clusterName}/jobs/${namespace}/${name}`,\n cronjob: `/c/${clusterName}/cronjobs/${namespace}/${name}`,\n service: `/c/${clusterName}/services/${namespace}/${name}`,\n ingress: `/c/${clusterName}/ingresses/${namespace}/${name}`,\n configmap: `/c/${clusterName}/configmaps/${namespace}/${name}`,\n secret: `/c/${clusterName}/secrets/${namespace}/${name}`,\n serviceaccount: `/c/${clusterName}/serviceaccounts/${namespace}/${name}`,\n role: `/c/${clusterName}/roles/${namespace}/${name}`,\n rolebinding: `/c/${clusterName}/rolebindings/${namespace}/${name}`,\n clusterrole: `/c/${clusterName}/clusterroles/${name}`,\n clusterrolebinding: `/c/${clusterName}/clusterrolebindings/${name}`,\n storageclass: `/c/${clusterName}/storage/storageclasses/${name}`,\n networkpolicy: `/c/${clusterName}/networkpolicies/${namespace}/${name}`,\n horizontalpodautoscaler: `/c/${clusterName}/horizontalpodautoscalers/${namespace}/${name}`,\n poddisruptionbudget: `/c/${clusterName}/poddisruptionbudgets/${namespace}/${name}`,\n customresourcedefinition: `/c/${clusterName}/customresourcedefinitions/${name}`,\n };\n\n return pathMap[lowercaseKind] ?? '';\n }\n}\n"],"names":[],"mappings":"AAsBO,MAAM,6BAAA,CAA+D;AAAA,EAC1E,MAAM,kBAAkB,OAAA,EAAqD;AAC3E,IAAA,MAAM,EAAE,YAAA,EAAc,mBAAA,EAAqB,MAAA,EAAQ,MAAK,GAAI,OAAA;AAE5D,IAAA,IAAI,CAAC,YAAA,IAAgB,CAAC,mBAAA,EAAqB,QAAA,EAAU;AACnD,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OACF;AAAA,IACF;AAEA,IAAA,MAAM,WAAA,GACH,qBAAqB,WAAA,IAA0B,SAAA;AAClD,IAAA,MAAM,IAAA,GAAO,IAAA,CAAK,eAAA,CAAgB,IAAA,EAAM,QAAQ,WAAW,CAAA;AAC3D,IAAA,IAAI,CAAC,IAAA,EAAM;AACT,MAAA,MAAM,IAAI,KAAA,CAAM,CAAA,8BAAA,EAAiC,IAAI,CAAA,CAAE,CAAA;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AAS,IAAI,IAAI,CAAA,CAAA;AAAA,MAChF,wBAAA,EAA0B,CAAA,GAAA,EAAM,WAAW,CAAA,2BAAA,EAA8B,IAAI,CAAA;AAAA,KAC/E;AAEA,IAAA,OAAO,OAAA,CAAQ,aAAa,CAAA,IAAK,EAAA;AAAA,EACnC;AACF;;;;"}
@@ -15,7 +15,7 @@ class OpenshiftClusterLinksFormatter {
15
15
  const namespace = encodeURIComponent(
16
16
  options.object.metadata?.namespace ?? ""
17
17
  );
18
- const validKind = kindMappings[options.kind.toLocaleLowerCase("en-US")];
18
+ const validKind = kindMappings[options.kind.toLowerCase()];
19
19
  if (!basePath.pathname.endsWith("/")) {
20
20
  basePath.pathname += "/";
21
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"OpenshiftClusterLinksFormatter.esm.js","sources":["../../../src/api/formatters/OpenshiftClusterLinksFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 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 { ClusterLinksFormatterOptions } from '../../types';\n\nconst kindMappings: Record<string, string> = {\n deployment: 'deployments',\n ingress: 'ingresses',\n service: 'services',\n horizontalpodautoscaler: 'horizontalpodautoscalers',\n persistentvolume: 'persistentvolumes',\n};\n\n/** @public */\nexport class OpenshiftClusterLinksFormatter {\n async formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL> {\n if (!options.dashboardUrl) {\n throw new Error('OpenShift dashboard requires a dashboardUrl option');\n }\n const basePath = new URL(options.dashboardUrl.href);\n const name = encodeURIComponent(options.object.metadata?.name ?? '');\n const namespace = encodeURIComponent(\n options.object.metadata?.namespace ?? '',\n );\n const validKind = kindMappings[options.kind.toLocaleLowerCase('en-US')];\n if (!basePath.pathname.endsWith('/')) {\n // a dashboard url with a path should end with a slash otherwise\n // the new combined URL will replace the last segment with the appended path!\n // https://foobar.com/abc/def + k8s/cluster/projects/test --> https://foobar.com/abc/k8s/cluster/projects/test\n // https://foobar.com/abc/def/ + k8s/cluster/projects/test --> https://foobar.com/abc/def/k8s/cluster/projects/test\n basePath.pathname += '/';\n }\n let path = '';\n if (namespace) {\n if (name && validKind) {\n path = `k8s/ns/${namespace}/${validKind}/${name}`;\n } else {\n path = `k8s/cluster/projects/${namespace}`;\n }\n } else if (validKind) {\n path = `k8s/cluster/${validKind}`;\n if (name) {\n path += `/${name}`;\n }\n }\n return new URL(path, basePath);\n }\n}\n"],"names":[],"mappings":"AAiBA,MAAM,YAAA,GAAuC;AAAA,EAC3C,UAAA,EAAY,aAAA;AAAA,EACZ,OAAA,EAAS,WAAA;AAAA,EACT,OAAA,EAAS,UAAA;AAAA,EACT,uBAAA,EAAyB,0BAAA;AAAA,EACzB,gBAAA,EAAkB;AACpB,CAAA;AAGO,MAAM,8BAAA,CAA+B;AAAA,EAC1C,MAAM,kBAAkB,OAAA,EAAqD;AAC3E,IAAA,IAAI,CAAC,QAAQ,YAAA,EAAc;AACzB,MAAA,MAAM,IAAI,MAAM,oDAAoD,CAAA;AAAA,IACtE;AACA,IAAA,MAAM,QAAA,GAAW,IAAI,GAAA,CAAI,OAAA,CAAQ,aAAa,IAAI,CAAA;AAClD,IAAA,MAAM,OAAO,kBAAA,CAAmB,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,QAAQ,EAAE,CAAA;AACnE,IAAA,MAAM,SAAA,GAAY,kBAAA;AAAA,MAChB,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,SAAA,IAAa;AAAA,KACxC;AACA,IAAA,MAAM,YAAY,YAAA,CAAa,OAAA,CAAQ,IAAA,CAAK,iBAAA,CAAkB,OAAO,CAAC,CAAA;AACtE,IAAA,IAAI,CAAC,QAAA,CAAS,QAAA,CAAS,QAAA,CAAS,GAAG,CAAA,EAAG;AAKpC,MAAA,QAAA,CAAS,QAAA,IAAY,GAAA;AAAA,IACvB;AACA,IAAA,IAAI,IAAA,GAAO,EAAA;AACX,IAAA,IAAI,SAAA,EAAW;AACb,MAAA,IAAI,QAAQ,SAAA,EAAW;AACrB,QAAA,IAAA,GAAO,CAAA,OAAA,EAAU,SAAS,CAAA,CAAA,EAAI,SAAS,IAAI,IAAI,CAAA,CAAA;AAAA,MACjD,CAAA,MAAO;AACL,QAAA,IAAA,GAAO,wBAAwB,SAAS,CAAA,CAAA;AAAA,MAC1C;AAAA,IACF,WAAW,SAAA,EAAW;AACpB,MAAA,IAAA,GAAO,eAAe,SAAS,CAAA,CAAA;AAC/B,MAAA,IAAI,IAAA,EAAM;AACR,QAAA,IAAA,IAAQ,IAAI,IAAI,CAAA,CAAA;AAAA,MAClB;AAAA,IACF;AACA,IAAA,OAAO,IAAI,GAAA,CAAI,IAAA,EAAM,QAAQ,CAAA;AAAA,EAC/B;AACF;;;;"}
1
+ {"version":3,"file":"OpenshiftClusterLinksFormatter.esm.js","sources":["../../../src/api/formatters/OpenshiftClusterLinksFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 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 { ClusterLinksFormatterOptions } from '../../types';\n\nconst kindMappings: Record<string, string> = {\n deployment: 'deployments',\n ingress: 'ingresses',\n service: 'services',\n horizontalpodautoscaler: 'horizontalpodautoscalers',\n persistentvolume: 'persistentvolumes',\n};\n\n/** @public */\nexport class OpenshiftClusterLinksFormatter {\n async formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL> {\n if (!options.dashboardUrl) {\n throw new Error('OpenShift dashboard requires a dashboardUrl option');\n }\n const basePath = new URL(options.dashboardUrl.href);\n const name = encodeURIComponent(options.object.metadata?.name ?? '');\n const namespace = encodeURIComponent(\n options.object.metadata?.namespace ?? '',\n );\n const validKind = kindMappings[options.kind.toLowerCase()];\n if (!basePath.pathname.endsWith('/')) {\n // a dashboard url with a path should end with a slash otherwise\n // the new combined URL will replace the last segment with the appended path!\n // https://foobar.com/abc/def + k8s/cluster/projects/test --> https://foobar.com/abc/k8s/cluster/projects/test\n // https://foobar.com/abc/def/ + k8s/cluster/projects/test --> https://foobar.com/abc/def/k8s/cluster/projects/test\n basePath.pathname += '/';\n }\n let path = '';\n if (namespace) {\n if (name && validKind) {\n path = `k8s/ns/${namespace}/${validKind}/${name}`;\n } else {\n path = `k8s/cluster/projects/${namespace}`;\n }\n } else if (validKind) {\n path = `k8s/cluster/${validKind}`;\n if (name) {\n path += `/${name}`;\n }\n }\n return new URL(path, basePath);\n }\n}\n"],"names":[],"mappings":"AAiBA,MAAM,YAAA,GAAuC;AAAA,EAC3C,UAAA,EAAY,aAAA;AAAA,EACZ,OAAA,EAAS,WAAA;AAAA,EACT,OAAA,EAAS,UAAA;AAAA,EACT,uBAAA,EAAyB,0BAAA;AAAA,EACzB,gBAAA,EAAkB;AACpB,CAAA;AAGO,MAAM,8BAAA,CAA+B;AAAA,EAC1C,MAAM,kBAAkB,OAAA,EAAqD;AAC3E,IAAA,IAAI,CAAC,QAAQ,YAAA,EAAc;AACzB,MAAA,MAAM,IAAI,MAAM,oDAAoD,CAAA;AAAA,IACtE;AACA,IAAA,MAAM,QAAA,GAAW,IAAI,GAAA,CAAI,OAAA,CAAQ,aAAa,IAAI,CAAA;AAClD,IAAA,MAAM,OAAO,kBAAA,CAAmB,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,QAAQ,EAAE,CAAA;AACnE,IAAA,MAAM,SAAA,GAAY,kBAAA;AAAA,MAChB,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,SAAA,IAAa;AAAA,KACxC;AACA,IAAA,MAAM,SAAA,GAAY,YAAA,CAAa,OAAA,CAAQ,IAAA,CAAK,aAAa,CAAA;AACzD,IAAA,IAAI,CAAC,QAAA,CAAS,QAAA,CAAS,QAAA,CAAS,GAAG,CAAA,EAAG;AAKpC,MAAA,QAAA,CAAS,QAAA,IAAY,GAAA;AAAA,IACvB;AACA,IAAA,IAAI,IAAA,GAAO,EAAA;AACX,IAAA,IAAI,SAAA,EAAW;AACb,MAAA,IAAI,QAAQ,SAAA,EAAW;AACrB,QAAA,IAAA,GAAO,CAAA,OAAA,EAAU,SAAS,CAAA,CAAA,EAAI,SAAS,IAAI,IAAI,CAAA,CAAA;AAAA,MACjD,CAAA,MAAO;AACL,QAAA,IAAA,GAAO,wBAAwB,SAAS,CAAA,CAAA;AAAA,MAC1C;AAAA,IACF,WAAW,SAAA,EAAW;AACpB,MAAA,IAAA,GAAO,eAAe,SAAS,CAAA,CAAA;AAC/B,MAAA,IAAI,IAAA,EAAM;AACR,QAAA,IAAA,IAAQ,IAAI,IAAI,CAAA,CAAA;AAAA,MAClB;AAAA,IACF;AACA,IAAA,OAAO,IAAI,GAAA,CAAI,IAAA,EAAM,QAAQ,CAAA;AAAA,EAC/B;AACF;;;;"}
@@ -14,7 +14,7 @@ class RancherClusterLinksFormatter {
14
14
  const namespace = encodeURIComponent(
15
15
  options.object.metadata?.namespace ?? ""
16
16
  );
17
- const validKind = kindMappings[options.kind.toLocaleLowerCase("en-US")];
17
+ const validKind = kindMappings[options.kind.toLowerCase()];
18
18
  if (!basePath.pathname.endsWith("/")) {
19
19
  basePath.pathname += "/";
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RancherClusterLinksFormatter.esm.js","sources":["../../../src/api/formatters/RancherClusterLinksFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 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 ClusterLinksFormatter,\n ClusterLinksFormatterOptions,\n} from '../../types';\n\nconst kindMappings: Record<string, string> = {\n deployment: 'apps.deployment',\n ingress: 'networking.k8s.io.ingress',\n service: 'service',\n horizontalpodautoscaler: 'autoscaling.horizontalpodautoscaler',\n};\n\n/** @public */\nexport class RancherClusterLinksFormatter implements ClusterLinksFormatter {\n async formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL> {\n if (!options.dashboardUrl) {\n throw new Error('Rancher dashboard requires a dashboardUrl option');\n }\n const basePath = new URL(options.dashboardUrl.href);\n const name = encodeURIComponent(options.object.metadata?.name ?? '');\n const namespace = encodeURIComponent(\n options.object.metadata?.namespace ?? '',\n );\n const validKind = kindMappings[options.kind.toLocaleLowerCase('en-US')];\n if (!basePath.pathname.endsWith('/')) {\n // a dashboard url with a path should end with a slash otherwise\n // the new combined URL will replace the last segment with the appended path!\n // https://foobar.com/abc/def + explorer/service/test --> https://foobar.com/abc/explorer/service/test\n // https://foobar.com/abc/def/ + explorer/service/test --> https://foobar.com/abc/def/explorer/service/test\n basePath.pathname += '/';\n }\n let path = '';\n if (validKind && name && namespace) {\n path = `explorer/${validKind}/${namespace}/${name}`;\n } else if (namespace) {\n path = 'explorer/workload';\n }\n return new URL(path, basePath);\n }\n}\n"],"names":[],"mappings":"AAoBA,MAAM,YAAA,GAAuC;AAAA,EAC3C,UAAA,EAAY,iBAAA;AAAA,EACZ,OAAA,EAAS,2BAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,uBAAA,EAAyB;AAC3B,CAAA;AAGO,MAAM,4BAAA,CAA8D;AAAA,EACzE,MAAM,kBAAkB,OAAA,EAAqD;AAC3E,IAAA,IAAI,CAAC,QAAQ,YAAA,EAAc;AACzB,MAAA,MAAM,IAAI,MAAM,kDAAkD,CAAA;AAAA,IACpE;AACA,IAAA,MAAM,QAAA,GAAW,IAAI,GAAA,CAAI,OAAA,CAAQ,aAAa,IAAI,CAAA;AAClD,IAAA,MAAM,OAAO,kBAAA,CAAmB,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,QAAQ,EAAE,CAAA;AACnE,IAAA,MAAM,SAAA,GAAY,kBAAA;AAAA,MAChB,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,SAAA,IAAa;AAAA,KACxC;AACA,IAAA,MAAM,YAAY,YAAA,CAAa,OAAA,CAAQ,IAAA,CAAK,iBAAA,CAAkB,OAAO,CAAC,CAAA;AACtE,IAAA,IAAI,CAAC,QAAA,CAAS,QAAA,CAAS,QAAA,CAAS,GAAG,CAAA,EAAG;AAKpC,MAAA,QAAA,CAAS,QAAA,IAAY,GAAA;AAAA,IACvB;AACA,IAAA,IAAI,IAAA,GAAO,EAAA;AACX,IAAA,IAAI,SAAA,IAAa,QAAQ,SAAA,EAAW;AAClC,MAAA,IAAA,GAAO,CAAA,SAAA,EAAY,SAAS,CAAA,CAAA,EAAI,SAAS,IAAI,IAAI,CAAA,CAAA;AAAA,IACnD,WAAW,SAAA,EAAW;AACpB,MAAA,IAAA,GAAO,mBAAA;AAAA,IACT;AACA,IAAA,OAAO,IAAI,GAAA,CAAI,IAAA,EAAM,QAAQ,CAAA;AAAA,EAC/B;AACF;;;;"}
1
+ {"version":3,"file":"RancherClusterLinksFormatter.esm.js","sources":["../../../src/api/formatters/RancherClusterLinksFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 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 ClusterLinksFormatter,\n ClusterLinksFormatterOptions,\n} from '../../types';\n\nconst kindMappings: Record<string, string> = {\n deployment: 'apps.deployment',\n ingress: 'networking.k8s.io.ingress',\n service: 'service',\n horizontalpodautoscaler: 'autoscaling.horizontalpodautoscaler',\n};\n\n/** @public */\nexport class RancherClusterLinksFormatter implements ClusterLinksFormatter {\n async formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL> {\n if (!options.dashboardUrl) {\n throw new Error('Rancher dashboard requires a dashboardUrl option');\n }\n const basePath = new URL(options.dashboardUrl.href);\n const name = encodeURIComponent(options.object.metadata?.name ?? '');\n const namespace = encodeURIComponent(\n options.object.metadata?.namespace ?? '',\n );\n const validKind = kindMappings[options.kind.toLowerCase()];\n if (!basePath.pathname.endsWith('/')) {\n // a dashboard url with a path should end with a slash otherwise\n // the new combined URL will replace the last segment with the appended path!\n // https://foobar.com/abc/def + explorer/service/test --> https://foobar.com/abc/explorer/service/test\n // https://foobar.com/abc/def/ + explorer/service/test --> https://foobar.com/abc/def/explorer/service/test\n basePath.pathname += '/';\n }\n let path = '';\n if (validKind && name && namespace) {\n path = `explorer/${validKind}/${namespace}/${name}`;\n } else if (namespace) {\n path = 'explorer/workload';\n }\n return new URL(path, basePath);\n }\n}\n"],"names":[],"mappings":"AAoBA,MAAM,YAAA,GAAuC;AAAA,EAC3C,UAAA,EAAY,iBAAA;AAAA,EACZ,OAAA,EAAS,2BAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,uBAAA,EAAyB;AAC3B,CAAA;AAGO,MAAM,4BAAA,CAA8D;AAAA,EACzE,MAAM,kBAAkB,OAAA,EAAqD;AAC3E,IAAA,IAAI,CAAC,QAAQ,YAAA,EAAc;AACzB,MAAA,MAAM,IAAI,MAAM,kDAAkD,CAAA;AAAA,IACpE;AACA,IAAA,MAAM,QAAA,GAAW,IAAI,GAAA,CAAI,OAAA,CAAQ,aAAa,IAAI,CAAA;AAClD,IAAA,MAAM,OAAO,kBAAA,CAAmB,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,QAAQ,EAAE,CAAA;AACnE,IAAA,MAAM,SAAA,GAAY,kBAAA;AAAA,MAChB,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,SAAA,IAAa;AAAA,KACxC;AACA,IAAA,MAAM,SAAA,GAAY,YAAA,CAAa,OAAA,CAAQ,IAAA,CAAK,aAAa,CAAA;AACzD,IAAA,IAAI,CAAC,QAAA,CAAS,QAAA,CAAS,QAAA,CAAS,GAAG,CAAA,EAAG;AAKpC,MAAA,QAAA,CAAS,QAAA,IAAY,GAAA;AAAA,IACvB;AACA,IAAA,IAAI,IAAA,GAAO,EAAA;AACX,IAAA,IAAI,SAAA,IAAa,QAAQ,SAAA,EAAW;AAClC,MAAA,IAAA,GAAO,CAAA,SAAA,EAAY,SAAS,CAAA,CAAA,EAAI,SAAS,IAAI,IAAI,CAAA,CAAA;AAAA,IACnD,WAAW,SAAA,EAAW;AACpB,MAAA,IAAA,GAAO,mBAAA;AAAA,IACT;AACA,IAAA,OAAO,IAAI,GAAA,CAAI,IAAA,EAAM,QAAQ,CAAA;AAAA,EAC/B;AACF;;;;"}
@@ -16,7 +16,7 @@ class StandardClusterLinksFormatter {
16
16
  const namespace = encodeURIComponent(
17
17
  options.object.metadata?.namespace ?? ""
18
18
  );
19
- const validKind = kindMappings[options.kind.toLocaleLowerCase("en-US")];
19
+ const validKind = kindMappings[options.kind.toLowerCase()];
20
20
  if (!result.pathname.endsWith("/")) {
21
21
  result.pathname += "/";
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"StandardClusterLinksFormatter.esm.js","sources":["../../../src/api/formatters/StandardClusterLinksFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 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 ClusterLinksFormatter,\n ClusterLinksFormatterOptions,\n} from '../../types';\n\nconst kindMappings: Record<string, string> = {\n deployment: 'deployment',\n pod: 'pod',\n ingress: 'ingress',\n service: 'service',\n horizontalpodautoscaler: 'deployment',\n statefulset: 'statefulset',\n};\n\n/** @public */\nexport class StandardClusterLinksFormatter implements ClusterLinksFormatter {\n async formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL> {\n if (!options.dashboardUrl) {\n throw new Error('standard dashboard requires a dashboardUrl option');\n }\n const result = new URL(options.dashboardUrl.href);\n const name = encodeURIComponent(options.object.metadata?.name ?? '');\n const namespace = encodeURIComponent(\n options.object.metadata?.namespace ?? '',\n );\n const validKind = kindMappings[options.kind.toLocaleLowerCase('en-US')];\n if (!result.pathname.endsWith('/')) {\n result.pathname += '/';\n }\n if (validKind && name && namespace) {\n result.hash = `/${validKind}/${namespace}/${name}`;\n } else if (namespace) {\n result.hash = '/workloads';\n }\n if (namespace) {\n // Note that Angular SPA requires a hash and the query parameter should be part of it\n result.hash += `?namespace=${namespace}`;\n }\n return result;\n }\n}\n"],"names":[],"mappings":"AAoBA,MAAM,YAAA,GAAuC;AAAA,EAC3C,UAAA,EAAY,YAAA;AAAA,EACZ,GAAA,EAAK,KAAA;AAAA,EACL,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,uBAAA,EAAyB,YAAA;AAAA,EACzB,WAAA,EAAa;AACf,CAAA;AAGO,MAAM,6BAAA,CAA+D;AAAA,EAC1E,MAAM,kBAAkB,OAAA,EAAqD;AAC3E,IAAA,IAAI,CAAC,QAAQ,YAAA,EAAc;AACzB,MAAA,MAAM,IAAI,MAAM,mDAAmD,CAAA;AAAA,IACrE;AACA,IAAA,MAAM,MAAA,GAAS,IAAI,GAAA,CAAI,OAAA,CAAQ,aAAa,IAAI,CAAA;AAChD,IAAA,MAAM,OAAO,kBAAA,CAAmB,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,QAAQ,EAAE,CAAA;AACnE,IAAA,MAAM,SAAA,GAAY,kBAAA;AAAA,MAChB,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,SAAA,IAAa;AAAA,KACxC;AACA,IAAA,MAAM,YAAY,YAAA,CAAa,OAAA,CAAQ,IAAA,CAAK,iBAAA,CAAkB,OAAO,CAAC,CAAA;AACtE,IAAA,IAAI,CAAC,MAAA,CAAO,QAAA,CAAS,QAAA,CAAS,GAAG,CAAA,EAAG;AAClC,MAAA,MAAA,CAAO,QAAA,IAAY,GAAA;AAAA,IACrB;AACA,IAAA,IAAI,SAAA,IAAa,QAAQ,SAAA,EAAW;AAClC,MAAA,MAAA,CAAO,OAAO,CAAA,CAAA,EAAI,SAAS,CAAA,CAAA,EAAI,SAAS,IAAI,IAAI,CAAA,CAAA;AAAA,IAClD,WAAW,SAAA,EAAW;AACpB,MAAA,MAAA,CAAO,IAAA,GAAO,YAAA;AAAA,IAChB;AACA,IAAA,IAAI,SAAA,EAAW;AAEb,MAAA,MAAA,CAAO,IAAA,IAAQ,cAAc,SAAS,CAAA,CAAA;AAAA,IACxC;AACA,IAAA,OAAO,MAAA;AAAA,EACT;AACF;;;;"}
1
+ {"version":3,"file":"StandardClusterLinksFormatter.esm.js","sources":["../../../src/api/formatters/StandardClusterLinksFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 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 ClusterLinksFormatter,\n ClusterLinksFormatterOptions,\n} from '../../types';\n\nconst kindMappings: Record<string, string> = {\n deployment: 'deployment',\n pod: 'pod',\n ingress: 'ingress',\n service: 'service',\n horizontalpodautoscaler: 'deployment',\n statefulset: 'statefulset',\n};\n\n/** @public */\nexport class StandardClusterLinksFormatter implements ClusterLinksFormatter {\n async formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL> {\n if (!options.dashboardUrl) {\n throw new Error('standard dashboard requires a dashboardUrl option');\n }\n const result = new URL(options.dashboardUrl.href);\n const name = encodeURIComponent(options.object.metadata?.name ?? '');\n const namespace = encodeURIComponent(\n options.object.metadata?.namespace ?? '',\n );\n const validKind = kindMappings[options.kind.toLowerCase()];\n if (!result.pathname.endsWith('/')) {\n result.pathname += '/';\n }\n if (validKind && name && namespace) {\n result.hash = `/${validKind}/${namespace}/${name}`;\n } else if (namespace) {\n result.hash = '/workloads';\n }\n if (namespace) {\n // Note that Angular SPA requires a hash and the query parameter should be part of it\n result.hash += `?namespace=${namespace}`;\n }\n return result;\n }\n}\n"],"names":[],"mappings":"AAoBA,MAAM,YAAA,GAAuC;AAAA,EAC3C,UAAA,EAAY,YAAA;AAAA,EACZ,GAAA,EAAK,KAAA;AAAA,EACL,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,uBAAA,EAAyB,YAAA;AAAA,EACzB,WAAA,EAAa;AACf,CAAA;AAGO,MAAM,6BAAA,CAA+D;AAAA,EAC1E,MAAM,kBAAkB,OAAA,EAAqD;AAC3E,IAAA,IAAI,CAAC,QAAQ,YAAA,EAAc;AACzB,MAAA,MAAM,IAAI,MAAM,mDAAmD,CAAA;AAAA,IACrE;AACA,IAAA,MAAM,MAAA,GAAS,IAAI,GAAA,CAAI,OAAA,CAAQ,aAAa,IAAI,CAAA;AAChD,IAAA,MAAM,OAAO,kBAAA,CAAmB,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,QAAQ,EAAE,CAAA;AACnE,IAAA,MAAM,SAAA,GAAY,kBAAA;AAAA,MAChB,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,SAAA,IAAa;AAAA,KACxC;AACA,IAAA,MAAM,SAAA,GAAY,YAAA,CAAa,OAAA,CAAQ,IAAA,CAAK,aAAa,CAAA;AACzD,IAAA,IAAI,CAAC,MAAA,CAAO,QAAA,CAAS,QAAA,CAAS,GAAG,CAAA,EAAG;AAClC,MAAA,MAAA,CAAO,QAAA,IAAY,GAAA;AAAA,IACrB;AACA,IAAA,IAAI,SAAA,IAAa,QAAQ,SAAA,EAAW;AAClC,MAAA,MAAA,CAAO,OAAO,CAAA,CAAA,EAAI,SAAS,CAAA,CAAA,EAAI,SAAS,IAAI,IAAI,CAAA,CAAA;AAAA,IAClD,WAAW,SAAA,EAAW;AACpB,MAAA,MAAA,CAAO,IAAA,GAAO,YAAA;AAAA,IAChB;AACA,IAAA,IAAI,SAAA,EAAW;AAEb,MAAA,MAAA,CAAO,IAAA,IAAQ,cAAc,SAAS,CAAA,CAAA;AAAA,IACxC;AACA,IAAA,OAAO,MAAA;AAAA,EACT;AACF;;;;"}
@@ -11,7 +11,7 @@ import '../../translation.esm.js';
11
11
  import Typography from '@material-ui/core/Typography';
12
12
  import Grid from '@material-ui/core/Grid';
13
13
 
14
- const capitalize = (str) => str.charAt(0).toLocaleUpperCase("en-US") + str.slice(1);
14
+ const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
15
15
  const DefaultCustomResourceDrawer = ({
16
16
  customResource,
17
17
  customResourceName,
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultCustomResourceDrawer.esm.js","sources":["../../../src/components/CustomResources/DefaultCustomResourceDrawer.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 { KubernetesStructuredMetadataTableDrawer } from '../KubernetesDrawer';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\n\nconst capitalize = (str: string) =>\n str.charAt(0).toLocaleUpperCase('en-US') + str.slice(1);\n\nexport const DefaultCustomResourceDrawer = ({\n customResource,\n customResourceName,\n expanded,\n}: {\n customResource: any;\n customResourceName: string;\n expanded?: boolean;\n}) => {\n const capitalizedName = capitalize(customResourceName);\n\n return (\n <KubernetesStructuredMetadataTableDrawer\n object={customResource}\n expanded={expanded}\n kind={capitalizedName}\n renderObject={cr => cr}\n >\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"body1\">\n {customResource.metadata?.name ?? 'unknown object'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography color=\"textSecondary\" variant=\"subtitle1\">\n {capitalizedName}\n </Typography>\n </Grid>\n </Grid>\n </KubernetesStructuredMetadataTableDrawer>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAoBA,MAAM,UAAA,GAAa,CAAC,GAAA,KAClB,GAAA,CAAI,MAAA,CAAO,CAAC,CAAA,CAAE,iBAAA,CAAkB,OAAO,CAAA,GAAI,GAAA,CAAI,KAAA,CAAM,CAAC,CAAA;AAEjD,MAAM,8BAA8B,CAAC;AAAA,EAC1C,cAAA;AAAA,EACA,kBAAA;AAAA,EACA;AACF,CAAA,KAIM;AACJ,EAAA,MAAM,eAAA,GAAkB,WAAW,kBAAkB,CAAA;AAErD,EAAA,uBACE,GAAA;AAAA,IAAC,uCAAA;AAAA,IAAA;AAAA,MACC,MAAA,EAAQ,cAAA;AAAA,MACR,QAAA;AAAA,MACA,IAAA,EAAM,eAAA;AAAA,MACN,cAAc,CAAA,EAAA,KAAM,EAAA;AAAA,MAEpB,QAAA,kBAAA,IAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAS,IAAA;AAAA,UACT,SAAA,EAAU,QAAA;AAAA,UACV,cAAA,EAAe,YAAA;AAAA,UACf,UAAA,EAAW,YAAA;AAAA,UACX,OAAA,EAAS,CAAA;AAAA,UAET,QAAA,EAAA;AAAA,4BAAA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EACR,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,OAAA,EACjB,QAAA,EAAA,cAAA,CAAe,QAAA,EAAU,IAAA,IAAQ,gBAAA,EACpC,CAAA,EACF,CAAA;AAAA,4BACA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EACR,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,KAAA,EAAM,eAAA,EAAgB,OAAA,EAAQ,WAAA,EACvC,QAAA,EAAA,eAAA,EACH,CAAA,EACF;AAAA;AAAA;AAAA;AACF;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"DefaultCustomResourceDrawer.esm.js","sources":["../../../src/components/CustomResources/DefaultCustomResourceDrawer.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 { KubernetesStructuredMetadataTableDrawer } from '../KubernetesDrawer';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\n\nconst capitalize = (str: string) => str.charAt(0).toUpperCase() + str.slice(1);\n\nexport const DefaultCustomResourceDrawer = ({\n customResource,\n customResourceName,\n expanded,\n}: {\n customResource: any;\n customResourceName: string;\n expanded?: boolean;\n}) => {\n const capitalizedName = capitalize(customResourceName);\n\n return (\n <KubernetesStructuredMetadataTableDrawer\n object={customResource}\n expanded={expanded}\n kind={capitalizedName}\n renderObject={cr => cr}\n >\n <Grid\n container\n direction=\"column\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n spacing={0}\n >\n <Grid item>\n <Typography variant=\"body1\">\n {customResource.metadata?.name ?? 'unknown object'}\n </Typography>\n </Grid>\n <Grid item>\n <Typography color=\"textSecondary\" variant=\"subtitle1\">\n {capitalizedName}\n </Typography>\n </Grid>\n </Grid>\n </KubernetesStructuredMetadataTableDrawer>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAoBA,MAAM,UAAA,GAAa,CAAC,GAAA,KAAgB,GAAA,CAAI,MAAA,CAAO,CAAC,CAAA,CAAE,WAAA,EAAY,GAAI,GAAA,CAAI,KAAA,CAAM,CAAC,CAAA;AAEtE,MAAM,8BAA8B,CAAC;AAAA,EAC1C,cAAA;AAAA,EACA,kBAAA;AAAA,EACA;AACF,CAAA,KAIM;AACJ,EAAA,MAAM,eAAA,GAAkB,WAAW,kBAAkB,CAAA;AAErD,EAAA,uBACE,GAAA;AAAA,IAAC,uCAAA;AAAA,IAAA;AAAA,MACC,MAAA,EAAQ,cAAA;AAAA,MACR,QAAA;AAAA,MACA,IAAA,EAAM,eAAA;AAAA,MACN,cAAc,CAAA,EAAA,KAAM,EAAA;AAAA,MAEpB,QAAA,kBAAA,IAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAS,IAAA;AAAA,UACT,SAAA,EAAU,QAAA;AAAA,UACV,cAAA,EAAe,YAAA;AAAA,UACf,UAAA,EAAW,YAAA;AAAA,UACX,OAAA,EAAS,CAAA;AAAA,UAET,QAAA,EAAA;AAAA,4BAAA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EACR,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,OAAA,EACjB,QAAA,EAAA,cAAA,CAAe,QAAA,EAAU,IAAA,IAAQ,gBAAA,EACpC,CAAA,EACF,CAAA;AAAA,4BACA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EACR,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,KAAA,EAAM,eAAA,EAAgB,OAAA,EAAQ,WAAA,EACvC,QAAA,EAAA,eAAA,EACH,CAAA,EACF;AAAA;AAAA;AAAA;AACF;AAAA,GACF;AAEJ;;;;"}
@@ -15,7 +15,7 @@ const getOwnedPodsThroughReplicaSets = (potentialOwner, replicaSets, pods) => {
15
15
  };
16
16
  const getMatchingHpa = (owner, hpas) => {
17
17
  return hpas.find((hpa) => {
18
- return (hpa.spec?.scaleTargetRef?.kind ?? "").toLocaleLowerCase("en-US") === owner.kind.toLocaleLowerCase("en-US") && (hpa.metadata?.namespace ?? "") === (owner.namespace ?? "unknown-namespace") && (hpa.spec?.scaleTargetRef?.name ?? "") === (owner.name ?? "unknown-deployment");
18
+ return (hpa.spec?.scaleTargetRef?.kind ?? "").toLowerCase() === owner.kind.toLowerCase() && (hpa.metadata?.namespace ?? "") === (owner.namespace ?? "unknown-namespace") && (hpa.spec?.scaleTargetRef?.name ?? "") === (owner.name ?? "unknown-deployment");
19
19
  });
20
20
  };
21
21
 
@@ -1 +1 @@
1
- {"version":3,"file":"owner.esm.js","sources":["../../src/utils/owner.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n V1ObjectMeta,\n V2HorizontalPodAutoscaler,\n V1Pod,\n V1ReplicaSet,\n} from '@kubernetes/client-node';\n\ninterface CanOwn {\n metadata?: V1ObjectMeta;\n}\n\ninterface CanBeOwned {\n metadata?: V1ObjectMeta;\n}\n\nexport function getOwnedResources<R extends CanBeOwned>(\n potentialOwner: CanOwn,\n possiblyOwned: R[],\n): R[] {\n return possiblyOwned.filter(\n p =>\n p.metadata?.ownerReferences?.some(\n o => o.uid === potentialOwner.metadata?.uid,\n ) ?? false,\n );\n}\n\nexport const getOwnedPodsThroughReplicaSets = (\n potentialOwner: CanOwn,\n replicaSets: V1ReplicaSet[],\n pods: V1Pod[],\n) => {\n return getOwnedResources(\n potentialOwner,\n replicaSets.filter(rs => rs.status && rs.status.replicas > 0),\n ).reduce((accum, rs) => {\n return accum.concat(getOwnedResources(rs, pods));\n }, [] as V1Pod[]);\n};\n\ninterface ResourceRef {\n kind: string;\n namespace?: string;\n name?: string;\n}\n\nexport const getMatchingHpa = (\n owner: ResourceRef,\n hpas: V2HorizontalPodAutoscaler[],\n): V2HorizontalPodAutoscaler | undefined => {\n return hpas.find(hpa => {\n return (\n (hpa.spec?.scaleTargetRef?.kind ?? '').toLocaleLowerCase('en-US') ===\n owner.kind.toLocaleLowerCase('en-US') &&\n (hpa.metadata?.namespace ?? '') ===\n (owner.namespace ?? 'unknown-namespace') &&\n (hpa.spec?.scaleTargetRef?.name ?? '') ===\n (owner.name ?? 'unknown-deployment')\n );\n });\n};\n"],"names":[],"mappings":"AA+BO,SAAS,iBAAA,CACd,gBACA,aAAA,EACK;AACL,EAAA,OAAO,aAAA,CAAc,MAAA;AAAA,IACnB,CAAA,CAAA,KACE,CAAA,CAAE,QAAA,EAAU,eAAA,EAAiB,IAAA;AAAA,MAC3B,CAAA,CAAA,KAAK,CAAA,CAAE,GAAA,KAAQ,cAAA,CAAe,QAAA,EAAU;AAAA,KAC1C,IAAK;AAAA,GACT;AACF;AAEO,MAAM,8BAAA,GAAiC,CAC5C,cAAA,EACA,WAAA,EACA,IAAA,KACG;AACH,EAAA,OAAO,iBAAA;AAAA,IACL,cAAA;AAAA,IACA,WAAA,CAAY,OAAO,CAAA,EAAA,KAAM,EAAA,CAAG,UAAU,EAAA,CAAG,MAAA,CAAO,WAAW,CAAC;AAAA,GAC9D,CAAE,MAAA,CAAO,CAAC,KAAA,EAAO,EAAA,KAAO;AACtB,IAAA,OAAO,KAAA,CAAM,MAAA,CAAO,iBAAA,CAAkB,EAAA,EAAI,IAAI,CAAC,CAAA;AAAA,EACjD,CAAA,EAAG,EAAa,CAAA;AAClB;AAQO,MAAM,cAAA,GAAiB,CAC5B,KAAA,EACA,IAAA,KAC0C;AAC1C,EAAA,OAAO,IAAA,CAAK,KAAK,CAAA,GAAA,KAAO;AACtB,IAAA,OAAA,CACG,GAAA,CAAI,IAAA,EAAM,cAAA,EAAgB,IAAA,IAAQ,EAAA,EAAI,iBAAA,CAAkB,OAAO,CAAA,KAC9D,KAAA,CAAM,IAAA,CAAK,iBAAA,CAAkB,OAAO,CAAA,IAAA,CACrC,IAAI,QAAA,EAAU,SAAA,IAAa,EAAA,OACzB,KAAA,CAAM,SAAA,IAAa,mBAAA,CAAA,IAAA,CACrB,GAAA,CAAI,IAAA,EAAM,cAAA,EAAgB,IAAA,IAAQ,EAAA,OAChC,KAAA,CAAM,IAAA,IAAQ,oBAAA,CAAA;AAAA,EAErB,CAAC,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"owner.esm.js","sources":["../../src/utils/owner.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n V1ObjectMeta,\n V2HorizontalPodAutoscaler,\n V1Pod,\n V1ReplicaSet,\n} from '@kubernetes/client-node';\n\ninterface CanOwn {\n metadata?: V1ObjectMeta;\n}\n\ninterface CanBeOwned {\n metadata?: V1ObjectMeta;\n}\n\nexport function getOwnedResources<R extends CanBeOwned>(\n potentialOwner: CanOwn,\n possiblyOwned: R[],\n): R[] {\n return possiblyOwned.filter(\n p =>\n p.metadata?.ownerReferences?.some(\n o => o.uid === potentialOwner.metadata?.uid,\n ) ?? false,\n );\n}\n\nexport const getOwnedPodsThroughReplicaSets = (\n potentialOwner: CanOwn,\n replicaSets: V1ReplicaSet[],\n pods: V1Pod[],\n) => {\n return getOwnedResources(\n potentialOwner,\n replicaSets.filter(rs => rs.status && rs.status.replicas > 0),\n ).reduce((accum, rs) => {\n return accum.concat(getOwnedResources(rs, pods));\n }, [] as V1Pod[]);\n};\n\ninterface ResourceRef {\n kind: string;\n namespace?: string;\n name?: string;\n}\n\nexport const getMatchingHpa = (\n owner: ResourceRef,\n hpas: V2HorizontalPodAutoscaler[],\n): V2HorizontalPodAutoscaler | undefined => {\n return hpas.find(hpa => {\n return (\n (hpa.spec?.scaleTargetRef?.kind ?? '').toLowerCase() ===\n owner.kind.toLowerCase() &&\n (hpa.metadata?.namespace ?? '') ===\n (owner.namespace ?? 'unknown-namespace') &&\n (hpa.spec?.scaleTargetRef?.name ?? '') ===\n (owner.name ?? 'unknown-deployment')\n );\n });\n};\n"],"names":[],"mappings":"AA+BO,SAAS,iBAAA,CACd,gBACA,aAAA,EACK;AACL,EAAA,OAAO,aAAA,CAAc,MAAA;AAAA,IACnB,CAAA,CAAA,KACE,CAAA,CAAE,QAAA,EAAU,eAAA,EAAiB,IAAA;AAAA,MAC3B,CAAA,CAAA,KAAK,CAAA,CAAE,GAAA,KAAQ,cAAA,CAAe,QAAA,EAAU;AAAA,KAC1C,IAAK;AAAA,GACT;AACF;AAEO,MAAM,8BAAA,GAAiC,CAC5C,cAAA,EACA,WAAA,EACA,IAAA,KACG;AACH,EAAA,OAAO,iBAAA;AAAA,IACL,cAAA;AAAA,IACA,WAAA,CAAY,OAAO,CAAA,EAAA,KAAM,EAAA,CAAG,UAAU,EAAA,CAAG,MAAA,CAAO,WAAW,CAAC;AAAA,GAC9D,CAAE,MAAA,CAAO,CAAC,KAAA,EAAO,EAAA,KAAO;AACtB,IAAA,OAAO,KAAA,CAAM,MAAA,CAAO,iBAAA,CAAkB,EAAA,EAAI,IAAI,CAAC,CAAA;AAAA,EACjD,CAAA,EAAG,EAAa,CAAA;AAClB;AAQO,MAAM,cAAA,GAAiB,CAC5B,KAAA,EACA,IAAA,KAC0C;AAC1C,EAAA,OAAO,IAAA,CAAK,KAAK,CAAA,GAAA,KAAO;AACtB,IAAA,OAAA,CACG,GAAA,CAAI,IAAA,EAAM,cAAA,EAAgB,IAAA,IAAQ,EAAA,EAAI,aAAY,KACjD,KAAA,CAAM,IAAA,CAAK,WAAA,EAAY,IAAA,CACxB,GAAA,CAAI,UAAU,SAAA,IAAa,EAAA,OACzB,KAAA,CAAM,SAAA,IAAa,mBAAA,CAAA,IAAA,CACrB,GAAA,CAAI,MAAM,cAAA,EAAgB,IAAA,IAAQ,EAAA,OAChC,KAAA,CAAM,IAAA,IAAQ,oBAAA,CAAA;AAAA,EAErB,CAAC,CAAA;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-kubernetes-react",
3
- "version": "0.6.0-next.2",
3
+ "version": "0.6.0",
4
4
  "description": "Web library for the kubernetes-react plugin",
5
5
  "backstage": {
6
6
  "role": "web-library",
@@ -62,12 +62,12 @@
62
62
  "test": "backstage-cli package test"
63
63
  },
64
64
  "dependencies": {
65
- "@backstage/catalog-model": "1.10.0",
66
- "@backstage/core-components": "0.18.14-next.2",
67
- "@backstage/core-plugin-api": "1.12.10-next.1",
68
- "@backstage/errors": "1.3.1",
69
- "@backstage/plugin-kubernetes-common": "0.9.13-next.1",
70
- "@backstage/types": "1.2.2",
65
+ "@backstage/catalog-model": "^1.10.1",
66
+ "@backstage/core-components": "^0.18.14",
67
+ "@backstage/core-plugin-api": "^1.12.10",
68
+ "@backstage/errors": "^1.3.1",
69
+ "@backstage/plugin-kubernetes-common": "^0.9.13",
70
+ "@backstage/types": "^1.2.2",
71
71
  "@kubernetes-models/apimachinery": "^2.0.0",
72
72
  "@kubernetes-models/base": "^5.0.0",
73
73
  "@kubernetes/client-node": "1.4.0",
@@ -78,16 +78,16 @@
78
78
  "@xterm/addon-fit": "^0.11.0",
79
79
  "@xterm/xterm": "^5.5.0",
80
80
  "cronstrue": "^2.32.0",
81
- "js-yaml": "^4.3.0",
81
+ "js-yaml": "^4.3.2",
82
82
  "kubernetes-models": "^4.3.1",
83
83
  "lodash": "^4.17.21",
84
84
  "luxon": "^3.0.0",
85
85
  "react-use": "^17.4.0"
86
86
  },
87
87
  "devDependencies": {
88
- "@backstage/cli": "0.36.6-next.1",
89
- "@backstage/core-app-api": "1.20.5-next.2",
90
- "@backstage/test-utils": "1.7.22-next.2",
88
+ "@backstage/cli": "^0.36.6",
89
+ "@backstage/core-app-api": "^1.20.5",
90
+ "@backstage/test-utils": "^1.7.22",
91
91
  "@testing-library/dom": "^10.0.0",
92
92
  "@testing-library/jest-dom": "^6.0.0",
93
93
  "@testing-library/react": "^16.0.0",