mirror of
https://github.com/nasa/openmct.git
synced 2025-02-08 12:00:38 +00:00
adding nextPage
This commit is contained in:
parent
635c725573
commit
112ac74cfb
@ -188,6 +188,10 @@ export default class TelemetryCollection extends EventEmitter {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getLastTelemetryDatum() {
|
||||||
|
return this.boundedTelemetry[this.boundedTelemetry.length - 1];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter any new telemetry (add/page, historical, subscription) based on
|
* Filter any new telemetry (add/page, historical, subscription) based on
|
||||||
* time bounds and dupes
|
* time bounds and dupes
|
||||||
|
@ -111,6 +111,20 @@ define([
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nextPage() {
|
||||||
|
const keystring = Object.keys(this.telemetryCollections)[0];
|
||||||
|
const lastDatum = this.telemetryCollections[keystring].getLastTelemtryDatum();
|
||||||
|
const timestampKey = this.openmct.time.timeSystem().key;
|
||||||
|
const metadata = this.openmct.telemetry.getMetadata(
|
||||||
|
this.telemetryCollections[keystring].telemetryObject
|
||||||
|
);
|
||||||
|
const formats = this.openmct.telemetry.getFormatMap(metadata);
|
||||||
|
const lastTimestamp = formats[timestampKey].parse(lastDatum);
|
||||||
|
|
||||||
|
// clear old collection, rerequest from last timestamp
|
||||||
|
this.addTelemetryObject(this.telemetryCollections[keystring].telemetryObject, lastTimestamp);
|
||||||
|
}
|
||||||
|
|
||||||
createTableRowCollections() {
|
createTableRowCollections() {
|
||||||
this.tableRows = new TableRowCollection();
|
this.tableRows = new TableRowCollection();
|
||||||
|
|
||||||
@ -141,11 +155,14 @@ define([
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addTelemetryObject(telemetryObject) {
|
addTelemetryObject(telemetryObject, start) {
|
||||||
this.addColumnsForObject(telemetryObject, true);
|
this.addColumnsForObject(telemetryObject, true);
|
||||||
|
|
||||||
const keyString = this.openmct.objects.makeKeyString(telemetryObject.identifier);
|
const keyString = this.openmct.objects.makeKeyString(telemetryObject.identifier);
|
||||||
let requestOptions = this.buildOptionsFromConfiguration(telemetryObject);
|
let requestOptions = this.buildOptionsFromConfiguration(telemetryObject);
|
||||||
|
if (start) {
|
||||||
|
requestOptions.start = start;
|
||||||
|
}
|
||||||
let columnMap = this.getColumnMapForObject(keyString);
|
let columnMap = this.getColumnMapForObject(keyString);
|
||||||
let limitEvaluator = this.openmct.telemetry.limitEvaluator(telemetryObject);
|
let limitEvaluator = this.openmct.telemetry.limitEvaluator(telemetryObject);
|
||||||
// hardcode 50 item limit
|
// hardcode 50 item limit
|
||||||
|
@ -559,6 +559,7 @@ export default {
|
|||||||
},
|
},
|
||||||
nextPage() {
|
nextPage() {
|
||||||
this.currentPage++;
|
this.currentPage++;
|
||||||
|
this.table.nextPage();
|
||||||
},
|
},
|
||||||
updateVisibleRows() {
|
updateVisibleRows() {
|
||||||
if (!this.updatingView) {
|
if (!this.updatingView) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user