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 committed 2021-03-17 21:12:19 +02:00
1 parent e966d2049a
commit 6deda2aff6
2 files changed
+4 -3

No files matched your search

@@ -29,10 +29,10 @@ export const MainLayoutHeader = observer(({ cluster, className }: Props) => {
<MenuItem onClick={actions.SHOW_SETTINGS}>
<span>Settings</span>
</MenuItem>
{ cluster.online && <MenuItem onClick={actions.DISCONNECT}>
<MenuItem onClick={actions.DISCONNECT}>
<span>Disconnect</span>
</MenuItem> }
{ cluster.online && !cluster.isManaged && <MenuItem onClick={actions.REMOVE}>
</MenuItem>
{ !cluster.isManaged && <MenuItem onClick={actions.REMOVE}>
<span>Remove</span>
</MenuItem> }
</Menu>;
@@ -10,6 +10,7 @@ import { ErrorBoundary } from "../error-boundary";
import { ResizeDirection, ResizeGrowthDirection, ResizeSide, ResizingAnchor } from "../resizing-anchor";
import { MainLayoutHeader } from "./main-layout-header";
import { Sidebar } from "./sidebar";
import { workspaceStore } from "../../../common/workspace-store";
export interface MainLayoutProps {
className?: any;