mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Backports the following commits to 6.x: - Fixes i18n issue in space nav selector (#26742)
This commit is contained in:
parent
a87f486afd
commit
cd7087b985
1 changed files with 20 additions and 15 deletions
|
@ -4,6 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { I18nProvider } from '@kbn/i18n/react';
|
||||
import { constant } from 'lodash';
|
||||
import { SpacesManager } from 'plugins/spaces/lib/spaces_manager';
|
||||
// @ts-ignore
|
||||
|
@ -13,8 +14,8 @@ import { NavControlPopover } from 'plugins/spaces/views/nav_control/nav_control_
|
|||
import { PathProvider } from 'plugins/xpack_main/services/path';
|
||||
import { UserProfileProvider } from 'plugins/xpack_main/services/user_profile';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { render, unmountComponentAtNode } from 'react-dom';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { NavControlSide } from 'ui/chrome/directives/header_global_nav';
|
||||
// @ts-ignore
|
||||
import { uiModules } from 'ui/modules';
|
||||
|
@ -59,13 +60,15 @@ module.controller(
|
|||
$scope.$parent.$watch('isVisible', function isVisibleWatcher(isVisible: boolean) {
|
||||
if (isVisible && !mounted && !pathProvider.isUnauthenticated()) {
|
||||
render(
|
||||
<NavControlPopover
|
||||
spacesManager={spacesManager}
|
||||
activeSpace={activeSpace}
|
||||
userProfile={userProfile}
|
||||
anchorPosition={'rightCenter'}
|
||||
buttonClass={SpacesGlobalNavButton}
|
||||
/>,
|
||||
<I18nProvider>
|
||||
<NavControlPopover
|
||||
spacesManager={spacesManager}
|
||||
activeSpace={activeSpace}
|
||||
userProfile={userProfile}
|
||||
anchorPosition={'rightCenter'}
|
||||
buttonClass={SpacesGlobalNavButton}
|
||||
/>
|
||||
</I18nProvider>,
|
||||
domNode
|
||||
);
|
||||
mounted = true;
|
||||
|
@ -113,13 +116,15 @@ chromeHeaderNavControlsRegistry.register(
|
|||
spacesManager = new SpacesManager($http, chrome, spaceSelectorURL);
|
||||
|
||||
ReactDOM.render(
|
||||
<NavControlPopover
|
||||
spacesManager={spacesManager}
|
||||
activeSpace={activeSpace}
|
||||
userProfile={userProfile}
|
||||
anchorPosition="downLeft"
|
||||
buttonClass={SpacesHeaderNavButton}
|
||||
/>,
|
||||
<I18nProvider>
|
||||
<NavControlPopover
|
||||
spacesManager={spacesManager}
|
||||
activeSpace={activeSpace}
|
||||
userProfile={userProfile}
|
||||
anchorPosition="downLeft"
|
||||
buttonClass={SpacesHeaderNavButton}
|
||||
/>
|
||||
</I18nProvider>,
|
||||
el
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue