Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/elastic/kibana into alert…
Browse files Browse the repository at this point in the history
…-list
  • Loading branch information
madirey committed Feb 4, 2020
2 parents 6305dc0 + 74768e5 commit 426502c
Show file tree
Hide file tree
Showing 119 changed files with 15,831 additions and 11,649 deletions.
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"src/legacy/core_plugins/management",
"src/plugins/management"
],
"advancedSettings": "src/plugins/advanced_settings",
"kibana_react": "src/legacy/core_plugins/kibana_react",
"kibana-react": "src/plugins/kibana_react",
"kibana_utils": "src/plugins/kibana_utils",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
"style-loader": "0.23.1",
"symbol-observable": "^1.2.0",
"tar": "4.4.13",
"terser-webpack-plugin": "^2.1.2",
"terser-webpack-plugin": "^2.3.4",
"thread-loader": "^2.1.3",
"tinygradient": "0.4.3",
"tinymath": "1.2.1",
Expand Down
21,114 changes: 11,760 additions & 9,354 deletions packages/kbn-pm/dist/index.js

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions rfcs/text/0006_management_section_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,7 @@ Current public contracts owned by the legacy service:
```js
// ui/management/index
interface API {
PAGE_TITLE_COMPONENT: string; // actually related to advanced settings?
PAGE_SUBTITLE_COMPONENT: string; // actually related to advanced settings?
PAGE_FOOTER_COMPONENT: string; // actually related to advanced settings?
SidebarNav: React.FC<any>;
registerSettingsComponent: (
id: string,
component: string | React.FC<any>,
allowOverride: boolean
) => void;
management: new ManagementSection();
MANAGEMENT_BREADCRUMB: {
text: string;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ import {
UiSettingsType,
} from '../../../../../../../core/public';
import { FieldSetting } from './types';

import { AdvancedSettings } from './advanced_settings';
jest.mock('ui/new_platform');

jest.mock('ui/new_platform', () => ({
npStart: mockConfig(),
Expand Down Expand Up @@ -215,6 +217,22 @@ function mockConfig() {
core: {
uiSettings: config,
},
plugins: {
advancedSettings: {
component: {
register: jest.fn(),
get: () => {
const foo: React.ComponentType = () => <div>Hello</div>;
foo.displayName = 'foo_component';
return foo;
},
componentType: {
PAGE_TITLE_COMPONENT: 'page_title_component',
PAGE_SUBTITLE_COMPONENT: 'page_subtitle_component',
},
},
},
},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ import { getAriaName, toEditableConfig, DEFAULT_CATEGORY } from './lib';

import { FieldSetting, IQuery } from './types';

import {
registerDefaultComponents,
PAGE_TITLE_COMPONENT,
PAGE_SUBTITLE_COMPONENT,
PAGE_FOOTER_COMPONENT,
} from './components/default_component_registry';
import { getSettingsComponent } from './components/component_registry';

interface AdvancedSettingsProps {
queryText: string;
enableSaving: boolean;
Expand Down Expand Up @@ -75,8 +67,6 @@ export class AdvancedSettings extends Component<AdvancedSettingsProps, AdvancedS
footerQueryMatched: false,
filteredSettings: this.mapSettings(Query.execute(parsedQuery, this.settings)),
};

registerDefaultComponents();
}

init(config: IUiSettingsClient) {
Expand Down Expand Up @@ -166,10 +156,13 @@ export class AdvancedSettings extends Component<AdvancedSettingsProps, AdvancedS

render() {
const { filteredSettings, query, footerQueryMatched } = this.state;
const componentRegistry = npStart.plugins.advancedSettings.component;

const PageTitle = getSettingsComponent(PAGE_TITLE_COMPONENT);
const PageSubtitle = getSettingsComponent(PAGE_SUBTITLE_COMPONENT);
const PageFooter = getSettingsComponent(PAGE_FOOTER_COMPONENT);
const PageTitle = componentRegistry.get(componentRegistry.componentType.PAGE_TITLE_COMPONENT);
const PageSubtitle = componentRegistry.get(
componentRegistry.componentType.PAGE_SUBTITLE_COMPONENT
);
const PageFooter = componentRegistry.get(componentRegistry.componentType.PAGE_FOOTER_COMPONENT);

return (
<div>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 426502c

Please sign in to comment.