Skip to content

Commit

Permalink
Merge branch '7.x' into backport/7.x/pr-56046
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Jan 28, 2020
2 parents 1609708 + 753c42b commit e4ceb50
Show file tree
Hide file tree
Showing 37 changed files with 935 additions and 688 deletions.
2 changes: 1 addition & 1 deletion docs/api/saved-objects/import.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Import an index pattern and dashboard:

[source,js]
--------------------------------------------------
$ curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@file.ndjson <1>
$ curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@file.ndjson
--------------------------------------------------

The `file.ndjson` file contains the following:
Expand Down
8 changes: 0 additions & 8 deletions x-pack/legacy/plugins/canvas/.storybook/storyshots.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ jest.mock('@elastic/eui/packages/react-datepicker', () => {

jest.mock('plugins/interpreter/registries', () => ({}));

// Disabling this test due to https://github.com/elastic/eui/issues/2242
jest.mock(
'../public/components/workpad_header/workpad_export/__examples__/disabled_panel.stories',
() => {
return 'Disabled Panel';
}
);

// Disabling this test due to https://github.com/elastic/eui/issues/2242
jest.mock(
'../public/components/workpad_header/workpad_export/flyout/__examples__/share_website_flyout.stories',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import { i18n } from '@kbn/i18n';
import { CANVAS as canvas } from './constants';

export const AngularStrings = {
CanvasRootController: {
getReadOnlyBadgeText: () =>
export const CapabilitiesStrings = {
ReadOnlyBadge: {
getText: () =>
i18n.translate('xpack.canvas.badge.readOnly.text', {
defaultMessage: 'Read only',
}),
getReadOnlyBadgeTooltip: () =>
getTooltip: () =>
i18n.translate('xpack.canvas.badge.readOnly.tooltip', {
defaultMessage: 'Unable to save {canvas} workpads',
values: {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/canvas/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { i18n } from '@kbn/i18n';

export * from './angular';
export * from './capabilities';
export * from './components';
export * from './constants';
export * from './errors';
Expand Down
8 changes: 0 additions & 8 deletions x-pack/legacy/plugins/canvas/public/angular/config/index.js

This file was deleted.

This file was deleted.

This file was deleted.

54 changes: 0 additions & 54 deletions x-pack/legacy/plugins/canvas/public/angular/controllers/canvas.tsx

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions x-pack/legacy/plugins/canvas/public/angular/services/index.js

This file was deleted.

31 changes: 0 additions & 31 deletions x-pack/legacy/plugins/canvas/public/angular/services/store.js

This file was deleted.

36 changes: 36 additions & 0 deletions x-pack/legacy/plugins/canvas/public/application.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import React from 'react';
import { Store } from 'redux';
import ReactDOM from 'react-dom';
import { I18nProvider } from '@kbn/i18n/react';
import { Provider } from 'react-redux';

import { AppMountParameters, CoreStart } from 'kibana/public';

// @ts-ignore Untyped local
import { App } from './components/app';
import { KibanaContextProvider } from '../../../../../src/plugins/kibana_react/public';

export const renderApp = (
coreStart: CoreStart,
plugins: object,
{ element }: AppMountParameters,
canvasStore: Store
) => {
ReactDOM.render(
<KibanaContextProvider services={{ ...coreStart, ...plugins }}>
<I18nProvider>
<Provider store={canvasStore}>
<App />
</Provider>
</I18nProvider>
</KibanaContextProvider>,
element
);
return () => ReactDOM.unmountComponentAtNode(element);
};

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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,13 @@ import { action } from '@storybook/addon-actions';
import React from 'react';
import { WorkpadExport } from '../workpad_export';

storiesOf('components/Export/WorkpadExport', module)
.add('enabled', () => (
<WorkpadExport
enabled={true}
onCopy={action('onCopy')}
onExport={action('onExport')}
getExportUrl={(type: string) => {
action(`getExportUrl('${type}')`);
return type;
}}
/>
))
.add('disabled', () => (
<WorkpadExport
enabled={false}
onCopy={action('onCopy')}
onExport={action('onExport')}
getExportUrl={(type: string) => {
action(`getExportUrl('${type}')`);
return type;
}}
/>
));
storiesOf('components/Export/WorkpadExport', module).add('enabled', () => (
<WorkpadExport
onCopy={action('onCopy')}
onExport={action('onExport')}
getExportUrl={(type: string) => {
action(`getExportUrl('${type}')`);
return type;
}}
/>
));
Loading

0 comments on commit e4ceb50

Please sign in to comment.