mirror of
https://github.com/nasa/openmct.git
synced 2025-01-01 19:06:40 +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"
|
<span ng-controller="PlotController as plot"
|
||||||
ng-mouseleave="representation.showControls = false">
|
ng-mouseleave="representation.showControls = false">
|
||||||
|
|
||||||
@ -114,7 +113,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="t-wait-spinner loading" ng-show="telemetry.isRequestPending()">
|
<span class="t-wait-spinner loading" ng-show="plot.isRequestPending">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="$last" class="gl-plot-axis-area gl-plot-x">
|
<div ng-if="$last" class="gl-plot-axis-area gl-plot-x">
|
||||||
@ -143,9 +142,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
@ -30,10 +30,11 @@ define(
|
|||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function PlotController($scope, telemetryFormatter) {
|
function PlotController($scope, telemetryFormatter, telemetrySubscriber) {
|
||||||
var subPlotFactory = new SubPlotFactory(telemetryFormatter),
|
var subPlotFactory = new SubPlotFactory(telemetryFormatter),
|
||||||
modeOptions = new PlotModeOptions([], subPlotFactory),
|
modeOptions = new PlotModeOptions([], subPlotFactory),
|
||||||
subplots = [],
|
subplots = [],
|
||||||
|
subscription,
|
||||||
domainOffset;
|
domainOffset;
|
||||||
|
|
||||||
// Populate the scope with axis information (specifically, options
|
// Populate the scope with axis information (specifically, options
|
||||||
@ -99,9 +100,18 @@ define(
|
|||||||
.forEach(updateSubplot);
|
.forEach(updateSubplot);
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.$watch("telemetry.getTelemetryObjects()", setupModes);
|
function updateValues() {
|
||||||
$scope.$watch("telemetry.getMetadata()", setupAxes);
|
|
||||||
$scope.$on("telemetryUpdate", plotTelemetry);
|
}
|
||||||
|
|
||||||
|
// Create a new subscription; telemetrySubscriber gets
|
||||||
|
// to do the meaningful work here.
|
||||||
|
function subscribe(domainObject) {
|
||||||
|
subscription = domainObject && telemetrySubscriber.subscribe(
|
||||||
|
domainObject,
|
||||||
|
updateValues
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
@ -169,7 +179,13 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Explicitly update all plots.
|
* 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