mirror of
https://github.com/nasa/openmct.git
synced 2024-12-29 17:38:53 +00:00
[Plot] Add PlotUpdater
Add PlotUpdater, which will track streaming data from within the plot. Allows removal of the cache for WTD-751.
This commit is contained in:
parent
d0de13ca62
commit
f3900cdd2a
@ -1,4 +1,3 @@
|
||||
<span ng-controller="TelemetryController as telemetry">
|
||||
<span ng-controller="PlotController as plot"
|
||||
ng-mouseleave="representation.showControls = false">
|
||||
|
||||
@ -114,7 +113,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<span class="t-wait-spinner loading" ng-show="telemetry.isRequestPending()">
|
||||
<span class="t-wait-spinner loading" ng-show="plot.isRequestPending">
|
||||
</span>
|
||||
</div>
|
||||
<div ng-if="$last" class="gl-plot-axis-area gl-plot-x">
|
||||
@ -143,9 +142,6 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -30,10 +30,11 @@ define(
|
||||
*
|
||||
* @constructor
|
||||
*/
|
||||
function PlotController($scope, telemetryFormatter) {
|
||||
function PlotController($scope, telemetryFormatter, telemetrySubscriber) {
|
||||
var subPlotFactory = new SubPlotFactory(telemetryFormatter),
|
||||
modeOptions = new PlotModeOptions([], subPlotFactory),
|
||||
subplots = [],
|
||||
subscription,
|
||||
domainOffset;
|
||||
|
||||
// Populate the scope with axis information (specifically, options
|
||||
@ -99,9 +100,18 @@ define(
|
||||
.forEach(updateSubplot);
|
||||
}
|
||||
|
||||
$scope.$watch("telemetry.getTelemetryObjects()", setupModes);
|
||||
$scope.$watch("telemetry.getMetadata()", setupAxes);
|
||||
$scope.$on("telemetryUpdate", plotTelemetry);
|
||||
function updateValues() {
|
||||
|
||||
}
|
||||
|
||||
// Create a new subscription; telemetrySubscriber gets
|
||||
// to do the meaningful work here.
|
||||
function subscribe(domainObject) {
|
||||
subscription = domainObject && telemetrySubscriber.subscribe(
|
||||
domainObject,
|
||||
updateValues
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
@ -169,7 +179,13 @@ define(
|
||||
/**
|
||||
* Explicitly update all plots.
|
||||
*/
|
||||
update: update
|
||||
update: update,
|
||||
/**
|
||||
* Check if a request is pending (to show the wait spinner)
|
||||
*/
|
||||
isRequestPending: function () {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user