1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

feat: Add last seen at timestamp

Closes #226
This commit is contained in:
Ivar Conradi Østhus 2020-12-22 09:45:35 +01:00
parent 9db1d59093
commit d1662d75c8

View File

@ -51,6 +51,10 @@ export default class MetricComponent extends React.Component {
formatFullDateTime(v) {
return formatFullDateTimeWithLocale(v, this.props.location.locale);
}
renderLastSeen = lastSeenAt => {
return lastSeenAt ? this.formatFullDateTime(lastSeenAt) : 'Never reported';
};
render() {
const { metrics = {}, featureToggle } = this.props;
const {
@ -113,7 +117,13 @@ export default class MetricComponent extends React.Component {
</div>
)}
<AppsLinkList apps={seenApps} />
<span>Created {this.formatFullDateTime(featureToggle.createdAt)}</span>
<div>
<strong>Created: </strong>
<span>{this.formatFullDateTime(featureToggle.createdAt)}</span>
<br />
<strong>Last seen: </strong>
<span>{this.renderLastSeen(featureToggle.lastSeenAt)}</span>
</div>
</Cell>
</Grid>
<hr />