Capitalize the license type in monitoring

This commit is contained in:
Chris Roberson 2018-07-11 14:26:02 -04:00
parent c6828d6388
commit 38ad3a516d

View file

@ -18,6 +18,7 @@ import {
export class LicenseStatus extends React.PureComponent {
render() {
const { isExpired, status, type, expiryDate } = this.props;
const capitalizedType = type[0].toUpperCase() + type.slice(1);
let icon;
let title;
let message;
@ -28,7 +29,7 @@ export class LicenseStatus extends React.PureComponent {
Your license expired on <strong>{expiryDate}</strong>
</Fragment>
);
title = `Your ${type} license has expired`;
title = `Your ${capitalizedType} license has expired`;
} else {
icon = <EuiIcon color="success" type="checkInCircleFilled" />;
message = expiryDate ? (
@ -38,7 +39,7 @@ export class LicenseStatus extends React.PureComponent {
) : (
<Fragment>Your license will never expire.</Fragment>
);
title = `Your ${type} license is ${status.toLowerCase()}`;
title = `Your ${capitalizedType} license is ${status.toLowerCase()}`;
}
return (
<div>