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

Remove cluster online status checks from main layout header - it's cluster menu is only visible when cluster is online and connected

Signed-off-by: Alex Culliere <alozhkin@mirantis.com>
This commit is contained in:
Alex Culliere 2021-02-08 14:39:09 +02:00
parent e966d2049a
commit 6deda2aff6
2 changed files with 4 additions and 3 deletions

View File

@ -29,10 +29,10 @@ export const MainLayoutHeader = observer(({ cluster, className }: Props) => {
<MenuItem onClick={actions.SHOW_SETTINGS}> <MenuItem onClick={actions.SHOW_SETTINGS}>
<span>Settings</span> <span>Settings</span>
</MenuItem> </MenuItem>
{ cluster.online && <MenuItem onClick={actions.DISCONNECT}> <MenuItem onClick={actions.DISCONNECT}>
<span>Disconnect</span> <span>Disconnect</span>
</MenuItem> } </MenuItem>
{ cluster.online && !cluster.isManaged && <MenuItem onClick={actions.REMOVE}> { !cluster.isManaged && <MenuItem onClick={actions.REMOVE}>
<span>Remove</span> <span>Remove</span>
</MenuItem> } </MenuItem> }
</Menu>; </Menu>;

View File

@ -10,6 +10,7 @@ import { ErrorBoundary } from "../error-boundary";
import { ResizeDirection, ResizeGrowthDirection, ResizeSide, ResizingAnchor } from "../resizing-anchor"; import { ResizeDirection, ResizeGrowthDirection, ResizeSide, ResizingAnchor } from "../resizing-anchor";
import { MainLayoutHeader } from "./main-layout-header"; import { MainLayoutHeader } from "./main-layout-header";
import { Sidebar } from "./sidebar"; import { Sidebar } from "./sidebar";
import { workspaceStore } from "../../../common/workspace-store";
export interface MainLayoutProps { export interface MainLayoutProps {
className?: any; className?: any;