mirror of
https://github.com/nasa/openmct.git
synced 2025-01-02 11:26:42 +00:00
Merge branch 'telemetry-comps' into combined-rodap-stuff
This commit is contained in:
commit
5803cd1de9
@ -62,7 +62,7 @@ export default class CompsManager extends EventEmitter {
|
|||||||
testValue: 0,
|
testValue: 0,
|
||||||
timeMetaData,
|
timeMetaData,
|
||||||
accumulateValues: false,
|
accumulateValues: false,
|
||||||
sampleSize: null
|
sampleSize: 10
|
||||||
});
|
});
|
||||||
this.emit('parameterAdded', this.#domainObject);
|
this.emit('parameterAdded', this.#domainObject);
|
||||||
}
|
}
|
||||||
@ -347,8 +347,10 @@ export default class CompsManager extends EventEmitter {
|
|||||||
|
|
||||||
clearData(telemetryLoadedPromise) {
|
clearData(telemetryLoadedPromise) {
|
||||||
this.#loaded = false;
|
this.#loaded = false;
|
||||||
|
if (telemetryLoadedPromise) {
|
||||||
this.#telemetryLoadedPromises.push(telemetryLoadedPromise);
|
this.#telemetryLoadedPromises.push(telemetryLoadedPromise);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setOutputFormat(outputFormat) {
|
setOutputFormat(outputFormat) {
|
||||||
this.#domainObject.configuration.comps.outputFormat = outputFormat;
|
this.#domainObject.configuration.comps.outputFormat = outputFormat;
|
||||||
|
@ -113,6 +113,9 @@
|
|||||||
aria-label="Toggle Parameter Accumulation"
|
aria-label="Toggle Parameter Accumulation"
|
||||||
></span>
|
></span>
|
||||||
</label>
|
</label>
|
||||||
|
<div v-if="!isEditing && parameter.accumulateValues">
|
||||||
|
- accumulating values with sample size {{ parameter.sampleSize }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<span v-if="isEditing && parameter.accumulateValues" class="c-test-datum__string"
|
<span v-if="isEditing && parameter.accumulateValues" class="c-test-datum__string"
|
||||||
>Sample Size</span
|
>Sample Size</span
|
||||||
@ -207,8 +210,7 @@ const props = defineProps({
|
|||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
const telemetryOptions = {
|
const telemetryOptions = {
|
||||||
size: 1,
|
strategy: 'minmax'
|
||||||
strategy: 'latest'
|
|
||||||
};
|
};
|
||||||
outputTelemetryCollection = openmct.telemetry.requestCollection(domainObject, telemetryOptions);
|
outputTelemetryCollection = openmct.telemetry.requestCollection(domainObject, telemetryOptions);
|
||||||
outputTelemetryCollection.on('add', telemetryProcessor);
|
outputTelemetryCollection.on('add', telemetryProcessor);
|
||||||
@ -264,6 +266,7 @@ function updateParameters() {
|
|||||||
openmct.objects.mutate(domainObject, `configuration.comps.parameters`, parameters.value);
|
openmct.objects.mutate(domainObject, `configuration.comps.parameters`, parameters.value);
|
||||||
compsManager.setDomainObject(domainObject);
|
compsManager.setDomainObject(domainObject);
|
||||||
applyTestData();
|
applyTestData();
|
||||||
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateAccumulateValues(parameter) {
|
function updateAccumulateValues(parameter) {
|
||||||
@ -295,6 +298,7 @@ function updateExpression() {
|
|||||||
openmct.objects.mutate(domainObject, `configuration.comps.expression`, expression.value);
|
openmct.objects.mutate(domainObject, `configuration.comps.expression`, expression.value);
|
||||||
compsManager.setDomainObject(domainObject);
|
compsManager.setDomainObject(domainObject);
|
||||||
applyTestData();
|
applyTestData();
|
||||||
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getValueFormatter() {
|
function getValueFormatter() {
|
||||||
@ -352,6 +356,11 @@ function telemetryProcessor(data) {
|
|||||||
currentCompOutput.value = formattedOutput;
|
currentCompOutput.value = formattedOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function reload() {
|
||||||
|
clearData();
|
||||||
|
outputTelemetryCollection._requestHistoricalTelemetry();
|
||||||
|
}
|
||||||
|
|
||||||
function clearData() {
|
function clearData() {
|
||||||
currentCompOutput.value = null;
|
currentCompOutput.value = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user