-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Discover] Fix overwriting data view id when loading a saved search w…
…ith ES|QL (#175769) This commit prevents the propagation of the AppState index (which is the id of the data view in the URL), to the state of a loaded saved search containing a ES|QL query. Since the id of the data view used in this case is retrieved from the text base language statement, there's no reason for mutating the saved search state
- Loading branch information
Showing
4 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* 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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
import { buildDataViewMock } from '@kbn/discover-utils/src/__mocks__'; | ||
import { DataView } from '@kbn/data-views-plugin/common'; | ||
|
||
const fields = [ | ||
{ | ||
name: '@timestamp', | ||
displayName: 'timestamp', | ||
type: 'date', | ||
scripted: false, | ||
filterable: true, | ||
aggregatable: true, | ||
sortable: true, | ||
}, | ||
{ | ||
name: 'message', | ||
displayName: 'message', | ||
type: 'string', | ||
scripted: false, | ||
filterable: false, | ||
}, | ||
] as DataView['fields']; | ||
|
||
export const dataViewEsql = buildDataViewMock({ | ||
name: 'index-pattern-esql', | ||
fields, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters