Fix all Age, LastSeen, and FirstSeen displays (#4990)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-03-17 15:17:03 -04:00
1 parent c9cab22558
commit b08daa811d
48 files changed
+458 -344

No files matched your search

@@ -49,12 +49,18 @@ export class KubeEvent extends KubeObject {
return `${component} ${host || ""}`;
}
/**
* @deprecated This function is not reactive to changing of time. If rendering use `<ReactiveDuration />` instead
*/
getFirstSeenTime() {
const diff = moment().diff(this.firstTimestamp);
return formatDuration(diff, true);
}
/**
* @deprecated This function is not reactive to changing of time. If rendering use `<ReactiveDuration />` instead
*/
getLastSeenTime() {
const diff = moment().diff(this.lastTimestamp);