Skip to content

Commit

Permalink
cherry-pick(#6960): Add strategy latest and timeContext to auto flow …
Browse files Browse the repository at this point in the history
…tabular and gauge views (#6960)
  • Loading branch information
shefalijoshi committed Aug 21, 2023
1 parent 856d885 commit cbbd937
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/plugins/autoflow/AutoflowTabularRowController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
6 changes: 5 additions & 1 deletion src/plugins/gauge/components/Gauge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
});
Expand Down

0 comments on commit cbbd937

Please sign in to comment.