mirror of
https://github.com/nasa/openmct.git
synced 2025-02-22 18:12:57 +00:00
Add strategy latest and timeContext to auto flow tabular and gauge views (#6960)
This commit is contained in:
parent
9ece4e55dc
commit
6db390a71a
@ -68,7 +68,12 @@ define([], function () {
|
|||||||
this.updateRowData.bind(this)
|
this.updateRowData.bind(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
this.openmct.telemetry.request(this.domainObject, { size: 1 }).then(
|
const options = {
|
||||||
|
size: 1,
|
||||||
|
strategy: 'latest',
|
||||||
|
timeContext: this.openmct.time.getContextForView([])
|
||||||
|
};
|
||||||
|
this.openmct.telemetry.request(this.domainObject, options).then(
|
||||||
function (history) {
|
function (history) {
|
||||||
if (!this.initialized && history.length > 0) {
|
if (!this.initialized && history.length > 0) {
|
||||||
this.updateRowData(history[history.length - 1]);
|
this.updateRowData(history[history.length - 1]);
|
||||||
|
@ -638,7 +638,11 @@ export default {
|
|||||||
|
|
||||||
this.valueKey = this.metadata.valuesForHints(['range'])[0].source;
|
this.valueKey = this.metadata.valuesForHints(['range'])[0].source;
|
||||||
|
|
||||||
this.openmct.telemetry.request(domainObject, { strategy: 'latest' }).then((values) => {
|
const options = {
|
||||||
|
strategy: 'latest',
|
||||||
|
timeContext: this.openmct.time.getContextForView([])
|
||||||
|
};
|
||||||
|
this.openmct.telemetry.request(domainObject, options).then((values) => {
|
||||||
const length = values.length;
|
const length = values.length;
|
||||||
this.updateValue(values[length - 1]);
|
this.updateValue(values[length - 1]);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user