Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Condition Sets] Gracefully handle no telemetry #7997

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/plugins/condition/criterion/TelemetryCriterion.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,12 @@
}

createNormalizedDatum(telemetryDatum, endpoint) {
if (!telemetryDatum) {
return;

Check warning on line 155 in src/plugins/condition/criterion/TelemetryCriterion.js

View check run for this annotation

Codecov / codecov/patch

src/plugins/condition/criterion/TelemetryCriterion.js#L155

Added line #L155 was not covered by tests
}

const id = this.openmct.objects.makeKeyString(endpoint.identifier);
const metadata = this.openmct.telemetry.getMetadata(endpoint).valueMetadatas;

const normalizedDatum = Object.values(metadata).reduce((datum, metadatum) => {
const formatter = this.openmct.telemetry.getValueFormatter(metadatum);
datum[metadatum.key] = formatter.parse(telemetryDatum[metadatum.source]);
Expand Down
Loading