mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 09:55:18 +00:00
add full output from Wazuh-api
This commit is contained in:
parent
b887824b1b
commit
77eed61d09
@ -517,18 +517,20 @@ export class DevToolsController {
|
||||
const path = req.includes('?') ? req.split('?')[0] : req;
|
||||
|
||||
if (typeof JSONraw === 'object') JSONraw.devTools = true;
|
||||
console.log("a")
|
||||
const output = await this.apiReq.request(method, path, JSONraw);
|
||||
console.log(output)
|
||||
|
||||
this.apiOutputBox.setValue(JSON.stringify(output.data.data, null, 2));
|
||||
this.apiOutputBox.setValue(JSON.stringify(output.data, null, 2));
|
||||
} else {
|
||||
this.apiOutputBox.setValue('Welcome!');
|
||||
}
|
||||
} catch (error) {
|
||||
const parsedError = this.errorHandler.handle(error, null, null, true);
|
||||
if (typeof parsedError === 'string') {
|
||||
return this.apiOutputBox.setValue(parsedError);
|
||||
return this.apiOutputBox.setValue(error);
|
||||
} else if (error && error.data && typeof error.data === 'object') {
|
||||
return this.apiOutputBox.setValue(JSON.stringify(error.data));
|
||||
return this.apiOutputBox.setValue(JSON.stringify(error));
|
||||
} else {
|
||||
return this.apiOutputBox.setValue('Empty');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user