Skip to content

Commit

Permalink
Merge pull request #81 from ChannelFinder/monitoring-first-timestamp
Browse files Browse the repository at this point in the history
Show epoch stamp if invalid
  • Loading branch information
tynanford authored Oct 24, 2023
2 parents 45300f2 + 7bf2956 commit 8ffddcc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/pv/valuetable/ValueTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@ function ValueTable(props) {
timestamp = new Date(message.seconds * 1000).toLocaleString();
}
if (!props.snapshot) {
if (message.seconds !== 631152000) {
setPVTimestamp(timestamp)
if (pvSeverity === "INVALID" || message.severity === "INVALID") {
setPVTimestamp(timestamp);
} else if (message.seconds !== 631152000) {
setPVTimestamp(timestamp);
}
}
}
Expand Down Expand Up @@ -193,7 +195,7 @@ function ValueTable(props) {
console.log("Unexpected message type: ", message);
}
}
}, [lastJsonMessage, props.pvMonitoring, props.snapshot, snapshot, pvPrecision]);
}, [lastJsonMessage, props.pvMonitoring, props.snapshot, snapshot, pvPrecision, pvSeverity]);

if (props.isLoading) {
return (
Expand Down

0 comments on commit 8ffddcc

Please sign in to comment.