1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Removing TopBar from ClusterManager

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-05-31 11:19:36 +03:00
parent 847d341a40
commit e30fbd6ea6
2 changed files with 2 additions and 15 deletions

View File

@ -35,22 +35,13 @@ import { Extensions, extensionsRoute } from "../+extensions";
import { HotbarMenu } from "../hotbar/hotbar-menu";
import { EntitySettings, entitySettingsRoute } from "../+entity-settings";
import { Welcome, welcomeRoute, welcomeURL } from "../+welcome";
import { hasLoadedView } from "./lens-views";
import { getActiveClusterEntity } from "../../api/catalog-entity-registry";
import { ClusterTopbar } from "./cluster-topbar";
@observer
export class ClusterManager extends React.Component {
render() {
const cluster = getActiveClusterEntity();
const isClusterVisible = cluster?.available && cluster?.ready && hasLoadedView(cluster.id);
return (
<div className="ClusterManager">
<main>
{ isClusterVisible && (
<ClusterTopbar cluster={cluster}/>
)}
<div id="lens-views"/>
<Switch>
<Route component={Welcome} {...welcomeRoute} />

View File

@ -88,12 +88,7 @@ export class ClusterView extends React.Component {
const { clusterId, cluster, isReady } = this;
if (cluster && !isReady) {
return (
<>
<ClusterTopbar cluster={cluster}/>
<ClusterStatus clusterId={clusterId} className="box center"/>
</>
);
return <ClusterStatus clusterId={clusterId} className="box center"/>;
}
return null;
@ -102,6 +97,7 @@ export class ClusterView extends React.Component {
render() {
return (
<div className="ClusterView flex column align-center">
{this.cluster && <ClusterTopbar cluster={this.cluster}/>}
{this.renderStatus()}
</div>
);