mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* [ML] Fixing analyze file endpoint call when behing proxy * small refactor
This commit is contained in:
parent
9ceccc2d94
commit
b74883907d
1 changed files with 8 additions and 5 deletions
|
@ -12,11 +12,14 @@ const basePath = chrome.addBasePath('/api/ml');
|
|||
|
||||
export const fileDatavisualizer = {
|
||||
|
||||
analyzeFile(obj, params) {
|
||||
let paramString = '?';
|
||||
for (const p in params) {
|
||||
if (params.hasOwnProperty(p)) {
|
||||
paramString += `&${p}=${params[p]}`;
|
||||
analyzeFile(obj, params = {}) {
|
||||
let paramString = '';
|
||||
if (Object.keys(params).length) {
|
||||
paramString = '?';
|
||||
for (const p in params) {
|
||||
if (params.hasOwnProperty(p)) {
|
||||
paramString += `&${p}=${params[p]}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
return http({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue