-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Derived Telemetry Prototype #7815
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
base: master
Are you sure you want to change the base?
Conversation
| this._setTimeSystem(this.options.timeContext.getTimeSystem()); | ||
| this.lastBounds = this.options.timeContext.getBounds(); | ||
| // prioritize passed options over time bounds | ||
| if (this.options.start) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're standardizing request options in this._requestHistoricalTelemetry();, recommend moving the assignment of this.lastBounds into that function after options are standardized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jvigliotta Need your thoughts here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a couple comments!
| // if derived, we can't use the old data | ||
| let data = this.getSeriesData(); | ||
|
|
||
| if (this.metadata.value(this.get('yKey')).derived) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this. Why can't we show historic computed/derived telemetry?
| ], | ||
| yAxis: persistedSeriesConfig.yAxis | ||
| yAxis: persistedSeriesConfig.yAxis, | ||
| ...this.childObject.configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shows 2 Config tabs in the inspector - One for the derived telemetry item and one for the stacked plot Config.
| :aria-label="`Reference ${parameter.name} Object Path`" | ||
| > | ||
| <ObjectPathString | ||
| :domain-object="compsManager.getTelemetryObjectForParameter(parameter.keyString)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skeptical of calling the compsManager.getTelemetryObjectForParameter method here.
| // Because this is triggered by a composition change, we have | ||
| // to defer mutation of our domain object, otherwise we might | ||
| // mutate an outdated version of the domain object. | ||
| setTimeout(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider observing the composition property of the domainObject instead of the parameterAdded, parameterRemoved events to make this change.
We should not need this setTimeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
jvigliotta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple thoughts added inline
| */ | ||
| async _requestHistoricalTelemetry() { | ||
| const options = this.openmct.telemetry.standardizeRequestOptions({ ...this.options }); | ||
| this.lastBounds = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ok from what I can see. You've added or removed other items that seem to cover this change. We'll definitely need to thoroughly test time conductor/fixed/realtime functionality though.
| * @private | ||
| */ | ||
| _processNewTelemetry(telemetryData) { | ||
| _processNewTelemetry(telemetryData, isSubscriptionData = false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think with the below commented out code, isSubscriptionData isn't used really anymore?
|
|
||
| this.loaded = true; | ||
|
|
||
| return historicalTelemetryLoadedPromise; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll need to update the docs for this method to show it's returning a promise now for the historical request?
| this.#telemetryLoadedPromises.push(telemetryLoadedPromise); | ||
| } | ||
| }); | ||
| await Promise.all(this.#telemetryLoadedPromises); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may be able to use something like we do in tables here:
openmct/src/plugins/telemetryTable/TelemetryTable.js
Lines 181 to 182 in f4637b8
| this.telemetryCollections[keyString].on('requestStarted', this.incrementOutstandingRequests); | |
| this.telemetryCollections[keyString].on('requestEnded', this.decrementOutstandingRequests); |
then we don't need to change the load() method of telemetry collections?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea. I'll try that.
| this._setTimeSystem(this.options.timeContext.getTimeSystem()); | ||
| this.lastBounds = this.options.timeContext.getBounds(); | ||
| // prioritize passed options over time bounds | ||
| if (this.options.start) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a couple comments!
|
|
||
| function reload() { | ||
| clearData(); | ||
| outputTelemetryCollection._requestHistoricalTelemetry(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh. Interesting...Need to check this. We shouldn't be calling internal methods.

Describe your changes:
Closes #7823
Add a new object called "Derived Telemetry" that allows telemetry to be used in simple mathematical expressions.
All Submissions:
Author Checklist
type:label? Note: this is not necessarily the same as the original issue.Reviewer Checklist