@backstage/plugin-kubernetes-react 0.1.2-next.1 → 0.2.0-next.3

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,36 @@
1
1
  # @backstage/plugin-kubernetes-react
2
2
 
3
+ ## 0.2.0-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/core-components@0.13.9-next.3
9
+ - @backstage/catalog-model@1.4.3
10
+ - @backstage/core-plugin-api@1.8.1-next.1
11
+ - @backstage/errors@1.2.3
12
+ - @backstage/types@1.1.1
13
+ - @backstage/plugin-kubernetes-common@0.7.2-next.1
14
+
15
+ ## 0.2.0-next.2
16
+
17
+ ### Minor Changes
18
+
19
+ - 899d71a: Change `formatClusterLink` to be an API and make it async for further customization possibilities.
20
+
21
+ **BREAKING**
22
+ If you have a custom k8s page and used `formatClusterLink` directly, you need to migrate to new `kubernetesClusterLinkFormatterApiRef`
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies
27
+ - @backstage/catalog-model@1.4.3
28
+ - @backstage/core-components@0.13.9-next.2
29
+ - @backstage/core-plugin-api@1.8.1-next.1
30
+ - @backstage/errors@1.2.3
31
+ - @backstage/types@1.1.1
32
+ - @backstage/plugin-kubernetes-common@0.7.2-next.1
33
+
3
34
  ## 0.1.2-next.1
4
35
 
