mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
[Monitoring] Read expiryDateMS from the right path in License rule (#148129)
The license details have been placed under the `meta` property but the context messages were not updated to read correctly from that path, this PR fixes that little issue.
This commit is contained in:
parent
c71f2d196f
commit
0b83a2a61a
2 changed files with 4 additions and 2 deletions
|
@ -111,7 +111,9 @@ export interface AlertThreadPoolRejectionsState extends AlertNodeState {
|
|||
}
|
||||
|
||||
export interface AlertLicenseState extends AlertState {
|
||||
expiryDateMS: number;
|
||||
meta: {
|
||||
expiryDateMS: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface AlertNodesChangedState extends AlertState {
|
||||
|
|
|
@ -155,7 +155,7 @@ export class LicenseExpirationRule extends BaseRule {
|
|||
// Logic in the base alert assumes that all alerts will operate against multiple nodes/instances (such as a CPU alert against ES nodes)
|
||||
// However, some alerts operate on the state of the cluster itself and are only concerned with a single state
|
||||
const state: AlertLicenseState = alertStates[0] as AlertLicenseState;
|
||||
const $duration = moment.duration(+new Date() - state.expiryDateMS);
|
||||
const $duration = moment.duration(+new Date() - state.meta.expiryDateMS);
|
||||
const actionText = i18n.translate('xpack.monitoring.alerts.licenseExpiration.action', {
|
||||
defaultMessage: 'Please update your license.',
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue