Skip to content

Commit

Permalink
update output when comp changes
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbell committed Oct 10, 2024
1 parent 3b78d4d commit d5ee430
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/plugins/comps/CompsManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,16 @@ export default class CompsManager extends EventEmitter {
this.emit('underlyingTelemetryUpdated', { [keyString]: newTelemetry });
};

reload() {
this.#destroy();
return this.load(this.#telemetryOptions);
}

clearData(telemetryLoadedPromise) {
this.#loaded = false;
this.#telemetryLoadedPromises.push(telemetryLoadedPromise);
if (telemetryLoadedPromise) {
this.#telemetryLoadedPromises.push(telemetryLoadedPromise);
}
}

setOutputFormat(outputFormat) {
Expand Down
7 changes: 7 additions & 0 deletions src/plugins/comps/components/CompsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ function updateParameters() {
openmct.objects.mutate(domainObject, `configuration.comps.parameters`, parameters.value);
compsManager.setDomainObject(domainObject);
applyTestData();
reload();
}

function updateAccumulateValues(parameter) {
Expand Down Expand Up @@ -297,6 +298,7 @@ function updateExpression() {
openmct.objects.mutate(domainObject, `configuration.comps.expression`, expression.value);
compsManager.setDomainObject(domainObject);
applyTestData();
reload();
}

function getValueFormatter() {
Expand Down Expand Up @@ -354,6 +356,11 @@ function telemetryProcessor(data) {
currentCompOutput.value = formattedOutput;
}

function reload() {
clearData();
outputTelemetryCollection._requestHistoricalTelemetry();
}

function clearData() {
currentCompOutput.value = null;
}
Expand Down

0 comments on commit d5ee430

Please sign in to comment.