mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Using getActiveClusterEntity() for searching
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
65e8615486
commit
16825f151c
@ -36,16 +36,16 @@ import { HotbarMenu } from "../hotbar/hotbar-menu";
|
||||
import { EntitySettings, entitySettingsRoute } from "../+entity-settings";
|
||||
import { Welcome, welcomeRoute, welcomeURL } from "../+welcome";
|
||||
import { TopBar } from "../layout/topbar";
|
||||
import { ClusterStore } from "../../../common/cluster-store";
|
||||
import { hasLoadedView } from "./lens-views";
|
||||
import { navigate } from "../../navigation";
|
||||
import { Icon } from "../icon";
|
||||
import { MaterialTooltip } from "../material-tooltip/material-tooltip";
|
||||
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
|
||||
|
||||
@observer
|
||||
export class ClusterManager extends React.Component {
|
||||
render() {
|
||||
const cluster = ClusterStore.getInstance().active;
|
||||
const cluster = getActiveClusterEntity();
|
||||
const isClusterVisible = cluster?.available && cluster?.ready && hasLoadedView(cluster.id);
|
||||
|
||||
return (
|
||||
@ -89,19 +89,3 @@ export class ClusterManager extends React.Component {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// const ClusterTopBar = observer(() => {
|
||||
// const cluster = ClusterStore.getInstance().activeCluster;
|
||||
|
||||
// // console.log(cluster)
|
||||
|
||||
// // if (!cluster) {
|
||||
// // return null;
|
||||
// // }
|
||||
|
||||
// return (
|
||||
// <TopBar sidebar={<div>Lens</div>}>
|
||||
// {cluster}
|
||||
// </TopBar>
|
||||
// );
|
||||
// });
|
||||
|
||||
@ -67,7 +67,6 @@ export class ClusterView extends React.Component {
|
||||
initView(clusterId); // init cluster-view (iframe), requires parent container #lens-views to be in DOM
|
||||
requestMain(clusterActivateHandler, clusterId, false); // activate and fetch cluster's state from main
|
||||
catalogEntityRegistry.activeEntity = catalogEntityRegistry.getById(clusterId);
|
||||
ClusterStore.getInstance().setActive(clusterId);
|
||||
}, {
|
||||
fireImmediately: true,
|
||||
}),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user