mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
update fetchLicense paths
This commit is contained in:
parent
6a0b7b4f7b
commit
63759503b4
1 changed files with 3 additions and 2 deletions
|
@ -79,12 +79,13 @@ export async function fetchLicenses(
|
|||
const response = await esClient.search<ElasticsearchSource>(params);
|
||||
return (
|
||||
response?.hits?.hits.map((hit) => {
|
||||
const rawLicense = hit._source!.license ?? {};
|
||||
const rawLicense =
|
||||
hit._source!.license ?? hit._source?.elasticsearch?.cluster?.stats?.license ?? {};
|
||||
const license: AlertLicense = {
|
||||
status: rawLicense.status ?? '',
|
||||
type: rawLicense.type ?? '',
|
||||
expiryDateMS: rawLicense.expiry_date_in_millis ?? 0,
|
||||
clusterUuid: hit._source!.cluster_uuid,
|
||||
clusterUuid: hit._source?.elasticsearch?.cluster?.id || hit._source!.cluster_uuid,
|
||||
ccs: hit._index,
|
||||
};
|
||||
return license;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue