From bacbf153fc458c431f03216544ac24d2c2a47de9 Mon Sep 17 00:00:00 2001 From: Chris Roberson Date: Tue, 31 Jul 2018 09:44:50 -0400 Subject: [PATCH] [Monitoring] Ensure we pass down the expiry_date for the license (#21354) * Ensure we pass down the expiry_date for the license * Update tests * Update fixtues * Update fixture * Revert "Update fixture" This reverts commit 0a1e7a5b29699b38fafbc9ca05f1e08608555662. * Revert "Update fixtues" This reverts commit b0c0e702003222161e90a65bfa571676434719d2. * Revert "Update tests" This reverts commit 6a4421bb4e981e34a890b4feb484328c068e64b7. * Revert "Ensure we pass down the expiry_date for the license" This reverts commit 2562395a78fb856af35db20cc52ee0c286bb6ebc. * Use expiry_date_in_millis value instead of expiry_date --- .../public/components/cluster/overview/license_text.js | 2 +- .../plugins/monitoring/public/views/license/controller.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/monitoring/public/components/cluster/overview/license_text.js b/x-pack/plugins/monitoring/public/components/cluster/overview/license_text.js index f1dc1e4922c8..17cd262a078b 100644 --- a/x-pack/plugins/monitoring/public/components/cluster/overview/license_text.js +++ b/x-pack/plugins/monitoring/public/components/cluster/overview/license_text.js @@ -26,7 +26,7 @@ export function LicenseText({ license, showLicenseExpiration }) { return ( - {capitalize(license.type)} license + {capitalize(license.type)} license ); } diff --git a/x-pack/plugins/monitoring/public/views/license/controller.js b/x-pack/plugins/monitoring/public/views/license/controller.js index 49dbec438f0b..e69c2df648bd 100644 --- a/x-pack/plugins/monitoring/public/views/license/controller.js +++ b/x-pack/plugins/monitoring/public/views/license/controller.js @@ -49,9 +49,9 @@ export class LicenseViewController { renderReact($scope) { $scope.$evalAsync(() => { const { isPrimaryCluster, license, isExpired, uploadLicensePath } = this; - let expiryDate = license.expiry_date; - if (license.expiry_date !== undefined) { - expiryDate = formatDateTimeLocal(license.expiry_date); + let expiryDate = license.expiry_date_in_millis; + if (license.expiry_date_in_millis !== undefined) { + expiryDate = formatDateTimeLocal(license.expiry_date_in_millis); } // Mount the React component to the template