-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into update-exp-view-formatting
- Loading branch information
Showing
208 changed files
with
2,558 additions
and
2,252 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* 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 { createMemoryHistory } from 'history'; | ||
import { dataPluginMock } from '../../../data/public/mocks'; | ||
import { DataPublicPluginStart } from '../../../data/public'; | ||
import { DiscoverSearchSessionManager } from '../application/apps/main/services/discover_search_session'; | ||
|
||
export function createSearchSessionMock() { | ||
const history = createMemoryHistory(); | ||
const session = dataPluginMock.createStartContract().search.session as jest.Mocked< | ||
DataPublicPluginStart['search']['session'] | ||
>; | ||
const searchSessionManager = new DiscoverSearchSessionManager({ | ||
history, | ||
session, | ||
}); | ||
return { | ||
history, | ||
session, | ||
searchSessionManager, | ||
}; | ||
} |
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,63 @@ | ||
/* | ||
* 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 { DiscoverServices } from '../build_services'; | ||
import { dataPluginMock } from '../../../data/public/mocks'; | ||
import { chromeServiceMock, coreMock, docLinksServiceMock } from '../../../../core/public/mocks'; | ||
import { DEFAULT_COLUMNS_SETTING } from '../../common'; | ||
import { savedSearchMock } from './saved_search'; | ||
import { UI_SETTINGS } from '../../../data/common'; | ||
import { TopNavMenu } from '../../../navigation/public'; | ||
const dataPlugin = dataPluginMock.createStartContract(); | ||
|
||
export const discoverServiceMock = ({ | ||
core: coreMock.createStart(), | ||
chrome: chromeServiceMock.createStartContract(), | ||
history: () => ({ | ||
location: { | ||
search: '', | ||
}, | ||
}), | ||
data: dataPlugin, | ||
docLinks: docLinksServiceMock.createStartContract(), | ||
capabilities: { | ||
visualize: { | ||
show: true, | ||
}, | ||
discover: { | ||
save: false, | ||
}, | ||
advancedSettings: { | ||
save: true, | ||
}, | ||
}, | ||
filterManager: dataPlugin.query.filterManager, | ||
uiSettings: { | ||
get: (key: string) => { | ||
if (key === 'fields:popularLimit') { | ||
return 5; | ||
} else if (key === DEFAULT_COLUMNS_SETTING) { | ||
return []; | ||
} else if (key === UI_SETTINGS.META_FIELDS) { | ||
return []; | ||
} | ||
}, | ||
}, | ||
indexPatternFieldEditor: { | ||
openEditor: jest.fn(), | ||
userPermissions: { | ||
editIndexPattern: jest.fn(), | ||
}, | ||
}, | ||
getSavedSearchById: (id?: string) => Promise.resolve(savedSearchMock), | ||
navigation: { | ||
ui: { TopNavMenu }, | ||
}, | ||
metadata: { | ||
branch: 'test', | ||
}, | ||
} as unknown) as DiscoverServices; |
16 changes: 16 additions & 0 deletions
16
src/plugins/discover/public/application/angular/create_discover_directive.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,16 @@ | ||
/* | ||
* 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 { DiscoverMainApp } from '../apps/main'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export function createDiscoverDirective(reactDirective: any) { | ||
return reactDirective(DiscoverMainApp, [ | ||
['indexPattern', { watchDepth: 'reference' }], | ||
['opts', { watchDepth: 'reference' }], | ||
]); | ||
} |
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
57 changes: 0 additions & 57 deletions
57
src/plugins/discover/public/application/angular/directives/debounce/debounce.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.