-
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.
[ES|QL] Enable ESQL alerts from the Discover app (#165973)
## Summary Enables the Alerts menu in Discover nav for the ES|QL mode and defaults to ESQL alerts by carrying the query that the user has typed. <img width="1621" alt="image" src="https://github.com/elastic/kibana/assets/17003240/5ffef9d1-179a-464a-8941-b6bf18b4f30f"> ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
- Loading branch information
Showing
10 changed files
with
170 additions
and
24 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
54 changes: 54 additions & 0 deletions
54
src/plugins/discover/public/__mocks__/data_view_no_timefield.ts
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,54 @@ | ||
/* | ||
* 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 { DataView } from '@kbn/data-views-plugin/public'; | ||
import { buildDataViewMock } from '@kbn/discover-utils/src/__mocks__'; | ||
|
||
const fields = [ | ||
{ | ||
name: '_index', | ||
type: 'string', | ||
scripted: false, | ||
filterable: true, | ||
}, | ||
{ | ||
name: 'message', | ||
displayName: 'message', | ||
type: 'string', | ||
scripted: false, | ||
filterable: false, | ||
}, | ||
{ | ||
name: 'extension', | ||
displayName: 'extension', | ||
type: 'string', | ||
scripted: false, | ||
filterable: true, | ||
aggregatable: true, | ||
}, | ||
{ | ||
name: 'bytes', | ||
displayName: 'bytes', | ||
type: 'number', | ||
scripted: false, | ||
filterable: true, | ||
aggregatable: true, | ||
}, | ||
{ | ||
name: 'scripted', | ||
displayName: 'scripted', | ||
type: 'number', | ||
scripted: true, | ||
filterable: false, | ||
}, | ||
] as DataView['fields']; | ||
|
||
export const dataViewWithNoTimefieldMock = buildDataViewMock({ | ||
name: 'index-pattern-with-timefield', | ||
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
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
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