Release 6.4.4 (#7308)

* Navigate to catalog explicitly on cluster disconnect (#7304)

* Navigate to catalog explicitly on cluster disconnect

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Linter fix

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

---------

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Release 6.4.4

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Sebastian MaltonandAlex Andreev authored and GitHub committed 2023-03-07 12:18:06 -05:00
1 parent b4c0ca981a
commit 57ce050e11
6 files changed
+18 -14

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
"productName": "",
"description": "Lens Desktop Core",
"homepage": "https://github.com/lensapp/lens",
"version": "6.4.3",
"version": "6.4.4",
"repository": {
"type": "git",
"url": "git+https://github.com/lensapp/lens.git"
@@ -127,7 +127,13 @@ export class KubernetesCluster<
context.menuItems.push({
title: "Disconnect",
icon: "link_off",
onClick: () => requestClusterDisconnection(this.getId()),
onClick: () => {
requestClusterDisconnection(this.getId());
broadcastMessage(
IpcRendererNavigationEvents.NAVIGATE_IN_APP,
"/catalog",
);
},
});
break;
case LensKubernetesClusterStatus.DISCONNECTED:
@@ -69,7 +69,11 @@ class NonInjectedClusterView extends React.Component<Dependencies> {
disposeOnUnmount(this, [
reaction(() => this.clusterId, async (clusterId) => {
// TODO: replace with better handling
if (clusterId && !this.props.entityRegistry.getById(clusterId)) {
if (!this.clusterId) {
return;
}
if (!this.props.entityRegistry.getById(clusterId)) {
return this.props.navigateToCatalog(); // redirect to catalog when the clusterId does not correspond to an entity
}
@@ -80,12 +84,6 @@ class NonInjectedClusterView extends React.Component<Dependencies> {
}, {
fireImmediately: true,
}),
reaction(() => [this.cluster?.ready, this.cluster?.disconnected], ([, disconnected]) => {
if (this.isViewLoaded.get() && disconnected) {
this.props.navigateToCatalog(); // redirect to catalog when active cluster get disconnected/not available
}
}),
]);
}