mirror of
https://github.com/nasa/openmct.git
synced 2025-01-03 11:54:10 +00:00
Merge remote-tracking branch 'khalidadil/extend-conditional' into combined-rodap-stuff
This commit is contained in:
commit
0d238f0f8b
@ -7,14 +7,18 @@ function sortTelemetriesByDate(historicalTelemetriesPool) {
|
||||
const { identifier } = domainObject;
|
||||
const telemetryIdentifier = makeKeyString(identifier);
|
||||
historicalTelemetry.forEach((historicalTelemetryItem) => {
|
||||
if (!historicalTelemetryDateMap.get(historicalTelemetryItem.utc)) {
|
||||
let telemetryTimestamp = historicalTelemetryItem.utc;
|
||||
if (historicalTelemetryItem.timestamp) {
|
||||
telemetryTimestamp = new Date(historicalTelemetryItem.timestamp)?.getTime();
|
||||
}
|
||||
if (!historicalTelemetryDateMap.get(telemetryTimestamp)) {
|
||||
const telemetryMap = new Map();
|
||||
telemetryMap.set(telemetryIdentifier, historicalTelemetryItem);
|
||||
historicalTelemetryDateMap.set(historicalTelemetryItem.utc, telemetryMap);
|
||||
historicalTelemetryDateMap.set(telemetryTimestamp, telemetryMap);
|
||||
} else {
|
||||
const telemetryMap = historicalTelemetryDateMap.get(historicalTelemetryItem.utc);
|
||||
const telemetryMap = historicalTelemetryDateMap.get(telemetryTimestamp);
|
||||
telemetryMap.set(telemetryIdentifier, historicalTelemetryItem);
|
||||
historicalTelemetryDateMap.set(historicalTelemetryItem.utc, telemetryMap);
|
||||
historicalTelemetryDateMap.set(telemetryTimestamp, telemetryMap);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user