mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Replace error notification with logger error
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
95a3d3b144
commit
3192ece80b
@ -5,7 +5,7 @@
|
|||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import customResourceDefinitionStoreInjectable from "../+custom-resources/definition.store.injectable";
|
import customResourceDefinitionStoreInjectable from "../+custom-resources/definition.store.injectable";
|
||||||
import apiManagerInjectable from "../../../common/k8s-api/api-manager/manager.injectable";
|
import apiManagerInjectable from "../../../common/k8s-api/api-manager/manager.injectable";
|
||||||
import showErrorNotificationInjectable from "../notifications/show-error-notification.injectable";
|
import loggerInjectable from "../../../common/logger.injectable";
|
||||||
|
|
||||||
const removeSubnamespaceInjectable = getInjectable({
|
const removeSubnamespaceInjectable = getInjectable({
|
||||||
id: "remove-subnamespace",
|
id: "remove-subnamespace",
|
||||||
@ -13,7 +13,7 @@ const removeSubnamespaceInjectable = getInjectable({
|
|||||||
instantiate: (di) => {
|
instantiate: (di) => {
|
||||||
const crdStore = di.inject(customResourceDefinitionStoreInjectable);
|
const crdStore = di.inject(customResourceDefinitionStoreInjectable);
|
||||||
const apiManager = di.inject(apiManagerInjectable);
|
const apiManager = di.inject(apiManagerInjectable);
|
||||||
const showErrorNotification = di.inject(showErrorNotificationInjectable);
|
const logger = di.inject(loggerInjectable);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removing subnamespace controlled by hierarchical namespace controller by deleting
|
* Removing subnamespace controlled by hierarchical namespace controller by deleting
|
||||||
@ -33,7 +33,7 @@ const removeSubnamespaceInjectable = getInjectable({
|
|||||||
const anchor = store?.getByName(subnamespaceName);
|
const anchor = store?.getByName(subnamespaceName);
|
||||||
|
|
||||||
if (!anchor) {
|
if (!anchor) {
|
||||||
showErrorNotification("Error removing namespace: can not find subnamespace anchor.");
|
logger.error("[REMOVING-SUBNAMESPACE]: Error removing namespace: can not find subnamespace anchor.");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user