diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/table_view.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/table_view.tsx index e4ab8c45cbf10..182c74c124fd9 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/table_view.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/table_view.tsx @@ -82,6 +82,7 @@ export const TableView = (props: Props) => { isOpen={openPopoverId === uniqueID} closePopover={closePopover} anchorPosition="rightCenter" + zIndex={0} > { - const [isToolTipOpen, { off: hideToolTip, on: showToolTip }] = useBoolean(false); const [isPopoverOpen, { off: closePopover, toggle: togglePopover }] = useBoolean(false); const metric = first(node.metrics); @@ -57,11 +56,11 @@ export const Node = ({ const value = formatter(rawValue); const isContainerAssetViewEnabled = useUiSetting(enableInfrastructureContainerAssetView); - const showContainerAssetDetailPage = nodeType === 'container' && isContainerAssetViewEnabled; + const isFlyoutMode = nodeType === 'host' || showContainerAssetDetailPage; const toggleAssetPopover = () => { - if (nodeType === 'host' || showContainerAssetDetailPage) { + if (isFlyoutMode) { setFlyoutUrlState({ detailsItemId: node.id, assetType: nodeType }); } else { togglePopover(); @@ -69,46 +68,40 @@ export const Node = ({ }; const nodeSquare = ( - + } + > +
+ +
+
); - return ( - <> - {isPopoverOpen ? ( - - - - ) : isToolTipOpen ? ( - } - > - {nodeSquare} - - ) : ( - nodeSquare - )} - + return !isFlyoutMode ? ( + + + + ) : ( + nodeSquare ); }; diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/node_square.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/node_square.tsx index 7f11f4bbc192c..31d31fed64016 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/node_square.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/node_square.tsx @@ -66,8 +66,8 @@ const NodeContainerSmall = ({ children, ...props }: NodeProps & { color: string {children} ); -const ValueInner = ({ children, ...props }: NodeProps) => ( - + ); const SquareOuter = ({ children, ...props }: NodeProps & { color: string }) => (
( export const NodeSquare = ({ squareSize, togglePopover, - showToolTip, - hideToolTip, color, nodeName, value, @@ -163,8 +162,6 @@ export const NodeSquare = ({ }: { squareSize: number; togglePopover: UseBooleanHandlers['toggle']; - showToolTip: () => void; - hideToolTip: () => void; color: string; nodeName: string; value: string; @@ -184,9 +181,6 @@ export const NodeSquare = ({ style={{ width: squareSize || 0, height: squareSize || 0 }} onClick={togglePopover} onKeyPress={togglePopover} - onFocus={showToolTip} - onMouseOver={showToolTip} - onMouseLeave={hideToolTip} className="buttonContainer" > @@ -217,10 +211,8 @@ export const NodeSquare = ({ style={{ width: squareSize || 0, height: squareSize || 0, ...style }} onClick={togglePopover} onKeyPress={togglePopover} - onMouseOver={showToolTip} - onFocus={showToolTip} - onMouseLeave={hideToolTip} color={color} + tabIndex={0} /> ); };