From 34ca6509b84f5a165fc25e3fb4f8ae913a7ee499 Mon Sep 17 00:00:00 2001
From: Gabriel
Date: Thu, 1 Jun 2023 14:50:04 +0200
Subject: [PATCH 1/6] chore: extract tokens
Signed-off-by: Gabriel
---
packages/technical-features/react-application/index.ts | 6 ++++++
.../cluster-frame-child-component-injection-token.ts | 0
.../root-frame-child-component-injection-token.ts | 0
3 files changed, 6 insertions(+)
rename packages/{core/src/renderer/frames => technical-features/react-application/src}/cluster-frame/cluster-frame-child-component-injection-token.ts (100%)
rename packages/{core/src/renderer/frames => technical-features/react-application/src}/root-frame/root-frame-child-component-injection-token.ts (100%)
diff --git a/packages/technical-features/react-application/index.ts b/packages/technical-features/react-application/index.ts
index e3f5236d54..892af3b030 100644
--- a/packages/technical-features/react-application/index.ts
+++ b/packages/technical-features/react-application/index.ts
@@ -7,4 +7,10 @@ export type { ReactApplicationChildren } from "./src/react-application/react-app
export { reactApplicationHigherOrderComponentInjectionToken } from "./src/react-application/react-application-higher-order-component-injection-token";
export type { ReactApplicationHigherOrderComponent } from "./src/react-application/react-application-higher-order-component-injection-token";
+export { clusterFrameChildComponentInjectionToken } from "./src/cluster-frame/cluster-frame-child-component-injection-token";
+export type { ClusterFrameChildComponent } from "./src/cluster-frame/cluster-frame-child-component-injection-token";
+
+export { rootFrameChildComponentInjectionToken } from "./src/root-frame/root-frame-child-component-injection-token";
+export type { RootFrameChildComponent } from "./src/root-frame/root-frame-child-component-injection-token";
+
export { reactApplicationFeature } from "./src/feature";
diff --git a/packages/core/src/renderer/frames/cluster-frame/cluster-frame-child-component-injection-token.ts b/packages/technical-features/react-application/src/cluster-frame/cluster-frame-child-component-injection-token.ts
similarity index 100%
rename from packages/core/src/renderer/frames/cluster-frame/cluster-frame-child-component-injection-token.ts
rename to packages/technical-features/react-application/src/cluster-frame/cluster-frame-child-component-injection-token.ts
diff --git a/packages/core/src/renderer/frames/root-frame/root-frame-child-component-injection-token.ts b/packages/technical-features/react-application/src/root-frame/root-frame-child-component-injection-token.ts
similarity index 100%
rename from packages/core/src/renderer/frames/root-frame/root-frame-child-component-injection-token.ts
rename to packages/technical-features/react-application/src/root-frame/root-frame-child-component-injection-token.ts
From 7274cdde5033c5214a71070e6e52743dcfaaf763 Mon Sep 17 00:00:00 2001
From: Gabriel
Date: Thu, 1 Jun 2023 15:52:54 +0200
Subject: [PATCH 2/6] chore: include types with void operator for coverage
Signed-off-by: Gabriel
---
packages/core/src/extensions/lens-renderer-extension.ts | 2 +-
.../force-update-modal-root-frame-component.injectable.ts | 2 +-
.../catalog/entity-details/component.injectable.tsx | 2 +-
...luster-manager-root-frame-child-component.injectable.tsx | 2 +-
...nd-container-cluster-frame-child-component.injectable.ts | 2 +-
...mmand-container-root-frame-child-component.injectable.ts | 2 +-
...nfirm-dialog-cluster-frame-child-component.injectable.ts | 2 +-
.../confirm-dialog-root-frame-child-component.injectable.ts | 2 +-
...uster-dialog-cluster-frame-child-component.injectable.ts | 2 +-
...ease-details-cluster-frame-child-component.injectable.ts | 2 +-
...ject-details-cluster-frame-child-component.injectable.ts | 2 +-
...onfig-dialog-cluster-frame-child-component.injectable.ts | 2 +-
...otifications-cluster-frame-child-component.injectable.ts | 2 +-
.../notifications-root-frame-child-component.injectable.ts | 2 +-
...igger-dialog-cluster-frame-child-component.injectable.ts | 2 +-
...scale-dialog-cluster-frame-child-component.injectable.ts | 2 +-
...scale-dialog-cluster-frame-child-component.injectable.ts | 2 +-
...scale-dialog-cluster-frame-child-component.injectable.ts | 2 +-
.../cluster-frame-component-registrator.injectable.ts | 2 +-
.../cluster-frame-layout-child-component.injectable.tsx | 2 +-
.../src/renderer/frames/cluster-frame/cluster-frame.tsx | 4 ++--
packages/core/src/renderer/frames/root-frame/root-frame.tsx | 4 ++--
...rward-dialog-cluster-frame-child-component.injectable.ts | 2 +-
.../react-application/src/react-application.test.tsx | 6 ++++++
24 files changed, 31 insertions(+), 25 deletions(-)
diff --git a/packages/core/src/extensions/lens-renderer-extension.ts b/packages/core/src/extensions/lens-renderer-extension.ts
index 76a35eae05..b34f8ef84f 100644
--- a/packages/core/src/extensions/lens-renderer-extension.ts
+++ b/packages/core/src/extensions/lens-renderer-extension.ts
@@ -26,7 +26,7 @@ import { getExtensionRoutePath } from "../renderer/routes/for-extension";
import type { KubeObjectHandlerRegistration } from "../renderer/kube-object/handler";
import type { AppPreferenceTabRegistration } from "../features/preferences/renderer/compliance-for-legacy-extension-api/app-preference-tab-registration";
import type { KubeObjectDetailRegistration } from "../renderer/components/kube-object-details/kube-object-detail-registration";
-import type { ClusterFrameChildComponent } from "../renderer/frames/cluster-frame/cluster-frame-child-component-injection-token";
+import type { ClusterFrameChildComponent } from "@k8slens/react-application";
import type { EntitySettingRegistration } from "../renderer/components/entity-settings/extension-registrator.injectable";
import type { CatalogEntityDetailRegistration } from "../renderer/components/catalog/entity-details/token";
import type { PageRegistration } from "../renderer/routes/page-registration";
diff --git a/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/force-update-modal-root-frame-component.injectable.ts b/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/force-update-modal-root-frame-component.injectable.ts
index b5dd601ad2..9745f51b63 100644
--- a/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/force-update-modal-root-frame-component.injectable.ts
+++ b/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/force-update-modal-root-frame-component.injectable.ts
@@ -4,7 +4,7 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
-import { rootFrameChildComponentInjectionToken } from "../../../../../../renderer/frames/root-frame/root-frame-child-component-injection-token";
+import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application";
import { ForceUpdateModal } from "./force-update-modal";
import timeSinceUpdateWasDownloadedInjectable from "./time-since-update-was-downloaded.injectable";
import updateDownloadedDateTimeInjectable from "../../../../common/update-downloaded-date-time.injectable";
diff --git a/packages/core/src/renderer/components/catalog/entity-details/component.injectable.tsx b/packages/core/src/renderer/components/catalog/entity-details/component.injectable.tsx
index 71ab008280..f18e9c76ef 100644
--- a/packages/core/src/renderer/components/catalog/entity-details/component.injectable.tsx
+++ b/packages/core/src/renderer/components/catalog/entity-details/component.injectable.tsx
@@ -11,7 +11,7 @@ import React from "react";
import type { CatalogEntity } from "../../../api/catalog-entity";
import type { CatalogEntityRegistry } from "../../../api/catalog/entity/registry";
import catalogEntityRegistryInjectable from "../../../api/catalog/entity/registry.injectable";
-import { rootFrameChildComponentInjectionToken } from "../../../frames/root-frame/root-frame-child-component-injection-token";
+import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application";
import type { HideEntityDetails } from "./hide.injectable";
import hideEntityDetailsInjectable from "./hide.injectable";
import selectedCatalogEntityInjectable from "./selected-entity.injectable";
diff --git a/packages/core/src/renderer/components/cluster-manager/cluster-manager-root-frame-child-component.injectable.tsx b/packages/core/src/renderer/components/cluster-manager/cluster-manager-root-frame-child-component.injectable.tsx
index a1e6130db9..9993bdec92 100644
--- a/packages/core/src/renderer/components/cluster-manager/cluster-manager-root-frame-child-component.injectable.tsx
+++ b/packages/core/src/renderer/components/cluster-manager/cluster-manager-root-frame-child-component.injectable.tsx
@@ -4,7 +4,7 @@
*/
import React from "react";
import { getInjectable } from "@ogre-tools/injectable";
-import { rootFrameChildComponentInjectionToken } from "../../frames/root-frame/root-frame-child-component-injection-token";
+import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application";
import { ClusterManager } from "./cluster-manager";
import { computed } from "mobx";
import { ErrorBoundary } from "@k8slens/error-boundary";
diff --git a/packages/core/src/renderer/components/command-palette/command-container-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/command-palette/command-container-cluster-frame-child-component.injectable.ts
index b517ab614a..c27f9df4f6 100644
--- a/packages/core/src/renderer/components/command-palette/command-container-cluster-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/command-palette/command-container-cluster-frame-child-component.injectable.ts
@@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import { CommandContainer } from "./command-container";
-import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
const commandContainerClusterFrameChildComponentInjectable = getInjectable({
id: "command-container-cluster-frame-child-component",
diff --git a/packages/core/src/renderer/components/command-palette/command-container-root-frame-child-component.injectable.ts b/packages/core/src/renderer/components/command-palette/command-container-root-frame-child-component.injectable.ts
index f1c7b72180..e90e043909 100644
--- a/packages/core/src/renderer/components/command-palette/command-container-root-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/command-palette/command-container-root-frame-child-component.injectable.ts
@@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
-import { rootFrameChildComponentInjectionToken } from "../../frames/root-frame/root-frame-child-component-injection-token";
+import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application";
import { computed } from "mobx";
import { CommandContainer } from "./command-container";
diff --git a/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-cluster-frame-child-component.injectable.ts
index 196d18b27f..99cb360a5c 100644
--- a/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-cluster-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-cluster-frame-child-component.injectable.ts
@@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import { ConfirmDialog } from "./confirm-dialog";
-import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
const confirmDialogClusterFrameChildComponentInjectable = getInjectable({
id: "confirm-dialog-cluster-frame-child-component",
diff --git a/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-root-frame-child-component.injectable.ts b/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-root-frame-child-component.injectable.ts
index 0132040818..ff875bd3ad 100644
--- a/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-root-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-root-frame-child-component.injectable.ts
@@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
-import { rootFrameChildComponentInjectionToken } from "../../frames/root-frame/root-frame-child-component-injection-token";
+import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application";
import { computed } from "mobx";
import { ConfirmDialog } from "./confirm-dialog";
diff --git a/packages/core/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog-cluster-frame-child-component.injectable.ts
index e427768ae9..50ed357c1f 100644
--- a/packages/core/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog-cluster-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog-cluster-frame-child-component.injectable.ts
@@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import { DeleteClusterDialog } from "./view";
-import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
const deleteClusterDialogClusterFrameChildComponentInjectable = getInjectable({
id: "delete-cluster-dialog-cluster-frame-child-component",
diff --git a/packages/core/src/renderer/components/helm-releases/release-details/release-details-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/helm-releases/release-details/release-details-cluster-frame-child-component.injectable.ts
index a2293e5ca1..ffb39e6f66 100644
--- a/packages/core/src/renderer/components/helm-releases/release-details/release-details-cluster-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/helm-releases/release-details/release-details-cluster-frame-child-component.injectable.ts
@@ -4,7 +4,7 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
-import { clusterFrameChildComponentInjectionToken } from "../../../frames/cluster-frame/cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
import { ReleaseDetails } from "./release-details";
import targetHelmReleaseInjectable from "./target-helm-release.injectable";
diff --git a/packages/core/src/renderer/components/kube-object-details/kube-object-details-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/kube-object-details/kube-object-details-cluster-frame-child-component.injectable.ts
index 1fcd929325..afd44dd4bc 100644
--- a/packages/core/src/renderer/components/kube-object-details/kube-object-details-cluster-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/kube-object-details/kube-object-details-cluster-frame-child-component.injectable.ts
@@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import { KubeObjectDetails } from "./kube-object-details";
-import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
const kubeObjectDetailsClusterFrameChildComponentInjectable = getInjectable({
id: "kube-object-details-cluster-frame-child-component",
diff --git a/packages/core/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog-cluster-frame-child-component.injectable.ts
index 17160edd81..ccd546f240 100644
--- a/packages/core/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog-cluster-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog-cluster-frame-child-component.injectable.ts
@@ -4,7 +4,7 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
-import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
import { KubeConfigDialog } from "./kubeconfig-dialog";
const kubeconfigDialogClusterFrameChildComponentInjectable = getInjectable({
diff --git a/packages/core/src/renderer/components/notifications/notifications-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/notifications/notifications-cluster-frame-child-component.injectable.ts
index acd2e72b9e..45f2f3652a 100644
--- a/packages/core/src/renderer/components/notifications/notifications-cluster-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/notifications/notifications-cluster-frame-child-component.injectable.ts
@@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import { Notifications } from "./notifications";
-import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
const notificationsClusterFrameChildComponentInjectable = getInjectable({
id: "notifications-cluster-frame-child-component",
diff --git a/packages/core/src/renderer/components/notifications/notifications-root-frame-child-component.injectable.ts b/packages/core/src/renderer/components/notifications/notifications-root-frame-child-component.injectable.ts
index eec5a1962a..20d83e78fd 100644
--- a/packages/core/src/renderer/components/notifications/notifications-root-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/notifications/notifications-root-frame-child-component.injectable.ts
@@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
-import { rootFrameChildComponentInjectionToken } from "../../frames/root-frame/root-frame-child-component-injection-token";
+import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application";
import { computed } from "mobx";
import { Notifications } from "./notifications";
diff --git a/packages/core/src/renderer/components/workloads-cronjobs/cron-job-trigger-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/workloads-cronjobs/cron-job-trigger-dialog-cluster-frame-child-component.injectable.ts
index 024515e1b8..0e51db8305 100644
--- a/packages/core/src/renderer/components/workloads-cronjobs/cron-job-trigger-dialog-cluster-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/workloads-cronjobs/cron-job-trigger-dialog-cluster-frame-child-component.injectable.ts
@@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import { CronJobTriggerDialog } from "./trigger-dialog/view";
-import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
const cronJobTriggerDialogClusterFrameChildComponentInjectable = getInjectable({
id: "cron-job-trigger-dialog-cluster-frame-child-component",
diff --git a/packages/core/src/renderer/components/workloads-deployments/scale/deployment-scale-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/workloads-deployments/scale/deployment-scale-dialog-cluster-frame-child-component.injectable.ts
index 31a444dba0..a6fcc64d56 100644
--- a/packages/core/src/renderer/components/workloads-deployments/scale/deployment-scale-dialog-cluster-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/workloads-deployments/scale/deployment-scale-dialog-cluster-frame-child-component.injectable.ts
@@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import { DeploymentScaleDialog } from "./dialog";
-import { clusterFrameChildComponentInjectionToken } from "../../../frames/cluster-frame/cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
const deploymentScaleDialogClusterFrameChildComponentInjectable = getInjectable({
id: "deployment-scale-dialog-cluster-frame-child-component",
diff --git a/packages/core/src/renderer/components/workloads-replicasets/scale-dialog/replicaset-scale-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/workloads-replicasets/scale-dialog/replicaset-scale-dialog-cluster-frame-child-component.injectable.ts
index a6f2d8c8f5..0ffd1519b1 100644
--- a/packages/core/src/renderer/components/workloads-replicasets/scale-dialog/replicaset-scale-dialog-cluster-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/workloads-replicasets/scale-dialog/replicaset-scale-dialog-cluster-frame-child-component.injectable.ts
@@ -4,7 +4,7 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
-import { clusterFrameChildComponentInjectionToken } from "../../../frames/cluster-frame/cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
import { ReplicaSetScaleDialog } from "./dialog";
const replicasetScaleDialogClusterFrameChildComponentInjectable = getInjectable({
diff --git a/packages/core/src/renderer/components/workloads-statefulsets/scale/statefulset-scale-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/workloads-statefulsets/scale/statefulset-scale-dialog-cluster-frame-child-component.injectable.ts
index 7a8b12686d..63ed64439d 100644
--- a/packages/core/src/renderer/components/workloads-statefulsets/scale/statefulset-scale-dialog-cluster-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/components/workloads-statefulsets/scale/statefulset-scale-dialog-cluster-frame-child-component.injectable.ts
@@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import { StatefulSetScaleDialog } from "./dialog";
-import { clusterFrameChildComponentInjectionToken } from "../../../frames/cluster-frame/cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
const statefulsetScaleDialogClusterFrameChildComponentInjectable = getInjectable({
id: "statefulset-scale-dialog-cluster-frame-child-component",
diff --git a/packages/core/src/renderer/frames/cluster-frame/cluster-frame-component-registrator.injectable.ts b/packages/core/src/renderer/frames/cluster-frame/cluster-frame-component-registrator.injectable.ts
index 31a2db819d..ff631107c3 100644
--- a/packages/core/src/renderer/frames/cluster-frame/cluster-frame-component-registrator.injectable.ts
+++ b/packages/core/src/renderer/frames/cluster-frame/cluster-frame-component-registrator.injectable.ts
@@ -8,7 +8,7 @@ import { map } from "lodash/fp";
import { extensionRegistratorInjectionToken } from "../../../extensions/extension-loader/extension-registrator-injection-token";
import type { ExtensionRegistrator } from "../../../extensions/extension-loader/extension-registrator-injection-token";
import type { LensRendererExtension } from "../../../extensions/lens-renderer-extension";
-import { clusterFrameChildComponentInjectionToken } from "./cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
const clusterFrameComponentRegistratorInjectable = getInjectable({
id: "cluster-frame-component-registrator",
diff --git a/packages/core/src/renderer/frames/cluster-frame/cluster-frame-layout-child-component.injectable.tsx b/packages/core/src/renderer/frames/cluster-frame/cluster-frame-layout-child-component.injectable.tsx
index bb73b55665..3f9acdb59f 100644
--- a/packages/core/src/renderer/frames/cluster-frame/cluster-frame-layout-child-component.injectable.tsx
+++ b/packages/core/src/renderer/frames/cluster-frame/cluster-frame-layout-child-component.injectable.tsx
@@ -4,7 +4,7 @@
*/
import React from "react";
import { getInjectable } from "@ogre-tools/injectable";
-import { clusterFrameChildComponentInjectionToken } from "./cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
import { MainLayout } from "../../components/layout/main-layout";
import { Sidebar } from "../../components/layout/sidebar";
import { Dock } from "../../components/dock";
diff --git a/packages/core/src/renderer/frames/cluster-frame/cluster-frame.tsx b/packages/core/src/renderer/frames/cluster-frame/cluster-frame.tsx
index b01b7cfd67..98c1ac7a50 100755
--- a/packages/core/src/renderer/frames/cluster-frame/cluster-frame.tsx
+++ b/packages/core/src/renderer/frames/cluster-frame/cluster-frame.tsx
@@ -11,8 +11,8 @@ import namespaceStoreInjectable from "../../components/namespaces/store.injecta
import type { SubscribeStores } from "../../kube-watch-api/kube-watch-api";
import { disposer } from "@k8slens/utilities";
import subscribeStoresInjectable from "../../kube-watch-api/subscribe-stores.injectable";
-import type { ClusterFrameChildComponent } from "./cluster-frame-child-component-injection-token";
-import { clusterFrameChildComponentInjectionToken } from "./cluster-frame-child-component-injection-token";
+import type { ClusterFrameChildComponent } from "@k8slens/react-application";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
import watchHistoryStateInjectable from "../../remote-helpers/watch-history-state.injectable";
import { computedInjectManyInjectable } from "@ogre-tools/injectable-extension-for-mobx";
import type { IComputedValue } from "mobx";
diff --git a/packages/core/src/renderer/frames/root-frame/root-frame.tsx b/packages/core/src/renderer/frames/root-frame/root-frame.tsx
index 21d3600ea8..1e02371207 100644
--- a/packages/core/src/renderer/frames/root-frame/root-frame.tsx
+++ b/packages/core/src/renderer/frames/root-frame/root-frame.tsx
@@ -7,8 +7,8 @@ import React from "react";
import { Observer } from "mobx-react";
import { withInjectables } from "@ogre-tools/injectable-react";
import broadcastThatRootFrameIsRenderedInjectable from "./broadcast-that-root-frame-is-rendered.injectable";
-import type { RootFrameChildComponent } from "./root-frame-child-component-injection-token";
-import { rootFrameChildComponentInjectionToken } from "./root-frame-child-component-injection-token";
+import type { RootFrameChildComponent } from "@k8slens/react-application";
+import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application";
interface Dependencies {
broadcastThatRootFrameIsRendered: () => void;
diff --git a/packages/core/src/renderer/port-forward/port-forward-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/port-forward/port-forward-dialog-cluster-frame-child-component.injectable.ts
index eeee6b6751..d67f7ee5e6 100644
--- a/packages/core/src/renderer/port-forward/port-forward-dialog-cluster-frame-child-component.injectable.ts
+++ b/packages/core/src/renderer/port-forward/port-forward-dialog-cluster-frame-child-component.injectable.ts
@@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import { PortForwardDialog } from "./port-forward-dialog";
-import { clusterFrameChildComponentInjectionToken } from "../frames/cluster-frame/cluster-frame-child-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
const portForwardDialogClusterFrameChildComponentInjectable = getInjectable({
id: "port-forward-dialog-cluster-frame-child-component",
diff --git a/packages/technical-features/react-application/src/react-application.test.tsx b/packages/technical-features/react-application/src/react-application.test.tsx
index 12fcdb6bac..2204eefb39 100644
--- a/packages/technical-features/react-application/src/react-application.test.tsx
+++ b/packages/technical-features/react-application/src/react-application.test.tsx
@@ -16,6 +16,9 @@ import {
reactApplicationHigherOrderComponentInjectionToken,
} from "./react-application/react-application-higher-order-component-injection-token";
+import { clusterFrameChildComponentInjectionToken } from "./cluster-frame/cluster-frame-child-component-injection-token";
+import { rootFrameChildComponentInjectionToken } from "./root-frame/root-frame-child-component-injection-token";
+
const SomeContent = () => Some children
;
describe("react-application", () => {
@@ -43,6 +46,9 @@ describe("react-application", () => {
await startApplication();
discover = discoverFor(() => rendered);
+
+ expect(clusterFrameChildComponentInjectionToken.id).toBe("cluster-frame-child-component");
+ expect(rootFrameChildComponentInjectionToken.id).toBe("root-frame-child-component");
});
it("renders", () => {
From f602ce8f465aa4425a9050146b1252da7867499e Mon Sep 17 00:00:00 2001
From: Jari Kolehmainen
Date: Fri, 26 May 2023 13:05:20 +0300
Subject: [PATCH 3/6] chore: extract prometheus from core
Signed-off-by: Jari Kolehmainen
---
open-lens/package.json | 1 +
open-lens/src/main/index.ts | 7 ++-
package-lock.json | 49 ++++++++++++++++++
packages/core/package.json | 1 +
.../main/__test__/prometheus-handler.test.ts | 4 +-
.../prometheus-handler/prometheus-handler.ts | 2 +-
.../main/prometheus/get-by-kind.injectable.ts | 2 +-
.../main/prometheus/providers.injectable.ts | 2 +-
.../prometheus/.eslintrc.js | 6 +++
.../technical-features/prometheus/.prettierrc | 1 +
.../prometheus/CHANGELOG.md | 4 ++
.../technical-features/prometheus/index.ts | 7 +++
.../prometheus/jest.config.js | 1 +
.../prometheus/package.json | 50 +++++++++++++++++++
.../prometheus/src/feature.ts | 17 +++++++
.../src}/helm-14-provider.injectable.ts | 16 +++---
.../src}/helm-provider.injectable.ts | 36 +++++++------
.../src}/lens-provider.injectable.ts | 38 ++++++++------
.../src}/operator-provider.injectable.ts.ts | 36 +++++++------
.../prometheus/src}/provider.ts | 36 ++++++++++---
.../src}/stacklight-provider.injectable.ts | 36 +++++++------
.../prometheus/tsconfig.json | 4 ++
.../prometheus/webpack.config.js | 1 +
23 files changed, 275 insertions(+), 82 deletions(-)
create mode 100644 packages/technical-features/prometheus/.eslintrc.js
create mode 100644 packages/technical-features/prometheus/.prettierrc
create mode 100644 packages/technical-features/prometheus/CHANGELOG.md
create mode 100644 packages/technical-features/prometheus/index.ts
create mode 100644 packages/technical-features/prometheus/jest.config.js
create mode 100644 packages/technical-features/prometheus/package.json
create mode 100644 packages/technical-features/prometheus/src/feature.ts
rename packages/{core/src/main/prometheus => technical-features/prometheus/src}/helm-14-provider.injectable.ts (65%)
rename packages/{core/src/main/prometheus => technical-features/prometheus/src}/helm-provider.injectable.ts (91%)
rename packages/{core/src/main/prometheus => technical-features/prometheus/src}/lens-provider.injectable.ts (91%)
rename packages/{core/src/main/prometheus => technical-features/prometheus/src}/operator-provider.injectable.ts.ts (91%)
rename packages/{core/src/main/prometheus => technical-features/prometheus/src}/provider.ts (73%)
rename packages/{core/src/main/prometheus => technical-features/prometheus/src}/stacklight-provider.injectable.ts (91%)
create mode 100644 packages/technical-features/prometheus/tsconfig.json
create mode 100644 packages/technical-features/prometheus/webpack.config.js
diff --git a/open-lens/package.json b/open-lens/package.json
index 0a2cea4562..838c37f897 100644
--- a/open-lens/package.json
+++ b/open-lens/package.json
@@ -206,6 +206,7 @@
"@k8slens/messaging-for-renderer": "^1.0.0",
"@k8slens/metrics": "^6.5.0",
"@k8slens/node-fetch": "^6.5.0",
+ "@k8slens/prometheus": "^1.0.0",
"@k8slens/random": "^1.0.0",
"@k8slens/react-application": "^1.0.0",
"@k8slens/resizing-anchor": "^1.0.0",
diff --git a/open-lens/src/main/index.ts b/open-lens/src/main/index.ts
index 58592cc42b..8a90aaca46 100644
--- a/open-lens/src/main/index.ts
+++ b/open-lens/src/main/index.ts
@@ -14,6 +14,7 @@ import { messagingFeatureForMain } from "@k8slens/messaging-for-main";
import { loggerFeature } from "@k8slens/logger";
import { randomFeature } from "@k8slens/random";
import { kubeApiSpecificsFeature } from "@k8slens/kube-api-specifics";
+import { prometheusFeature } from "@k8slens/prometheus";
const environment = "main";
@@ -26,12 +27,10 @@ registerMobX(di);
runInAction(() => {
registerLensCore(di, environment);
- registerFeature(di,
- loggerFeature,
- );
-
registerFeature(
di,
+ loggerFeature,
+ prometheusFeature,
applicationFeature,
applicationFeatureForElectronMain,
messagingFeatureForMain,
diff --git a/package-lock.json b/package-lock.json
index 6f89bb48e6..eb92446d12 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3831,6 +3831,10 @@
"resolved": "packages/node-fetch",
"link": true
},
+ "node_modules/@k8slens/prometheus": {
+ "resolved": "packages/technical-features/prometheus",
+ "link": true
+ },
"node_modules/@k8slens/random": {
"resolved": "packages/random-id",
"link": true
@@ -33993,6 +33997,7 @@
"@k8slens/messaging-for-renderer": "^1.0.0",
"@k8slens/metrics": "^6.5.0",
"@k8slens/node-fetch": "^6.5.0",
+ "@k8slens/prometheus": "^1.0.0",
"@k8slens/random": "^1.0.0",
"@k8slens/react-application": "^1.0.0",
"@k8slens/resizing-anchor": "^1.0.0",
@@ -34335,6 +34340,7 @@
"@k8slens/messaging-for-renderer": "^1.0.0-alpha.1",
"@k8slens/metrics": "^6.5.0-alpha.7",
"@k8slens/node-fetch": "^6.5.0-alpha.3",
+ "@k8slens/prometheus": "^1.0.0",
"@k8slens/random": "^1.0.0",
"@k8slens/react-application": "^1.0.0-alpha.5",
"@k8slens/resizing-anchor": "^1.0.0-alpha.5",
@@ -35248,6 +35254,28 @@
"url": "https://opencollective.com/node-fetch"
}
},
+ "packages/prometheus": {
+ "name": "@k8slens/prometheus",
+ "version": "1.0.0",
+ "extraneous": true,
+ "license": "MIT",
+ "devDependencies": {
+ "@k8slens/eslint-config": "^6.5.0-alpha.3",
+ "@k8slens/jest": "^6.5.0-alpha.5",
+ "@k8slens/typescript": "^6.5.0-alpha.3",
+ "@k8slens/webpack": "^6.5.0-alpha.9"
+ },
+ "peerDependencies": {
+ "@k8slens/application": "^6.5.0-alpha.2",
+ "@k8slens/feature-core": "^6.5.0-alpha.0",
+ "@k8slens/utilities": "^1.0.0-alpha.7",
+ "@kubernetes/client-node": "^0.18.1",
+ "@ogre-tools/fp": "^16.1.0",
+ "@ogre-tools/injectable": "^16.1.0",
+ "@ogre-tools/injectable-extension-for-auto-registration": "^16.1.0",
+ "@ogre-tools/injectable-extension-for-mobx": "^16.1.0"
+ }
+ },
"packages/random-id": {
"name": "@k8slens/random",
"version": "1.0.0",
@@ -35517,6 +35545,27 @@
"mobx": "^6.9.0"
}
},
+ "packages/technical-features/prometheus": {
+ "name": "@k8slens/prometheus",
+ "version": "1.0.0",
+ "license": "MIT",
+ "devDependencies": {
+ "@k8slens/eslint-config": "^6.5.0-alpha.3",
+ "@k8slens/jest": "^6.5.0-alpha.5",
+ "@k8slens/typescript": "^6.5.0-alpha.3",
+ "@k8slens/webpack": "^6.5.0-alpha.9"
+ },
+ "peerDependencies": {
+ "@k8slens/application": "^6.5.0-alpha.2",
+ "@k8slens/feature-core": "^6.5.0-alpha.0",
+ "@k8slens/utilities": "^1.0.0-alpha.7",
+ "@kubernetes/client-node": "^0.18.1",
+ "@ogre-tools/fp": "^17.2.0",
+ "@ogre-tools/injectable": "^17.2.0",
+ "@ogre-tools/injectable-extension-for-auto-registration": "^17.2.0",
+ "@ogre-tools/injectable-extension-for-mobx": "^17.2.0"
+ }
+ },
"packages/technical-features/react-application": {
"name": "@k8slens/react-application",
"version": "1.0.0",
diff --git a/packages/core/package.json b/packages/core/package.json
index 919de6d364..47538264d4 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -228,6 +228,7 @@
"@k8slens/messaging-for-renderer": "^1.0.0-alpha.1",
"@k8slens/metrics": "^6.5.0-alpha.7",
"@k8slens/node-fetch": "^6.5.0-alpha.3",
+ "@k8slens/prometheus": "^1.0.0",
"@k8slens/react-application": "^1.0.0-alpha.5",
"@k8slens/random": "^1.0.0",
"@k8slens/resizing-anchor": "^1.0.0-alpha.5",
diff --git a/packages/core/src/main/__test__/prometheus-handler.test.ts b/packages/core/src/main/__test__/prometheus-handler.test.ts
index df0e1b37c9..84f0f154cb 100644
--- a/packages/core/src/main/__test__/prometheus-handler.test.ts
+++ b/packages/core/src/main/__test__/prometheus-handler.test.ts
@@ -7,8 +7,8 @@ import { getDiForUnitTesting } from "../getDiForUnitTesting";
import { Cluster } from "../../common/cluster/cluster";
import type { DiContainer } from "@ogre-tools/injectable";
import { getInjectable } from "@ogre-tools/injectable";
-import type { PrometheusProvider } from "../prometheus/provider";
-import { prometheusProviderInjectionToken } from "../prometheus/provider";
+import type { PrometheusProvider } from "@k8slens/prometheus";
+import { prometheusProviderInjectionToken } from "@k8slens/prometheus";
import { runInAction } from "mobx";
import prometheusHandlerInjectable from "../cluster/prometheus-handler/prometheus-handler.injectable";
import directoryForTempInjectable from "../../common/app-paths/directory-for-temp/directory-for-temp.injectable";
diff --git a/packages/core/src/main/cluster/prometheus-handler/prometheus-handler.ts b/packages/core/src/main/cluster/prometheus-handler/prometheus-handler.ts
index 81c3901750..142a69bb07 100644
--- a/packages/core/src/main/cluster/prometheus-handler/prometheus-handler.ts
+++ b/packages/core/src/main/cluster/prometheus-handler/prometheus-handler.ts
@@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
-import type { PrometheusProvider, PrometheusService } from "../../prometheus/provider";
+import type { PrometheusProvider, PrometheusService } from "@k8slens/prometheus";
import type { ClusterPrometheusPreferences } from "../../../common/cluster-types";
import type { Cluster } from "../../../common/cluster/cluster";
import { CoreV1Api } from "@kubernetes/client-node";
diff --git a/packages/core/src/main/prometheus/get-by-kind.injectable.ts b/packages/core/src/main/prometheus/get-by-kind.injectable.ts
index 93d7567f6e..3930c77e62 100644
--- a/packages/core/src/main/prometheus/get-by-kind.injectable.ts
+++ b/packages/core/src/main/prometheus/get-by-kind.injectable.ts
@@ -4,7 +4,7 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { matches } from "lodash/fp";
-import type { PrometheusProvider } from "./provider";
+import type { PrometheusProvider } from "@k8slens/prometheus";
import prometheusProvidersInjectable from "./providers.injectable";
export type GetPrometheusProviderByKind = (kind: string) => PrometheusProvider;
diff --git a/packages/core/src/main/prometheus/providers.injectable.ts b/packages/core/src/main/prometheus/providers.injectable.ts
index 73fe2dfe50..43ec48d769 100644
--- a/packages/core/src/main/prometheus/providers.injectable.ts
+++ b/packages/core/src/main/prometheus/providers.injectable.ts
@@ -4,7 +4,7 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { computedInjectManyInjectable } from "@ogre-tools/injectable-extension-for-mobx";
-import { prometheusProviderInjectionToken } from "./provider";
+import { prometheusProviderInjectionToken } from "@k8slens/prometheus";
const prometheusProvidersInjectable = getInjectable({
id: "prometheus-providers",
diff --git a/packages/technical-features/prometheus/.eslintrc.js b/packages/technical-features/prometheus/.eslintrc.js
new file mode 100644
index 0000000000..f404cf0ace
--- /dev/null
+++ b/packages/technical-features/prometheus/.eslintrc.js
@@ -0,0 +1,6 @@
+module.exports = {
+ extends: "@k8slens/eslint-config/eslint",
+ parserOptions: {
+ project: "./tsconfig.json",
+ },
+ };
diff --git a/packages/technical-features/prometheus/.prettierrc b/packages/technical-features/prometheus/.prettierrc
new file mode 100644
index 0000000000..edd47b479e
--- /dev/null
+++ b/packages/technical-features/prometheus/.prettierrc
@@ -0,0 +1 @@
+"@k8slens/eslint-config/prettier"
diff --git a/packages/technical-features/prometheus/CHANGELOG.md b/packages/technical-features/prometheus/CHANGELOG.md
new file mode 100644
index 0000000000..e4d87c4d45
--- /dev/null
+++ b/packages/technical-features/prometheus/CHANGELOG.md
@@ -0,0 +1,4 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
diff --git a/packages/technical-features/prometheus/index.ts b/packages/technical-features/prometheus/index.ts
new file mode 100644
index 0000000000..426758e06e
--- /dev/null
+++ b/packages/technical-features/prometheus/index.ts
@@ -0,0 +1,7 @@
+/**
+ * Copyright (c) OpenLens Authors. All rights reserved.
+ * Licensed under MIT License. See LICENSE in root directory for more information.
+ */
+
+export { prometheusFeature } from "./src/feature";
+export * from "./src/provider";
diff --git a/packages/technical-features/prometheus/jest.config.js b/packages/technical-features/prometheus/jest.config.js
new file mode 100644
index 0000000000..c6074967eb
--- /dev/null
+++ b/packages/technical-features/prometheus/jest.config.js
@@ -0,0 +1 @@
+module.exports = require("@k8slens/jest").monorepoPackageConfig(__dirname).configForNode;
diff --git a/packages/technical-features/prometheus/package.json b/packages/technical-features/prometheus/package.json
new file mode 100644
index 0000000000..f6c7ff26d4
--- /dev/null
+++ b/packages/technical-features/prometheus/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "@k8slens/prometheus",
+ "private": false,
+ "version": "1.0.0",
+ "description": "Prometheus support for Lens",
+ "type": "commonjs",
+ "publishConfig": {
+ "access": "public",
+ "registry": "https://registry.npmjs.org/"
+ },
+ "files": [
+ "dist"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lensapp/lens.git"
+ },
+ "main": "dist/index.js",
+ "types": "dist/index.d.ts",
+ "author": {
+ "name": "OpenLens Authors",
+ "email": "info@k8slens.dev"
+ },
+ "license": "MIT",
+ "homepage": "https://github.com/lensapp/lens",
+ "scripts": {
+ "build": "lens-webpack-build",
+ "clean": "rimraf dist/",
+ "dev": "webpack --mode=development --watch",
+ "test": "jest --coverage --runInBand",
+ "lint": "lens-lint",
+ "lint:fix": "lens-lint --fix"
+ },
+ "peerDependencies": {
+ "@k8slens/application": "^6.5.0-alpha.2",
+ "@k8slens/feature-core": "^6.5.0-alpha.0",
+ "@k8slens/utilities": "^1.0.0-alpha.7",
+ "@kubernetes/client-node": "^0.18.1",
+ "@ogre-tools/fp": "^17.2.0",
+ "@ogre-tools/injectable": "^17.2.0",
+ "@ogre-tools/injectable-extension-for-auto-registration": "^17.2.0",
+ "@ogre-tools/injectable-extension-for-mobx": "^17.2.0"
+ },
+ "devDependencies": {
+ "@k8slens/eslint-config": "^6.5.0-alpha.3",
+ "@k8slens/jest": "^6.5.0-alpha.5",
+ "@k8slens/typescript": "^6.5.0-alpha.3",
+ "@k8slens/webpack": "^6.5.0-alpha.9"
+ }
+}
diff --git a/packages/technical-features/prometheus/src/feature.ts b/packages/technical-features/prometheus/src/feature.ts
new file mode 100644
index 0000000000..1a6b24eaa7
--- /dev/null
+++ b/packages/technical-features/prometheus/src/feature.ts
@@ -0,0 +1,17 @@
+import { getFeature } from "@k8slens/feature-core";
+import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration";
+import { applicationFeature } from "@k8slens/application";
+
+export const prometheusFeature = getFeature({
+ id: "prometheus",
+
+ register: (di) => {
+ autoRegister({
+ di,
+ targetModule: module,
+ getRequireContexts: () => [require.context("./", true, /\.injectable\.(ts|tsx)$/)],
+ });
+ },
+
+ dependencies: [applicationFeature],
+});
diff --git a/packages/core/src/main/prometheus/helm-14-provider.injectable.ts b/packages/technical-features/prometheus/src/helm-14-provider.injectable.ts
similarity index 65%
rename from packages/core/src/main/prometheus/helm-14-provider.injectable.ts
rename to packages/technical-features/prometheus/src/helm-14-provider.injectable.ts
index 6cc66c519e..35d55abe7d 100644
--- a/packages/core/src/main/prometheus/helm-14-provider.injectable.ts
+++ b/packages/technical-features/prometheus/src/helm-14-provider.injectable.ts
@@ -9,15 +9,15 @@ import { getInjectable } from "@ogre-tools/injectable";
const helm14PrometheusProviderInjectable = getInjectable({
id: "helm14-prometheus-provider",
- instantiate: () => createPrometheusProvider({
- kind: "helm14",
- name: "Helm 14.x",
- isConfigurable: true,
- getQuery: getLensLikeQueryFor({ rateAccuracy: "5m" }),
- getService: (client) => findFirstNamespacedService(client, "app=prometheus,component=server,heritage=Helm"),
- }),
+ instantiate: () =>
+ createPrometheusProvider({
+ kind: "helm14",
+ name: "Helm 14.x",
+ isConfigurable: true,
+ getQuery: getLensLikeQueryFor({ rateAccuracy: "5m" }),
+ getService: (client) => findFirstNamespacedService(client, "app=prometheus,component=server,heritage=Helm"),
+ }),
injectionToken: prometheusProviderInjectionToken,
});
export default helm14PrometheusProviderInjectable;
-
diff --git a/packages/core/src/main/prometheus/helm-provider.injectable.ts b/packages/technical-features/prometheus/src/helm-provider.injectable.ts
similarity index 91%
rename from packages/core/src/main/prometheus/helm-provider.injectable.ts
rename to packages/technical-features/prometheus/src/helm-provider.injectable.ts
index 953bd68277..ac6b46d4e4 100644
--- a/packages/core/src/main/prometheus/helm-provider.injectable.ts
+++ b/packages/technical-features/prometheus/src/helm-provider.injectable.ts
@@ -4,16 +4,25 @@
*/
import type { PrometheusProvider } from "./provider";
-import { createPrometheusProvider, bytesSent, findFirstNamespacedService, prometheusProviderInjectionToken } from "./provider";
+import {
+ createPrometheusProvider,
+ bytesSent,
+ findFirstNamespacedService,
+ prometheusProviderInjectionToken,
+} from "./provider";
import { getInjectable } from "@ogre-tools/injectable";
-export const getHelmLikeQueryFor = ({ rateAccuracy }: { rateAccuracy: string }): PrometheusProvider["getQuery"] => (
+export const getHelmLikeQueryFor =
+ ({ rateAccuracy }: { rateAccuracy: string }): PrometheusProvider["getQuery"] =>
(opts, queryName) => {
- switch(opts.category) {
+ switch (opts.category) {
case "cluster":
switch (queryName) {
case "memoryUsage":
- return `sum(node_memory_MemTotal_bytes - (node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes)) by (component)`.replace(/_bytes/g, `_bytes{node=~"${opts.nodes}"}`);
+ return `sum(node_memory_MemTotal_bytes - (node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes)) by (component)`.replace(
+ /_bytes/g,
+ `_bytes{node=~"${opts.nodes}"}`,
+ );
case "workloadMemoryUsage":
return `sum(container_memory_working_set_bytes{container!="POD",container!="",instance=~"${opts.nodes}"}) by (component)`;
case "memoryRequests":
@@ -127,20 +136,19 @@ export const getHelmLikeQueryFor = ({ rateAccuracy }: { rateAccuracy: string }):
}
throw new Error(`Unknown queryName="${queryName}" for category="${opts.category}"`);
- }
-);
+ };
const helmPrometheusProviderInjectable = getInjectable({
id: "helm-prometheus-provider",
- instantiate: () => createPrometheusProvider({
- kind: "helm",
- name: "Helm",
- isConfigurable: true,
- getQuery: getHelmLikeQueryFor({ rateAccuracy: "5m" }),
- getService: (client) => findFirstNamespacedService(client, "app=prometheus,component=server,heritage=Helm"),
- }),
+ instantiate: () =>
+ createPrometheusProvider({
+ kind: "helm",
+ name: "Helm",
+ isConfigurable: true,
+ getQuery: getHelmLikeQueryFor({ rateAccuracy: "5m" }),
+ getService: (client) => findFirstNamespacedService(client, "app=prometheus,component=server,heritage=Helm"),
+ }),
injectionToken: prometheusProviderInjectionToken,
});
export default helmPrometheusProviderInjectable;
-
diff --git a/packages/core/src/main/prometheus/lens-provider.injectable.ts b/packages/technical-features/prometheus/src/lens-provider.injectable.ts
similarity index 91%
rename from packages/core/src/main/prometheus/lens-provider.injectable.ts
rename to packages/technical-features/prometheus/src/lens-provider.injectable.ts
index c523c72582..cb8b7bbf5a 100644
--- a/packages/core/src/main/prometheus/lens-provider.injectable.ts
+++ b/packages/technical-features/prometheus/src/lens-provider.injectable.ts
@@ -3,17 +3,26 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
-import { bytesSent, prometheusProviderInjectionToken, findNamespacedService, createPrometheusProvider } from "./provider";
-import type { PrometheusProvider } from "./provider";
+import {
+ bytesSent,
+ prometheusProviderInjectionToken,
+ findNamespacedService,
+ createPrometheusProvider,
+} from "./provider";
+import type { PrometheusProvider } from "./provider";
import { getInjectable } from "@ogre-tools/injectable";
-export const getLensLikeQueryFor = ({ rateAccuracy }: { rateAccuracy: string }): PrometheusProvider["getQuery"] => (
+export const getLensLikeQueryFor =
+ ({ rateAccuracy }: { rateAccuracy: string }): PrometheusProvider["getQuery"] =>
(opts, queryName) => {
- switch(opts.category) {
+ switch (opts.category) {
case "cluster":
switch (queryName) {
case "memoryUsage":
- return `sum(node_memory_MemTotal_bytes - (node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes)) by (kubernetes_name)`.replace(/_bytes/g, `_bytes{kubernetes_node=~"${opts.nodes}"}`);
+ return `sum(node_memory_MemTotal_bytes - (node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes)) by (kubernetes_name)`.replace(
+ /_bytes/g,
+ `_bytes{kubernetes_node=~"${opts.nodes}"}`,
+ );
case "workloadMemoryUsage":
return `sum(container_memory_working_set_bytes{container!="POD",container!="",instance=~"${opts.nodes}"}) by (component)`;
case "memoryRequests":
@@ -127,20 +136,19 @@ export const getLensLikeQueryFor = ({ rateAccuracy }: { rateAccuracy: string }):
}
throw new Error(`Unknown queryName="${queryName}" for category="${opts.category}"`);
- }
-);
+ };
const lensPrometheusProviderInjectable = getInjectable({
id: "lens-prometheus-provider",
- instantiate: () => createPrometheusProvider({
- kind: "lens",
- name: "Lens",
- isConfigurable: false,
- getQuery: getLensLikeQueryFor({ rateAccuracy: "1m" }),
- getService: (client) => findNamespacedService(client, "prometheus", "lens-metrics"),
- }),
+ instantiate: () =>
+ createPrometheusProvider({
+ kind: "lens",
+ name: "Lens",
+ isConfigurable: false,
+ getQuery: getLensLikeQueryFor({ rateAccuracy: "1m" }),
+ getService: (client) => findNamespacedService(client, "prometheus", "lens-metrics"),
+ }),
injectionToken: prometheusProviderInjectionToken,
});
export default lensPrometheusProviderInjectable;
-
diff --git a/packages/core/src/main/prometheus/operator-provider.injectable.ts.ts b/packages/technical-features/prometheus/src/operator-provider.injectable.ts.ts
similarity index 91%
rename from packages/core/src/main/prometheus/operator-provider.injectable.ts.ts
rename to packages/technical-features/prometheus/src/operator-provider.injectable.ts.ts
index 5215f2dff2..d8da7255b6 100644
--- a/packages/core/src/main/prometheus/operator-provider.injectable.ts.ts
+++ b/packages/technical-features/prometheus/src/operator-provider.injectable.ts.ts
@@ -4,16 +4,25 @@
*/
import type { PrometheusProvider } from "./provider";
-import { bytesSent, createPrometheusProvider, findFirstNamespacedService, prometheusProviderInjectionToken } from "./provider";
+import {
+ bytesSent,
+ createPrometheusProvider,
+ findFirstNamespacedService,
+ prometheusProviderInjectionToken,
+} from "./provider";
import { getInjectable } from "@ogre-tools/injectable";
-export const getOperatorLikeQueryFor = ({ rateAccuracy }: { rateAccuracy: string }): PrometheusProvider["getQuery"] => (
+export const getOperatorLikeQueryFor =
+ ({ rateAccuracy }: { rateAccuracy: string }): PrometheusProvider["getQuery"] =>
(opts, queryName) => {
- switch(opts.category) {
+ switch (opts.category) {
case "cluster":
switch (queryName) {
case "memoryUsage":
- return `sum(node_memory_MemTotal_bytes - (node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes))`.replace(/_bytes/g, `_bytes * on (pod,namespace) group_left(node) kube_pod_info{node=~"${opts.nodes}"}`);
+ return `sum(node_memory_MemTotal_bytes - (node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes))`.replace(
+ /_bytes/g,
+ `_bytes * on (pod,namespace) group_left(node) kube_pod_info{node=~"${opts.nodes}"}`,
+ );
case "workloadMemoryUsage":
return `sum(container_memory_working_set_bytes{container!="", instance=~"${opts.nodes}"}) by (component)`;
case "memoryRequests":
@@ -127,20 +136,19 @@ export const getOperatorLikeQueryFor = ({ rateAccuracy }: { rateAccuracy: string
}
throw new Error(`Unknown queryName="${queryName}" for category="${opts.category}"`);
- }
-);
+ };
const operatorPrometheusProviderInjectable = getInjectable({
id: "operator-prometheus-provider",
- instantiate: () => createPrometheusProvider({
- kind: "operator",
- name: "Prometheus Operator",
- isConfigurable: true,
- getService: (client) => findFirstNamespacedService(client, "operated-prometheus=true"),
- getQuery: getOperatorLikeQueryFor({ rateAccuracy: "1m" }),
- }),
+ instantiate: () =>
+ createPrometheusProvider({
+ kind: "operator",
+ name: "Prometheus Operator",
+ isConfigurable: true,
+ getService: (client) => findFirstNamespacedService(client, "operated-prometheus=true"),
+ getQuery: getOperatorLikeQueryFor({ rateAccuracy: "1m" }),
+ }),
injectionToken: prometheusProviderInjectionToken,
});
export default operatorPrometheusProviderInjectable;
-
diff --git a/packages/core/src/main/prometheus/provider.ts b/packages/technical-features/prometheus/src/provider.ts
similarity index 73%
rename from packages/core/src/main/prometheus/provider.ts
rename to packages/technical-features/prometheus/src/provider.ts
index 5bd9588a06..ad38958be8 100644
--- a/packages/core/src/main/prometheus/provider.ts
+++ b/packages/technical-features/prometheus/src/provider.ts
@@ -35,13 +35,16 @@ export interface CreatePrometheusProviderOpts {
getService(client: CoreV1Api): Promise;
}
-export const createPrometheusProvider = ({ getService, ...opts }: CreatePrometheusProviderOpts): PrometheusProvider => ({
+export const createPrometheusProvider = ({
+ getService,
+ ...opts
+}: CreatePrometheusProviderOpts): PrometheusProvider => ({
...opts,
getPrometheusService: async (client) => {
try {
return {
kind: opts.kind,
- ...await getService(client),
+ ...(await getService(client)),
};
} catch (error) {
throw new Error(`Failed to find Prometheus provider for "${opts.name}"`, { cause: error });
@@ -49,10 +52,17 @@ export const createPrometheusProvider = ({ getService, ...opts }: CreatePromethe
},
});
-export async function findFirstNamespacedService(client: CoreV1Api, ...selectors: string[]): Promise {
+export async function findFirstNamespacedService(
+ client: CoreV1Api,
+ ...selectors: string[]
+): Promise {
try {
for (const selector of selectors) {
- const { body: { items: [service] }} = await client.listServiceForAllNamespaces(undefined, undefined, undefined, selector);
+ const {
+ body: {
+ items: [service],
+ },
+ } = await client.listServiceForAllNamespaces(undefined, undefined, undefined, selector);
if (service?.metadata?.namespace && service.metadata.name && service.spec?.ports) {
return {
@@ -63,13 +73,19 @@ export async function findFirstNamespacedService(client: CoreV1Api, ...selectors
}
}
} catch (error) {
- throw new Error(`Failed to list services in all namespaces: ${isRequestError(error) ? error.response?.body.message : error}`);
+ throw new Error(
+ `Failed to list services in all namespaces: ${isRequestError(error) ? error.response?.body.message : error}`,
+ );
}
throw new Error(`No service found from any namespace`);
}
-export async function findNamespacedService(client: CoreV1Api, name: string, namespace: string): Promise {
+export async function findNamespacedService(
+ client: CoreV1Api,
+ name: string,
+ namespace: string,
+): Promise {
try {
const { body: service } = await client.readNamespacedService(name, namespace);
@@ -82,8 +98,12 @@ export async function findNamespacedService(client: CoreV1Api, name: string, nam
service: service.metadata.name,
port: service.spec.ports[0].port,
};
- } catch(error) {
- throw new Error(`Failed to list services in namespace="${namespace}": ${isRequestError(error) ? error.response?.body.message : error}`);
+ } catch (error) {
+ throw new Error(
+ `Failed to list services in namespace="${namespace}": ${
+ isRequestError(error) ? error.response?.body.message : error
+ }`,
+ );
}
}
diff --git a/packages/core/src/main/prometheus/stacklight-provider.injectable.ts b/packages/technical-features/prometheus/src/stacklight-provider.injectable.ts
similarity index 91%
rename from packages/core/src/main/prometheus/stacklight-provider.injectable.ts
rename to packages/technical-features/prometheus/src/stacklight-provider.injectable.ts
index ca7a946466..36979d36ea 100644
--- a/packages/core/src/main/prometheus/stacklight-provider.injectable.ts
+++ b/packages/technical-features/prometheus/src/stacklight-provider.injectable.ts
@@ -4,16 +4,25 @@
*/
import type { PrometheusProvider } from "./provider";
-import { bytesSent, createPrometheusProvider, findFirstNamespacedService, prometheusProviderInjectionToken } from "./provider";
+import {
+ bytesSent,
+ createPrometheusProvider,
+ findFirstNamespacedService,
+ prometheusProviderInjectionToken,
+} from "./provider";
import { getInjectable } from "@ogre-tools/injectable";
-export const getStacklightLikeQueryFor = ({ rateAccuracy }: { rateAccuracy: string }): PrometheusProvider["getQuery"] => (
+export const getStacklightLikeQueryFor =
+ ({ rateAccuracy }: { rateAccuracy: string }): PrometheusProvider["getQuery"] =>
(opts, queryName) => {
- switch(opts.category) {
+ switch (opts.category) {
case "cluster":
switch (queryName) {
case "memoryUsage":
- return `sum(node_memory_MemTotal_bytes - (node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes)) by (kubernetes_name)`.replace(/_bytes/g, `_bytes{node=~"${opts.nodes}"}`);
+ return `sum(node_memory_MemTotal_bytes - (node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes)) by (kubernetes_name)`.replace(
+ /_bytes/g,
+ `_bytes{node=~"${opts.nodes}"}`,
+ );
case "workloadMemoryUsage":
return `sum(container_memory_working_set_bytes{container!="POD",container!="",instance=~"${opts.nodes}"}) by (component)`;
case "memoryRequests":
@@ -127,20 +136,19 @@ export const getStacklightLikeQueryFor = ({ rateAccuracy }: { rateAccuracy: stri
}
throw new Error(`Unknown queryName="${queryName}" for category="${opts.category}"`);
- }
-);
+ };
const stacklightPrometheusProviderInjectable = getInjectable({
id: "stacklight-prometheus-provider",
- instantiate: () => createPrometheusProvider({
- kind: "stacklight",
- name: "Stacklight",
- isConfigurable: true,
- getService: (client) => findFirstNamespacedService(client, "prometheus-server", "stacklight"),
- getQuery: getStacklightLikeQueryFor({ rateAccuracy: "1m" }),
- }),
+ instantiate: () =>
+ createPrometheusProvider({
+ kind: "stacklight",
+ name: "Stacklight",
+ isConfigurable: true,
+ getService: (client) => findFirstNamespacedService(client, "prometheus-server", "stacklight"),
+ getQuery: getStacklightLikeQueryFor({ rateAccuracy: "1m" }),
+ }),
injectionToken: prometheusProviderInjectionToken,
});
export default stacklightPrometheusProviderInjectable;
-
diff --git a/packages/technical-features/prometheus/tsconfig.json b/packages/technical-features/prometheus/tsconfig.json
new file mode 100644
index 0000000000..2b0f0e5603
--- /dev/null
+++ b/packages/technical-features/prometheus/tsconfig.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@k8slens/typescript/config/base.json",
+ "include": ["**/*.ts"]
+ }
diff --git a/packages/technical-features/prometheus/webpack.config.js b/packages/technical-features/prometheus/webpack.config.js
new file mode 100644
index 0000000000..3183f30179
--- /dev/null
+++ b/packages/technical-features/prometheus/webpack.config.js
@@ -0,0 +1 @@
+module.exports = require("@k8slens/webpack").configForNode;
From 8b69c12ed4b2c48e3d493e75f7376f22237fddec Mon Sep 17 00:00:00 2001
From: Gabriel
Date: Thu, 1 Jun 2023 19:10:29 +0200
Subject: [PATCH 4/6] chore: extract @k8slens/notifications
Signed-off-by: Gabriel
---
open-lens/src/main/index.ts | 2 +
open-lens/src/renderer/index.ts | 3 +
package-lock.json | 41 ++++++++++++
package.json | 1 +
packages/core/package.json | 1 +
.../src/extensions/renderer-api/components.ts | 19 +++---
.../selection-of-update-stability.test.ts | 2 +-
.../edit-namespace-from-new-tab.test.tsx | 5 +-
...tom-helm-repository-in-preferences.test.ts | 3 +-
...epository-from-list-in-preferences.test.ts | 3 +-
.../active-helm-repositories.injectable.ts | 2 +-
.../add-helm-repository.injectable.ts | 3 +-
...e-helm-repositories-in-preferences.test.ts | 2 +-
.../showing-details-for-helm-release.test.ts | 5 +-
.../features/pod-logs/download-logs.test.tsx | 2 +-
.../renderer/failure-listener.injectable.ts | 2 +-
packages/core/src/main/getDiForUnitTesting.ts | 2 +
.../components/add-cluster/add-cluster.tsx | 5 +-
.../renderer/components/catalog/catalog.tsx | 4 +-
.../cluster-local-terminal-settings.test.tsx | 2 +-
.../cluster-settings/icon-settings.tsx | 4 +-
.../local-terminal-settings.tsx | 4 +-
.../config-maps/config-map-details.tsx | 5 +-
.../add-dialog/view.tsx | 4 +-
.../config-secrets/add-dialog/view.tsx | 4 +-
.../config-secrets/secret-details.tsx | 6 +-
.../confirm-dialog/confirm-dialog.tsx | 4 +-
.../components/delete-cluster-dialog/view.tsx | 4 +-
.../components/dialog/logs-dialog.tsx | 4 +-
.../components/dock/create-resource/view.tsx | 6 +-
.../edit-resource-model.injectable.tsx | 5 +-
.../renderer/components/dock/info-panel.tsx | 6 +-
.../dock/logs/download-all-logs.injectable.ts | 2 +-
.../dock/terminal/send-command.injectable.ts | 2 +-
.../attempt-install-by-info.injectable.tsx | 2 +-
.../attempt-install.injectable.tsx | 5 +-
...ate-temp-files-and-validate.injectable.tsx | 2 +-
.../unpack-extension.injectable.tsx | 3 +-
.../get-base-registry-url.injectable.tsx | 2 +-
...nstall-extension-from-input.injectable.tsx | 2 +-
.../read-file-notify.injectable.ts | 2 +-
.../uninstall-extension.injectable.tsx | 3 +-
.../helm-releases/dialog/dialog.tsx | 4 +-
.../release-details-model.injectable.tsx | 6 +-
.../kubeconfig-dialog/kubeconfig-dialog.tsx | 4 +-
.../kubeconfig-dialog/open.injectable.ts | 2 +-
.../namespaces/add-dialog/dialog.tsx | 4 +-
.../port-forward-menu.tsx | 4 +-
.../service-port-component.tsx | 4 +-
.../components/notifications/index.ts | 7 --
.../cluster-role-bindings/dialog/view.tsx | 4 +-
.../cluster-roles/add-dialog/view.tsx | 4 +-
.../role-bindings/dialog/view.tsx | 4 +-
.../user-management/roles/add-dialog/view.tsx | 4 +-
.../service-accounts/create-dialog/view.tsx | 4 +-
.../workloads-cronjobs/cron-job-menu.tsx | 4 +-
.../trigger-dialog/view.tsx | 6 +-
.../workloads-daemonsets/daemonset-menu.tsx | 4 +-
.../workloads-deployments/deployment-menu.tsx | 4 +-
.../workloads-deployments/scale/dialog.tsx | 4 +-
...oad-pods-from-all-namespaces.injectable.ts | 2 +-
.../workloads-pods/pod-container-port.tsx | 4 +-
.../scale-dialog/dialog.tsx | 4 +-
.../replication-controller-details.tsx | 4 +-
.../workloads-statefulsets/scale/dialog.tsx | 4 +-
.../statefulset-menu.tsx | 4 +-
.../init-cluster-frame.injectable.ts | 2 +-
.../init-cluster-frame/init-cluster-frame.ts | 2 +-
.../core/src/renderer/getDiForUnitTesting.tsx | 2 +
.../add-sync-entries.injectable.tsx | 2 +-
...amespaces-forbidden-handler.injectable.tsx | 3 +-
.../ipc/register-ipc-listeners.injectable.ts | 2 +-
.../src/renderer/k8s/api-kube.injectable.ts | 2 +-
.../about-port-forwarding.injectable.tsx | 2 +-
...otify-error-port-forwarding.injectable.tsx | 2 +-
.../open-port-forward.injectable.ts | 2 +-
...-protocol-add-route-handlers.injectable.ts | 2 +-
.../bind-protocol-add-route-handlers.tsx | 2 +-
...ens-protocol-router-renderer.injectable.ts | 3 +-
.../lens-protocol-router-renderer.tsx | 2 +-
.../notifications/.eslintrc.json | 6 ++
.../ui-components/notifications/.prettierrc | 1 +
.../ui-components/notifications/CHANGELOG.md | 4 ++
.../ui-components/notifications/README.md | 19 ++++++
packages/ui-components/notifications/index.ts | 25 +++++++
.../notifications/jest.config.js | 3 +
.../ui-components/notifications/package.json | 66 +++++++++++++++++++
.../notifications/src/feature.ts | 14 ++++
...luster-frame-child-component.injectable.ts | 4 +-
...s-root-frame-child-component.injectable.ts | 4 +-
.../src}/notifications-store.injectable.ts | 4 +-
.../notifications/src}/notifications.scss | 22 +++++--
.../notifications/src}/notifications.store.ts | 8 ++-
.../notifications/src}/notifications.tsx | 23 +++++--
.../src}/show-checked-error.injectable.ts | 12 ++--
.../show-error-notification.injectable.ts | 6 +-
.../src}/show-info-notification.injectable.ts | 6 +-
.../src}/show-short-info.injectable.ts | 6 +-
.../show-success-notification.injectable.ts | 6 +-
.../notifications/tailwind.config.js | 28 ++++++++
.../ui-components/notifications/tsconfig.json | 4 ++
.../notifications/webpack.config.js | 1 +
102 files changed, 399 insertions(+), 192 deletions(-)
delete mode 100644 packages/core/src/renderer/components/notifications/index.ts
create mode 100644 packages/ui-components/notifications/.eslintrc.json
create mode 100644 packages/ui-components/notifications/.prettierrc
create mode 100644 packages/ui-components/notifications/CHANGELOG.md
create mode 100644 packages/ui-components/notifications/README.md
create mode 100644 packages/ui-components/notifications/index.ts
create mode 100644 packages/ui-components/notifications/jest.config.js
create mode 100644 packages/ui-components/notifications/package.json
create mode 100644 packages/ui-components/notifications/src/feature.ts
rename packages/{core/src/renderer/components/notifications => ui-components/notifications/src}/notifications-cluster-frame-child-component.injectable.ts (81%)
rename packages/{core/src/renderer/components/notifications => ui-components/notifications/src}/notifications-root-frame-child-component.injectable.ts (81%)
rename packages/{core/src/renderer/components/notifications => ui-components/notifications/src}/notifications-store.injectable.ts (77%)
rename packages/{core/src/renderer/components/notifications => ui-components/notifications/src}/notifications.scss (73%)
rename packages/{core/src/renderer/components/notifications => ui-components/notifications/src}/notifications.store.ts (93%)
rename packages/{core/src/renderer/components/notifications => ui-components/notifications/src}/notifications.tsx (85%)
rename packages/{core/src/renderer/components/notifications => ui-components/notifications/src}/show-checked-error.injectable.ts (76%)
rename packages/{core/src/renderer/components/notifications => ui-components/notifications/src}/show-error-notification.injectable.ts (77%)
rename packages/{core/src/renderer/components/notifications => ui-components/notifications/src}/show-info-notification.injectable.ts (78%)
rename packages/{core/src/renderer/components/notifications => ui-components/notifications/src}/show-short-info.injectable.ts (74%)
rename packages/{core/src/renderer/components/notifications => ui-components/notifications/src}/show-success-notification.injectable.ts (78%)
create mode 100644 packages/ui-components/notifications/tailwind.config.js
create mode 100644 packages/ui-components/notifications/tsconfig.json
create mode 100644 packages/ui-components/notifications/webpack.config.js
diff --git a/open-lens/src/main/index.ts b/open-lens/src/main/index.ts
index 8a90aaca46..631bec505f 100644
--- a/open-lens/src/main/index.ts
+++ b/open-lens/src/main/index.ts
@@ -15,6 +15,7 @@ import { loggerFeature } from "@k8slens/logger";
import { randomFeature } from "@k8slens/random";
import { kubeApiSpecificsFeature } from "@k8slens/kube-api-specifics";
import { prometheusFeature } from "@k8slens/prometheus";
+import { notificationsFeature } from "@k8slens/notifications";
const environment = "main";
@@ -36,6 +37,7 @@ runInAction(() => {
messagingFeatureForMain,
randomFeature,
kubeApiSpecificsFeature,
+ notificationsFeature,
);
try {
diff --git a/open-lens/src/renderer/index.ts b/open-lens/src/renderer/index.ts
index 0525f968e8..bfcb814a8a 100644
--- a/open-lens/src/renderer/index.ts
+++ b/open-lens/src/renderer/index.ts
@@ -5,6 +5,7 @@ import "@k8slens/tooltip/styles";
import "@k8slens/resizing-anchor/styles";
import "@k8slens/icon/styles";
import "@k8slens/animate/styles";
+import "@k8slens/notifications/styles";
import { runInAction } from "mobx";
import {
@@ -31,6 +32,7 @@ import { animateFeature } from "@k8slens/animate";
import { clusterSidebarFeature } from "@k8slens/cluster-sidebar";
import { randomFeature } from "@k8slens/random";
import { kubeApiSpecificsFeature } from "@k8slens/kube-api-specifics";
+import { notificationsFeature } from "@k8slens/notifications";
const environment = "renderer";
@@ -60,6 +62,7 @@ runInAction(() => {
clusterSidebarFeature,
randomFeature,
kubeApiSpecificsFeature,
+ notificationsFeature,
);
autoRegister({
diff --git a/package-lock.json b/package-lock.json
index eb92446d12..5062762ffd 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3835,6 +3835,10 @@
"resolved": "packages/technical-features/prometheus",
"link": true
},
+ "node_modules/@k8slens/notifications": {
+ "resolved": "packages/ui-components/notifications",
+ "link": true
+ },
"node_modules/@k8slens/random": {
"resolved": "packages/random-id",
"link": true
@@ -34341,6 +34345,7 @@
"@k8slens/metrics": "^6.5.0-alpha.7",
"@k8slens/node-fetch": "^6.5.0-alpha.3",
"@k8slens/prometheus": "^1.0.0",
+ "@k8slens/notifications": "^1.0.0",
"@k8slens/random": "^1.0.0",
"@k8slens/react-application": "^1.0.0-alpha.5",
"@k8slens/resizing-anchor": "^1.0.0-alpha.5",
@@ -35711,6 +35716,42 @@
"winston": "^3.8.2"
}
},
+ "packages/ui-components/notifications": {
+ "name": "@k8slens/notifications",
+ "version": "1.0.0",
+ "license": "MIT",
+ "devDependencies": {
+ "@k8slens/eslint-config": "^6.5.0",
+ "@k8slens/webpack": "^6.5.0"
+ },
+ "peerDependencies": {
+ "@k8slens/animate": "^1.0.0-alpha.0",
+ "@k8slens/application": "^6.5.0",
+ "@k8slens/event-emitter": "^1.0.0",
+ "@k8slens/feature-core": "^6.5.0-alpha.0",
+ "@k8slens/icon": "^1.0.0-alpha.7",
+ "@k8slens/json-api": "^1.0.0-alpha.3",
+ "@k8slens/logger": "^1.0.0",
+ "@k8slens/react-application": "^1.0.0-alpha.5",
+ "@k8slens/run-many": "^1.0.0",
+ "@k8slens/tooltip": "^1.0.0",
+ "@k8slens/utilities": "^1.0.0-alpha.1",
+ "@ogre-tools/fp": "^17.2.0",
+ "@ogre-tools/injectable": "^17.2.0",
+ "@ogre-tools/injectable-extension-for-auto-registration": "^17.2.0",
+ "@ogre-tools/injectable-extension-for-mobx": "^17.2.0",
+ "@ogre-tools/injectable-react": "^17.2.0",
+ "auto-bind": "^4.0.0",
+ "lodash": "^4.17.21",
+ "mobx": "^6.8.0",
+ "mobx-react": "^7.6.0",
+ "react": "^17.0.2",
+ "react-dom": "^17.0.2",
+ "react-router-dom": "^5.3.4",
+ "uuid": "^8.3.2",
+ "winston": "^3.8.2"
+ }
+ },
"packages/ui-components/resizing-anchor": {
"name": "@k8slens/resizing-anchor",
"version": "1.0.0",
diff --git a/package.json b/package.json
index d2e809bb04..6b6e75c4a9 100644
--- a/package.json
+++ b/package.json
@@ -27,6 +27,7 @@
"mkdocs:serve-local": "docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest",
"mkdocs:verify": "docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict",
"test:unit": "lerna run --stream test:unit --no-bail",
+ "test:unit:updatesnapshot": "lerna run --stream test:unit --no-bail -- -u",
"test:unit:watch": "jest --watch",
"test:integration": "lerna run --stream test:integration --no-bail",
"bump-version": "lerna version --no-git-tag-version --no-push",
diff --git a/packages/core/package.json b/packages/core/package.json
index 47538264d4..59a4d351cc 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -207,6 +207,7 @@
"@hapi/call": "^9.0.1",
"@hapi/subtext": "^7.1.0",
"@k8slens/animate": "^1.0.0-alpha.0",
+ "@k8slens/notifications": "^1.0.0",
"@k8slens/application": "^6.5.0-alpha.0",
"@k8slens/application-for-electron-main": "^6.5.0-alpha.0",
"@k8slens/button": "^1.0.0-alpha.5",
diff --git a/packages/core/src/extensions/renderer-api/components.ts b/packages/core/src/extensions/renderer-api/components.ts
index 36ce3bba0a..1ab3e6295d 100644
--- a/packages/core/src/extensions/renderer-api/components.ts
+++ b/packages/core/src/extensions/renderer-api/components.ts
@@ -16,15 +16,18 @@ import { ConfirmDialog as _ConfirmDialog } from "../../renderer/components/confi
import type { ConfirmDialogBooleanParams, ConfirmDialogParams, ConfirmDialogProps } from "../../renderer/components/confirm-dialog";
import openConfirmDialogInjectable from "../../renderer/components/confirm-dialog/open.injectable";
import confirmInjectable from "../../renderer/components/confirm-dialog/confirm.injectable";
-import notificationsStoreInjectable from "../../renderer/components/notifications/notifications-store.injectable";
+import {
+ notificationsStoreInjectable,
+ showCheckedErrorNotificationInjectable,
+ showErrorNotificationInjectable,
+ showInfoNotificationInjectable,
+ showShortInfoNotificationInjectable,
+ showSuccessNotificationInjectable,
+} from "@k8slens/notifications";
import podStoreInjectable from "../../renderer/components/workloads-pods/store.injectable";
import getDetailsUrlInjectable from "../../renderer/components/kube-detail-params/get-details-url.injectable";
import showDetailsInjectable from "../../renderer/components/kube-detail-params/show-details.injectable";
-import showCheckedErrorNotificationInjectable from "../../renderer/components/notifications/show-checked-error.injectable";
-import showErrorNotificationInjectable from "../../renderer/components/notifications/show-error-notification.injectable";
-import showInfoNotificationInjectable from "../../renderer/components/notifications/show-info-notification.injectable";
-import showShortInfoNotificationInjectable from "../../renderer/components/notifications/show-short-info.injectable";
-import showSuccessNotificationInjectable from "../../renderer/components/notifications/show-success-notification.injectable";
+
// layouts
export * from "../../renderer/components/layout/main-layout";
@@ -72,14 +75,14 @@ export * from "../../renderer/components/line-progress";
export * from "../../renderer/components/menu";
export {
- NotificationStatus,
+ type NotificationStatus,
type CreateNotificationOptions,
type Notification,
type NotificationId,
type NotificationMessage,
type ShowNotification,
type NotificationsStore,
-} from "../../renderer/components/notifications";
+} from"@k8slens/notifications";
export const Notifications = {
ok: asLegacyGlobalFunctionForExtensionApi(showSuccessNotificationInjectable),
diff --git a/packages/core/src/features/application-update/child-features/selection-of-update-stability/selection-of-update-stability.test.ts b/packages/core/src/features/application-update/child-features/selection-of-update-stability/selection-of-update-stability.test.ts
index 05785faf38..deb3d9d88a 100644
--- a/packages/core/src/features/application-update/child-features/selection-of-update-stability/selection-of-update-stability.test.ts
+++ b/packages/core/src/features/application-update/child-features/selection-of-update-stability/selection-of-update-stability.test.ts
@@ -19,7 +19,7 @@ import downloadPlatformUpdateInjectable from "../../main/download-update/downloa
import selectedUpdateChannelInjectable from "../../common/selected-update-channel.injectable";
import type { IComputedValue } from "mobx";
import setUpdateOnQuitInjectable from "../../../../main/electron-app/features/set-update-on-quit.injectable";
-import showInfoNotificationInjectable from "../../../../renderer/components/notifications/show-info-notification.injectable";
+import { showInfoNotificationInjectable } from "@k8slens/notifications";
import processCheckingForUpdatesInjectable from "../../main/process-checking-for-updates.injectable";
import type { DiContainer } from "@ogre-tools/injectable";
import getBuildVersionInjectable
diff --git a/packages/core/src/features/cluster/namespaces/edit-namespace-from-new-tab.test.tsx b/packages/core/src/features/cluster/namespaces/edit-namespace-from-new-tab.test.tsx
index 9ceeb46f69..254c8790db 100644
--- a/packages/core/src/features/cluster/namespaces/edit-namespace-from-new-tab.test.tsx
+++ b/packages/core/src/features/cluster/namespaces/edit-namespace-from-new-tab.test.tsx
@@ -14,8 +14,7 @@ import type { AsyncFnMock } from "@async-fn/jest";
import asyncFn from "@async-fn/jest";
import dockStoreInjectable from "../../../renderer/components/dock/dock/store.injectable";
import { Namespace } from "@k8slens/kube-object";
-import showSuccessNotificationInjectable from "../../../renderer/components/notifications/show-success-notification.injectable";
-import showErrorNotificationInjectable from "../../../renderer/components/notifications/show-error-notification.injectable";
+import { showSuccessNotificationInjectable, showErrorNotificationInjectable } from "@k8slens/notifications";
import readJsonFileInjectable from "../../../common/fs/read-json-file.injectable";
import directoryForLensLocalStorageInjectable from "../../../common/directory-for-lens-local-storage/directory-for-lens-local-storage.injectable";
import hostedClusterIdInjectable from "../../../renderer/cluster-frame-context/hosted-cluster-id.injectable";
@@ -25,7 +24,7 @@ import apiKubePatchInjectable from "../../../renderer/k8s/api-kube-patch.injecta
import apiKubeGetInjectable from "../../../renderer/k8s/api-kube-get.injectable";
import type { BaseKubeJsonApiObjectMetadata, KubeObjectScope, KubeJsonApiData } from "@k8slens/kube-object";
import { JsonApiErrorParsed } from "@k8slens/json-api";
-import type { ShowNotification } from "../../../renderer/components/notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import React from "react";
describe("cluster/namespaces - edit namespace from new tab", () => {
diff --git a/packages/core/src/features/helm-charts/add-custom-helm-repository-in-preferences.test.ts b/packages/core/src/features/helm-charts/add-custom-helm-repository-in-preferences.test.ts
index d86fb5978d..4b23744c8a 100644
--- a/packages/core/src/features/helm-charts/add-custom-helm-repository-in-preferences.test.ts
+++ b/packages/core/src/features/helm-charts/add-custom-helm-repository-in-preferences.test.ts
@@ -15,8 +15,7 @@ import getActiveHelmRepositoriesInjectable from "../../main/helm/repositories/ge
import type { HelmRepo } from "../../common/helm/helm-repo";
import requestPublicHelmRepositoriesInjectable from "./child-features/preferences/renderer/adding-of-public-helm-repository/public-helm-repositories/request-public-helm-repositories.injectable";
import isPathInjectable from "../../renderer/components/input/validators/is-path.injectable";
-import showSuccessNotificationInjectable from "../../renderer/components/notifications/show-success-notification.injectable";
-import showErrorNotificationInjectable from "../../renderer/components/notifications/show-error-notification.injectable";
+import { showSuccessNotificationInjectable, showErrorNotificationInjectable } from "@k8slens/notifications";
import type { AsyncResult } from "@k8slens/utilities";
import { testUsingFakeTime } from "../../test-utils/use-fake-time";
diff --git a/packages/core/src/features/helm-charts/add-helm-repository-from-list-in-preferences.test.ts b/packages/core/src/features/helm-charts/add-helm-repository-from-list-in-preferences.test.ts
index 1791d58e98..43e4770a2e 100644
--- a/packages/core/src/features/helm-charts/add-helm-repository-from-list-in-preferences.test.ts
+++ b/packages/core/src/features/helm-charts/add-helm-repository-from-list-in-preferences.test.ts
@@ -13,8 +13,7 @@ import helmBinaryPathInjectable from "../../main/helm/helm-binary-path.injectabl
import getActiveHelmRepositoriesInjectable from "../../main/helm/repositories/get-active-helm-repositories/get-active-helm-repositories.injectable";
import type { HelmRepo } from "../../common/helm/helm-repo";
import requestPublicHelmRepositoriesInjectable from "./child-features/preferences/renderer/adding-of-public-helm-repository/public-helm-repositories/request-public-helm-repositories.injectable";
-import showSuccessNotificationInjectable from "../../renderer/components/notifications/show-success-notification.injectable";
-import showErrorNotificationInjectable from "../../renderer/components/notifications/show-error-notification.injectable";
+import { showSuccessNotificationInjectable, showErrorNotificationInjectable } from "@k8slens/notifications";
import type { AsyncResult } from "@k8slens/utilities";
describe("add helm repository from list in preferences", () => {
diff --git a/packages/core/src/features/helm-charts/child-features/preferences/renderer/active-helm-repositories.injectable.ts b/packages/core/src/features/helm-charts/child-features/preferences/renderer/active-helm-repositories.injectable.ts
index b4195a876f..8ab1f7871f 100644
--- a/packages/core/src/features/helm-charts/child-features/preferences/renderer/active-helm-repositories.injectable.ts
+++ b/packages/core/src/features/helm-charts/child-features/preferences/renderer/active-helm-repositories.injectable.ts
@@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable";
import { asyncComputed } from "@ogre-tools/injectable-react";
import { getActiveHelmRepositoriesChannel } from "../../../../../common/helm/get-active-helm-repositories-channel";
import { requestFromChannelInjectionToken } from "@k8slens/messaging";
-import showErrorNotificationInjectable from "../../../../../renderer/components/notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import helmRepositoriesErrorStateInjectable from "./helm-repositories-error-state.injectable";
import { runInAction } from "mobx";
diff --git a/packages/core/src/features/helm-charts/child-features/preferences/renderer/adding-of-public-helm-repository/select-helm-repository/add-helm-repository.injectable.ts b/packages/core/src/features/helm-charts/child-features/preferences/renderer/adding-of-public-helm-repository/select-helm-repository/add-helm-repository.injectable.ts
index 3c2199c490..98806e1d6d 100644
--- a/packages/core/src/features/helm-charts/child-features/preferences/renderer/adding-of-public-helm-repository/select-helm-repository/add-helm-repository.injectable.ts
+++ b/packages/core/src/features/helm-charts/child-features/preferences/renderer/adding-of-public-helm-repository/select-helm-repository/add-helm-repository.injectable.ts
@@ -6,8 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable";
import type { HelmRepo } from "../../../../../../../common/helm/helm-repo";
import { requestFromChannelInjectionToken } from "@k8slens/messaging";
import activeHelmRepositoriesInjectable from "../../active-helm-repositories.injectable";
-import showErrorNotificationInjectable from "../../../../../../../renderer/components/notifications/show-error-notification.injectable";
-import showSuccessNotificationInjectable from "../../../../../../../renderer/components/notifications/show-success-notification.injectable";
+import { showErrorNotificationInjectable, showSuccessNotificationInjectable } from "@k8slens/notifications";
import { addHelmRepositoryChannel } from "../../../../../../../common/helm/add-helm-repository-channel";
const addHelmRepositoryInjectable = getInjectable({
diff --git a/packages/core/src/features/helm-charts/listing-active-helm-repositories-in-preferences.test.ts b/packages/core/src/features/helm-charts/listing-active-helm-repositories-in-preferences.test.ts
index c554be5390..17143be136 100644
--- a/packages/core/src/features/helm-charts/listing-active-helm-repositories-in-preferences.test.ts
+++ b/packages/core/src/features/helm-charts/listing-active-helm-repositories-in-preferences.test.ts
@@ -15,7 +15,7 @@ import helmBinaryPathInjectable from "../../main/helm/helm-binary-path.injectabl
import { loggerInjectionToken } from "@k8slens/logger";
import type { Logger } from "@k8slens/logger";
import requestPublicHelmRepositoriesInjectable from "./child-features/preferences/renderer/adding-of-public-helm-repository/public-helm-repositories/request-public-helm-repositories.injectable";
-import showErrorNotificationInjectable from "../../renderer/components/notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import { noop } from "@k8slens/utilities";
describe("listing active helm repositories in preferences", () => {
diff --git a/packages/core/src/features/helm-releases/showing-details-for-helm-release.test.ts b/packages/core/src/features/helm-releases/showing-details-for-helm-release.test.ts
index 98a9e54c4c..1d51c2c215 100644
--- a/packages/core/src/features/helm-releases/showing-details-for-helm-release.test.ts
+++ b/packages/core/src/features/helm-releases/showing-details-for-helm-release.test.ts
@@ -15,8 +15,7 @@ import type { RequestHelmReleaseUpdate } from "../../common/k8s-api/endpoints/he
import requestHelmReleaseUpdateInjectable from "../../common/k8s-api/endpoints/helm-releases.api/request-update.injectable";
import type { RequestDetailedHelmRelease } from "../../renderer/components/helm-releases/release-details/release-details-model/request-detailed-helm-release.injectable";
import requestDetailedHelmReleaseInjectable from "../../renderer/components/helm-releases/release-details/release-details-model/request-detailed-helm-release.injectable";
-import showSuccessNotificationInjectable from "../../renderer/components/notifications/show-success-notification.injectable";
-import showCheckedErrorInjectable from "../../renderer/components/notifications/show-checked-error.injectable";
+import { showSuccessNotificationInjectable, showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
import getRandomUpgradeChartTabIdInjectable from "../../renderer/components/dock/upgrade-chart/get-random-upgrade-chart-tab-id.injectable";
import type { RequestHelmCharts } from "../../common/k8s-api/endpoints/helm-charts.api/request-charts.injectable";
import type { RequestHelmChartVersions } from "../../common/k8s-api/endpoints/helm-charts.api/request-versions.injectable";
@@ -67,7 +66,7 @@ describe("showing details for helm release", () => {
builder.beforeWindowStart(({ windowDi }) => {
windowDi.override(getRandomUpgradeChartTabIdInjectable, () => () => "some-tab-id");
windowDi.override(showSuccessNotificationInjectable, () => showSuccessNotificationMock);
- windowDi.override(showCheckedErrorInjectable, () => showCheckedErrorNotificationMock);
+ windowDi.override(showCheckedErrorNotificationInjectable, () => showCheckedErrorNotificationMock);
windowDi.override(requestDetailedHelmReleaseInjectable, () => requestDetailedHelmReleaseMock);
windowDi.override(requestHelmReleaseConfigurationInjectable, () => requestHelmReleaseConfigurationMock);
windowDi.override(requestHelmReleaseUpdateInjectable, () => requestHelmReleaseUpdateMock);
diff --git a/packages/core/src/features/pod-logs/download-logs.test.tsx b/packages/core/src/features/pod-logs/download-logs.test.tsx
index 8bc95f78f5..1c1cbee513 100644
--- a/packages/core/src/features/pod-logs/download-logs.test.tsx
+++ b/packages/core/src/features/pod-logs/download-logs.test.tsx
@@ -25,7 +25,7 @@ import reloadLogsInjectable from "../../renderer/components/dock/logs/reload-log
import setLogTabDataInjectable from "../../renderer/components/dock/logs/set-log-tab-data.injectable";
import stopLoadingLogsInjectable from "../../renderer/components/dock/logs/stop-loading-logs.injectable";
import { dockerPod } from "../../renderer/components/dock/logs/__test__/pod.mock";
-import showErrorNotificationInjectable from "../../renderer/components/notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import type { DiContainer } from "@ogre-tools/injectable";
import type { Container } from "@k8slens/kube-object";
diff --git a/packages/core/src/features/shell-sync/renderer/failure-listener.injectable.ts b/packages/core/src/features/shell-sync/renderer/failure-listener.injectable.ts
index 135143b3a6..adc2a36461 100644
--- a/packages/core/src/features/shell-sync/renderer/failure-listener.injectable.ts
+++ b/packages/core/src/features/shell-sync/renderer/failure-listener.injectable.ts
@@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getMessageChannelListenerInjectable } from "@k8slens/messaging";
-import showErrorNotificationInjectable from "../../../renderer/components/notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import { shellSyncFailedChannel } from "../common/failure-channel";
const shellSyncFailureListenerInjectable = getMessageChannelListenerInjectable({
diff --git a/packages/core/src/main/getDiForUnitTesting.ts b/packages/core/src/main/getDiForUnitTesting.ts
index c2e84847b2..61934d2f78 100644
--- a/packages/core/src/main/getDiForUnitTesting.ts
+++ b/packages/core/src/main/getDiForUnitTesting.ts
@@ -31,6 +31,7 @@ import { messagingFeature, testUtils as messagingTestUtils } from "@k8slens/mess
import { loggerFeature } from "@k8slens/logger";
import { randomFeature } from "@k8slens/random";
import { kubeApiSpecificsFeature } from "@k8slens/kube-api-specifics";
+import { notificationsFeature } from "@k8slens/notifications";
export function getDiForUnitTesting() {
const environment = "main";
@@ -48,6 +49,7 @@ export function getDiForUnitTesting() {
loggerFeature,
randomFeature,
kubeApiSpecificsFeature,
+ notificationsFeature,
);
});
diff --git a/packages/core/src/renderer/components/add-cluster/add-cluster.tsx b/packages/core/src/renderer/components/add-cluster/add-cluster.tsx
index 073523439e..f7717b4009 100644
--- a/packages/core/src/renderer/components/add-cluster/add-cluster.tsx
+++ b/packages/core/src/renderer/components/add-cluster/add-cluster.tsx
@@ -16,7 +16,7 @@ import { loadConfigFromString, splitConfig } from "../../../common/kube-helpers"
import { docsUrl } from "../../../common/vars";
import { isDefined, iter } from "@k8slens/utilities";
import { Button } from "@k8slens/button";
-import type { ShowNotification } from "../notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { SettingLayout } from "../layout/setting-layout";
import { MonacoEditor } from "../monaco-editor";
import { withInjectables } from "@ogre-tools/injectable-react";
@@ -27,8 +27,7 @@ import type { EmitAppEvent } from "../../../common/app-event-bus/emit-event.inje
import emitAppEventInjectable from "../../../common/app-event-bus/emit-event.injectable";
import type { GetDirnameOfPath } from "../../../common/path/get-dirname.injectable";
import getDirnameOfPathInjectable from "../../../common/path/get-dirname.injectable";
-import showSuccessNotificationInjectable from "../notifications/show-success-notification.injectable";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import { showSuccessNotificationInjectable, showErrorNotificationInjectable } from "@k8slens/notifications";
interface Option {
config: KubeConfig;
diff --git a/packages/core/src/renderer/components/catalog/catalog.tsx b/packages/core/src/renderer/components/catalog/catalog.tsx
index 6739d3541a..3ee018bd80 100644
--- a/packages/core/src/renderer/components/catalog/catalog.tsx
+++ b/packages/core/src/renderer/components/catalog/catalog.tsx
@@ -14,7 +14,7 @@ import type { CatalogEntityContextMenu } from "../../api/catalog-entity";
import { ItemListLayout } from "../item-object-list";
import { MainLayout } from "../layout/main-layout";
import { MenuActions, MenuItem } from "../menu";
-import type { ShowNotification } from "../notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { RenderDelay } from "../render-delay/render-delay";
import { CatalogAddButton } from "./catalog-add-button";
import type { CatalogEntityStore } from "./catalog-entity-store.injectable";
@@ -35,7 +35,7 @@ import normalizeCatalogEntityContextMenuInjectable from "../../catalog/normalize
import type { Navigate } from "../../navigation/navigate.injectable";
import navigateInjectable from "../../navigation/navigate.injectable";
import type { StorageLayer } from "../../utils/storage-helper";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import { browseCatalogTab } from "./catalog-browse-tab";
import catalogEntityStoreInjectable from "./catalog-entity-store.injectable";
import catalogPreviousActiveTabStorageInjectable from "./catalog-previous-active-tab-storage/catalog-previous-active-tab-storage.injectable";
diff --git a/packages/core/src/renderer/components/cluster-settings/__tests__/cluster-local-terminal-settings.test.tsx b/packages/core/src/renderer/components/cluster-settings/__tests__/cluster-local-terminal-settings.test.tsx
index 7abaf8ac15..b8bd6a24b2 100644
--- a/packages/core/src/renderer/components/cluster-settings/__tests__/cluster-local-terminal-settings.test.tsx
+++ b/packages/core/src/renderer/components/cluster-settings/__tests__/cluster-local-terminal-settings.test.tsx
@@ -12,7 +12,7 @@ import { Cluster } from "../../../../common/cluster/cluster";
import { getDiForUnitTesting } from "../../../getDiForUnitTesting";
import type { DiRender } from "../../test-utils/renderFor";
import { renderFor } from "../../test-utils/renderFor";
-import showErrorNotificationInjectable from "../../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import statInjectable from "../../../../common/fs/stat.injectable";
import loadKubeconfigInjectable from "../../../../common/cluster/load-kubeconfig.injectable";
diff --git a/packages/core/src/renderer/components/cluster-settings/icon-settings.tsx b/packages/core/src/renderer/components/cluster-settings/icon-settings.tsx
index a802807c17..2e8050b2c4 100644
--- a/packages/core/src/renderer/components/cluster-settings/icon-settings.tsx
+++ b/packages/core/src/renderer/components/cluster-settings/icon-settings.tsx
@@ -13,8 +13,8 @@ import type { Cluster } from "../../../common/cluster/cluster";
import { Avatar } from "../avatar";
import { FilePicker, OverSizeLimitStyle } from "../file-picker";
import { MenuActions, MenuItem } from "../menu";
-import type { ShowNotification } from "../notifications";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import type { ShowNotification } from "@k8slens/notifications";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import { clusterIconSettingsComponentInjectionToken, clusterIconSettingsMenuInjectionToken } from "@k8slens/cluster-settings";
import type { ClusterIconMenuItem, ClusterIconSettingsComponent } from "@k8slens/cluster-settings";
diff --git a/packages/core/src/renderer/components/cluster-settings/local-terminal-settings.tsx b/packages/core/src/renderer/components/cluster-settings/local-terminal-settings.tsx
index 0548a7c3a3..f87b970ea3 100644
--- a/packages/core/src/renderer/components/cluster-settings/local-terminal-settings.tsx
+++ b/packages/core/src/renderer/components/cluster-settings/local-terminal-settings.tsx
@@ -8,10 +8,10 @@ import { observer } from "mobx-react";
import type { Cluster } from "../../../common/cluster/cluster";
import { Input } from "../input";
import { SubTitle } from "../layout/sub-title";
-import type { ShowNotification } from "../notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { Icon } from "@k8slens/icon";
import { withInjectables } from "@ogre-tools/injectable-react";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import type { ValidateDirectory } from "../../../common/fs/validate-directory.injectable";
import validateDirectoryInjectable from "../../../common/fs/validate-directory.injectable";
import type { ResolveTilde } from "../../../common/path/resolve-tilde.injectable";
diff --git a/packages/core/src/renderer/components/config-maps/config-map-details.tsx b/packages/core/src/renderer/components/config-maps/config-map-details.tsx
index b97738e813..4a215ca829 100644
--- a/packages/core/src/renderer/components/config-maps/config-map-details.tsx
+++ b/packages/core/src/renderer/components/config-maps/config-map-details.tsx
@@ -9,7 +9,7 @@ import React from "react";
import { autorun, makeObservable, observable } from "mobx";
import { disposeOnUnmount, observer } from "mobx-react";
import { DrawerTitle } from "../drawer";
-import type { ShowNotification } from "../notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { Button } from "@k8slens/button";
import type { KubeObjectDetailsProps } from "../kube-object-details";
import { ConfigMap } from "@k8slens/kube-object";
@@ -17,8 +17,7 @@ import type { Logger } from "@k8slens/logger";
import type { ConfigMapStore } from "./store";
import { withInjectables } from "@ogre-tools/injectable-react";
import configMapStoreInjectable from "./store.injectable";
-import showSuccessNotificationInjectable from "../notifications/show-success-notification.injectable";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import { showSuccessNotificationInjectable, showErrorNotificationInjectable } from "@k8slens/notifications";
import { loggerInjectionToken } from "@k8slens/logger";
import { MonacoEditor } from "../monaco-editor";
diff --git a/packages/core/src/renderer/components/config-resource-quotas/add-dialog/view.tsx b/packages/core/src/renderer/components/config-resource-quotas/add-dialog/view.tsx
index ee59ab1ab6..af1794456e 100644
--- a/packages/core/src/renderer/components/config-resource-quotas/add-dialog/view.tsx
+++ b/packages/core/src/renderer/components/config-resource-quotas/add-dialog/view.tsx
@@ -25,8 +25,8 @@ import { withInjectables } from "@ogre-tools/injectable-react";
import closeAddQuotaDialogInjectable from "./close.injectable";
import isAddQuotaDialogOpenInjectable from "./is-open.injectable";
import { resourceQuotaApiInjectable } from "@k8slens/kube-api-specifics";
-import type { ShowCheckedErrorNotification } from "../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
export interface AddQuotaDialogProps extends DialogProps {
}
diff --git a/packages/core/src/renderer/components/config-secrets/add-dialog/view.tsx b/packages/core/src/renderer/components/config-secrets/add-dialog/view.tsx
index 5ccfcc0c9b..796ab8a350 100644
--- a/packages/core/src/renderer/components/config-secrets/add-dialog/view.tsx
+++ b/packages/core/src/renderer/components/config-secrets/add-dialog/view.tsx
@@ -28,8 +28,8 @@ import closeAddSecretDialogInjectable from "./close.injectable";
import { secretApiInjectable } from "@k8slens/kube-api-specifics";
import showDetailsInjectable from "../../kube-detail-params/show-details.injectable";
import isAddSecretDialogOpenInjectable from "./is-open.injectable";
-import type { ShowCheckedErrorNotification } from "../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
export interface AddSecretDialogProps extends Partial {
}
diff --git a/packages/core/src/renderer/components/config-secrets/secret-details.tsx b/packages/core/src/renderer/components/config-secrets/secret-details.tsx
index 398488f65a..9bf44ee3fd 100644
--- a/packages/core/src/renderer/components/config-secrets/secret-details.tsx
+++ b/packages/core/src/renderer/components/config-secrets/secret-details.tsx
@@ -11,7 +11,7 @@ import { disposeOnUnmount, observer } from "mobx-react";
import { DrawerItem, DrawerTitle } from "../drawer";
import { Input } from "../input";
import { Button } from "@k8slens/button";
-import type { ShowNotification } from "../notifications";
+import type { ShowNotification, ShowCheckedErrorNotification } from "@k8slens/notifications";
import { base64, toggle } from "@k8slens/utilities";
import { Icon } from "@k8slens/icon";
import type { KubeObjectDetailsProps } from "../kube-object-details";
@@ -21,9 +21,7 @@ import type { SecretStore } from "./store";
import { withInjectables } from "@ogre-tools/injectable-react";
import { loggerInjectionToken } from "@k8slens/logger";
import secretStoreInjectable from "./store.injectable";
-import showSuccessNotificationInjectable from "../notifications/show-success-notification.injectable";
-import type { ShowCheckedErrorNotification } from "../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../notifications/show-checked-error.injectable";
+import { showSuccessNotificationInjectable, showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
export interface SecretDetailsProps extends KubeObjectDetailsProps {
}
diff --git a/packages/core/src/renderer/components/confirm-dialog/confirm-dialog.tsx b/packages/core/src/renderer/components/confirm-dialog/confirm-dialog.tsx
index 17b91bab4d..283bfba011 100644
--- a/packages/core/src/renderer/components/confirm-dialog/confirm-dialog.tsx
+++ b/packages/core/src/renderer/components/confirm-dialog/confirm-dialog.tsx
@@ -16,10 +16,10 @@ import { Button } from "@k8slens/button";
import type { DialogProps } from "../dialog";
import { Dialog } from "../dialog";
import { Icon } from "@k8slens/icon";
-import type { ShowNotification } from "../notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { withInjectables } from "@ogre-tools/injectable-react";
import confirmDialogStateInjectable from "./state.injectable";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
export interface ConfirmDialogProps extends Partial {
}
diff --git a/packages/core/src/renderer/components/delete-cluster-dialog/view.tsx b/packages/core/src/renderer/components/delete-cluster-dialog/view.tsx
index 0625692777..0afa28449e 100644
--- a/packages/core/src/renderer/components/delete-cluster-dialog/view.tsx
+++ b/packages/core/src/renderer/components/delete-cluster-dialog/view.tsx
@@ -10,7 +10,7 @@ import { observer } from "mobx-react";
import React from "react";
import { Button } from "@k8slens/button";
-import type { ShowNotification } from "../notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { Dialog } from "../dialog";
import { Icon } from "@k8slens/icon";
import { Select } from "../select";
@@ -26,7 +26,7 @@ import type { RequestDeleteCluster } from "../../../features/cluster/delete-dial
import requestDeleteClusterInjectable from "../../../features/cluster/delete-dialog/renderer/request-delete.injectable";
import type { SaveKubeconfig } from "./save-kubeconfig.injectable";
import saveKubeconfigInjectable from "./save-kubeconfig.injectable";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import { isCurrentContext } from "./is-current-context";
import type { IsInLocalKubeconfig } from "./is-in-local-kubeconfig.injectable";
import isInLocalKubeconfigInjectable from "./is-in-local-kubeconfig.injectable";
diff --git a/packages/core/src/renderer/components/dialog/logs-dialog.tsx b/packages/core/src/renderer/components/dialog/logs-dialog.tsx
index c3e1ffd55f..06e4922dc4 100644
--- a/packages/core/src/renderer/components/dialog/logs-dialog.tsx
+++ b/packages/core/src/renderer/components/dialog/logs-dialog.tsx
@@ -9,13 +9,13 @@ import React from "react";
import type { DialogProps } from "../dialog";
import { Dialog } from "../dialog";
import { Wizard, WizardStep } from "../wizard";
-import type { ShowNotification } from "../notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { Button } from "@k8slens/button";
import { Icon } from "@k8slens/icon";
import { clipboard } from "electron";
import { kebabCase } from "lodash/fp";
import { withInjectables } from "@ogre-tools/injectable-react";
-import showSuccessNotificationInjectable from "../notifications/show-success-notification.injectable";
+import { showSuccessNotificationInjectable } from "@k8slens/notifications";
export interface LogsDialogProps extends DialogProps {
title: string;
diff --git a/packages/core/src/renderer/components/dock/create-resource/view.tsx b/packages/core/src/renderer/components/dock/create-resource/view.tsx
index 56f05621fb..5638594b23 100644
--- a/packages/core/src/renderer/components/dock/create-resource/view.tsx
+++ b/packages/core/src/renderer/components/dock/create-resource/view.tsx
@@ -13,7 +13,7 @@ import { observer } from "mobx-react";
import type { CreateResourceTabStore } from "./store";
import { EditorPanel } from "../editor-panel";
import { InfoPanel } from "../info-panel";
-import type { ShowNotification } from "../../notifications";
+import type { ShowNotification, ShowCheckedErrorNotification } from "@k8slens/notifications";
import type { Logger } from "@k8slens/logger";
import type { ApiManager } from "../../../../common/k8s-api/api-manager";
import { isObject, prevDefault } from "@k8slens/utilities";
@@ -30,9 +30,7 @@ import navigateInjectable from "../../../navigation/navigate.injectable";
import type { RequestKubeObjectCreation } from "../../../../common/k8s-api/endpoints/resource-applier.api/request-update.injectable";
import requestKubeObjectCreationInjectable from "../../../../common/k8s-api/endpoints/resource-applier.api/request-update.injectable";
import { loggerInjectionToken } from "@k8slens/logger";
-import type { ShowCheckedErrorNotification } from "../../notifications/show-checked-error.injectable";
-import showSuccessNotificationInjectable from "../../notifications/show-success-notification.injectable";
-import showCheckedErrorNotificationInjectable from "../../notifications/show-checked-error.injectable";
+import { showSuccessNotificationInjectable, showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
export interface CreateResourceProps {
tabId: string;
diff --git a/packages/core/src/renderer/components/dock/edit-resource/edit-resource-model/edit-resource-model.injectable.tsx b/packages/core/src/renderer/components/dock/edit-resource/edit-resource-model/edit-resource-model.injectable.tsx
index 1671247eb8..f3e8129348 100644
--- a/packages/core/src/renderer/components/dock/edit-resource/edit-resource-model/edit-resource-model.injectable.tsx
+++ b/packages/core/src/renderer/components/dock/edit-resource/edit-resource-model/edit-resource-model.injectable.tsx
@@ -15,10 +15,9 @@ import assert from "assert";
import type { RequestPatchKubeResource } from "./request-patch-kube-resource.injectable";
import requestPatchKubeResourceInjectable from "./request-patch-kube-resource.injectable";
import { createPatch } from "rfc6902";
-import type { ShowNotification } from "../../../notifications";
-import showSuccessNotificationInjectable from "../../../notifications/show-success-notification.injectable";
+import type { ShowNotification } from "@k8slens/notifications";
+import { showSuccessNotificationInjectable, showErrorNotificationInjectable } from "@k8slens/notifications";
import React from "react";
-import showErrorNotificationInjectable from "../../../notifications/show-error-notification.injectable";
import { createKubeApiURL, parseKubeApi } from "@k8slens/kube-api";
const editResourceModelInjectable = getInjectable({
diff --git a/packages/core/src/renderer/components/dock/info-panel.tsx b/packages/core/src/renderer/components/dock/info-panel.tsx
index 0a878e6ea3..f1be17d990 100644
--- a/packages/core/src/renderer/components/dock/info-panel.tsx
+++ b/packages/core/src/renderer/components/dock/info-panel.tsx
@@ -14,12 +14,10 @@ import { Button } from "@k8slens/button";
import { Icon } from "@k8slens/icon";
import { Spinner } from "../spinner";
import type { DockStore, TabId } from "./dock/store";
-import type { ShowNotification } from "../notifications";
+import type { ShowNotification, ShowCheckedErrorNotification } from "@k8slens/notifications";
import { withInjectables } from "@ogre-tools/injectable-react";
import dockStoreInjectable from "./dock/store.injectable";
-import type { ShowCheckedErrorNotification } from "../notifications/show-checked-error.injectable";
-import showSuccessNotificationInjectable from "../notifications/show-success-notification.injectable";
-import showCheckedErrorNotificationInjectable from "../notifications/show-checked-error.injectable";
+import { showSuccessNotificationInjectable, showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
export interface InfoPanelProps extends OptionalProps {
tabId: TabId;
diff --git a/packages/core/src/renderer/components/dock/logs/download-all-logs.injectable.ts b/packages/core/src/renderer/components/dock/logs/download-all-logs.injectable.ts
index 1b9f87f1cf..5b2c8485a9 100644
--- a/packages/core/src/renderer/components/dock/logs/download-all-logs.injectable.ts
+++ b/packages/core/src/renderer/components/dock/logs/download-all-logs.injectable.ts
@@ -7,7 +7,7 @@ import type { PodLogsQuery } from "@k8slens/kube-object";
import type { ResourceDescriptor } from "@k8slens/kube-api";
import { loggerInjectionToken } from "@k8slens/logger";
import openSaveFileDialogInjectable from "../../../utils/save-file.injectable";
-import showErrorNotificationInjectable from "../../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import callForLogsInjectable from "./call-for-logs.injectable";
const downloadAllLogsInjectable = getInjectable({
diff --git a/packages/core/src/renderer/components/dock/terminal/send-command.injectable.ts b/packages/core/src/renderer/components/dock/terminal/send-command.injectable.ts
index 835a917638..807ecb034d 100644
--- a/packages/core/src/renderer/components/dock/terminal/send-command.injectable.ts
+++ b/packages/core/src/renderer/components/dock/terminal/send-command.injectable.ts
@@ -7,7 +7,7 @@ import { when } from "mobx";
import { loggerInjectionToken } from "@k8slens/logger";
import { TerminalChannels } from "../../../../common/terminal/channels";
import { waitUntilDefined, noop } from "@k8slens/utilities";
-import showSuccessNotificationInjectable from "../../notifications/show-success-notification.injectable";
+import { showSuccessNotificationInjectable } from "@k8slens/notifications";
import selectDockTabInjectable from "../dock/select-dock-tab.injectable";
import type { TabId } from "../dock/store";
import createTerminalTabInjectable from "./create-terminal-tab.injectable";
diff --git a/packages/core/src/renderer/components/extensions/attempt-install-by-info.injectable.tsx b/packages/core/src/renderer/components/extensions/attempt-install-by-info.injectable.tsx
index 4c9dc6b94a..c2c8b64a96 100644
--- a/packages/core/src/renderer/components/extensions/attempt-install-by-info.injectable.tsx
+++ b/packages/core/src/renderer/components/extensions/attempt-install-by-info.injectable.tsx
@@ -17,7 +17,7 @@ import { withTimeout } from "../../../common/fetch/timeout-controller";
import downloadBinaryInjectable from "../../../common/fetch/download-binary.injectable";
import downloadJsonInjectable from "../../../common/fetch/download-json/normal.injectable";
import type { PackageJson } from "type-fest";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import { loggerInjectionToken } from "@k8slens/logger";
export interface ExtensionInfo {
diff --git a/packages/core/src/renderer/components/extensions/attempt-install/attempt-install.injectable.tsx b/packages/core/src/renderer/components/extensions/attempt-install/attempt-install.injectable.tsx
index 3ea0002af9..bc11a10f27 100644
--- a/packages/core/src/renderer/components/extensions/attempt-install/attempt-install.injectable.tsx
+++ b/packages/core/src/renderer/components/extensions/attempt-install/attempt-install.injectable.tsx
@@ -14,7 +14,7 @@ import createTempFilesAndValidateInjectable from "./create-temp-files-and-valida
import extensionInstallationStateStoreInjectable from "../../../../extensions/extension-installation-state-store/extension-installation-state-store.injectable";
import type { Disposer } from "@k8slens/utilities";
import { disposer } from "@k8slens/utilities";
-import type { ShowNotification } from "../../notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { Button } from "@k8slens/button";
import type { ExtensionLoader } from "../../../../extensions/extension-loader";
import React from "react";
@@ -22,8 +22,7 @@ import { remove as removeDir } from "fs-extra";
import { shell } from "electron";
import type { ExtensionInstallationStateStore } from "../../../../extensions/extension-installation-state-store/extension-installation-state-store";
import { ExtensionInstallationState } from "../../../../extensions/extension-installation-state-store/extension-installation-state-store";
-import showErrorNotificationInjectable from "../../notifications/show-error-notification.injectable";
-import showInfoNotificationInjectable from "../../notifications/show-info-notification.injectable";
+import { showErrorNotificationInjectable, showInfoNotificationInjectable } from "@k8slens/notifications";
import type { LensExtensionId } from "@k8slens/legacy-extensions";
export interface InstallRequest {
diff --git a/packages/core/src/renderer/components/extensions/attempt-install/create-temp-files-and-validate.injectable.tsx b/packages/core/src/renderer/components/extensions/attempt-install/create-temp-files-and-validate.injectable.tsx
index a726f435eb..e249cbf5b9 100644
--- a/packages/core/src/renderer/components/extensions/attempt-install/create-temp-files-and-validate.injectable.tsx
+++ b/packages/core/src/renderer/components/extensions/attempt-install/create-temp-files-and-validate.injectable.tsx
@@ -12,7 +12,7 @@ import { loggerInjectionToken } from "@k8slens/logger";
import writeFileInjectable from "../../../../common/fs/write-file.injectable";
import joinPathsInjectable from "../../../../common/path/join-paths.injectable";
import tempDirectoryPathInjectable from "../../../../common/os/temp-directory-path.injectable";
-import showErrorNotificationInjectable from "../../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import type { LensExtensionId, LensExtensionManifest } from "@k8slens/legacy-extensions";
export interface InstallRequestValidated {
diff --git a/packages/core/src/renderer/components/extensions/attempt-install/unpack-extension.injectable.tsx b/packages/core/src/renderer/components/extensions/attempt-install/unpack-extension.injectable.tsx
index 89305f776f..fcdd351ef0 100644
--- a/packages/core/src/renderer/components/extensions/attempt-install/unpack-extension.injectable.tsx
+++ b/packages/core/src/renderer/components/extensions/attempt-install/unpack-extension.injectable.tsx
@@ -17,8 +17,7 @@ import React from "react";
import type { InstallRequestValidated } from "./create-temp-files-and-validate.injectable";
import extractTarInjectable from "../../../../common/fs/extract-tar.injectable";
import { loggerInjectionToken } from "@k8slens/logger";
-import showInfoNotificationInjectable from "../../notifications/show-info-notification.injectable";
-import showErrorNotificationInjectable from "../../notifications/show-error-notification.injectable";
+import { showInfoNotificationInjectable, showErrorNotificationInjectable } from "@k8slens/notifications";
export type UnpackExtension = (request: InstallRequestValidated, disposeDownloading?: Disposer) => Promise;
diff --git a/packages/core/src/renderer/components/extensions/get-base-registry-url/get-base-registry-url.injectable.tsx b/packages/core/src/renderer/components/extensions/get-base-registry-url/get-base-registry-url.injectable.tsx
index e9d5b1cf1a..2a9e743131 100644
--- a/packages/core/src/renderer/components/extensions/get-base-registry-url/get-base-registry-url.injectable.tsx
+++ b/packages/core/src/renderer/components/extensions/get-base-registry-url/get-base-registry-url.injectable.tsx
@@ -9,7 +9,7 @@ import execFileInjectable from "../../../../common/fs/exec-file.injectable";
import { loggerInjectionToken } from "@k8slens/logger";
import { defaultExtensionRegistryUrl } from "../../../../features/user-preferences/common/preferences-helpers";
import userPreferencesStateInjectable from "../../../../features/user-preferences/common/state.injectable";
-import showErrorNotificationInjectable from "../../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
const getBaseRegistryUrlInjectable = getInjectable({
id: "get-base-registry-url",
diff --git a/packages/core/src/renderer/components/extensions/install-extension-from-input.injectable.tsx b/packages/core/src/renderer/components/extensions/install-extension-from-input.injectable.tsx
index c0cc10bb94..dc976e6c4e 100644
--- a/packages/core/src/renderer/components/extensions/install-extension-from-input.injectable.tsx
+++ b/packages/core/src/renderer/components/extensions/install-extension-from-input.injectable.tsx
@@ -12,7 +12,7 @@ import attemptInstallByInfoInjectable from "./attempt-install-by-info.injectable
import extensionInstallationStateStoreInjectable from "../../../extensions/extension-installation-state-store/extension-installation-state-store.injectable";
import readFileNotifyInjectable from "./read-file-notify/read-file-notify.injectable";
import getBasenameOfPathInjectable from "../../../common/path/get-basename.injectable";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import { loggerInjectionToken } from "@k8slens/logger";
import downloadBinaryInjectable from "../../../common/fetch/download-binary.injectable";
import { withTimeout } from "../../../common/fetch/timeout-controller";
diff --git a/packages/core/src/renderer/components/extensions/read-file-notify/read-file-notify.injectable.ts b/packages/core/src/renderer/components/extensions/read-file-notify/read-file-notify.injectable.ts
index ad04713106..3ddb4face6 100644
--- a/packages/core/src/renderer/components/extensions/read-file-notify/read-file-notify.injectable.ts
+++ b/packages/core/src/renderer/components/extensions/read-file-notify/read-file-notify.injectable.ts
@@ -4,7 +4,7 @@
*/
import { getMessageFromError } from "../get-message-from-error/get-message-from-error";
import { getInjectable } from "@ogre-tools/injectable";
-import showErrorNotificationInjectable from "../../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import { loggerInjectionToken } from "@k8slens/logger";
import readFileBufferInjectable from "../../../../common/fs/read-file-buffer.injectable";
diff --git a/packages/core/src/renderer/components/extensions/uninstall-extension.injectable.tsx b/packages/core/src/renderer/components/extensions/uninstall-extension.injectable.tsx
index 132e13d46c..254a7611b6 100644
--- a/packages/core/src/renderer/components/extensions/uninstall-extension.injectable.tsx
+++ b/packages/core/src/renderer/components/extensions/uninstall-extension.injectable.tsx
@@ -12,8 +12,7 @@ import { extensionDisplayName } from "../../../extensions/lens-extension";
import React from "react";
import { when } from "mobx";
import { getMessageFromError } from "./get-message-from-error/get-message-from-error";
-import showSuccessNotificationInjectable from "../notifications/show-success-notification.injectable";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import { showSuccessNotificationInjectable, showErrorNotificationInjectable } from "@k8slens/notifications";
const uninstallExtensionInjectable = getInjectable({
id: "uninstall-extension",
diff --git a/packages/core/src/renderer/components/helm-releases/dialog/dialog.tsx b/packages/core/src/renderer/components/helm-releases/dialog/dialog.tsx
index 55292b5ef9..ef8795793d 100644
--- a/packages/core/src/renderer/components/helm-releases/dialog/dialog.tsx
+++ b/packages/core/src/renderer/components/helm-releases/dialog/dialog.tsx
@@ -21,8 +21,8 @@ import type { RollbackRelease } from "../rollback-release/rollback-release.injec
import rollbackReleaseInjectable from "../rollback-release/rollback-release.injectable";
import type { HelmReleaseRevision, RequestHelmReleaseHistory } from "../../../../common/k8s-api/endpoints/helm-releases.api/request-history.injectable";
import requestHelmReleaseHistoryInjectable from "../../../../common/k8s-api/endpoints/helm-releases.api/request-history.injectable";
-import type { ShowCheckedErrorNotification } from "../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
export interface ReleaseRollbackDialogProps extends DialogProps {
}
diff --git a/packages/core/src/renderer/components/helm-releases/release-details/release-details-model/release-details-model.injectable.tsx b/packages/core/src/renderer/components/helm-releases/release-details/release-details-model/release-details-model.injectable.tsx
index 728ad4bbcb..016f9faa2c 100644
--- a/packages/core/src/renderer/components/helm-releases/release-details/release-details-model/release-details-model.injectable.tsx
+++ b/packages/core/src/renderer/components/helm-releases/release-details/release-details-model/release-details-model.injectable.tsx
@@ -18,10 +18,8 @@ import type { GetResourceDetailsUrl } from "./get-resource-details-url.injectabl
import getResourceDetailsUrlInjectable from "./get-resource-details-url.injectable";
import type { RequestHelmReleaseUpdate } from "../../../../../common/k8s-api/endpoints/helm-releases.api/request-update.injectable";
import updateReleaseInjectable from "../../update-release/update-release.injectable";
-import type { ShowCheckedErrorNotification } from "../../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../../notifications/show-checked-error.injectable";
-import type { ShowNotification } from "../../../notifications";
-import showSuccessNotificationInjectable from "../../../notifications/show-success-notification.injectable";
+import type { ShowCheckedErrorNotification, ShowNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable, showSuccessNotificationInjectable } from "@k8slens/notifications";
import React from "react";
import createUpgradeChartTabInjectable from "../../../dock/upgrade-chart/create-upgrade-chart-tab.injectable";
import type { HelmRelease } from "../../../../../common/k8s-api/endpoints/helm-releases.api";
diff --git a/packages/core/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.tsx b/packages/core/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.tsx
index 2e2956ab27..bfb7a355b9 100644
--- a/packages/core/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.tsx
+++ b/packages/core/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.tsx
@@ -13,12 +13,12 @@ import { Button } from "@k8slens/button";
import type { DialogProps } from "../dialog";
import { Dialog } from "../dialog";
import { Icon } from "@k8slens/icon";
-import type { ShowNotification } from "../notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { Wizard, WizardStep } from "../wizard";
import { MonacoEditor } from "../monaco-editor";
import { clipboard } from "electron";
import { withInjectables } from "@ogre-tools/injectable-react";
-import showSuccessNotificationInjectable from "../notifications/show-success-notification.injectable";
+import { showSuccessNotificationInjectable } from "@k8slens/notifications";
import kubeconfigDialogStateInjectable from "./state.injectable";
import { saveFileDialog } from "../../utils/saveFile";
diff --git a/packages/core/src/renderer/components/kubeconfig-dialog/open.injectable.ts b/packages/core/src/renderer/components/kubeconfig-dialog/open.injectable.ts
index f8b49428b4..4e4ea159bc 100644
--- a/packages/core/src/renderer/components/kubeconfig-dialog/open.injectable.ts
+++ b/packages/core/src/renderer/components/kubeconfig-dialog/open.injectable.ts
@@ -4,7 +4,7 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { loggerInjectionToken } from "@k8slens/logger";
-import showCheckedErrorNotificationInjectable from "../notifications/show-checked-error.injectable";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
import kubeconfigDialogStateInjectable from "./state.injectable";
import type { StrictReactNode } from "@k8slens/utilities";
diff --git a/packages/core/src/renderer/components/namespaces/add-dialog/dialog.tsx b/packages/core/src/renderer/components/namespaces/add-dialog/dialog.tsx
index 8d50983359..32f3adf92a 100644
--- a/packages/core/src/renderer/components/namespaces/add-dialog/dialog.tsx
+++ b/packages/core/src/renderer/components/namespaces/add-dialog/dialog.tsx
@@ -20,8 +20,8 @@ import namespaceStoreInjectable from "../store.injectable";
import addNamespaceDialogStateInjectable
from "./state.injectable";
import type { NamespaceStore } from "../store";
-import type { ShowCheckedErrorNotification } from "../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
import autoBindReact from "auto-bind/react";
export interface AddNamespaceDialogProps extends DialogProps {
diff --git a/packages/core/src/renderer/components/network-port-forwards/port-forward-menu.tsx b/packages/core/src/renderer/components/network-port-forwards/port-forward-menu.tsx
index 3e4fb7f298..f72a345ee1 100644
--- a/packages/core/src/renderer/components/network-port-forwards/port-forward-menu.tsx
+++ b/packages/core/src/renderer/components/network-port-forwards/port-forward-menu.tsx
@@ -10,13 +10,13 @@ import type { MenuActionsProps } from "../menu/menu-actions";
import { MenuActions } from "../menu/menu-actions";
import { MenuItem } from "../menu";
import { Icon } from "@k8slens/icon";
-import type { ShowNotification } from "../notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { withInjectables } from "@ogre-tools/injectable-react";
import portForwardDialogModelInjectable from "../../port-forward/port-forward-dialog-model/port-forward-dialog-model.injectable";
import portForwardStoreInjectable from "../../port-forward/port-forward-store/port-forward-store.injectable";
import type { OpenPortForward } from "../../port-forward/open-port-forward.injectable";
import openPortForwardInjectable from "../../port-forward/open-port-forward.injectable";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import autoBindReact from "auto-bind/react";
export interface PortForwardMenuProps extends MenuActionsProps {
diff --git a/packages/core/src/renderer/components/network-services/service-port-component.tsx b/packages/core/src/renderer/components/network-services/service-port-component.tsx
index df00267eaa..8455fbe34e 100644
--- a/packages/core/src/renderer/components/network-services/service-port-component.tsx
+++ b/packages/core/src/renderer/components/network-services/service-port-component.tsx
@@ -10,7 +10,7 @@ import { disposeOnUnmount, observer } from "mobx-react";
import type { Service, ServicePort } from "@k8slens/kube-object";
import { action, makeObservable, observable, reaction } from "mobx";
import { cssNames } from "@k8slens/utilities";
-import type { ShowNotification } from "../notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { Button } from "@k8slens/button";
import type { ForwardedPort, PortForwardStore } from "../../port-forward";
import { predictProtocol } from "../../port-forward";
@@ -24,7 +24,7 @@ import notifyErrorPortForwardingInjectable from "../../port-forward/notify-error
import type { OpenPortForward } from "../../port-forward/open-port-forward.injectable";
import openPortForwardInjectable from "../../port-forward/open-port-forward.injectable";
import { loggerInjectionToken } from "@k8slens/logger";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
export interface ServicePortComponentProps {
service: Service;
diff --git a/packages/core/src/renderer/components/notifications/index.ts b/packages/core/src/renderer/components/notifications/index.ts
deleted file mode 100644
index 9ae9345244..0000000000
--- a/packages/core/src/renderer/components/notifications/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * Copyright (c) OpenLens Authors. All rights reserved.
- * Licensed under MIT License. See LICENSE in root directory for more information.
- */
-
-export * from "./notifications";
-export * from "./notifications.store";
diff --git a/packages/core/src/renderer/components/user-management/cluster-role-bindings/dialog/view.tsx b/packages/core/src/renderer/components/user-management/cluster-role-bindings/dialog/view.tsx
index c65b0adda0..4316d0c606 100644
--- a/packages/core/src/renderer/components/user-management/cluster-role-bindings/dialog/view.tsx
+++ b/packages/core/src/renderer/components/user-management/cluster-role-bindings/dialog/view.tsx
@@ -37,8 +37,8 @@ import type { ShowDetails } from "../../../kube-detail-params/show-details.injec
import type { ClusterRoleBindingStore } from "../store";
import clusterRoleBindingStoreInjectable from "../store.injectable";
import showDetailsInjectable from "../../../kube-detail-params/show-details.injectable";
-import type { ShowCheckedErrorNotification } from "../../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
export interface ClusterRoleBindingDialogProps extends Partial {
}
diff --git a/packages/core/src/renderer/components/user-management/cluster-roles/add-dialog/view.tsx b/packages/core/src/renderer/components/user-management/cluster-roles/add-dialog/view.tsx
index 402be32434..47bf807644 100644
--- a/packages/core/src/renderer/components/user-management/cluster-roles/add-dialog/view.tsx
+++ b/packages/core/src/renderer/components/user-management/cluster-roles/add-dialog/view.tsx
@@ -20,8 +20,8 @@ import closeAddClusterRoleDialogInjectable from "./close.injectable";
import clusterRoleStoreInjectable from "../store.injectable";
import showDetailsInjectable from "../../../kube-detail-params/show-details.injectable";
import addClusterRoleDialogStateInjectable from "./state.injectable";
-import type { ShowCheckedErrorNotification } from "../../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
export interface AddClusterRoleDialogProps extends Partial {
}
diff --git a/packages/core/src/renderer/components/user-management/role-bindings/dialog/view.tsx b/packages/core/src/renderer/components/user-management/role-bindings/dialog/view.tsx
index 8a8ca2597e..6650c43eac 100644
--- a/packages/core/src/renderer/components/user-management/role-bindings/dialog/view.tsx
+++ b/packages/core/src/renderer/components/user-management/role-bindings/dialog/view.tsx
@@ -36,8 +36,8 @@ import clusterRoleStoreInjectable from "../../cluster-roles/store.injectable";
import roleStoreInjectable from "../../roles/store.injectable";
import serviceAccountStoreInjectable from "../../service-accounts/store.injectable";
import { roleApiInjectable } from "@k8slens/kube-api-specifics";
-import type { ShowCheckedErrorNotification } from "../../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
import type { RoleApi } from "@k8slens/kube-api";
export interface RoleBindingDialogProps extends Partial {
diff --git a/packages/core/src/renderer/components/user-management/roles/add-dialog/view.tsx b/packages/core/src/renderer/components/user-management/roles/add-dialog/view.tsx
index b688ec3717..86e415fb1e 100644
--- a/packages/core/src/renderer/components/user-management/roles/add-dialog/view.tsx
+++ b/packages/core/src/renderer/components/user-management/roles/add-dialog/view.tsx
@@ -22,8 +22,8 @@ import closeAddRoleDialogInjectable from "./close.injectable";
import roleStoreInjectable from "../store.injectable";
import showDetailsInjectable from "../../../kube-detail-params/show-details.injectable";
import addRoleDialogStateInjectable from "./state.injectable";
-import type { ShowCheckedErrorNotification } from "../../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
export interface AddRoleDialogProps extends Partial {
}
diff --git a/packages/core/src/renderer/components/user-management/service-accounts/create-dialog/view.tsx b/packages/core/src/renderer/components/user-management/service-accounts/create-dialog/view.tsx
index 483043571b..02e270b1d0 100644
--- a/packages/core/src/renderer/components/user-management/service-accounts/create-dialog/view.tsx
+++ b/packages/core/src/renderer/components/user-management/service-accounts/create-dialog/view.tsx
@@ -23,8 +23,8 @@ import closeCreateServiceAccountDialogInjectable from "./close.injectable";
import serviceAccountStoreInjectable from "../store.injectable";
import showDetailsInjectable from "../../../kube-detail-params/show-details.injectable";
import createServiceAccountDialogStateInjectable from "./state.injectable";
-import type { ShowCheckedErrorNotification } from "../../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
export interface CreateServiceAccountDialogProps extends Partial {
}
diff --git a/packages/core/src/renderer/components/workloads-cronjobs/cron-job-menu.tsx b/packages/core/src/renderer/components/workloads-cronjobs/cron-job-menu.tsx
index dc17e2976c..3f14a29d6d 100644
--- a/packages/core/src/renderer/components/workloads-cronjobs/cron-job-menu.tsx
+++ b/packages/core/src/renderer/components/workloads-cronjobs/cron-job-menu.tsx
@@ -13,8 +13,8 @@ import openConfirmDialogInjectable from "../confirm-dialog/open.injectable";
import type { OpenCronJobTriggerDialog } from "./trigger-dialog/open.injectable";
import openCronJobTriggerDialogInjectable from "./trigger-dialog/open.injectable";
import { cronJobApiInjectable } from "@k8slens/kube-api-specifics";
-import type { ShowCheckedErrorNotification } from "../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
import type { CronJobApi } from "@k8slens/kube-api";
export interface CronJobMenuProps extends KubeObjectMenuProps {}
diff --git a/packages/core/src/renderer/components/workloads-cronjobs/trigger-dialog/view.tsx b/packages/core/src/renderer/components/workloads-cronjobs/trigger-dialog/view.tsx
index 0f3ad0cf9d..255b7dcf1d 100644
--- a/packages/core/src/renderer/components/workloads-cronjobs/trigger-dialog/view.tsx
+++ b/packages/core/src/renderer/components/workloads-cronjobs/trigger-dialog/view.tsx
@@ -13,7 +13,7 @@ import type { DialogProps } from "../../dialog";
import { Dialog } from "../../dialog";
import { Wizard, WizardStep } from "../../wizard";
import type { CronJob } from "@k8slens/kube-object";
-import type { ShowNotification } from "../../notifications";
+import type { ShowNotification, ShowCheckedErrorNotification } from "@k8slens/notifications";
import { cssNames } from "@k8slens/utilities";
import { Input } from "../../input";
import { systemName, maxLength } from "../../input/input_validators";
@@ -21,9 +21,7 @@ import { withInjectables } from "@ogre-tools/injectable-react";
import closeCronJobTriggerDialogInjectable from "./close.injectable";
import { jobApiInjectable } from "@k8slens/kube-api-specifics";
import cronJobTriggerDialogStateInjectable from "./state.injectable";
-import type { ShowCheckedErrorNotification } from "../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../notifications/show-checked-error.injectable";
-import showErrorNotificationInjectable from "../../notifications/show-error-notification.injectable";
+import { showCheckedErrorNotificationInjectable, showErrorNotificationInjectable } from "@k8slens/notifications";
import type { JobApi } from "@k8slens/kube-api";
export interface CronJobTriggerDialogProps extends Partial {
diff --git a/packages/core/src/renderer/components/workloads-daemonsets/daemonset-menu.tsx b/packages/core/src/renderer/components/workloads-daemonsets/daemonset-menu.tsx
index e2fb983589..b6cc4906f0 100644
--- a/packages/core/src/renderer/components/workloads-daemonsets/daemonset-menu.tsx
+++ b/packages/core/src/renderer/components/workloads-daemonsets/daemonset-menu.tsx
@@ -11,8 +11,8 @@ import { withInjectables } from "@ogre-tools/injectable-react";
import { daemonSetApiInjectable } from "@k8slens/kube-api-specifics";
import type { OpenConfirmDialog } from "../confirm-dialog/open.injectable";
import openConfirmDialogInjectable from "../confirm-dialog/open.injectable";
-import type { ShowCheckedErrorNotification } from "../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
import type { DaemonSetApi } from "@k8slens/kube-api";
export interface DaemonSetMenuProps extends KubeObjectMenuProps {}
diff --git a/packages/core/src/renderer/components/workloads-deployments/deployment-menu.tsx b/packages/core/src/renderer/components/workloads-deployments/deployment-menu.tsx
index fe0a5450f5..aa85aa4961 100644
--- a/packages/core/src/renderer/components/workloads-deployments/deployment-menu.tsx
+++ b/packages/core/src/renderer/components/workloads-deployments/deployment-menu.tsx
@@ -13,8 +13,8 @@ import { deploymentApiInjectable } from "@k8slens/kube-api-specifics";
import openDeploymentScaleDialogInjectable from "./scale/open.injectable";
import type { OpenConfirmDialog } from "../confirm-dialog/open.injectable";
import openConfirmDialogInjectable from "../confirm-dialog/open.injectable";
-import type { ShowCheckedErrorNotification } from "../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
import type { DeploymentApi } from "@k8slens/kube-api";
export interface DeploymentMenuProps extends KubeObjectMenuProps {}
diff --git a/packages/core/src/renderer/components/workloads-deployments/scale/dialog.tsx b/packages/core/src/renderer/components/workloads-deployments/scale/dialog.tsx
index 7f2f71245b..1915acea4a 100644
--- a/packages/core/src/renderer/components/workloads-deployments/scale/dialog.tsx
+++ b/packages/core/src/renderer/components/workloads-deployments/scale/dialog.tsx
@@ -19,8 +19,8 @@ import { cssNames } from "@k8slens/utilities";
import { withInjectables } from "@ogre-tools/injectable-react";
import { deploymentApiInjectable } from "@k8slens/kube-api-specifics";
import deploymentScaleDialogStateInjectable from "./dialog-state.injectable";
-import type { ShowCheckedErrorNotification } from "../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
import type { DeploymentApi } from "@k8slens/kube-api";
export interface DeploymentScaleDialogProps extends Partial {
diff --git a/packages/core/src/renderer/components/workloads-pods/load-pods-from-all-namespaces.injectable.ts b/packages/core/src/renderer/components/workloads-pods/load-pods-from-all-namespaces.injectable.ts
index de5b22a2fd..4ffd45f0c0 100644
--- a/packages/core/src/renderer/components/workloads-pods/load-pods-from-all-namespaces.injectable.ts
+++ b/packages/core/src/renderer/components/workloads-pods/load-pods-from-all-namespaces.injectable.ts
@@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import clusterFrameContextForNamespacedResourcesInjectable from "../../cluster-frame-context/for-namespaced-resources.injectable";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import podStoreInjectable from "./store.injectable";
const loadPodsFromAllNamespacesInjectable = getInjectable({
diff --git a/packages/core/src/renderer/components/workloads-pods/pod-container-port.tsx b/packages/core/src/renderer/components/workloads-pods/pod-container-port.tsx
index 1e82342633..b2d35718d5 100644
--- a/packages/core/src/renderer/components/workloads-pods/pod-container-port.tsx
+++ b/packages/core/src/renderer/components/workloads-pods/pod-container-port.tsx
@@ -10,7 +10,7 @@ import { disposeOnUnmount, observer } from "mobx-react";
import type { ContainerPort, Pod } from "@k8slens/kube-object";
import { action, makeObservable, observable, reaction } from "mobx";
import { cssNames } from "@k8slens/utilities";
-import type { ShowNotification } from "../notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { Button } from "@k8slens/button";
import type { ForwardedPort, PortForwardStore } from "../../port-forward";
import { predictProtocol } from "../../port-forward";
@@ -24,7 +24,7 @@ import notifyErrorPortForwardingInjectable from "../../port-forward/notify-error
import type { OpenPortForward } from "../../port-forward/open-port-forward.injectable";
import openPortForwardInjectable from "../../port-forward/open-port-forward.injectable";
import { loggerInjectionToken } from "@k8slens/logger";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
export interface PodContainerPortProps {
pod: Pod;
diff --git a/packages/core/src/renderer/components/workloads-replicasets/scale-dialog/dialog.tsx b/packages/core/src/renderer/components/workloads-replicasets/scale-dialog/dialog.tsx
index fd1d4cad44..7f0999c845 100644
--- a/packages/core/src/renderer/components/workloads-replicasets/scale-dialog/dialog.tsx
+++ b/packages/core/src/renderer/components/workloads-replicasets/scale-dialog/dialog.tsx
@@ -19,8 +19,8 @@ import type { ReplicaSet } from "@k8slens/kube-object";
import { withInjectables } from "@ogre-tools/injectable-react";
import { replicaSetApiInjectable } from "@k8slens/kube-api-specifics";
import replicaSetScaleDialogStateInjectable from "./state.injectable";
-import type { ShowCheckedErrorNotification } from "../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
import type { ReplicaSetApi } from "@k8slens/kube-api";
export interface ReplicaSetScaleDialogProps extends Partial {
diff --git a/packages/core/src/renderer/components/workloads-replication-controllers/replication-controller-details.tsx b/packages/core/src/renderer/components/workloads-replication-controllers/replication-controller-details.tsx
index d706e1fa94..3641248d69 100644
--- a/packages/core/src/renderer/components/workloads-replication-controllers/replication-controller-details.tsx
+++ b/packages/core/src/renderer/components/workloads-replication-controllers/replication-controller-details.tsx
@@ -13,8 +13,8 @@ import { Badge } from "../badge";
import type { KubeObjectDetailsProps } from "../kube-object-details";
import type { ReplicationController } from "@k8slens/kube-object";
import { replicationControllerApiInjectable } from "@k8slens/kube-api-specifics";
-import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
-import type { ShowNotification } from "../notifications";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { Slider } from "../slider";
import type { ReplicationControllerApi } from "@k8slens/kube-api";
diff --git a/packages/core/src/renderer/components/workloads-statefulsets/scale/dialog.tsx b/packages/core/src/renderer/components/workloads-statefulsets/scale/dialog.tsx
index 5159fa5146..b6206071db 100644
--- a/packages/core/src/renderer/components/workloads-statefulsets/scale/dialog.tsx
+++ b/packages/core/src/renderer/components/workloads-statefulsets/scale/dialog.tsx
@@ -19,8 +19,8 @@ import { cssNames } from "@k8slens/utilities";
import { withInjectables } from "@ogre-tools/injectable-react";
import { statefulSetApiInjectable } from "@k8slens/kube-api-specifics";
import statefulSetDialogStateInjectable from "./dialog-state.injectable";
-import type { ShowCheckedErrorNotification } from "../../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
import type { StatefulSetApi } from "@k8slens/kube-api";
export interface StatefulSetScaleDialogProps extends Partial {
diff --git a/packages/core/src/renderer/components/workloads-statefulsets/statefulset-menu.tsx b/packages/core/src/renderer/components/workloads-statefulsets/statefulset-menu.tsx
index 0ddf45bfb2..7db7c9def4 100644
--- a/packages/core/src/renderer/components/workloads-statefulsets/statefulset-menu.tsx
+++ b/packages/core/src/renderer/components/workloads-statefulsets/statefulset-menu.tsx
@@ -11,8 +11,8 @@ import { withInjectables } from "@ogre-tools/injectable-react";
import { statefulSetApiInjectable } from "@k8slens/kube-api-specifics";
import type { OpenConfirmDialog } from "../confirm-dialog/open.injectable";
import openConfirmDialogInjectable from "../confirm-dialog/open.injectable";
-import type { ShowCheckedErrorNotification } from "../notifications/show-checked-error.injectable";
-import showCheckedErrorNotificationInjectable from "../notifications/show-checked-error.injectable";
+import type { ShowCheckedErrorNotification } from "@k8slens/notifications";
+import { showCheckedErrorNotificationInjectable } from "@k8slens/notifications";
import type { StatefulSetApi } from "@k8slens/kube-api";
export interface StatefulSetMenuProps extends KubeObjectMenuProps {}
diff --git a/packages/core/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.injectable.ts b/packages/core/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.injectable.ts
index a8f15ca3d7..3913b33241 100644
--- a/packages/core/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.injectable.ts
+++ b/packages/core/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.injectable.ts
@@ -11,7 +11,7 @@ import assert from "assert";
import emitAppEventInjectable from "../../../../common/app-event-bus/emit-event.injectable";
import loadExtensionsInjectable from "../../load-extensions.injectable";
import { loggerInjectionToken } from "@k8slens/logger";
-import showErrorNotificationInjectable from "../../../components/notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
const initClusterFrameInjectable = getInjectable({
id: "init-cluster-frame",
diff --git a/packages/core/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.ts b/packages/core/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.ts
index acc2868c50..1d59134bb4 100644
--- a/packages/core/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.ts
+++ b/packages/core/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.ts
@@ -4,7 +4,7 @@
*/
import type { Cluster } from "../../../../common/cluster/cluster";
import type { CatalogEntityRegistry } from "../../../api/catalog/entity/registry";
-import type { ShowNotification } from "../../../components/notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import { when } from "mobx";
import { requestSetClusterFrameId } from "../../../ipc";
import type { EmitAppEvent } from "../../../../common/app-event-bus/emit-event.injectable";
diff --git a/packages/core/src/renderer/getDiForUnitTesting.tsx b/packages/core/src/renderer/getDiForUnitTesting.tsx
index 6a2c54adb7..45fc10cfc6 100644
--- a/packages/core/src/renderer/getDiForUnitTesting.tsx
+++ b/packages/core/src/renderer/getDiForUnitTesting.tsx
@@ -24,6 +24,7 @@ import { loggerFeature } from "@k8slens/logger";
import { clusterSidebarFeature } from "@k8slens/cluster-sidebar";
import { randomFeature } from "@k8slens/random";
import { kubeApiSpecificsFeature } from "@k8slens/kube-api-specifics";
+import { notificationsFeature } from "@k8slens/notifications";
export const getDiForUnitTesting = () => {
const environment = "renderer";
@@ -45,6 +46,7 @@ export const getDiForUnitTesting = () => {
clusterSidebarFeature,
randomFeature,
kubeApiSpecificsFeature,
+ notificationsFeature,
);
});
diff --git a/packages/core/src/renderer/initializers/add-sync-entries.injectable.tsx b/packages/core/src/renderer/initializers/add-sync-entries.injectable.tsx
index 5d42d0e496..025c2bf679 100644
--- a/packages/core/src/renderer/initializers/add-sync-entries.injectable.tsx
+++ b/packages/core/src/renderer/initializers/add-sync-entries.injectable.tsx
@@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable";
import React from "react";
import navigateToKubernetesPreferencesInjectable from "../../features/preferences/common/navigate-to-kubernetes-preferences.injectable";
import { runInAction } from "mobx";
-import showSuccessNotificationInjectable from "../components/notifications/show-success-notification.injectable";
+import { showSuccessNotificationInjectable } from "@k8slens/notifications";
import userPreferencesStateInjectable from "../../features/user-preferences/common/state.injectable";
const addSyncEntriesInjectable = getInjectable({
diff --git a/packages/core/src/renderer/ipc/list-namespaces-forbidden-handler.injectable.tsx b/packages/core/src/renderer/ipc/list-namespaces-forbidden-handler.injectable.tsx
index 7b1e4303a7..8e21d5a4d0 100644
--- a/packages/core/src/renderer/ipc/list-namespaces-forbidden-handler.injectable.tsx
+++ b/packages/core/src/renderer/ipc/list-namespaces-forbidden-handler.injectable.tsx
@@ -8,9 +8,8 @@ import type { ListNamespaceForbiddenArgs } from "../../common/ipc/cluster";
import { Button } from "@k8slens/button";
import type { IpcRendererEvent } from "electron";
import React from "react";
-import notificationsStoreInjectable from "../components/notifications/notifications-store.injectable";
+import { notificationsStoreInjectable, showSuccessNotificationInjectable } from "@k8slens/notifications";
import { getMillisecondsFromUnixEpoch } from "../../common/utils/date/get-current-date-time";
-import showSuccessNotificationInjectable from "../components/notifications/show-success-notification.injectable";
import getClusterByIdInjectable from "../../features/cluster/storage/common/get-by-id.injectable";
const intervalBetweenNotifications = 1000 * 60; // 60s
diff --git a/packages/core/src/renderer/ipc/register-ipc-listeners.injectable.ts b/packages/core/src/renderer/ipc/register-ipc-listeners.injectable.ts
index 0a80abb9e6..5af8fbb50e 100644
--- a/packages/core/src/renderer/ipc/register-ipc-listeners.injectable.ts
+++ b/packages/core/src/renderer/ipc/register-ipc-listeners.injectable.ts
@@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable";
import { defaultHotbarCells } from "../../features/hotbar/storage/common/types";
import { clusterListNamespaceForbiddenChannel } from "../../common/ipc/cluster";
import { hotbarTooManyItemsChannel } from "../../common/ipc/hotbar";
-import showErrorNotificationInjectable from "../components/notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import ipcRendererInjectable from "../utils/channel/ipc-renderer.injectable";
import listNamespacesForbiddenHandlerInjectable from "./list-namespaces-forbidden-handler.injectable";
diff --git a/packages/core/src/renderer/k8s/api-kube.injectable.ts b/packages/core/src/renderer/k8s/api-kube.injectable.ts
index 68b62578b5..57314d03f7 100644
--- a/packages/core/src/renderer/k8s/api-kube.injectable.ts
+++ b/packages/core/src/renderer/k8s/api-kube.injectable.ts
@@ -9,7 +9,7 @@ import { apiKubeInjectionToken } from "@k8slens/kube-api";
import { storesAndApisCanBeCreatedInjectionToken } from "@k8slens/kube-api-specifics";
import createKubeJsonApiInjectable from "../../common/k8s-api/create-kube-json-api.injectable";
import isDevelopmentInjectable from "../../common/vars/is-development.injectable";
-import showErrorNotificationInjectable from "../components/notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import windowLocationInjectable from "../../common/k8s-api/window-location.injectable";
import { apiBaseServerAddressInjectionToken } from "../../common/k8s-api/api-base-configs";
diff --git a/packages/core/src/renderer/port-forward/about-port-forwarding.injectable.tsx b/packages/core/src/renderer/port-forward/about-port-forwarding.injectable.tsx
index f174f9019d..f365565ff2 100644
--- a/packages/core/src/renderer/port-forward/about-port-forwarding.injectable.tsx
+++ b/packages/core/src/renderer/port-forward/about-port-forwarding.injectable.tsx
@@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable";
import React from "react";
import navigateToPortForwardsInjectable from "../../common/front-end-routing/routes/cluster/network/port-forwards/navigate-to-port-forwards.injectable";
import { Button } from "@k8slens/button";
-import showSuccessNotificationInjectable from "../components/notifications/show-success-notification.injectable";
+import { showSuccessNotificationInjectable } from "@k8slens/notifications";
const aboutPortForwardingInjectable = getInjectable({
id: "about-port-forwarding",
diff --git a/packages/core/src/renderer/port-forward/notify-error-port-forwarding.injectable.tsx b/packages/core/src/renderer/port-forward/notify-error-port-forwarding.injectable.tsx
index edd8357be7..16466c7d70 100644
--- a/packages/core/src/renderer/port-forward/notify-error-port-forwarding.injectable.tsx
+++ b/packages/core/src/renderer/port-forward/notify-error-port-forwarding.injectable.tsx
@@ -4,7 +4,7 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import navigateToPortForwardsInjectable from "../../common/front-end-routing/routes/cluster/network/port-forwards/navigate-to-port-forwards.injectable";
-import showErrorNotificationInjectable from "../components/notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import React from "react";
import { Button } from "@k8slens/button";
diff --git a/packages/core/src/renderer/port-forward/open-port-forward.injectable.ts b/packages/core/src/renderer/port-forward/open-port-forward.injectable.ts
index 812eb091ed..a1aaf1b001 100644
--- a/packages/core/src/renderer/port-forward/open-port-forward.injectable.ts
+++ b/packages/core/src/renderer/port-forward/open-port-forward.injectable.ts
@@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import { loggerInjectionToken } from "@k8slens/logger";
import openLinkInBrowserInjectable from "../../common/utils/open-link-in-browser.injectable";
-import showErrorNotificationInjectable from "../components/notifications/show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "@k8slens/notifications";
import type { ForwardedPort } from "./port-forward-item";
import { portForwardAddress } from "./port-forward-utils";
diff --git a/packages/core/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable.ts b/packages/core/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable.ts
index 146b96be91..a04e26c0e9 100644
--- a/packages/core/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable.ts
+++ b/packages/core/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable.ts
@@ -13,7 +13,7 @@ import navigateToEntitySettingsInjectable from "../../../common/front-end-routin
import navigateToClusterViewInjectable from "../../../common/front-end-routing/routes/cluster-view/navigate-to-cluster-view.injectable";
import catalogEntityRegistryInjectable from "../../api/catalog/entity/registry.injectable";
import navigateToPreferencesInjectable from "../../../features/preferences/common/navigate-to-preferences.injectable";
-import showShortInfoNotificationInjectable from "../../components/notifications/show-short-info.injectable";
+import { showShortInfoNotificationInjectable } from "@k8slens/notifications";
import getClusterByIdInjectable from "../../../features/cluster/storage/common/get-by-id.injectable";
const bindProtocolAddRouteHandlersInjectable = getInjectable({
diff --git a/packages/core/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.tsx b/packages/core/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.tsx
index eee3a0d371..5473f6855b 100644
--- a/packages/core/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.tsx
+++ b/packages/core/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.tsx
@@ -11,7 +11,7 @@ import {
EXTENSION_PUBLISHER_MATCH,
LensProtocolRouter,
} from "../../../common/protocol-handler";
-import type { ShowNotification } from "../../components/notifications";
+import type { ShowNotification } from "@k8slens/notifications";
import type { NavigateToCatalog } from "../../../common/front-end-routing/routes/catalog/navigate-to-catalog.injectable";
import type { NavigateToEntitySettings } from "../../../common/front-end-routing/routes/entity-settings/navigate-to-entity-settings.injectable";
import type { NavigateToClusterView } from "../../../common/front-end-routing/routes/cluster-view/navigate-to-cluster-view.injectable";
diff --git a/packages/core/src/renderer/protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.injectable.ts b/packages/core/src/renderer/protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.injectable.ts
index a21e68328a..c4b9c972f2 100644
--- a/packages/core/src/renderer/protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.injectable.ts
+++ b/packages/core/src/renderer/protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.injectable.ts
@@ -6,8 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable";
import extensionLoaderInjectable from "../../../extensions/extension-loader/extension-loader.injectable";
import { LensProtocolRouterRenderer } from "./lens-protocol-router-renderer";
import { loggerInjectionToken } from "@k8slens/logger";
-import showErrorNotificationInjectable from "../../components/notifications/show-error-notification.injectable";
-import showShortInfoNotificationInjectable from "../../components/notifications/show-short-info.injectable";
+import { showErrorNotificationInjectable, showShortInfoNotificationInjectable } from "@k8slens/notifications";
import isExtensionEnabledInjectable from "../../../features/extensions/enabled/common/is-enabled.injectable";
const lensProtocolRouterRendererInjectable = getInjectable({
diff --git a/packages/core/src/renderer/protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.tsx b/packages/core/src/renderer/protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.tsx
index 3c9959aa87..b22084fa8e 100644
--- a/packages/core/src/renderer/protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.tsx
+++ b/packages/core/src/renderer/protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.tsx
@@ -9,7 +9,7 @@ import * as proto from "../../../common/protocol-handler";
import Url from "url-parse";
import type { LensProtocolRouterDependencies } from "../../../common/protocol-handler";
import { foldAttemptResults, ProtocolHandlerInvalid, RouteAttempt } from "../../../common/protocol-handler";
-import type { ShowNotification } from "../../components/notifications";
+import type { ShowNotification } from "@k8slens/notifications";
interface Dependencies extends LensProtocolRouterDependencies {
showShortInfoNotification: ShowNotification;
diff --git a/packages/ui-components/notifications/.eslintrc.json b/packages/ui-components/notifications/.eslintrc.json
new file mode 100644
index 0000000000..b15115cb69
--- /dev/null
+++ b/packages/ui-components/notifications/.eslintrc.json
@@ -0,0 +1,6 @@
+{
+ "extends": "@k8slens/eslint-config/eslint",
+ "parserOptions": {
+ "project": "./tsconfig.json"
+ }
+}
diff --git a/packages/ui-components/notifications/.prettierrc b/packages/ui-components/notifications/.prettierrc
new file mode 100644
index 0000000000..edd47b479e
--- /dev/null
+++ b/packages/ui-components/notifications/.prettierrc
@@ -0,0 +1 @@
+"@k8slens/eslint-config/prettier"
diff --git a/packages/ui-components/notifications/CHANGELOG.md b/packages/ui-components/notifications/CHANGELOG.md
new file mode 100644
index 0000000000..e4d87c4d45
--- /dev/null
+++ b/packages/ui-components/notifications/CHANGELOG.md
@@ -0,0 +1,4 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
diff --git a/packages/ui-components/notifications/README.md b/packages/ui-components/notifications/README.md
new file mode 100644
index 0000000000..f8759aa675
--- /dev/null
+++ b/packages/ui-components/notifications/README.md
@@ -0,0 +1,19 @@
+# @k8slens/notifications
+
+This package contains stuff related to creating Lens-applications.
+
+# Usage
+
+```bash
+$ npm install @k8slens/notifications
+```
+
+```typescript
+export type { notificationsName, notificationsProps } from "@k8slens/button";
+export type { notifications } from "@k8slens/button";
+export { defaultEnterDurationFornotificationsdInjectable } from "@k8slens/button";
+export { defaultLeaveDurationFornotificationsdInjectable } from "@k8slens/button";
+export { requestAnimationFrameInjectable } from "@k8slens/button";
+```
+
+## Extendability
diff --git a/packages/ui-components/notifications/index.ts b/packages/ui-components/notifications/index.ts
new file mode 100644
index 0000000000..cdcb1da93f
--- /dev/null
+++ b/packages/ui-components/notifications/index.ts
@@ -0,0 +1,25 @@
+/**
+ * Copyright (c) OpenLens Authors. All rights reserved.
+ * Licensed under MIT License. See LICENSE in root directory for more information.
+ */
+
+export type {
+ NotificationId,
+ NotificationMessage,
+ NotificationStatus,
+ CreateNotificationOptions,
+ Notification,
+ NotificationsStore,
+} from "./src/notifications.store";
+export type { ShowNotification } from "./src/notifications";
+export { Notifications } from "./src/notifications";
+export { notificationsClusterFrameChildComponentInjectable } from "./src/notifications-cluster-frame-child-component.injectable";
+export { notificationsRootFrameChildComponentInjectable } from "./src/notifications-root-frame-child-component.injectable";
+export { notificationsStoreInjectable } from "./src/notifications-store.injectable";
+export type { ShowCheckedErrorNotification } from "./src/show-checked-error.injectable";
+export { showCheckedErrorNotificationInjectable } from "./src/show-checked-error.injectable";
+export { showErrorNotificationInjectable } from "./src/show-error-notification.injectable";
+export { showInfoNotificationInjectable } from "./src/show-info-notification.injectable";
+export { showShortInfoNotificationInjectable } from "./src/show-short-info.injectable";
+export { showSuccessNotificationInjectable } from "./src/show-success-notification.injectable";
+export { notificationsFeature } from "./src/feature";
diff --git a/packages/ui-components/notifications/jest.config.js b/packages/ui-components/notifications/jest.config.js
new file mode 100644
index 0000000000..05ec7ecd4d
--- /dev/null
+++ b/packages/ui-components/notifications/jest.config.js
@@ -0,0 +1,3 @@
+const { configForReact } = require("@k8slens/jest").monorepoPackageConfig(__dirname);
+
+module.exports = configForReact;
diff --git a/packages/ui-components/notifications/package.json b/packages/ui-components/notifications/package.json
new file mode 100644
index 0000000000..4a3e12831d
--- /dev/null
+++ b/packages/ui-components/notifications/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "@k8slens/notifications",
+ "private": false,
+ "version": "1.0.0",
+ "description": "Highly extendable notifications in the Lens.",
+ "type": "commonjs",
+ "files": [
+ "dist"
+ ],
+ "publishConfig": {
+ "access": "public",
+ "registry": "https://registry.npmjs.org/"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lensapp/lens.git"
+ },
+ "main": "dist/index.js",
+ "exports": {
+ ".": "./dist/index.js",
+ "./styles": "./dist/index.css"
+ },
+ "types": "dist/index.d.ts",
+ "author": {
+ "name": "OpenLens Authors",
+ "email": "info@k8slens.dev"
+ },
+ "license": "MIT",
+ "homepage": "https://github.com/lensapp/lens",
+ "scripts": {
+ "build": "lens-webpack-build",
+ "lint": "lens-lint",
+ "lint:fix": "lens-lint --fix"
+ },
+ "peerDependencies": {
+ "@k8slens/react-application": "^1.0.0-alpha.5",
+ "@k8slens/animate": "^1.0.0-alpha.0",
+ "@k8slens/application": "^6.5.0",
+ "@k8slens/event-emitter": "^1.0.0",
+ "@k8slens/feature-core": "^6.5.0-alpha.0",
+ "@k8slens/json-api": "^1.0.0-alpha.3",
+ "@k8slens/icon": "^1.0.0-alpha.7",
+ "@k8slens/run-many": "^1.0.0",
+ "@k8slens/logger": "^1.0.0",
+ "@k8slens/tooltip": "^1.0.0",
+ "@k8slens/utilities": "^1.0.0-alpha.1",
+ "@ogre-tools/injectable-react": "^17.2.0",
+ "@ogre-tools/injectable": "^17.2.0",
+ "@ogre-tools/fp": "^17.2.0",
+ "@ogre-tools/injectable-extension-for-auto-registration": "^17.2.0",
+ "@ogre-tools/injectable-extension-for-mobx": "^17.2.0",
+ "auto-bind": "^4.0.0",
+ "lodash": "^4.17.21",
+ "mobx": "^6.8.0",
+ "mobx-react": "^7.6.0",
+ "react-router-dom": "^5.3.4",
+ "react": "^17.0.2",
+ "react-dom": "^17.0.2",
+ "winston": "^3.8.2",
+ "uuid": "^8.3.2"
+ },
+ "devDependencies": {
+ "@k8slens/eslint-config": "^6.5.0",
+ "@k8slens/webpack": "^6.5.0"
+ }
+}
diff --git a/packages/ui-components/notifications/src/feature.ts b/packages/ui-components/notifications/src/feature.ts
new file mode 100644
index 0000000000..7294c4dda1
--- /dev/null
+++ b/packages/ui-components/notifications/src/feature.ts
@@ -0,0 +1,14 @@
+import { getFeature } from "@k8slens/feature-core";
+import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration";
+
+export const notificationsFeature = getFeature({
+ id: "notifications-feature",
+
+ register: (di) => {
+ autoRegister({
+ di,
+ targetModule: module,
+ getRequireContexts: () => [require.context("./", true, /\.injectable\.(ts|tsx)$/)],
+ });
+ },
+});
diff --git a/packages/core/src/renderer/components/notifications/notifications-cluster-frame-child-component.injectable.ts b/packages/ui-components/notifications/src/notifications-cluster-frame-child-component.injectable.ts
similarity index 81%
rename from packages/core/src/renderer/components/notifications/notifications-cluster-frame-child-component.injectable.ts
rename to packages/ui-components/notifications/src/notifications-cluster-frame-child-component.injectable.ts
index 45f2f3652a..51561b7e69 100644
--- a/packages/core/src/renderer/components/notifications/notifications-cluster-frame-child-component.injectable.ts
+++ b/packages/ui-components/notifications/src/notifications-cluster-frame-child-component.injectable.ts
@@ -7,7 +7,7 @@ import { computed } from "mobx";
import { Notifications } from "./notifications";
import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application";
-const notificationsClusterFrameChildComponentInjectable = getInjectable({
+export const notificationsClusterFrameChildComponentInjectable = getInjectable({
id: "notifications-cluster-frame-child-component",
instantiate: () => ({
@@ -18,5 +18,3 @@ const notificationsClusterFrameChildComponentInjectable = getInjectable({
injectionToken: clusterFrameChildComponentInjectionToken,
});
-
-export default notificationsClusterFrameChildComponentInjectable;
diff --git a/packages/core/src/renderer/components/notifications/notifications-root-frame-child-component.injectable.ts b/packages/ui-components/notifications/src/notifications-root-frame-child-component.injectable.ts
similarity index 81%
rename from packages/core/src/renderer/components/notifications/notifications-root-frame-child-component.injectable.ts
rename to packages/ui-components/notifications/src/notifications-root-frame-child-component.injectable.ts
index 20d83e78fd..5faf4585f4 100644
--- a/packages/core/src/renderer/components/notifications/notifications-root-frame-child-component.injectable.ts
+++ b/packages/ui-components/notifications/src/notifications-root-frame-child-component.injectable.ts
@@ -7,7 +7,7 @@ import { rootFrameChildComponentInjectionToken } from "@k8slens/react-applicatio
import { computed } from "mobx";
import { Notifications } from "./notifications";
-const notificationsRootFrameChildComponentInjectable = getInjectable({
+export const notificationsRootFrameChildComponentInjectable = getInjectable({
id: "notifications-root-frame-child-component",
instantiate: () => ({
@@ -18,5 +18,3 @@ const notificationsRootFrameChildComponentInjectable = getInjectable({
injectionToken: rootFrameChildComponentInjectionToken,
});
-
-export default notificationsRootFrameChildComponentInjectable;
diff --git a/packages/core/src/renderer/components/notifications/notifications-store.injectable.ts b/packages/ui-components/notifications/src/notifications-store.injectable.ts
similarity index 77%
rename from packages/core/src/renderer/components/notifications/notifications-store.injectable.ts
rename to packages/ui-components/notifications/src/notifications-store.injectable.ts
index 1b14abef96..4c20ff0dce 100644
--- a/packages/core/src/renderer/components/notifications/notifications-store.injectable.ts
+++ b/packages/ui-components/notifications/src/notifications-store.injectable.ts
@@ -5,9 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import { NotificationsStore } from "./notifications.store";
-const notificationsStoreInjectable = getInjectable({
+export const notificationsStoreInjectable = getInjectable({
id: "notifications-store",
instantiate: () => new NotificationsStore(),
});
-
-export default notificationsStoreInjectable;
diff --git a/packages/core/src/renderer/components/notifications/notifications.scss b/packages/ui-components/notifications/src/notifications.scss
similarity index 73%
rename from packages/core/src/renderer/components/notifications/notifications.scss
rename to packages/ui-components/notifications/src/notifications.scss
index f91ebde44c..4b3c26ce20 100644
--- a/packages/core/src/renderer/components/notifications/notifications.scss
+++ b/packages/ui-components/notifications/src/notifications.scss
@@ -3,13 +3,25 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
+$color-white: rgb(255,255,255);
+
+@mixin hidden-scrollbar {
+ overflow: auto;
+ // Chrome, Safari
+ &::-webkit-scrollbar {
+ width: 0;
+ height: 0;
+ background: transparent;
+ }
+}
+
.Notifications {
@include hidden-scrollbar;
position: absolute;
right: 0;
top: 0;
- padding: $padding * 2;
+ padding: 8px * 2;
max-height: 100vh;
z-index: 100000;
height: min-content!important;
@@ -20,20 +32,20 @@
.notification {
flex: 0 0;
- padding: $padding * 1.5;
+ padding: 8px * 1.5;
border-radius: 3px;
min-width: 350px;
max-width: 35vw;
word-break: break-word;
&:not(:last-child) {
- margin-bottom: $margin * 2;
+ margin-bottom: 8px * 2;
}
> .message {
white-space: pre-line;
- padding-left: $padding;
- padding-right: $padding * 2;
+ padding-left: 8px;
+ padding-right: 8px * 2;
align-self: center;
a {
diff --git a/packages/core/src/renderer/components/notifications/notifications.store.ts b/packages/ui-components/notifications/src/notifications.store.ts
similarity index 93%
rename from packages/core/src/renderer/components/notifications/notifications.store.ts
rename to packages/ui-components/notifications/src/notifications.store.ts
index d4e16dd0d2..4ee9383152 100644
--- a/packages/core/src/renderer/components/notifications/notifications.store.ts
+++ b/packages/ui-components/notifications/src/notifications.store.ts
@@ -44,13 +44,15 @@ export class NotificationsStore {
}
getById(id: NotificationId) {
- return this.notifications.find(item => item.id === id);
+ return this.notifications.find((item) => item.id === id);
}
addAutoHideTimer(id: NotificationId) {
const notification = this.getById(id);
- if (!notification) return;
+ if (!notification) {
+ return;
+ }
this.removeAutoHideTimer(id);
if (notification?.timeout) {
@@ -74,7 +76,7 @@ export class NotificationsStore {
...rawNotification,
};
const id = notification.id;
- const index = this.notifications.findIndex(item => item.id === id);
+ const index = this.notifications.findIndex((item) => item.id === id);
if (index > -1) {
this.notifications.splice(index, 1, notification); // update existing with same id
diff --git a/packages/core/src/renderer/components/notifications/notifications.tsx b/packages/ui-components/notifications/src/notifications.tsx
similarity index 85%
rename from packages/core/src/renderer/components/notifications/notifications.tsx
rename to packages/ui-components/notifications/src/notifications.tsx
index 343068b25e..5338687727 100644
--- a/packages/core/src/renderer/components/notifications/notifications.tsx
+++ b/packages/ui-components/notifications/src/notifications.tsx
@@ -11,11 +11,16 @@ import { disposeOnUnmount, observer } from "mobx-react";
import { JsonApiErrorParsed } from "@k8slens/json-api";
import type { Disposer } from "@k8slens/utilities";
import { cssNames, prevDefault } from "@k8slens/utilities";
-import type { CreateNotificationOptions, Notification, NotificationMessage, NotificationsStore } from "./notifications.store";
+import type {
+ CreateNotificationOptions,
+ Notification,
+ NotificationMessage,
+ NotificationsStore,
+} from "./notifications.store";
import { Animate } from "@k8slens/animate";
import { Icon } from "@k8slens/icon";
import { withInjectables } from "@ogre-tools/injectable-react";
-import notificationsStoreInjectable from "./notifications-store.injectable";
+import { notificationsStoreInjectable } from "./notifications-store.injectable";
export type ShowNotification = (message: NotificationMessage, opts?: CreateNotificationOptions) => Disposer;
@@ -29,9 +34,13 @@ class NonInjectedNotifications extends React.Component {
componentDidMount() {
disposeOnUnmount(this, [
- reaction(() => this.props.store.notifications.length, () => {
- this.scrollToLastNotification();
- }, { delay: 250 }),
+ reaction(
+ () => this.props.store.notifications.length,
+ () => {
+ this.scrollToLastNotification();
+ },
+ { delay: 250 },
+ ),
]);
}
@@ -59,8 +68,8 @@ class NonInjectedNotifications extends React.Component {
const { notifications, remove, addAutoHideTimer, removeAutoHideTimer } = this.props.store;
return (
- this.elem = e}>
- {notifications.map(notification => {
+
(this.elem = e)}>
+ {notifications.map((notification) => {
const { id, status, onClose } = notification;
const msgText = this.getMessage(notification);
diff --git a/packages/core/src/renderer/components/notifications/show-checked-error.injectable.ts b/packages/ui-components/notifications/src/show-checked-error.injectable.ts
similarity index 76%
rename from packages/core/src/renderer/components/notifications/show-checked-error.injectable.ts
rename to packages/ui-components/notifications/src/show-checked-error.injectable.ts
index afc30c4e4e..da5614d78c 100644
--- a/packages/core/src/renderer/components/notifications/show-checked-error.injectable.ts
+++ b/packages/ui-components/notifications/src/show-checked-error.injectable.ts
@@ -7,11 +7,15 @@ import { JsonApiErrorParsed } from "@k8slens/json-api";
import { loggerInjectionToken } from "@k8slens/logger";
import type { Disposer } from "@k8slens/utilities";
import type { CreateNotificationOptions } from "./notifications.store";
-import showErrorNotificationInjectable from "./show-error-notification.injectable";
+import { showErrorNotificationInjectable } from "./show-error-notification.injectable";
-export type ShowCheckedErrorNotification = (message: unknown, fallback: string, opts?: CreateNotificationOptions) => Disposer;
+export type ShowCheckedErrorNotification = (
+ message: unknown,
+ fallback: string,
+ opts?: CreateNotificationOptions,
+) => Disposer;
-const showCheckedErrorNotificationInjectable = getInjectable({
+export const showCheckedErrorNotificationInjectable = getInjectable({
id: "show-checked-error-notififcation",
instantiate: (di): ShowCheckedErrorNotification => {
const showErrorNotification = di.inject(showErrorNotificationInjectable);
@@ -28,5 +32,3 @@ const showCheckedErrorNotificationInjectable = getInjectable({
};
},
});
-
-export default showCheckedErrorNotificationInjectable;
diff --git a/packages/core/src/renderer/components/notifications/show-error-notification.injectable.ts b/packages/ui-components/notifications/src/show-error-notification.injectable.ts
similarity index 77%
rename from packages/core/src/renderer/components/notifications/show-error-notification.injectable.ts
rename to packages/ui-components/notifications/src/show-error-notification.injectable.ts
index 14b56b06a5..b71370d9d5 100644
--- a/packages/core/src/renderer/components/notifications/show-error-notification.injectable.ts
+++ b/packages/ui-components/notifications/src/show-error-notification.injectable.ts
@@ -5,9 +5,9 @@
import { getInjectable } from "@ogre-tools/injectable";
import type { ShowNotification } from "./notifications";
import { NotificationStatus } from "./notifications.store";
-import notificationsStoreInjectable from "./notifications-store.injectable";
+import { notificationsStoreInjectable } from "./notifications-store.injectable";
-const showErrorNotificationInjectable = getInjectable({
+export const showErrorNotificationInjectable = getInjectable({
id: "show-error-notification",
instantiate: (di): ShowNotification => {
@@ -21,5 +21,3 @@ const showErrorNotificationInjectable = getInjectable({
});
},
});
-
-export default showErrorNotificationInjectable;
diff --git a/packages/core/src/renderer/components/notifications/show-info-notification.injectable.ts b/packages/ui-components/notifications/src/show-info-notification.injectable.ts
similarity index 78%
rename from packages/core/src/renderer/components/notifications/show-info-notification.injectable.ts
rename to packages/ui-components/notifications/src/show-info-notification.injectable.ts
index d67836b413..78e8826316 100644
--- a/packages/core/src/renderer/components/notifications/show-info-notification.injectable.ts
+++ b/packages/ui-components/notifications/src/show-info-notification.injectable.ts
@@ -5,9 +5,9 @@
import { getInjectable } from "@ogre-tools/injectable";
import type { ShowNotification } from "./notifications";
import { NotificationStatus } from "./notifications.store";
-import notificationsStoreInjectable from "./notifications-store.injectable";
+import { notificationsStoreInjectable } from "./notifications-store.injectable";
-const showInfoNotificationInjectable = getInjectable({
+export const showInfoNotificationInjectable = getInjectable({
id: "show-info-notification",
instantiate: (di): ShowNotification => {
@@ -21,5 +21,3 @@ const showInfoNotificationInjectable = getInjectable({
});
},
});
-
-export default showInfoNotificationInjectable;
diff --git a/packages/core/src/renderer/components/notifications/show-short-info.injectable.ts b/packages/ui-components/notifications/src/show-short-info.injectable.ts
similarity index 74%
rename from packages/core/src/renderer/components/notifications/show-short-info.injectable.ts
rename to packages/ui-components/notifications/src/show-short-info.injectable.ts
index b5865b4c27..86efbd8564 100644
--- a/packages/core/src/renderer/components/notifications/show-short-info.injectable.ts
+++ b/packages/ui-components/notifications/src/show-short-info.injectable.ts
@@ -5,9 +5,9 @@
import { getInjectable } from "@ogre-tools/injectable";
import type { ShowNotification } from "./notifications";
-import showInfoNotificationInjectable from "./show-info-notification.injectable";
+import { showInfoNotificationInjectable } from "./show-info-notification.injectable";
-const showShortInfoNotificationInjectable = getInjectable({
+export const showShortInfoNotificationInjectable = getInjectable({
id: "show-short-info-notification",
instantiate: (di): ShowNotification => {
const showInfoNotification = di.inject(showInfoNotificationInjectable);
@@ -20,5 +20,3 @@ const showShortInfoNotificationInjectable = getInjectable({
};
},
});
-
-export default showShortInfoNotificationInjectable;
diff --git a/packages/core/src/renderer/components/notifications/show-success-notification.injectable.ts b/packages/ui-components/notifications/src/show-success-notification.injectable.ts
similarity index 78%
rename from packages/core/src/renderer/components/notifications/show-success-notification.injectable.ts
rename to packages/ui-components/notifications/src/show-success-notification.injectable.ts
index c75c84cc3d..0a9eb01e32 100644
--- a/packages/core/src/renderer/components/notifications/show-success-notification.injectable.ts
+++ b/packages/ui-components/notifications/src/show-success-notification.injectable.ts
@@ -5,9 +5,9 @@
import { getInjectable } from "@ogre-tools/injectable";
import type { ShowNotification } from "./notifications";
import { NotificationStatus } from "./notifications.store";
-import notificationsStoreInjectable from "./notifications-store.injectable";
+import { notificationsStoreInjectable } from "./notifications-store.injectable";
-const showSuccessNotificationInjectable = getInjectable({
+export const showSuccessNotificationInjectable = getInjectable({
id: "show-success-notification",
instantiate: (di): ShowNotification => {
@@ -22,5 +22,3 @@ const showSuccessNotificationInjectable = getInjectable({
});
},
});
-
-export default showSuccessNotificationInjectable;
diff --git a/packages/ui-components/notifications/tailwind.config.js b/packages/ui-components/notifications/tailwind.config.js
new file mode 100644
index 0000000000..0feb6790ac
--- /dev/null
+++ b/packages/ui-components/notifications/tailwind.config.js
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) OpenLens Authors. All rights reserved.
+ * Licensed under MIT License. See LICENSE in root directory for more information.
+ */
+
+const path = require("path");
+
+module.exports = {
+ content: [path.join(__dirname, "src/**/*.tsx")],
+ darkMode: "class",
+ theme: {
+ fontFamily: {
+ sans: ["Roboto", "Helvetica", "Arial", "sans-serif"],
+ },
+ extend: {
+ colors: {
+ textAccent: "var(--textColorAccent)",
+ textPrimary: "var(--textColorPrimary)",
+ textTertiary: "var(--textColorTertiary)",
+ textDimmed: "var(--textColorDimmed)",
+ },
+ },
+ },
+ variants: {
+ extend: {},
+ },
+ plugins: [],
+};
diff --git a/packages/ui-components/notifications/tsconfig.json b/packages/ui-components/notifications/tsconfig.json
new file mode 100644
index 0000000000..9e140d79da
--- /dev/null
+++ b/packages/ui-components/notifications/tsconfig.json
@@ -0,0 +1,4 @@
+{
+ "extends": "@k8slens/typescript/config/base.json",
+ "include": ["**/*.ts", "**/*.tsx"],
+}
diff --git a/packages/ui-components/notifications/webpack.config.js b/packages/ui-components/notifications/webpack.config.js
new file mode 100644
index 0000000000..1cda407f5a
--- /dev/null
+++ b/packages/ui-components/notifications/webpack.config.js
@@ -0,0 +1 @@
+module.exports = require("@k8slens/webpack").configForReact;
From 2547b19245906431fd26190ced8841eb6d6f2467 Mon Sep 17 00:00:00 2001
From: Gabriel
Date: Thu, 1 Jun 2023 21:44:28 +0200
Subject: [PATCH 5/6] chore: update snapshots
Signed-off-by: Gabriel
---
...acters-in-page-registrations.test.tsx.snap | 12 +-
.../navigate-to-extension-page.test.tsx.snap | 30 +-
.../navigating-between-routes.test.tsx.snap | 12 +-
...ation-using-application-menu.test.tsx.snap | 12 +-
...ding-preference-when-disabled.test.ts.snap | 12 +-
.../installing-update.test.ts.snap | 54 ++--
...update-using-application-menu.test.ts.snap | 6 +-
...g-update-using-topbar-button.test.tsx.snap | 12 +-
.../installing-update-using-tray.test.ts.snap | 36 +--
.../__snapshots__/force-update.test.ts.snap | 18 +-
...eriodical-checking-of-updates.test.ts.snap | 6 +-
...selection-of-update-stability.test.ts.snap | 6 +-
.../custom-columns.test.tsx.snap | 48 ++--
.../entity-running.test.tsx.snap | 12 +-
.../opening-entity-details.test.tsx.snap | 54 ++--
.../custom-resources-in-sidebar.test.tsx.snap | 48 ++--
...ing-cluster-frame-components.test.tsx.snap | 6 +-
...-and-tab-navigation-for-core.test.tsx.snap | 42 +--
...ab-navigation-for-extensions.test.tsx.snap | 54 ++--
.../visibility-of-sidebar-items.test.tsx.snap | 12 +-
.../workload-overview.test.tsx.snap | 6 +-
.../delete-cluster-dialog.test.tsx.snap | 30 +-
...when-cluster-is-not-relevant.test.tsx.snap | 18 +-
...when-cluster-is-not-relevant.test.tsx.snap | 18 +-
...when-cluster-is-not-relevant.test.tsx.snap | 18 +-
...hide-kube-object-detail-item.test.tsx.snap | 12 +-
...when-cluster-is-not-relevant.test.tsx.snap | 18 +-
...how-status-for-a-kube-object.test.tsx.snap | 36 +--
...when-cluster-is-not-relevant.test.tsx.snap | 18 +-
.../edit-namespace-from-new-tab.test.tsx.snap | 96 +++----
...e-from-previously-opened-tab.test.tsx.snap | 12 +-
.../__snapshots__/pods.test.tsx.snap | 18 +-
...when-cluster-is-not-relevant.test.tsx.snap | 18 +-
.../keyboard-shortcuts.test.tsx.snap | 48 ++--
.../view-with-extra-columns.test.ts.snap | 6 +-
...-settings-for-correct-entity.test.tsx.snap | 24 +-
...gation-using-application-menu.test.ts.snap | 12 +-
...elm-repository-in-preferences.test.ts.snap | 72 ++---
...tory-from-list-in-preferences.test.ts.snap | 60 ++--
...m-repositories-in-preferences.test.ts.snap | 60 ++--
...ive-repository-in-preferences.test.ts.snap | 24 +-
...lling-helm-chart-from-new-tab.test.ts.snap | 266 +++++++++---------
...rt-from-previously-opened-tab.test.ts.snap | 12 +-
...tab-for-installing-helm-chart.test.ts.snap | 54 ++--
.../upgrade-chart-new-tab.test.ts.snap | 18 +-
...wing-details-for-helm-release.test.ts.snap | 108 +++----
.../hovering-hotbar-menu.test.ts.snap | 12 +-
.../route-with-sub-namespaces.test.tsx.snap | 18 +-
.../__snapshots__/download-logs.test.tsx.snap | 12 +-
.../closing-preferences.test.tsx.snap | 48 ++--
...nsion-adding-preference-tabs.test.tsx.snap | 6 +-
.../hiding-of-empty-branches.test.tsx.snap | 18 +-
...n-to-application-preferences.test.tsx.snap | 30 +-
...igation-to-editor-preferences.test.ts.snap | 12 +-
...tension-specific-preferences.test.tsx.snap | 54 ++--
...ion-to-kubernetes-preferences.test.ts.snap | 12 +-
...vigation-to-proxy-preferences.test.ts.snap | 12 +-
...ion-to-telemetry-preferences.test.tsx.snap | 30 +-
...ation-to-terminal-preferences.test.ts.snap | 12 +-
...gation-using-application-menu.test.ts.snap | 12 +-
.../navigation-using-tray.test.ts.snap | 12 +-
.../urls-of-legacy-extensions.test.tsx.snap | 30 +-
...-originating-from-extensions.test.tsx.snap | 6 +-
...dability-using-extension-api.test.tsx.snap | 24 +-
...gation-using-application-menu.test.ts.snap | 18 +-
.../__snapshots__/status-bar.test.tsx.snap | 66 ++---
.../__snapshots__/cluster-frame.test.tsx.snap | 18 +-
67 files changed, 1018 insertions(+), 1018 deletions(-)
diff --git a/packages/core/src/features/__snapshots__/extension-special-characters-in-page-registrations.test.tsx.snap b/packages/core/src/features/__snapshots__/extension-special-characters-in-page-registrations.test.tsx.snap
index 93047b5827..ff06a6b9ad 100644
--- a/packages/core/src/features/__snapshots__/extension-special-characters-in-page-registrations.test.tsx.snap
+++ b/packages/core/src/features/__snapshots__/extension-special-characters-in-page-registrations.test.tsx.snap
@@ -2,6 +2,9 @@
exports[`extension special characters in page registrations renders 1`] = `
+
@@ -339,14 +342,14 @@ exports[`extension special characters in page registrations renders 1`] = `
/>
-
`;
exports[`extension special characters in page registrations when navigating to route with ID having special characters renders 1`] = `
+
@@ -560,8 +563,5 @@ exports[`extension special characters in page registrations when navigating to r
/>
-
`;
diff --git a/packages/core/src/features/__snapshots__/navigate-to-extension-page.test.tsx.snap b/packages/core/src/features/__snapshots__/navigate-to-extension-page.test.tsx.snap
index 1dbfd9a235..c24dec4f2d 100644
--- a/packages/core/src/features/__snapshots__/navigate-to-extension-page.test.tsx.snap
+++ b/packages/core/src/features/__snapshots__/navigate-to-extension-page.test.tsx.snap
@@ -2,6 +2,9 @@
exports[`navigate to extension page renders 1`] = `
+
@@ -339,14 +342,14 @@ exports[`navigate to extension page renders 1`] = `
/>
-
`;
exports[`navigate to extension page when extension navigates to child route renders 1`] = `
+
@@ -560,14 +563,14 @@ exports[`navigate to extension page when extension navigates to child route rend
/>
-
`;
exports[`navigate to extension page when extension navigates to route with parameters renders 1`] = `
+
@@ -797,14 +800,14 @@ exports[`navigate to extension page when extension navigates to route with param
/>
-
`;
exports[`navigate to extension page when extension navigates to route without parameters renders 1`] = `
+
@@ -1034,14 +1037,14 @@ exports[`navigate to extension page when extension navigates to route without pa
/>
-
`;
exports[`navigate to extension page when extension navigates to route without parameters when changing page parameters renders 1`] = `
+
@@ -1271,8 +1274,5 @@ exports[`navigate to extension page when extension navigates to route without pa
/>
-
`;
diff --git a/packages/core/src/features/__snapshots__/navigating-between-routes.test.tsx.snap b/packages/core/src/features/__snapshots__/navigating-between-routes.test.tsx.snap
index 1280d1a3ce..91a68cf004 100644
--- a/packages/core/src/features/__snapshots__/navigating-between-routes.test.tsx.snap
+++ b/packages/core/src/features/__snapshots__/navigating-between-routes.test.tsx.snap
@@ -2,6 +2,9 @@
exports[`navigating between routes given route with optional path parameters when navigating to route with path parameters renders 1`] = `
+
@@ -218,14 +221,14 @@ exports[`navigating between routes given route with optional path parameters whe
/>
-
`;
exports[`navigating between routes given route without path parameters when navigating to route renders 1`] = `
+
@@ -439,8 +442,5 @@ exports[`navigating between routes given route without path parameters when navi
/>
-
`;
diff --git a/packages/core/src/features/add-cluster/__snapshots__/navigation-using-application-menu.test.tsx.snap b/packages/core/src/features/add-cluster/__snapshots__/navigation-using-application-menu.test.tsx.snap
index 91e901072d..1b9d75f07f 100644
--- a/packages/core/src/features/add-cluster/__snapshots__/navigation-using-application-menu.test.tsx.snap
+++ b/packages/core/src/features/add-cluster/__snapshots__/navigation-using-application-menu.test.tsx.snap
@@ -2,6 +2,9 @@
exports[`add-cluster - navigation using application menu renders 1`] = `
+
@@ -339,14 +342,14 @@ exports[`add-cluster - navigation using application menu renders 1`] = `
/>
-
`;
exports[`add-cluster - navigation using application menu when navigating to add cluster using application menu renders 1`] = `
+
@@ -644,8 +647,5 @@ exports[`add-cluster - navigation using application menu when navigating to add
/>
-
`;
diff --git a/packages/core/src/features/application-update/__snapshots__/hiding-preference-when-disabled.test.ts.snap b/packages/core/src/features/application-update/__snapshots__/hiding-preference-when-disabled.test.ts.snap
index 3f0ffbfa07..93866d2d68 100644
--- a/packages/core/src/features/application-update/__snapshots__/hiding-preference-when-disabled.test.ts.snap
+++ b/packages/core/src/features/application-update/__snapshots__/hiding-preference-when-disabled.test.ts.snap
@@ -3,6 +3,9 @@
exports[`hiding Update Channel preference with updating is not enabled renders 1`] = `
+
@@ -673,9 +676,6 @@ exports[`hiding Update Channel preference with updating is not enabled renders 1
/>
-
`;
@@ -683,6 +683,9 @@ exports[`hiding Update Channel preference with updating is not enabled renders 1
exports[`showing Update Channel preference with updating is enabled renders 1`] = `
+
@@ -1442,9 +1445,6 @@ exports[`showing Update Channel preference with updating is enabled renders 1`]
/>
-
`;
diff --git a/packages/core/src/features/application-update/__snapshots__/installing-update.test.ts.snap b/packages/core/src/features/application-update/__snapshots__/installing-update.test.ts.snap
index 70dd9078fb..3cf464f6ac 100644
--- a/packages/core/src/features/application-update/__snapshots__/installing-update.test.ts.snap
+++ b/packages/core/src/features/application-update/__snapshots__/installing-update.test.ts.snap
@@ -3,6 +3,9 @@
exports[`installing update when started renders 1`] = `
+
@@ -340,9 +343,6 @@ exports[`installing update when started renders 1`] = `
/>
-
`;
@@ -350,6 +350,9 @@ exports[`installing update when started renders 1`] = `
exports[`installing update when started when user checks for updates renders 1`] = `
+
@@ -687,9 +690,6 @@ exports[`installing update when started when user checks for updates renders 1`]
/>
-
`;
@@ -697,6 +697,9 @@ exports[`installing update when started when user checks for updates renders 1`]
exports[`installing update when started when user checks for updates when new update is discovered renders 1`] = `
+
@@ -1034,9 +1037,6 @@ exports[`installing update when started when user checks for updates when new up
/>
-
`;
@@ -1044,6 +1044,9 @@ exports[`installing update when started when user checks for updates when new up
exports[`installing update when started when user checks for updates when new update is discovered when download fails renders 1`] = `
+
@@ -1381,9 +1384,6 @@ exports[`installing update when started when user checks for updates when new up
/>
-
`;
@@ -1391,6 +1391,9 @@ exports[`installing update when started when user checks for updates when new up
exports[`installing update when started when user checks for updates when new update is discovered when download succeeds given checking for updates again when check resolves with different update that was previously downloaded when download fails renders 1`] = `
+
@@ -1728,9 +1731,6 @@ exports[`installing update when started when user checks for updates when new up
/>
-
`;
@@ -1738,6 +1738,9 @@ exports[`installing update when started when user checks for updates when new up
exports[`installing update when started when user checks for updates when new update is discovered when download succeeds given checking for updates again when check resolves with different update that was previously downloaded when download resolves successfully renders 1`] = `
+
@@ -2100,9 +2103,6 @@ exports[`installing update when started when user checks for updates when new up
/>
-
`;
@@ -2110,6 +2110,9 @@ exports[`installing update when started when user checks for updates when new up
exports[`installing update when started when user checks for updates when new update is discovered when download succeeds given checking for updates again when check resolves with same update that is already downloaded renders 1`] = `
+
@@ -2472,9 +2475,6 @@ exports[`installing update when started when user checks for updates when new up
/>
-
`;
@@ -2482,6 +2482,9 @@ exports[`installing update when started when user checks for updates when new up
exports[`installing update when started when user checks for updates when new update is discovered when download succeeds renders 1`] = `
+
@@ -2844,9 +2847,6 @@ exports[`installing update when started when user checks for updates when new up
/>
-
`;
@@ -2854,6 +2854,9 @@ exports[`installing update when started when user checks for updates when new up
exports[`installing update when started when user checks for updates when no new update is discovered renders 1`] = `
+
@@ -3191,9 +3194,6 @@ exports[`installing update when started when user checks for updates when no new
/>
-
`;
diff --git a/packages/core/src/features/application-update/child-features/application-update-using-application-menu/__snapshots__/application-update-using-application-menu.test.ts.snap b/packages/core/src/features/application-update/child-features/application-update-using-application-menu/__snapshots__/application-update-using-application-menu.test.ts.snap
index 51f9570841..16ffd55d35 100644
--- a/packages/core/src/features/application-update/child-features/application-update-using-application-menu/__snapshots__/application-update-using-application-menu.test.ts.snap
+++ b/packages/core/src/features/application-update/child-features/application-update-using-application-menu/__snapshots__/application-update-using-application-menu.test.ts.snap
@@ -3,6 +3,9 @@
exports[`installing update using application menu when started renders 1`] = `
+
@@ -340,9 +343,6 @@ exports[`installing update using application menu when started renders 1`] = `
/>
-
`;
diff --git a/packages/core/src/features/application-update/child-features/application-update-using-top-bar/__snapshots__/installing-update-using-topbar-button.test.tsx.snap b/packages/core/src/features/application-update/child-features/application-update-using-top-bar/__snapshots__/installing-update-using-topbar-button.test.tsx.snap
index 6ec61d27cf..99a1eea3a7 100644
--- a/packages/core/src/features/application-update/child-features/application-update-using-top-bar/__snapshots__/installing-update-using-topbar-button.test.tsx.snap
+++ b/packages/core/src/features/application-update/child-features/application-update-using-top-bar/__snapshots__/installing-update-using-topbar-button.test.tsx.snap
@@ -3,6 +3,9 @@
exports[`encourage user to update when sufficient time passed since update was downloaded when started given the update check when update downloaded given some time passes, when checking for updates again when checking for updates resolves with same version that was previously downloaded renders 1`] = `
+
@@ -365,9 +368,6 @@ exports[`encourage user to update when sufficient time passed since update was d
/>
-
`;
@@ -375,6 +375,9 @@ exports[`encourage user to update when sufficient time passed since update was d
exports[`encourage user to update when sufficient time passed since update was downloaded when started renders 1`] = `
+
@@ -712,9 +715,6 @@ exports[`encourage user to update when sufficient time passed since update was d
/>
-
`;
diff --git a/packages/core/src/features/application-update/child-features/application-update-using-tray/__snapshots__/installing-update-using-tray.test.ts.snap b/packages/core/src/features/application-update/child-features/application-update-using-tray/__snapshots__/installing-update-using-tray.test.ts.snap
index 6634465613..79150fefa1 100644
--- a/packages/core/src/features/application-update/child-features/application-update-using-tray/__snapshots__/installing-update-using-tray.test.ts.snap
+++ b/packages/core/src/features/application-update/child-features/application-update-using-tray/__snapshots__/installing-update-using-tray.test.ts.snap
@@ -3,6 +3,9 @@
exports[`installing update using tray when started renders 1`] = `
+
@@ -340,9 +343,6 @@ exports[`installing update using tray when started renders 1`] = `
/>
-
`;
@@ -350,6 +350,9 @@ exports[`installing update using tray when started renders 1`] = `
exports[`installing update using tray when started when user checks for updates using tray renders 1`] = `
+
@@ -687,9 +690,6 @@ exports[`installing update using tray when started when user checks for updates
/>
-
`;
@@ -697,6 +697,9 @@ exports[`installing update using tray when started when user checks for updates
exports[`installing update using tray when started when user checks for updates using tray when new update is discovered renders 1`] = `
+
@@ -1034,9 +1037,6 @@ exports[`installing update using tray when started when user checks for updates
/>
-
`;
@@ -1044,6 +1044,9 @@ exports[`installing update using tray when started when user checks for updates
exports[`installing update using tray when started when user checks for updates using tray when new update is discovered when download fails renders 1`] = `
+
@@ -1381,9 +1384,6 @@ exports[`installing update using tray when started when user checks for updates
/>
-
`;
@@ -1391,6 +1391,9 @@ exports[`installing update using tray when started when user checks for updates
exports[`installing update using tray when started when user checks for updates using tray when new update is discovered when download succeeds renders 1`] = `
+
@@ -1753,9 +1756,6 @@ exports[`installing update using tray when started when user checks for updates
/>
-
`;
@@ -1763,6 +1763,9 @@ exports[`installing update using tray when started when user checks for updates
exports[`installing update using tray when started when user checks for updates using tray when no new update is discovered renders 1`] = `
+
@@ -2100,9 +2103,6 @@ exports[`installing update using tray when started when user checks for updates
/>
-
`;
diff --git a/packages/core/src/features/application-update/child-features/force-update/__snapshots__/force-update.test.ts.snap b/packages/core/src/features/application-update/child-features/force-update/__snapshots__/force-update.test.ts.snap
index e705f60cb1..9c0bd3e31e 100644
--- a/packages/core/src/features/application-update/child-features/force-update/__snapshots__/force-update.test.ts.snap
+++ b/packages/core/src/features/application-update/child-features/force-update/__snapshots__/force-update.test.ts.snap
@@ -3,6 +3,9 @@
exports[`force user to update when too long since update was downloaded when application is started given checking for updates and it resolves, when update was downloaded renders 1`] = `
+
@@ -365,9 +368,6 @@ exports[`force user to update when too long since update was downloaded when app
/>
-
`;
@@ -375,6 +375,9 @@ exports[`force user to update when too long since update was downloaded when app
exports[`force user to update when too long since update was downloaded when application is started given checking for updates and it resolves, when update was downloaded when enough time passes to consider that update must be installed renders 1`] = `
+
@@ -737,9 +740,6 @@ exports[`force user to update when too long since update was downloaded when app
/>
-
+
@@ -1156,9 +1159,6 @@ exports[`force user to update when too long since update was downloaded when app
/>
-
`;
diff --git a/packages/core/src/features/application-update/child-features/periodical-checking-of-updates/__snapshots__/periodical-checking-of-updates.test.ts.snap b/packages/core/src/features/application-update/child-features/periodical-checking-of-updates/__snapshots__/periodical-checking-of-updates.test.ts.snap
index f6dd2cabb8..cfa3ad9c5d 100644
--- a/packages/core/src/features/application-update/child-features/periodical-checking-of-updates/__snapshots__/periodical-checking-of-updates.test.ts.snap
+++ b/packages/core/src/features/application-update/child-features/periodical-checking-of-updates/__snapshots__/periodical-checking-of-updates.test.ts.snap
@@ -3,6 +3,9 @@
exports[`periodical checking of updates given updater is enabled and configuration exists, when started renders 1`] = `
+
@@ -340,9 +343,6 @@ exports[`periodical checking of updates given updater is enabled and configurati
/>
-
`;
diff --git a/packages/core/src/features/application-update/child-features/selection-of-update-stability/__snapshots__/selection-of-update-stability.test.ts.snap b/packages/core/src/features/application-update/child-features/selection-of-update-stability/__snapshots__/selection-of-update-stability.test.ts.snap
index 6a3c008e43..c2c1a208b5 100644
--- a/packages/core/src/features/application-update/child-features/selection-of-update-stability/__snapshots__/selection-of-update-stability.test.ts.snap
+++ b/packages/core/src/features/application-update/child-features/selection-of-update-stability/__snapshots__/selection-of-update-stability.test.ts.snap
@@ -3,6 +3,9 @@
exports[`selection of update stability when started renders 1`] = `
+
@@ -340,9 +343,6 @@ exports[`selection of update stability when started renders 1`] = `
/>
-
`;
diff --git a/packages/core/src/features/catalog/__snapshots__/custom-columns.test.tsx.snap b/packages/core/src/features/catalog/__snapshots__/custom-columns.test.tsx.snap
index 30677b1639..44900992c0 100644
--- a/packages/core/src/features/catalog/__snapshots__/custom-columns.test.tsx.snap
+++ b/packages/core/src/features/catalog/__snapshots__/custom-columns.test.tsx.snap
@@ -3,6 +3,9 @@
exports[`custom category columns for catalog renders 1`] = `
+
@@ -579,9 +582,6 @@ exports[`custom category columns for catalog renders 1`] = `
/>
-
`;
@@ -589,6 +589,9 @@ exports[`custom category columns for catalog renders 1`] = `
exports[`custom category columns for catalog when category is added using default colemns renders 1`] = `
+
@@ -1196,9 +1199,6 @@ exports[`custom category columns for catalog when category is added using defaul
/>
-
`;
@@ -1206,6 +1206,9 @@ exports[`custom category columns for catalog when category is added using defaul
exports[`custom category columns for catalog when category is added using default colemns when an extension is registered with additional custom columns when the Test category tab is clicked renders 1`] = `
+
@@ -1803,9 +1806,6 @@ exports[`custom category columns for catalog when category is added using defaul
/>
-
`;
@@ -1813,6 +1813,9 @@ exports[`custom category columns for catalog when category is added using defaul
exports[`custom category columns for catalog when category is added using default colemns when the Test category tab is clicked renders 1`] = `
+
@@ -2399,9 +2402,6 @@ exports[`custom category columns for catalog when category is added using defaul
/>
-
`;
@@ -2409,6 +2409,9 @@ exports[`custom category columns for catalog when category is added using defaul
exports[`custom category columns for catalog when category is added with custom columns renders 1`] = `
+
@@ -3016,9 +3019,6 @@ exports[`custom category columns for catalog when category is added with custom
/>
-
`;
@@ -3026,6 +3026,9 @@ exports[`custom category columns for catalog when category is added with custom
exports[`custom category columns for catalog when category is added with custom columns when the Test category tab is clicked renders 1`] = `
+
@@ -3570,9 +3573,6 @@ exports[`custom category columns for catalog when category is added with custom
/>
-
`;
@@ -3580,6 +3580,9 @@ exports[`custom category columns for catalog when category is added with custom
exports[`custom category columns for catalog when category is added without default columns renders 1`] = `
+
@@ -4187,9 +4190,6 @@ exports[`custom category columns for catalog when category is added without defa
/>
-
`;
@@ -4197,6 +4197,9 @@ exports[`custom category columns for catalog when category is added without defa
exports[`custom category columns for catalog when category is added without default columns when the Test category tab is clicked renders 1`] = `
+
@@ -4730,9 +4733,6 @@ exports[`custom category columns for catalog when category is added without defa
/>
-
`;
diff --git a/packages/core/src/features/catalog/__snapshots__/entity-running.test.tsx.snap b/packages/core/src/features/catalog/__snapshots__/entity-running.test.tsx.snap
index 865ac34654..4a7b84a3f7 100644
--- a/packages/core/src/features/catalog/__snapshots__/entity-running.test.tsx.snap
+++ b/packages/core/src/features/catalog/__snapshots__/entity-running.test.tsx.snap
@@ -3,6 +3,9 @@
exports[`entity running technical tests when navigated to catalog renders 1`] = `
+
@@ -704,9 +707,6 @@ exports[`entity running technical tests when navigated to catalog renders 1`] =
/>
-
`;
@@ -714,6 +714,9 @@ exports[`entity running technical tests when navigated to catalog renders 1`] =
exports[`entity running technical tests when navigated to catalog when details panel is opened renders 1`] = `
+
@@ -1415,9 +1418,6 @@ exports[`entity running technical tests when navigated to catalog when details p
/>
-
+
@@ -719,9 +722,6 @@ exports[`Showing correct entity settings when navigating to local cluster entity
/>
-
+
@@ -1119,9 +1122,6 @@ exports[`Showing correct entity settings when navigating to non-local cluster en
/>
-
+
@@ -1421,9 +1424,6 @@ exports[`Showing correct entity settings when navigating to weblink entity setti
/>
-
+
@@ -713,9 +716,6 @@ exports[`add custom helm repository in preferences when navigating to preference
/>
-
+
@@ -1472,9 +1475,6 @@ exports[`add custom helm repository in preferences when navigating to preference
/>
-
+
@@ -2231,9 +2234,6 @@ exports[`add custom helm repository in preferences when navigating to preference
/>
-
+
@@ -3101,9 +3104,6 @@ exports[`add custom helm repository in preferences when navigating to preference
/>
-
+
@@ -3868,9 +3871,6 @@ exports[`add custom helm repository in preferences when navigating to preference
/>
-
+
@@ -4738,9 +4741,6 @@ exports[`add custom helm repository in preferences when navigating to preference
/>
-
+
@@ -5790,9 +5793,6 @@ exports[`add custom helm repository in preferences when navigating to preference
/>
-
+
@@ -6660,9 +6663,6 @@ exports[`add custom helm repository in preferences when navigating to preference
/>
-
+
@@ -7712,9 +7715,6 @@ exports[`add custom helm repository in preferences when navigating to preference
/>
-
+
@@ -8583,9 +8586,6 @@ exports[`add custom helm repository in preferences when navigating to preference
/>
-
+
@@ -9339,9 +9342,6 @@ exports[`add custom helm repository in preferences when navigating to preference
/>
-
+
@@ -10095,9 +10098,6 @@ exports[`add custom helm repository in preferences when navigating to preference
/>
-
+
@@ -713,9 +716,6 @@ exports[`add helm repository from list in preferences when navigating to prefere
/>
-
+
@@ -1472,9 +1475,6 @@ exports[`add helm repository from list in preferences when navigating to prefere
/>
-
+
@@ -2233,9 +2236,6 @@ exports[`add helm repository from list in preferences when navigating to prefere
/>
-
+
@@ -3802,9 +3805,6 @@ exports[`add helm repository from list in preferences when navigating to prefere
/>
-
+
@@ -4550,9 +4553,6 @@ exports[`add helm repository from list in preferences when navigating to prefere
/>
-
+
@@ -5343,9 +5346,6 @@ exports[`add helm repository from list in preferences when navigating to prefere
/>
-
+
@@ -6138,9 +6141,6 @@ exports[`add helm repository from list in preferences when navigating to prefere
/>
-
+
@@ -7740,9 +7743,6 @@ exports[`add helm repository from list in preferences when navigating to prefere
/>
-
+
@@ -713,9 +716,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
/>
-
+
@@ -1461,9 +1464,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
/>
-
+
@@ -2101,9 +2104,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
/>
-
+
@@ -2849,9 +2852,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
/>
-
+
@@ -3489,9 +3492,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
/>
-
+
@@ -4237,9 +4240,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
/>
-
+
@@ -5030,9 +5033,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
/>
-
+
@@ -5670,9 +5673,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
/>
-
+
@@ -6310,9 +6313,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
/>
-
+
@@ -6950,9 +6953,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
/>
-
+
@@ -713,9 +716,6 @@ exports[`remove helm repository from list of active repositories in preferences
/>
-
+
@@ -1444,9 +1447,6 @@ exports[`remove helm repository from list of active repositories in preferences
/>
-
+
@@ -2175,9 +2178,6 @@ exports[`remove helm repository from list of active repositories in preferences
/>
-
+
@@ -2923,9 +2926,6 @@ exports[`remove helm repository from list of active repositories in preferences
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- close
-
-
-
- Close
-
-
-
-
-
-
@@ -10170,6 +10132,44 @@ exports[`installing helm chart from new tab given tab for installing chart was n
+
+
+
+
+
+
+
+
+ close
+
+
+
+ Close
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- close
-
-
-
- Close
-
-
-
-
-
-
@@ -10950,6 +10912,44 @@ exports[`installing helm chart from new tab given tab for installing chart was n
+
+
+
+
+
+
+
+
+ close
+
+
+
+ Close
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -340,9 +343,6 @@ exports[`hovering hotbar menu tests renders 1`] = `
/>
-
+
@@ -687,9 +690,6 @@ exports[`hovering hotbar menu tests when hovering over the hotbar menu renders 1
/>
-
`;
exports[`preferences - closing-preferences given already in a page and then navigated to preferences when navigating to a tab in preferences renders 1`] = `
+
@@ -2550,14 +2553,14 @@ exports[`preferences - closing-preferences given already in a page and then navi
/>
-
`;
exports[`preferences - closing-preferences given already in a page and then navigated to preferences when navigating to a tab in preferences when preferences are closed renders 1`] = `
+
@@ -2773,14 +2776,14 @@ exports[`preferences - closing-preferences given already in a page and then navi
/>
-
`;
exports[`preferences - closing-preferences given already in a page and then navigated to preferences when preferences are closed renders 1`] = `
+
@@ -2996,8 +2999,5 @@ exports[`preferences - closing-preferences given already in a page and then navi
/>
-
`;
diff --git a/packages/core/src/features/preferences/__snapshots__/extension-adding-preference-tabs.test.tsx.snap b/packages/core/src/features/preferences/__snapshots__/extension-adding-preference-tabs.test.tsx.snap
index 2bcae9f787..129a5d8e71 100644
--- a/packages/core/src/features/preferences/__snapshots__/extension-adding-preference-tabs.test.tsx.snap
+++ b/packages/core/src/features/preferences/__snapshots__/extension-adding-preference-tabs.test.tsx.snap
@@ -3,6 +3,9 @@
exports[`preferences: extension adding preference tabs given in preferences, when extension with preference tabs is enabled renders 1`] = `
+
@@ -697,9 +700,6 @@ exports[`preferences: extension adding preference tabs given in preferences, whe
/>
-
`;
diff --git a/packages/core/src/features/preferences/__snapshots__/hiding-of-empty-branches.test.tsx.snap b/packages/core/src/features/preferences/__snapshots__/hiding-of-empty-branches.test.tsx.snap
index 347e0ad0bb..63b426c7ec 100644
--- a/packages/core/src/features/preferences/__snapshots__/hiding-of-empty-branches.test.tsx.snap
+++ b/packages/core/src/features/preferences/__snapshots__/hiding-of-empty-branches.test.tsx.snap
@@ -2,6 +2,9 @@
exports[`preferences - hiding-of-empty-branches, given in preferences page given tab group and empty tabs renders 1`] = `
+
@@ -672,14 +675,14 @@ exports[`preferences - hiding-of-empty-branches, given in preferences page given
/>
-
`;
exports[`preferences - hiding-of-empty-branches, given in preferences page given tab group and empty tabs when an item appears for one of the tabs renders 1`] = `
+
@@ -1378,14 +1381,14 @@ exports[`preferences - hiding-of-empty-branches, given in preferences page given
/>
-
`;
exports[`preferences - hiding-of-empty-branches, given in preferences page given tab group and empty tabs when an item appears for one of the tabs when an item appears for the remaining tab renders 1`] = `
+
@@ -2096,8 +2099,5 @@ exports[`preferences - hiding-of-empty-branches, given in preferences page given
/>
-
`;
diff --git a/packages/core/src/features/preferences/__snapshots__/navigation-to-application-preferences.test.tsx.snap b/packages/core/src/features/preferences/__snapshots__/navigation-to-application-preferences.test.tsx.snap
index a98fee596b..541332fe35 100644
--- a/packages/core/src/features/preferences/__snapshots__/navigation-to-application-preferences.test.tsx.snap
+++ b/packages/core/src/features/preferences/__snapshots__/navigation-to-application-preferences.test.tsx.snap
@@ -2,6 +2,9 @@
exports[`preferences - navigation to application preferences given in preferences, when rendered renders 1`] = `
+
@@ -672,14 +675,14 @@ exports[`preferences - navigation to application preferences given in preference
/>
-
`;
exports[`preferences - navigation to application preferences given in preferences, when rendered when extension with application preference items gets enabled renders 1`] = `
+
@@ -1381,14 +1384,14 @@ exports[`preferences - navigation to application preferences given in preference
/>
-
`;
exports[`preferences - navigation to application preferences given in some child page of preferences, when rendered renders 1`] = `
+
@@ -1804,14 +1807,14 @@ exports[`preferences - navigation to application preferences given in some child
/>
-
`;
exports[`preferences - navigation to application preferences given in some child page of preferences, when rendered when navigating to application preferences using navigation renders 1`] = `
+
@@ -2482,15 +2485,15 @@ exports[`preferences - navigation to application preferences given in some child
/>
-
`;
exports[`preferences - navigation to application preferences given in some child page of preferences, when rendered when navigating to preferences without specifying the tab renders 1`] = `
+
@@ -3161,9 +3164,6 @@ exports[`preferences - navigation to application preferences given in some child
/>
-
`;
diff --git a/packages/core/src/features/preferences/__snapshots__/navigation-to-editor-preferences.test.ts.snap b/packages/core/src/features/preferences/__snapshots__/navigation-to-editor-preferences.test.ts.snap
index 068e445fc5..d1a0dc44f1 100644
--- a/packages/core/src/features/preferences/__snapshots__/navigation-to-editor-preferences.test.ts.snap
+++ b/packages/core/src/features/preferences/__snapshots__/navigation-to-editor-preferences.test.ts.snap
@@ -2,6 +2,9 @@
exports[`preferences - navigation to editor preferences given in preferences, when rendered renders 1`] = `
+
@@ -672,14 +675,14 @@ exports[`preferences - navigation to editor preferences given in preferences, wh
/>
-
`;
exports[`preferences - navigation to editor preferences given in preferences, when rendered when navigating to editor preferences using navigation renders 1`] = `
+
@@ -1328,8 +1331,5 @@ exports[`preferences - navigation to editor preferences given in preferences, wh
/>
-
`;
diff --git a/packages/core/src/features/preferences/__snapshots__/navigation-to-extension-specific-preferences.test.tsx.snap b/packages/core/src/features/preferences/__snapshots__/navigation-to-extension-specific-preferences.test.tsx.snap
index 75ea28be0c..65cf147915 100644
--- a/packages/core/src/features/preferences/__snapshots__/navigation-to-extension-specific-preferences.test.tsx.snap
+++ b/packages/core/src/features/preferences/__snapshots__/navigation-to-extension-specific-preferences.test.tsx.snap
@@ -3,6 +3,9 @@
exports[`preferences - navigation to extension specific preferences given in preferences, when rendered given extension with registered tab renders 1`] = `
+
@@ -685,15 +688,15 @@ exports[`preferences - navigation to extension specific preferences given in pre
/>
-
`;
exports[`preferences - navigation to extension specific preferences given in preferences, when rendered given extension with registered tab when navigating to specific extension tab renders 1`] = `
+
@@ -1082,14 +1085,14 @@ exports[`preferences - navigation to extension specific preferences given in pre
/>
-
`;
exports[`preferences - navigation to extension specific preferences given in preferences, when rendered given extensions with tabs having same id when navigating to first extension tab renders 1`] = `
+
@@ -1490,14 +1493,14 @@ exports[`preferences - navigation to extension specific preferences given in pre
/>
-
`;
exports[`preferences - navigation to extension specific preferences given in preferences, when rendered given extensions with tabs having same id when navigating to second extension tab renders 1`] = `
+
@@ -1898,14 +1901,14 @@ exports[`preferences - navigation to extension specific preferences given in pre
/>
-
`;
exports[`preferences - navigation to extension specific preferences given in preferences, when rendered given multiple extensions with specific preferences, when navigating to extension specific preferences page renders 1`] = `
+
@@ -2332,14 +2335,14 @@ exports[`preferences - navigation to extension specific preferences given in pre
/>
-
`;
exports[`preferences - navigation to extension specific preferences given in preferences, when rendered renders 1`] = `
+
@@ -3010,14 +3013,14 @@ exports[`preferences - navigation to extension specific preferences given in pre
/>
-
`;
exports[`preferences - navigation to extension specific preferences given in preferences, when rendered when extension with specific preferences is enabled renders 1`] = `
+
@@ -3726,14 +3729,14 @@ exports[`preferences - navigation to extension specific preferences given in pre
/>
-
`;
exports[`preferences - navigation to extension specific preferences given in preferences, when rendered when extension with specific preferences is enabled when navigating to extension preferences using navigation renders 1`] = `
+
@@ -4148,15 +4151,15 @@ exports[`preferences - navigation to extension specific preferences given in pre
/>
-
`;
exports[`preferences - navigation to extension specific preferences given in preferences, when rendered when extension with specific preferences is enabled when navigating to extension preferences using navigation when extension is disabled renders 1`] = `
+
@@ -4501,9 +4504,6 @@ exports[`preferences - navigation to extension specific preferences given in pre
/>
-
`;
diff --git a/packages/core/src/features/preferences/__snapshots__/navigation-to-kubernetes-preferences.test.ts.snap b/packages/core/src/features/preferences/__snapshots__/navigation-to-kubernetes-preferences.test.ts.snap
index 98056d147a..69bd7c3155 100644
--- a/packages/core/src/features/preferences/__snapshots__/navigation-to-kubernetes-preferences.test.ts.snap
+++ b/packages/core/src/features/preferences/__snapshots__/navigation-to-kubernetes-preferences.test.ts.snap
@@ -2,6 +2,9 @@
exports[`preferences - navigation to kubernetes preferences given in preferences, when rendered renders 1`] = `
+
@@ -672,14 +675,14 @@ exports[`preferences - navigation to kubernetes preferences given in preferences
/>
-
`;
exports[`preferences - navigation to kubernetes preferences given in preferences, when rendered when navigating to kubernetes preferences using navigation renders 1`] = `
+
@@ -1366,8 +1369,5 @@ exports[`preferences - navigation to kubernetes preferences given in preferences
/>
-
`;
diff --git a/packages/core/src/features/preferences/__snapshots__/navigation-to-proxy-preferences.test.ts.snap b/packages/core/src/features/preferences/__snapshots__/navigation-to-proxy-preferences.test.ts.snap
index 9361de2db6..3d35b8453c 100644
--- a/packages/core/src/features/preferences/__snapshots__/navigation-to-proxy-preferences.test.ts.snap
+++ b/packages/core/src/features/preferences/__snapshots__/navigation-to-proxy-preferences.test.ts.snap
@@ -2,6 +2,9 @@
exports[`preferences - navigation to proxy preferences given in preferences, when rendered renders 1`] = `
+
@@ -672,14 +675,14 @@ exports[`preferences - navigation to proxy preferences given in preferences, whe
/>
-
`;
exports[`preferences - navigation to proxy preferences given in preferences, when rendered when navigating to proxy preferences using navigation renders 1`] = `
+
@@ -1095,8 +1098,5 @@ exports[`preferences - navigation to proxy preferences given in preferences, whe
/>
-
`;
diff --git a/packages/core/src/features/preferences/__snapshots__/navigation-to-telemetry-preferences.test.tsx.snap b/packages/core/src/features/preferences/__snapshots__/navigation-to-telemetry-preferences.test.tsx.snap
index d795e4f5eb..6a0fd32f4b 100644
--- a/packages/core/src/features/preferences/__snapshots__/navigation-to-telemetry-preferences.test.tsx.snap
+++ b/packages/core/src/features/preferences/__snapshots__/navigation-to-telemetry-preferences.test.tsx.snap
@@ -2,6 +2,9 @@
exports[`preferences - navigation to telemetry preferences given URL for Sentry DNS, when navigating to preferences when navigating to telemetry preferences renders 1`] = `
+
@@ -401,14 +404,14 @@ exports[`preferences - navigation to telemetry preferences given URL for Sentry
/>
-
`;
exports[`preferences - navigation to telemetry preferences given in preferences, when rendered renders 1`] = `
+
@@ -1079,14 +1082,14 @@ exports[`preferences - navigation to telemetry preferences given in preferences,
/>
-
`;
exports[`preferences - navigation to telemetry preferences given in preferences, when rendered when extension with telemetry preference items gets enabled renders 1`] = `
+
@@ -1769,14 +1772,14 @@ exports[`preferences - navigation to telemetry preferences given in preferences,
/>
-
`;
exports[`preferences - navigation to telemetry preferences given in preferences, when rendered when extension with telemetry preference items gets enabled when clicking link to telemetry preferences from navigation renders 1`] = `
+
@@ -2165,14 +2168,14 @@ exports[`preferences - navigation to telemetry preferences given in preferences,
/>
-
`;
exports[`preferences - navigation to telemetry preferences given no URL for Sentry DNS, when navigating to telemetry preferences renders 1`] = `
+
@@ -2521,8 +2524,5 @@ exports[`preferences - navigation to telemetry preferences given no URL for Sent
/>
-
`;
diff --git a/packages/core/src/features/preferences/__snapshots__/navigation-to-terminal-preferences.test.ts.snap b/packages/core/src/features/preferences/__snapshots__/navigation-to-terminal-preferences.test.ts.snap
index ed5616001c..7903d9612b 100644
--- a/packages/core/src/features/preferences/__snapshots__/navigation-to-terminal-preferences.test.ts.snap
+++ b/packages/core/src/features/preferences/__snapshots__/navigation-to-terminal-preferences.test.ts.snap
@@ -2,6 +2,9 @@
exports[`preferences - navigation to terminal preferences given in preferences, when rendered renders 1`] = `
+
@@ -672,14 +675,14 @@ exports[`preferences - navigation to terminal preferences given in preferences,
/>
-
`;
exports[`preferences - navigation to terminal preferences given in preferences, when rendered when navigating to terminal preferences using navigation renders 1`] = `
+
@@ -1302,8 +1305,5 @@ exports[`preferences - navigation to terminal preferences given in preferences,
/>
-
`;
diff --git a/packages/core/src/features/preferences/__snapshots__/navigation-using-application-menu.test.ts.snap b/packages/core/src/features/preferences/__snapshots__/navigation-using-application-menu.test.ts.snap
index 5aeb89368c..c9fc9b6a33 100644
--- a/packages/core/src/features/preferences/__snapshots__/navigation-using-application-menu.test.ts.snap
+++ b/packages/core/src/features/preferences/__snapshots__/navigation-using-application-menu.test.ts.snap
@@ -2,6 +2,9 @@
exports[`preferences - navigation using application menu renders 1`] = `
+
@@ -339,14 +342,14 @@ exports[`preferences - navigation using application menu renders 1`] = `
/>
-
`;
exports[`preferences - navigation using application menu when navigating to preferences using application menu renders 1`] = `
+
@@ -1017,8 +1020,5 @@ exports[`preferences - navigation using application menu when navigating to pref
/>
-
`;
diff --git a/packages/core/src/features/preferences/__snapshots__/navigation-using-tray.test.ts.snap b/packages/core/src/features/preferences/__snapshots__/navigation-using-tray.test.ts.snap
index 5618e8dd83..9a153bed65 100644
--- a/packages/core/src/features/preferences/__snapshots__/navigation-using-tray.test.ts.snap
+++ b/packages/core/src/features/preferences/__snapshots__/navigation-using-tray.test.ts.snap
@@ -3,6 +3,9 @@
exports[`show-about-using-tray renders 1`] = `
+
@@ -340,9 +343,6 @@ exports[`show-about-using-tray renders 1`] = `
/>
-
`;
@@ -350,6 +350,9 @@ exports[`show-about-using-tray renders 1`] = `
exports[`show-about-using-tray when navigating using tray renders 1`] = `
+
@@ -1020,9 +1023,6 @@ exports[`show-about-using-tray when navigating using tray renders 1`] = `
/>
-
`;
diff --git a/packages/core/src/features/preferences/__snapshots__/urls-of-legacy-extensions.test.tsx.snap b/packages/core/src/features/preferences/__snapshots__/urls-of-legacy-extensions.test.tsx.snap
index 16af6c0eb5..e2e5ed8d65 100644
--- a/packages/core/src/features/preferences/__snapshots__/urls-of-legacy-extensions.test.tsx.snap
+++ b/packages/core/src/features/preferences/__snapshots__/urls-of-legacy-extensions.test.tsx.snap
@@ -3,6 +3,9 @@
exports[`preferences: URLs of legacy extensions given extension with both custom preference tabs and content for the default tab when navigating to specific custom preference tab using magic string URL renders 1`] = `
+
@@ -439,9 +442,6 @@ exports[`preferences: URLs of legacy extensions given extension with both custom
/>
-
`;
@@ -449,6 +449,9 @@ exports[`preferences: URLs of legacy extensions given extension with both custom
exports[`preferences: URLs of legacy extensions given extension with both custom preference tabs and content for the default tab when navigating to unspecified custom preferences tab using magic string URL renders 1`] = `
+
@@ -885,9 +888,6 @@ exports[`preferences: URLs of legacy extensions given extension with both custom
/>
-
`;
@@ -895,6 +895,9 @@ exports[`preferences: URLs of legacy extensions given extension with both custom
exports[`preferences: URLs of legacy extensions given extension with custom preferences and a custom preference tab when navigating to specific custom preference tab using magic string URL renders 1`] = `
+
@@ -1293,9 +1296,6 @@ exports[`preferences: URLs of legacy extensions given extension with custom pref
/>
-
`;
@@ -1303,6 +1303,9 @@ exports[`preferences: URLs of legacy extensions given extension with custom pref
exports[`preferences: URLs of legacy extensions given extension with custom preferences and a custom preference tab when navigating to unspecified custom preferences tab using magic string URL renders 1`] = `
+
@@ -1675,9 +1678,6 @@ exports[`preferences: URLs of legacy extensions given extension with custom pref
/>
-
`;
@@ -1685,6 +1685,9 @@ exports[`preferences: URLs of legacy extensions given extension with custom pref
exports[`preferences: URLs of legacy extensions given extension with custom preferences but without a custom preference tab when navigating to the default preference tab using magic string URL renders 1`] = `
+
@@ -2097,9 +2100,6 @@ exports[`preferences: URLs of legacy extensions given extension with custom pref
/>
-
`;
diff --git a/packages/core/src/features/status-bar/__snapshots__/status-bar-items-originating-from-extensions.test.tsx.snap b/packages/core/src/features/status-bar/__snapshots__/status-bar-items-originating-from-extensions.test.tsx.snap
index 7b24c4c3ea..3a91097292 100644
--- a/packages/core/src/features/status-bar/__snapshots__/status-bar-items-originating-from-extensions.test.tsx.snap
+++ b/packages/core/src/features/status-bar/__snapshots__/status-bar-items-originating-from-extensions.test.tsx.snap
@@ -3,6 +3,9 @@
exports[`status-bar-items-originating-from-extensions when application starts when extension with status bar items is loaded renders 1`] = `
+
@@ -392,9 +395,6 @@ exports[`status-bar-items-originating-from-extensions when application starts wh
-
`;
diff --git a/packages/core/src/features/top-bar/extension-api/__snapshots__/extendability-using-extension-api.test.tsx.snap b/packages/core/src/features/top-bar/extension-api/__snapshots__/extendability-using-extension-api.test.tsx.snap
index e375091250..4bf00d92ad 100644
--- a/packages/core/src/features/top-bar/extension-api/__snapshots__/extendability-using-extension-api.test.tsx.snap
+++ b/packages/core/src/features/top-bar/extension-api/__snapshots__/extendability-using-extension-api.test.tsx.snap
@@ -3,6 +3,9 @@
exports[`extendability-using-extension-api given an extension with a weakly typed and invalid top-bar item is enabled renders without blowing up 1`] = `
+
@@ -340,9 +343,6 @@ exports[`extendability-using-extension-api given an extension with a weakly type
/>
-
`;
@@ -350,6 +350,9 @@ exports[`extendability-using-extension-api given an extension with a weakly type
exports[`extendability-using-extension-api given an extension with top-bar items is enabled renders 1`] = `
+
@@ -696,9 +699,6 @@ exports[`extendability-using-extension-api given an extension with top-bar items
/>
-
`;
@@ -706,6 +706,9 @@ exports[`extendability-using-extension-api given an extension with top-bar items
exports[`extendability-using-extension-api given an extension with top-bar items is enabled when the extension is disabled renders 1`] = `
+
@@ -1043,9 +1046,6 @@ exports[`extendability-using-extension-api given an extension with top-bar items
/>
-
`;
@@ -1053,6 +1053,9 @@ exports[`extendability-using-extension-api given an extension with top-bar items
exports[`extendability-using-extension-api renders 1`] = `
+
@@ -1390,9 +1393,6 @@ exports[`extendability-using-extension-api renders 1`] = `
/>
-
`;
diff --git a/packages/core/src/features/welcome/__snapshots__/navigation-using-application-menu.test.ts.snap b/packages/core/src/features/welcome/__snapshots__/navigation-using-application-menu.test.ts.snap
index a1c9bda98e..3d401fb6d8 100644
--- a/packages/core/src/features/welcome/__snapshots__/navigation-using-application-menu.test.ts.snap
+++ b/packages/core/src/features/welcome/__snapshots__/navigation-using-application-menu.test.ts.snap
@@ -2,6 +2,9 @@
exports[`welcome - navigation using application menu renders 1`] = `
+
@@ -339,15 +342,15 @@ exports[`welcome - navigation using application menu renders 1`] = `
/>
-
`;
exports[`welcome - navigation using application menu when navigated somewhere else renders 1`] = `
+
@@ -1018,15 +1021,15 @@ exports[`welcome - navigation using application menu when navigated somewhere el
/>
-
`;
exports[`welcome - navigation using application menu when navigated somewhere else when navigated to welcome using application menu renders 1`] = `
+
@@ -1364,8 +1367,5 @@ exports[`welcome - navigation using application menu when navigated somewhere el
/>
-
`;
diff --git a/packages/core/src/renderer/components/status-bar/__snapshots__/status-bar.test.tsx.snap b/packages/core/src/renderer/components/status-bar/__snapshots__/status-bar.test.tsx.snap
index 1a825cbb71..9a056eb546 100644
--- a/packages/core/src/renderer/components/status-bar/__snapshots__/status-bar.test.tsx.snap
+++ b/packages/core/src/renderer/components/status-bar/__snapshots__/status-bar.test.tsx.snap
@@ -3,6 +3,9 @@
exports[` when StatusBar's status is set to "error" renders 1`] = `
+
@@ -340,9 +343,6 @@ exports[` when StatusBar's status is set to "error" renders 1`] = `
/>
-
`;
@@ -350,6 +350,9 @@ exports[` when StatusBar's status is set to "error" renders 1`] = `
exports[` when StatusBar's status is set to "warning" renders 1`] = `
+
@@ -687,9 +690,6 @@ exports[` when StatusBar's status is set to "warning" renders 1`] =
/>
-
`;
@@ -697,6 +697,9 @@ exports[` when StatusBar's status is set to "warning" renders 1`] =
exports[` when an extension is enabled specifying the side the elements should be on renders 1`] = `
+
@@ -1076,9 +1079,6 @@ exports[` when an extension is enabled specifying the side the elem
-
`;
@@ -1086,6 +1086,9 @@ exports[` when an extension is enabled specifying the side the elem
exports[` when an extension is enabled with an invalid data type, ("hello") renders 1`] = `
+
@@ -1423,9 +1426,6 @@ exports[` when an extension is enabled with an invalid data type, (
/>
-
`;
@@ -1433,6 +1433,9 @@ exports[` when an extension is enabled with an invalid data type, (
exports[` when an extension is enabled with an invalid data type, ([[Object]]) renders 1`] = `
+
@@ -1770,9 +1773,6 @@ exports[` when an extension is enabled with an invalid data type, (
/>
-
`;
@@ -1780,6 +1780,9 @@ exports[` when an extension is enabled with an invalid data type, (
exports[` when an extension is enabled with an invalid data type, ([]) renders 1`] = `
+
@@ -2117,9 +2120,6 @@ exports[` when an extension is enabled with an invalid data type, (
/>
-
`;
@@ -2127,6 +2127,9 @@ exports[` when an extension is enabled with an invalid data type, (
exports[` when an extension is enabled with an invalid data type, ({}) renders 1`] = `
+
@@ -2464,9 +2467,6 @@ exports[` when an extension is enabled with an invalid data type, (
/>
-
`;
@@ -2474,6 +2474,9 @@ exports[` when an extension is enabled with an invalid data type, (
exports[` when an extension is enabled with an invalid data type, (6) renders 1`] = `
+
@@ -2811,9 +2814,6 @@ exports[` when an extension is enabled with an invalid data type, (
/>
-
`;
@@ -2821,6 +2821,9 @@ exports[` when an extension is enabled with an invalid data type, (
exports[` when an extension is enabled with an invalid data type, (null) renders 1`] = `
+
@@ -3158,9 +3161,6 @@ exports[` when an extension is enabled with an invalid data type, (
/>
-
`;
@@ -3168,6 +3168,9 @@ exports[` when an extension is enabled with an invalid data type, (
exports[` when an extension is enabled with an invalid data type, (undefined) renders 1`] = `
+
@@ -3505,9 +3508,6 @@ exports[` when an extension is enabled with an invalid data type, (
/>
-
`;
@@ -3515,6 +3515,9 @@ exports[` when an extension is enabled with an invalid data type, (
exports[` when an extension is enabled with no status items renders 1`] = `
+
@@ -3852,9 +3855,6 @@ exports[` when an extension is enabled with no status items renders
/>
-
`;
diff --git a/packages/core/src/renderer/frames/cluster-frame/__snapshots__/cluster-frame.test.tsx.snap b/packages/core/src/renderer/frames/cluster-frame/__snapshots__/cluster-frame.test.tsx.snap
index 3d12aff987..e548507335 100644
--- a/packages/core/src/renderer/frames/cluster-frame/__snapshots__/cluster-frame.test.tsx.snap
+++ b/packages/core/src/renderer/frames/cluster-frame/__snapshots__/cluster-frame.test.tsx.snap
@@ -2,6 +2,9 @@
exports[` given cluster with list nodes and namespaces permissions given no matching component given current url is starting url renders 1`] = `
+
given cluster with list nodes and namespaces permissio
class="ResizingAnchor horizontal leading"
/>
-
given cluster with list nodes and namespaces permissio
exports[` given cluster with list nodes and namespaces permissions renders 1`] = `
+
given cluster with list nodes and namespaces permissio
class="ResizingAnchor horizontal leading"
/>
-
given cluster with list nodes and namespaces permissio
exports[` given cluster without list nodes, but with namespaces permissions renders 1`] = `
+
given cluster without list nodes, but with namespaces
class="ResizingAnchor horizontal leading"
/>
-
Date: Thu, 1 Jun 2023 22:36:49 +0200
Subject: [PATCH 6/6] chore: resolve comments
Signed-off-by: Gabriel
---
open-lens/src/main/index.ts | 2 --
package-lock.json | 10 +++++-----
.../core/src/extensions/renderer-api/components.ts | 2 +-
packages/ui-components/notifications/index.ts | 2 +-
4 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/open-lens/src/main/index.ts b/open-lens/src/main/index.ts
index 631bec505f..8a90aaca46 100644
--- a/open-lens/src/main/index.ts
+++ b/open-lens/src/main/index.ts
@@ -15,7 +15,6 @@ import { loggerFeature } from "@k8slens/logger";
import { randomFeature } from "@k8slens/random";
import { kubeApiSpecificsFeature } from "@k8slens/kube-api-specifics";
import { prometheusFeature } from "@k8slens/prometheus";
-import { notificationsFeature } from "@k8slens/notifications";
const environment = "main";
@@ -37,7 +36,6 @@ runInAction(() => {
messagingFeatureForMain,
randomFeature,
kubeApiSpecificsFeature,
- notificationsFeature,
);
try {
diff --git a/package-lock.json b/package-lock.json
index 5062762ffd..552593e91c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3831,14 +3831,14 @@
"resolved": "packages/node-fetch",
"link": true
},
- "node_modules/@k8slens/prometheus": {
- "resolved": "packages/technical-features/prometheus",
- "link": true
- },
"node_modules/@k8slens/notifications": {
"resolved": "packages/ui-components/notifications",
"link": true
},
+ "node_modules/@k8slens/prometheus": {
+ "resolved": "packages/technical-features/prometheus",
+ "link": true
+ },
"node_modules/@k8slens/random": {
"resolved": "packages/random-id",
"link": true
@@ -34344,8 +34344,8 @@
"@k8slens/messaging-for-renderer": "^1.0.0-alpha.1",
"@k8slens/metrics": "^6.5.0-alpha.7",
"@k8slens/node-fetch": "^6.5.0-alpha.3",
- "@k8slens/prometheus": "^1.0.0",
"@k8slens/notifications": "^1.0.0",
+ "@k8slens/prometheus": "^1.0.0",
"@k8slens/random": "^1.0.0",
"@k8slens/react-application": "^1.0.0-alpha.5",
"@k8slens/resizing-anchor": "^1.0.0-alpha.5",
diff --git a/packages/core/src/extensions/renderer-api/components.ts b/packages/core/src/extensions/renderer-api/components.ts
index 1ab3e6295d..91c5e98560 100644
--- a/packages/core/src/extensions/renderer-api/components.ts
+++ b/packages/core/src/extensions/renderer-api/components.ts
@@ -75,7 +75,7 @@ export * from "../../renderer/components/line-progress";
export * from "../../renderer/components/menu";
export {
- type NotificationStatus,
+ NotificationStatus,
type CreateNotificationOptions,
type Notification,
type NotificationId,
diff --git a/packages/ui-components/notifications/index.ts b/packages/ui-components/notifications/index.ts
index cdcb1da93f..7a4fb7c7d3 100644
--- a/packages/ui-components/notifications/index.ts
+++ b/packages/ui-components/notifications/index.ts
@@ -6,11 +6,11 @@
export type {
NotificationId,
NotificationMessage,
- NotificationStatus,
CreateNotificationOptions,
Notification,
NotificationsStore,
} from "./src/notifications.store";
+export { NotificationStatus } from "./src/notifications.store";
export type { ShowNotification } from "./src/notifications";
export { Notifications } from "./src/notifications";
export { notificationsClusterFrameChildComponentInjectable } from "./src/notifications-cluster-frame-child-component.injectable";