[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 0a1e7a5b29.

* Revert "Update fixtues"

This reverts commit b0c0e70200.

* Revert "Update tests"

This reverts commit 6a4421bb4e.

* Revert "Ensure we pass down the expiry_date for the license"

This reverts commit 2562395a78.

* Use expiry_date_in_millis value instead of expiry_date
This commit is contained in:
Chris Roberson 2018-07-31 09:44:50 -04:00 committed by GitHub
parent 1211efdf40
commit bacbf153fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -26,7 +26,7 @@ export function LicenseText({ license, showLicenseExpiration }) {
return (
<EuiLink href="#/license">
{capitalize(license.type)} license <WillExpireOn expiryDate={license.expiry_date} />
{capitalize(license.type)} license <WillExpireOn expiryDate={license.expiry_date_in_millis} />
</EuiLink>
);
}

View file

@ -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