mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Slim down core bundle (#75912)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
feab3e3b02
commit
085cac13f2
6 changed files with 17 additions and 8 deletions
|
@ -31,7 +31,7 @@ import {
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { groupBy, sortBy } from 'lodash';
|
||||
import React, { Fragment, useRef } from 'react';
|
||||
import { useObservable } from 'react-use';
|
||||
import useObservable from 'react-use/lib/useObservable';
|
||||
import * as Rx from 'rxjs';
|
||||
import { ChromeNavLink, ChromeRecentlyAccessedHistoryItem } from '../..';
|
||||
import { AppCategory } from '../../../../types';
|
||||
|
|
|
@ -28,7 +28,7 @@ import {
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import classnames from 'classnames';
|
||||
import React, { createRef, useState } from 'react';
|
||||
import { useObservable } from 'react-use';
|
||||
import useObservable from 'react-use/lib/useObservable';
|
||||
import { Observable } from 'rxjs';
|
||||
import { LoadingIndicator } from '../';
|
||||
import {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
import { EuiHeaderBreadcrumbs } from '@elastic/eui';
|
||||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
import { useObservable } from 'react-use';
|
||||
import useObservable from 'react-use/lib/useObservable';
|
||||
import { Observable } from 'rxjs';
|
||||
import { ChromeBreadcrumb } from '../../chrome_service';
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
import { EuiHeaderLogo } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import React from 'react';
|
||||
import { useObservable } from 'react-use';
|
||||
import useObservable from 'react-use/lib/useObservable';
|
||||
import { Observable } from 'rxjs';
|
||||
import Url from 'url';
|
||||
import { ChromeNavLink } from '../..';
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
import { EuiHeaderSectionItem } from '@elastic/eui';
|
||||
import React from 'react';
|
||||
import { useObservable } from 'react-use';
|
||||
import useObservable from 'react-use/lib/useObservable';
|
||||
import { Observable } from 'rxjs';
|
||||
import { ChromeNavControl } from '../../nav_controls';
|
||||
import { HeaderExtension } from './header_extension';
|
||||
|
|
|
@ -19,12 +19,11 @@
|
|||
|
||||
import React, { Fragment } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import { filter } from 'rxjs/operators';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import { EuiCallOut, EuiButton } from '@elastic/eui';
|
||||
import { EuiCallOut, EuiButton, EuiLoadingSpinner } from '@elastic/eui';
|
||||
|
||||
import { I18nStart } from '../../i18n';
|
||||
import { IUiSettingsClient } from '../../ui_settings';
|
||||
|
@ -36,6 +35,8 @@ interface StartDeps {
|
|||
uiSettings: IUiSettingsClient;
|
||||
}
|
||||
|
||||
const ReactMarkdownLazy = React.lazy(() => import('react-markdown'));
|
||||
|
||||
/**
|
||||
* Sets up the custom banner that can be specified in advanced settings.
|
||||
* @internal
|
||||
|
@ -75,7 +76,15 @@ export class UserBannerService {
|
|||
}
|
||||
iconType="help"
|
||||
>
|
||||
<ReactMarkdown renderers={{ root: Fragment }}>{content.trim()}</ReactMarkdown>
|
||||
<React.Suspense
|
||||
fallback={
|
||||
<div>
|
||||
<EuiLoadingSpinner />
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<ReactMarkdownLazy renderers={{ root: Fragment }} source={content.trim()} />
|
||||
</React.Suspense>
|
||||
|
||||
<EuiButton type="primary" size="s" onClick={() => banners.remove(id!)}>
|
||||
<FormattedMessage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue