mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Clean up ui/courier exports. (#52037)
This commit is contained in:
parent
45ef370e84
commit
d1de029b88
3 changed files with 33 additions and 11 deletions
|
@ -40,11 +40,11 @@ export function getSearchParams(config: IUiSettingsClient, esShardTimeout: numbe
|
|||
};
|
||||
}
|
||||
|
||||
export function getIgnoreThrottled(config: IUiSettingsClient) {
|
||||
function getIgnoreThrottled(config: IUiSettingsClient) {
|
||||
return !config.get('search:includeFrozen');
|
||||
}
|
||||
|
||||
export function getMaxConcurrentShardRequests(config: IUiSettingsClient) {
|
||||
function getMaxConcurrentShardRequests(config: IUiSettingsClient) {
|
||||
const maxConcurrentShardRequests = config.get('courier:maxConcurrentShardRequests');
|
||||
return maxConcurrentShardRequests > 0 ? maxConcurrentShardRequests : undefined;
|
||||
}
|
||||
|
|
|
@ -17,8 +17,31 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './fetch';
|
||||
export * from './search_source';
|
||||
export * from './search_strategy';
|
||||
export * from './utils/courier_inspector_utils';
|
||||
export * from './types';
|
||||
export { SearchSource } from './search_source';
|
||||
|
||||
// TODO: Exporting this mock outside of jest tests causes errors because
|
||||
// jest is undefined. Need to refactor the mock to be consistent with
|
||||
// other NP-style mocks.
|
||||
// export { searchSourceMock } from './search_source/mocks';
|
||||
|
||||
export {
|
||||
addSearchStrategy, // used externally by Rollups
|
||||
getSearchErrorType, // used externally by Rollups
|
||||
hasSearchStategyForIndexPattern, // used externally by Discover
|
||||
isDefaultTypeIndexPattern, // used externally by Discover
|
||||
SearchError, // used externally by Visualizations & Rollups
|
||||
} from './search_strategy';
|
||||
|
||||
export {
|
||||
getRequestInspectorStats,
|
||||
getResponseInspectorStats,
|
||||
} from './utils/courier_inspector_utils';
|
||||
|
||||
// types
|
||||
export { SearchSourceContract } from './search_source';
|
||||
|
||||
export {
|
||||
EsQuerySortValue, // used externally by Discover
|
||||
FetchOptions, // used externally by AggTypes
|
||||
SortDirection, // used externally by Discover
|
||||
} from './types';
|
||||
|
|
|
@ -28,7 +28,7 @@ import { i18n } from '@kbn/i18n';
|
|||
import { SearchResponse } from 'elasticsearch';
|
||||
import { SearchSourceContract, RequestInspectorStats } from '../types';
|
||||
|
||||
function getRequestInspectorStats(searchSource: SearchSourceContract) {
|
||||
export function getRequestInspectorStats(searchSource: SearchSourceContract) {
|
||||
const stats: RequestInspectorStats = {};
|
||||
const index = searchSource.getField('index');
|
||||
|
||||
|
@ -56,7 +56,8 @@ function getRequestInspectorStats(searchSource: SearchSourceContract) {
|
|||
|
||||
return stats;
|
||||
}
|
||||
function getResponseInspectorStats(
|
||||
|
||||
export function getResponseInspectorStats(
|
||||
searchSource: SearchSourceContract,
|
||||
resp: SearchResponse<unknown>
|
||||
) {
|
||||
|
@ -121,5 +122,3 @@ function getResponseInspectorStats(
|
|||
|
||||
return stats;
|
||||
}
|
||||
|
||||
export { getRequestInspectorStats, getResponseInspectorStats };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue