-
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.
Merge remote-tracking branch 'upstream/master' into newplatform/data-…
…plugin/value-suggesions
- Loading branch information
Showing
91 changed files
with
6,889 additions
and
1,188 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,39 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
export function buildQueryFromFilters(filters: unknown[], indexPattern: unknown): unknown; | ||
export function buildEsQuery( | ||
indexPattern: unknown, | ||
queries: unknown, | ||
filters: unknown, | ||
config?: { | ||
allowLeadingWildcards: boolean; | ||
queryStringOptions: unknown; | ||
ignoreFilterIfFieldNotInIndex: boolean; | ||
dateFormatTZ?: string | null; | ||
} | ||
): unknown; | ||
export function getEsQueryConfig(config: { | ||
get: (name: string) => unknown; | ||
}): { | ||
allowLeadingWildcards: boolean; | ||
queryStringOptions: unknown; | ||
ignoreFilterIfFieldNotInIndex: boolean; | ||
dateFormatTZ?: string | null; | ||
}; |
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 |
---|---|---|
|
@@ -17,5 +17,6 @@ | |
* under the License. | ||
*/ | ||
|
||
export * from './es_query'; | ||
export * from './kuery'; | ||
export * from './filters'; |
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
45 changes: 45 additions & 0 deletions
45
x-pack/legacy/plugins/infra/public/containers/logs/log_analysis/api/get_log_entry_rate.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,45 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { fold } from 'fp-ts/lib/Either'; | ||
import { pipe } from 'fp-ts/lib/pipeable'; | ||
import { identity } from 'fp-ts/lib/function'; | ||
import { kfetch } from 'ui/kfetch'; | ||
|
||
import { | ||
getLogEntryRateRequestPayloadRT, | ||
getLogEntryRateSuccessReponsePayloadRT, | ||
LOG_ANALYSIS_GET_LOG_ENTRY_RATE_PATH, | ||
} from '../../../../../common/http_api/log_analysis'; | ||
import { createPlainError, throwErrors } from '../../../../../common/runtime_types'; | ||
|
||
export const callGetLogEntryRateAPI = async ( | ||
sourceId: string, | ||
startTime: number, | ||
endTime: number, | ||
bucketDuration: number | ||
) => { | ||
const response = await kfetch({ | ||
method: 'POST', | ||
pathname: LOG_ANALYSIS_GET_LOG_ENTRY_RATE_PATH, | ||
body: JSON.stringify( | ||
getLogEntryRateRequestPayloadRT.encode({ | ||
data: { | ||
sourceId, | ||
timeRange: { | ||
startTime, | ||
endTime, | ||
}, | ||
bucketDuration, | ||
}, | ||
}) | ||
), | ||
}); | ||
return pipe( | ||
getLogEntryRateSuccessReponsePayloadRT.decode(response), | ||
fold(throwErrors(createPlainError), identity) | ||
); | ||
}; |
71 changes: 0 additions & 71 deletions
71
...gins/infra/public/containers/logs/log_analysis/log_analysis_graph_data/log_entry_rate.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.