mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[ML] Fixing analyze file endpoint call when behind proxy (#28595)
* [ML] Fixing analyze file endpoint call when behing proxy * small refactor
This commit is contained in:
parent
e1a6f75acc
commit
90b5969e5c
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