mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
show catalog if viewed cluster is disconnected
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
6061075525
commit
491aa173ae
@ -8,6 +8,8 @@ import { ClusterStatus } from "./cluster-status";
|
||||
import { hasLoadedView } from "./lens-views";
|
||||
import { Cluster } from "../../../main/cluster";
|
||||
import { clusterStore } from "../../../common/cluster-store";
|
||||
import { navigate } from "../../navigation";
|
||||
import { catalogURL } from "../+catalog";
|
||||
|
||||
interface Props extends RouteComponentProps<IClusterViewRouteParams> {
|
||||
}
|
||||
@ -26,6 +28,9 @@ export class ClusterView extends React.Component<Props> {
|
||||
disposeOnUnmount(this, [
|
||||
reaction(() => this.clusterId, clusterId => clusterStore.setActive(clusterId), {
|
||||
fireImmediately: true,
|
||||
}),
|
||||
reaction(() => this.cluster.online, (online) => {
|
||||
if (!online) navigate(catalogURL());
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user