mirror of
https://github.com/nasa/openmct.git
synced 2025-01-18 18:57:01 +00:00
cherry-pick(#6960): Add strategy latest and timeContext to auto flow tabular and gauge views (#6981)
cherry-pick(#6960): Add strategy latest and timeContext to auto flow tabular and gauge views (#6960)
This commit is contained in:
parent
856d88597e
commit
b043f26e49
@ -68,7 +68,12 @@ define([], function () {
|
||||
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) {
|
||||
if (!this.initialized && history.length > 0) {
|
||||
this.updateRowData(history[history.length - 1]);
|
||||
|
@ -638,7 +638,11 @@ export default {
|
||||
|
||||
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;
|
||||
this.updateValue(values[length - 1]);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user