Skip to content

Commit c26a49d

Browse files
Merge branch 'master' into issue-54043-sharing-saved-objects-phase-1
2 parents 223ecef + 730dcbf commit c26a49d

126 files changed

Lines changed: 1880 additions & 1609 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/index.test.tsx.snap

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/index.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ describe('MetricsAxisOptions component', () => {
9595
schemas: { metrics: [{ name: 'metric' }] },
9696
},
9797
setState: jest.fn(),
98+
serialize: jest.fn(),
9899
},
99100
stateParams: {
100101
valueAxes: [axis],

src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ function MetricsAxisOptions(props: ValidationVisOptionsProps<BasicVislibParams>)
299299
}, [stateParams.seriesParams]);
300300

301301
useEffect(() => {
302-
vis.setState({ type: visType } as any);
302+
vis.setState({ ...vis.serialize(), type: visType });
303303
}, [vis, visType]);
304304

305305
return isTabSelected ? (

x-pack/legacy/plugins/canvas/.storybook/webpack.config.js

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
const path = require('path');
88
const webpack = require('webpack');
9+
const { stringifyRequest } = require('loader-utils');
910
const CopyWebpackPlugin = require('copy-webpack-plugin');
1011
const { DLL_OUTPUT, KIBANA_ROOT } = require('./constants');
1112

@@ -73,7 +74,20 @@ module.exports = async ({ config }) => {
7374
path: path.resolve(KIBANA_ROOT, 'src/optimize/postcss.config.js'),
7475
},
7576
},
76-
{ loader: 'sass-loader' },
77+
{
78+
loader: 'sass-loader',
79+
options: {
80+
prependData(loaderContext) {
81+
return `@import ${stringifyRequest(
82+
loaderContext,
83+
path.resolve(KIBANA_ROOT, 'src/legacy/ui/public/styles/_styling_constants.scss')
84+
)};\n`;
85+
},
86+
sassOptions: {
87+
includePaths: [path.resolve(KIBANA_ROOT, 'node_modules')],
88+
},
89+
},
90+
},
7791
],
7892
});
7993

@@ -86,8 +100,9 @@ module.exports = async ({ config }) => {
86100
loader: 'css-loader',
87101
options: {
88102
importLoaders: 2,
89-
modules: true,
90-
localIdentName: '[name]__[local]___[hash:base64:5]',
103+
modules: {
104+
localIdentName: '[name]__[local]___[hash:base64:5]',
105+
},
91106
},
92107
},
93108
{
@@ -159,7 +174,11 @@ module.exports = async ({ config }) => {
159174
// what require() calls it will execute within the bundle
160175
JSON.stringify({ type, modules: extensions[type] || [] }),
161176
].join('');
162-
})
177+
}),
178+
179+
// Mock out libs used by a few componets to avoid loading in kibana_legacy and platform
180+
new webpack.NormalModuleReplacementPlugin(/lib\/notify/, path.resolve(__dirname, '../tasks/mocks/uiNotify')),
181+
new webpack.NormalModuleReplacementPlugin(/lib\/download_workpad/, path.resolve(__dirname, '../tasks/mocks/downloadWorkpad')),
163182
);
164183

165184
// Tell Webpack about relevant extensions
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
export const downloadWorkpad = async workpadId => console.log(`Download workpad ${workpadId}`);
7+
8+
export const downloadRenderedWorkpad = async renderedWorkpad =>
9+
console.log(`Download workpad ${renderedWorkpad.id}`);
10+
11+
export const downloadRuntime = async basePath => console.log(`Download run time at ${basePath}`);
12+
13+
export const downloadZippedRuntime = async data => console.log(`Downloading data ${data}`);

x-pack/legacy/plugins/monitoring/public/components/alerts/configuration/__snapshots__/step1.test.tsx.snap

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/legacy/plugins/monitoring/public/components/alerts/configuration/configuration.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const AlertsConfiguration: React.FC<AlertsConfigurationProps> = (
6161
async function fetchEmailActions() {
6262
const kibanaActions = await kfetch({
6363
method: 'GET',
64-
pathname: `/api/action/_find`,
64+
pathname: `/api/action/_getAll`,
6565
});
6666

6767
const actions = kibanaActions.data.filter(

x-pack/legacy/plugins/monitoring/public/components/alerts/configuration/step1.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ describe('Step1', () => {
2727
actionTypeId: '1abc',
2828
name: 'Testing',
2929
config: {},
30+
isPreconfigured: false,
3031
},
3132
];
3233
const selectedEmailActionId = emailActions[0].id;
@@ -83,6 +84,7 @@ describe('Step1', () => {
8384
actionTypeId: '.email',
8485
name: '',
8586
config: {},
87+
isPreconfigured: false,
8688
},
8789
],
8890
selectedEmailActionId: NEW_ACTION_ID,

x-pack/legacy/plugins/siem/public/containers/case/configure/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { isEmpty } from 'lodash/fp';
88
import {
9-
CasesConnectorsFindResult,
9+
Connector,
1010
CasesConfigurePatch,
1111
CasesConfigureResponse,
1212
CasesConfigureRequest,
@@ -18,7 +18,7 @@ import { ApiProps } from '../types';
1818
import { convertToCamelCase, decodeCaseConfigureResponse } from '../utils';
1919
import { CaseConfigure } from './types';
2020

21-
export const fetchConnectors = async ({ signal }: ApiProps): Promise<CasesConnectorsFindResult> => {
21+
export const fetchConnectors = async ({ signal }: ApiProps): Promise<Connector[]> => {
2222
const response = await KibanaServices.get().http.fetch(
2323
`${CASES_CONFIGURE_URL}/connectors/_find`,
2424
{

x-pack/legacy/plugins/siem/public/containers/case/configure/use_connectors.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const useConnectors = (): ReturnConnectors => {
3131
const res = await fetchConnectors({ signal: abortCtrl.signal });
3232
if (!didCancel) {
3333
setLoading(false);
34-
setConnectors(res.data);
34+
setConnectors(res);
3535
}
3636
} catch (error) {
3737
if (!didCancel) {

0 commit comments

Comments
 (0)