in src/helpers.ts [128:145]
export async function fetchClusterData() {
const jsonDataCluster: object = await fetch(ELASTICSEARCH_HOST, {
method: 'GET',
headers: {
"accept": "*/*",
"Authorization": API_KEY,
"kbn-xsrf": "reporting"
}
}).then(response => {
if (!response.ok) {
throw new Error(response.statusText);
}
return response.text();
}).then(json => {
return JSON.parse(json);
});
return jsonDataCluster;
}