mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[ES|QL][Lens] Fixes import to other spaces (#183076)
## Summary Removes it as it is not needed. Its presence also creates a small bug. 1. Create a visualization with ES|QL 2. Export the dashboard 3. Import to a new space It will ask for a dataview while it is not needed.
This commit is contained in:
parent
781b5eef8e
commit
07e3b4825a
4 changed files with 6 additions and 42 deletions
|
@ -37,13 +37,7 @@ describe('getLensAttributesFromSuggestion', () => {
|
|||
'index-pattern-with-timefield-id': {},
|
||||
},
|
||||
}),
|
||||
references: [
|
||||
{
|
||||
id: 'index-pattern-with-timefield-id',
|
||||
name: 'textBasedLanguages-datasource-layer-suggestion',
|
||||
type: 'index-pattern',
|
||||
},
|
||||
],
|
||||
references: [],
|
||||
title: currentSuggestionMock.title,
|
||||
visualizationType: 'lnsHeatmap',
|
||||
});
|
||||
|
|
|
@ -50,13 +50,7 @@ export const getLensAttributesFromSuggestion = ({
|
|||
i18n.translate('visualizationUtils.config.suggestion.title', {
|
||||
defaultMessage: 'New suggestion',
|
||||
}),
|
||||
references: [
|
||||
{
|
||||
id: dataView?.id ?? '',
|
||||
name: `textBasedLanguages-datasource-layer-suggestion`,
|
||||
type: 'index-pattern',
|
||||
},
|
||||
],
|
||||
references: [],
|
||||
state: {
|
||||
datasourceStates,
|
||||
filters,
|
||||
|
|
|
@ -539,13 +539,7 @@ describe('LensVisService attributes', () => {
|
|||
expect(lensVis.visContext).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"attributes": Object {
|
||||
"references": Array [
|
||||
Object {
|
||||
"id": "index-pattern-with-timefield-id",
|
||||
"name": "textBasedLanguages-datasource-layer-suggestion",
|
||||
"type": "index-pattern",
|
||||
},
|
||||
],
|
||||
"references": Array [],
|
||||
"state": Object {
|
||||
"datasourceStates": Object {
|
||||
"textBased": Object {
|
||||
|
@ -736,13 +730,7 @@ describe('LensVisService attributes', () => {
|
|||
'index-pattern-with-timefield-id': {},
|
||||
},
|
||||
}),
|
||||
references: [
|
||||
{
|
||||
id: 'index-pattern-with-timefield-id',
|
||||
name: 'textBasedLanguages-datasource-layer-suggestion',
|
||||
type: 'index-pattern',
|
||||
},
|
||||
],
|
||||
references: [],
|
||||
title: 'Heat map',
|
||||
visualizationType: 'lnsHeatmap',
|
||||
});
|
||||
|
|
|
@ -3,13 +3,7 @@
|
|||
exports[`external_vis_context exportVisContext should work correctly 1`] = `
|
||||
Object {
|
||||
"attributes": Object {
|
||||
"references": Array [
|
||||
Object {
|
||||
"id": "index-pattern-with-timefield-id",
|
||||
"name": "textBasedLanguages-datasource-layer-suggestion",
|
||||
"type": "index-pattern",
|
||||
},
|
||||
],
|
||||
"references": Array [],
|
||||
"state": Object {
|
||||
"datasourceStates": Object {
|
||||
"textBased": Object {
|
||||
|
@ -192,13 +186,7 @@ Object {
|
|||
exports[`external_vis_context exportVisContext should work correctly 2`] = `
|
||||
Object {
|
||||
"attributes": Object {
|
||||
"references": Array [
|
||||
Object {
|
||||
"id": "index-pattern-with-timefield-id",
|
||||
"name": "textBasedLanguages-datasource-layer-suggestion",
|
||||
"type": "index-pattern",
|
||||
},
|
||||
],
|
||||
"references": Array [],
|
||||
"state": Object {
|
||||
"datasourceStates": Object {
|
||||
"textBased": Object {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue