mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Grokdebugger] Fix grokdebugger simulate call in non-default s… (#61423)
This commit is contained in:
parent
5b8de94616
commit
3373bb8613
1 changed files with 3 additions and 3 deletions
|
@ -4,19 +4,19 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import chrome from 'ui/chrome';
|
||||
import { ROUTES } from '../../../common/constants';
|
||||
import { GrokdebuggerResponse } from 'plugins/grokdebugger/models/grokdebugger_response';
|
||||
|
||||
export class GrokdebuggerService {
|
||||
constructor(http) {
|
||||
this.http = http;
|
||||
this.basePath = chrome.addBasePath(ROUTES.API_ROOT);
|
||||
}
|
||||
|
||||
simulate(grokdebuggerRequest) {
|
||||
return this.http
|
||||
.post(`${this.basePath}/simulate`, { body: JSON.stringify(grokdebuggerRequest.upstreamJSON) })
|
||||
.post(`${ROUTES.API_ROOT}/simulate`, {
|
||||
body: JSON.stringify(grokdebuggerRequest.upstreamJSON),
|
||||
})
|
||||
.then(response => {
|
||||
return GrokdebuggerResponse.fromUpstreamJSON(response.grokdebuggerResponse);
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue