mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Canvas] Fixes Storybook for DatasourceComponent is crashing. (#110180)
* Added mock for `es_service`. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
73f8a92a33
commit
d43e9f586b
2 changed files with 14 additions and 0 deletions
10
x-pack/plugins/canvas/storybook/__mocks__/es_service.ts
Normal file
10
x-pack/plugins/canvas/storybook/__mocks__/es_service.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export const getDefaultIndex = () => {
|
||||
return Promise.resolve('Demonstration index');
|
||||
};
|
|
@ -56,6 +56,10 @@ const canvasWebpack = {
|
|||
resolve: {
|
||||
alias: {
|
||||
'src/plugins': resolve(KIBANA_ROOT, 'src/plugins'),
|
||||
'../../lib/es_service': resolve(
|
||||
KIBANA_ROOT,
|
||||
'x-pack/plugins/canvas/storybook/__mocks__/es_service.ts'
|
||||
),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue