From 96e45666f05465411c3cce22dba5d2dc386c5f75 Mon Sep 17 00:00:00 2001 From: Federico Rodriguez Date: Tue, 2 Nov 2021 12:41:23 +0100 Subject: [PATCH] Fixed breadcrumbs style compatibility for Kibana 7.14.2 (#3668) * Parcial breadcrumb style fix * Improved beadcrumb styling and text overflow * Added changelog --- CHANGELOG.md | 1 + .../globalBreadcrumb/globalBreadcrumb.scss | 19 ++++++---- .../globalBreadcrumb/globalBreadcrumb.tsx | 38 +++++++++---------- .../common/modules/main-overview.tsx | 38 +++++++++---------- 4 files changed, 47 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02e217dddb..95b5a6bf5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes to the Wazuh app project will be documented in this file. - Fixed compatibility wazuh 4.2 - kibana 7.13.4 [#3653](https://github.com/wazuh/wazuh-kibana-app/pull/3653) - Fixed interative register windows agent screen error [#3654](https://github.com/wazuh/wazuh-kibana-app/pull/3654) +- Fixed breadcrumbs style compatibility for Kibana 7.14.2 [#3668](https://github.com/wazuh/wazuh-kibana-app/pull/3668) ## Wazuh v4.2.4 - Kibana 7.10.2, 7.11.2, 7.12.1 - Revision 4205 diff --git a/public/components/common/globalBreadcrumb/globalBreadcrumb.scss b/public/components/common/globalBreadcrumb/globalBreadcrumb.scss index 50d1dd6501..0b3ad2c2c9 100644 --- a/public/components/common/globalBreadcrumb/globalBreadcrumb.scss +++ b/public/components/common/globalBreadcrumb/globalBreadcrumb.scss @@ -1,20 +1,23 @@ +nav.euiBreadcrumbs.wz-global-breadcrumb span.euiBreadcrumb[title=""]:first-child{ + display: none; +} + +.euiBreadcrumbs--truncate .wz-global-breadcrumb .euiBreadcrumb:not(.euiBreadcrumb--collapsed) span.euiToolTipAnchor{ + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: text-bottom; +} + .wz-global-breadcrumb { font-size: 14px; - font-family: "Inter UI"; padding: 0px; } .wz-global-breadcrumb-btn{ max-width: unset!important; - height: 20px; } -.wz-global-breadcrumb-btn{ - height: 20px; - font-family: "Inter UI"; -} - - @media screen and (-webkit-min-device-pixel-ratio: 0) { _::-webkit-full-page-media, _:future, :root , .wz-global-breadcrumb { line-height: 1.5; diff --git a/public/components/common/globalBreadcrumb/globalBreadcrumb.tsx b/public/components/common/globalBreadcrumb/globalBreadcrumb.tsx index 1762d5fd69..972e5d4b6c 100644 --- a/public/components/common/globalBreadcrumb/globalBreadcrumb.tsx +++ b/public/components/common/globalBreadcrumb/globalBreadcrumb.tsx @@ -25,26 +25,24 @@ class WzGlobalBreadcrumb extends Component { return (
{!!this.props.state.breadcrumb.length && ( - breadcrumb.agent ? { - text: ( - { ev.stopPropagation(); AppNavigate.navigateToModule(ev, 'agents', { "tab": "welcome", "agent": breadcrumb.agent.id }); this.router.reload(); }} - id="breadcrumbNoTitle" - > - - {breadcrumb.agent.name} - - ) - } : breadcrumb)} - aria-label="Wazuh global breadcrumbs" - /> + breadcrumb.agent ? { + className: "euiLink euiLink--subdued ", + onClick: (ev) => { ev.stopPropagation(); AppNavigate.navigateToModule(ev, 'agents', { "tab": "welcome", "agent": breadcrumb.agent.id }); this.router.reload(); }, + id: "breadcrumbNoTitle", + truncate: true, + text: ( + + {breadcrumb.agent.name} + + ) + } : breadcrumb)} + aria-label="Wazuh global breadcrumbs" + /> )}
) diff --git a/public/components/common/modules/main-overview.tsx b/public/components/common/modules/main-overview.tsx index 512e7ea738..444e70c321 100644 --- a/public/components/common/modules/main-overview.tsx +++ b/public/components/common/modules/main-overview.tsx @@ -78,33 +78,29 @@ export class MainModuleOverview extends Component { }, ]; if (currentAgent.id) { - breadcrumb.push( { + breadcrumb.push({ + className: "euiLink euiLink--subdued ", + onClick: (ev) => { ev.stopPropagation(); AppNavigate.navigateToModule(ev, 'agents', { "tab": "welcome", "agent": currentAgent.id }); this.router.reload(); }, + id: "breadcrumbNoTitle", + truncate: true, text: ( - { ev.stopPropagation(); AppNavigate.navigateToModule(ev, 'agents', { "tab": "welcome", "agent": currentAgent.id }); this.router.reload(); }} - id="breadcrumbNoTitle" - > - - {currentAgent.name} - - ), + + {currentAgent.name} + + ), }) } breadcrumb.push({ text: ( - -
- -
- {WAZUH_MODULES[this.props.section].title} -
-
-
+ + + <> + {WAZUH_MODULES[this.props.section].title} + + - - + + ), truncate: false,