5
36
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -8,10 +8,10 @@ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
8
8
  import { OAuthApi, OpenIdConnectApi, DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api';
9
9
  import * as kubernetes_models_v1 from 'kubernetes-models/v1';
10
10
  import { Event, Pod, IContainer, IContainerStatus } from 'kubernetes-models/v1';
11
+ import { JsonObject } from '@backstage/types';
11
12
  import { V1HorizontalPodAutoscaler, V1Job, V1ObjectMeta, V1Pod } from '@kubernetes/client-node';
12
13
  import * as react_use_lib_useAsyncFn from 'react-use/lib/useAsyncFn';
13
14
  import { Pod as Pod$1 } from 'kubernetes-models/v1/Pod';
14
- import { JsonObject } from '@backstage/types';
15
15
 
16
16
  /**
17
17
  *
@@ -101,6 +101,8 @@ declare const kubernetesApiRef: _backstage_core_plugin_api.ApiRef<KubernetesApi>
101
101
  /** @public */
102
102
  declare const kubernetesProxyApiRef: _backstage_core_plugin_api.ApiRef<KubernetesProxyApi>;
103
103
  /** @public */
104
+ declare const kubernetesClusterLinkFormatterApiRef: _backstage_core_plugin_api.ApiRef<KubernetesClusterLinkFormatterApi>;
105
+ /** @public */
104
106
  interface KubernetesApi {
105
107
  getObjectsByEntity(requestBody: KubernetesRequestBody): Promise<ObjectsByEntityResponse>;
106
108
  getClusters(): Promise<{
@@ -139,6 +141,20 @@ interface KubernetesProxyApi {
139
141
  namespace: string;
140
142
  }): Promise<Event[]>;
141
143
  }
144
+ /**
145
+ * @public
146
+ */
147
+ type FormatClusterLinkOptions = {
148
+ dashboardUrl?: string;
149
+ dashboardApp?: string;
150
+ dashboardParameters?: JsonObject;
151
+ object: any;
152
+ kind: string;
153
+ };
154
+ /** @public */
155
+ interface KubernetesClusterLinkFormatterApi {
156
+ formatClusterLink(options: FormatClusterLinkOptions): Promise<string | undefined>;
157
+ }
142
158
 
143
159
  /** @public */
144
160
  interface KubernetesAuthProvider {
@@ -248,6 +264,33 @@ declare class KubernetesBackendClient implements KubernetesApi {
248
264
  private static getKubernetesAuthHeaderByAuthProvider;
249
265
  }
250
266
 
267
+ /**
268
+ * @public
269
+ */
270
+ interface ClusterLinksFormatterOptions {
271
+ dashboardUrl?: URL;
272
+ dashboardParameters?: JsonObject;
273
+ object: any;
274
+ kind: string;
275
+ }
276
+ /**
277
+ * @public
278
+ */
279
+ interface ClusterLinksFormatter {
280
+ formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL>;
281
+ }
282
+
283
+ /** @public */
284
+ declare class KubernetesClusterLinkFormatter implements KubernetesClusterLinkFormatterApi {
285
+ private readonly formatters;
286
+ private readonly defaultFormatterName;
287
+ constructor(options: {
288
+ formatters: Record<string, ClusterLinksFormatter>;
289
+ defaultFormatterName: string;
290
+ });
291
+ formatClusterLink(options: FormatClusterLinkOptions): Promise<string | undefined>;
292
+ }
293
+
251
294
  /**
252
295
  * A client for common requests through the proxy endpoint of the kubernetes backend plugin.
253
296
  *
@@ -276,6 +319,41 @@ declare class KubernetesProxyClient {
276
319
  }>;
277
320
  }
278
321
 
322
+ /** @public */
323
+ declare class AksClusterLinksFormatter implements ClusterLinksFormatter {
324
+ formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL>;
325
+ }
326
+
327
+ /** @public */
328
+ declare class EksClusterLinksFormatter implements ClusterLinksFormatter {
329
+ formatClusterLink(_options: ClusterLinksFormatterOptions): Promise<URL>;
330
+ }
331
+
332
+ /** @public */
333
+ declare class GkeClusterLinksFormatter implements ClusterLinksFormatter {
334
+ formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL>;
335
+ }
336
+
337
+ /** @public */
338
+ declare class StandardClusterLinksFormatter implements ClusterLinksFormatter {
339
+ formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL>;
340
+ }
341
+
342
+ /** @public */
343
+ declare class OpenshiftClusterLinksFormatter {
344
+ formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL>;
345
+ }
346
+
347
+ /** @public */
348
+ declare class RancherClusterLinksFormatter implements ClusterLinksFormatter {
349
+ formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL>;
350
+ }
351
+
352
+ /** @public */
353
+ declare const DEFAULT_FORMATTER_NAME = "standard";
354
+ /** @public */
355
+ declare function getDefaultFormatters(_deps: {}): Record<string, ClusterLinksFormatter>;
356
+
279
357
  /**
280
358
  * Props for Cluster
281
359
  *
@@ -780,38 +858,4 @@ declare const PodExecTerminal: (props: PodExecTerminalProps) => React__default.J
780
858
  */
781
859
  declare const PodExecTerminalDialog: (props: PodExecTerminalProps) => React__default.JSX.Element;
782
860
 
783
- /**
784
- * @public
785
- */
786
- type FormatClusterLinkOptions = {
787
- dashboardUrl?: string;
788
- dashboardApp?: string;
789
- dashboardParameters?: JsonObject;
790
- object: any;
791
- kind: string;
792
- };
793
- /**
794
- * @public
795
- */
796
- declare function formatClusterLink(options: FormatClusterLinkOptions): string | undefined;
797
-
798
- /**
799
- * @public
800
- */
801
- interface ClusterLinksFormatterOptions {
802
- dashboardUrl?: URL;
803
- dashboardParameters?: JsonObject;
804
- object: any;
805
- kind: string;
806
- }
807
- /**
808
- * @public
809
- */
810
- type ClusterLinksFormatter = (options: ClusterLinksFormatterOptions) => URL;
811
-
812
- /**
813
- * @public
814
- */
815
- declare const clusterLinksFormatters: Record<string, ClusterLinksFormatter>;
816
-
817
- export { AksKubernetesAuthProvider, Cluster, ClusterContext, ClusterLinksFormatter, ClusterLinksFormatterOptions, ClusterProps, ContainerCard, ContainerCardProps, ContainerScope, CronJobsAccordions, CronJobsAccordionsProps, CustomResources, CustomResourcesProps, DetectedErrorsContext, ErrorList, ErrorListProps, ErrorMatcher, ErrorPanel, ErrorPanelProps, ErrorReporting, ErrorReportingProps, Events, EventsContent, EventsContentProps, EventsOptions, EventsProps, FixDialog, FixDialogProps, FormatClusterLinkOptions, GoogleKubernetesAuthProvider, GroupedResponsesContext, HorizontalPodAutoscalerDrawer, IngressesAccordions, IngressesAccordionsProps, JobsAccordions, JobsAccordionsProps, KubernetesApi, KubernetesAuthProvider, KubernetesAuthProviders, KubernetesAuthProvidersApi, KubernetesBackendClient, KubernetesDrawer, KubernetesDrawerProps, KubernetesDrawerable, KubernetesObject, KubernetesObjects, KubernetesProxyApi, KubernetesProxyClient, KubernetesStructuredMetadataTableDrawer, KubernetesStructuredMetadataTableDrawerProps, LinkErrorPanel, LinkErrorPanelProps, ManifestYaml, ManifestYamlProps, OidcKubernetesAuthProvider, PendingPodContent, PendingPodContentProps, PodAndErrors, PodColumns, PodDrawer, PodDrawerProps, PodExecTerminal, PodExecTerminalDialog, PodExecTerminalProps, PodLogs, PodLogsDialog, PodLogsDialogProps, PodLogsOptions, PodLogsProps, PodMetricsContext, PodMetricsMatcher, PodNamesWithErrorsContext, PodNamesWithMetricsContext, PodScope, PodsTable, PodsTablesProps, READY_COLUMNS, RESOURCE_COLUMNS, ResourceUtilization, ResourceUtilizationProps, ServerSideKubernetesAuthProvider, ServicesAccordions, ServicesAccordionsProps, clusterLinksFormatters, formatClusterLink, kubernetesApiRef, kubernetesAuthProvidersApiRef, kubernetesProxyApiRef, useCustomResources, useEvents, useKubernetesObjects, useMatchingErrors, usePodLogs, usePodMetrics };
861
+ export { AksClusterLinksFormatter, AksKubernetesAuthProvider, Cluster, ClusterContext, ClusterLinksFormatter, ClusterLinksFormatterOptions, ClusterProps, ContainerCard, ContainerCardProps, ContainerScope, CronJobsAccordions, CronJobsAccordionsProps, CustomResources, CustomResourcesProps, DEFAULT_FORMATTER_NAME, DetectedErrorsContext, EksClusterLinksFormatter, ErrorList, ErrorListProps, ErrorMatcher, ErrorPanel, ErrorPanelProps, ErrorReporting, ErrorReportingProps, Events, EventsContent, EventsContentProps, EventsOptions, EventsProps, FixDialog, FixDialogProps, FormatClusterLinkOptions, GkeClusterLinksFormatter, GoogleKubernetesAuthProvider, GroupedResponsesContext, HorizontalPodAutoscalerDrawer, IngressesAccordions, IngressesAccordionsProps, JobsAccordions, JobsAccordionsProps, KubernetesApi, KubernetesAuthProvider, KubernetesAuthProviders, KubernetesAuthProvidersApi, KubernetesBackendClient, KubernetesClusterLinkFormatter, KubernetesClusterLinkFormatterApi, KubernetesDrawer, KubernetesDrawerProps, KubernetesDrawerable, KubernetesObject, KubernetesObjects, KubernetesProxyApi, KubernetesProxyClient, KubernetesStructuredMetadataTableDrawer, KubernetesStructuredMetadataTableDrawerProps, LinkErrorPanel, LinkErrorPanelProps, ManifestYaml, ManifestYamlProps, OidcKubernetesAuthProvider, OpenshiftClusterLinksFormatter, PendingPodContent, PendingPodContentProps, PodAndErrors, PodColumns, PodDrawer, PodDrawerProps, PodExecTerminal, PodExecTerminalDialog, PodExecTerminalProps, PodLogs, PodLogsDialog, PodLogsDialogProps, PodLogsOptions, PodLogsProps, PodMetricsContext, PodMetricsMatcher, PodNamesWithErrorsContext, PodNamesWithMetricsContext, PodScope, PodsTable, PodsTablesProps, READY_COLUMNS, RESOURCE_COLUMNS, RancherClusterLinksFormatter, ResourceUtilization, ResourceUtilizationProps, ServerSideKubernetesAuthProvider, ServicesAccordions, ServicesAccordionsProps, StandardClusterLinksFormatter, getDefaultFormatters, kubernetesApiRef, kubernetesAuthProvidersApiRef, kubernetesClusterLinkFormatterApiRef, kubernetesProxyApiRef, useCustomResources, useEvents, useKubernetesObjects, useMatchingErrors, usePodLogs, usePodMetrics };