mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 05:07:52 +00:00
[Time Conductor] Using new API
This commit is contained in:
parent
843c678b0b
commit
482eb4a5e8
@ -29,8 +29,8 @@ define(
|
||||
* labelled 'ticks'. It requires 'start' and 'end' integer values to
|
||||
* be specified as attributes.
|
||||
*/
|
||||
function TimeOfInterestController($scope, conductor, formatService) {
|
||||
this.conductor = conductor;
|
||||
function TimeOfInterestController($scope, openmct, formatService) {
|
||||
this.conductor = openmct.conductor;
|
||||
this.formatService = formatService;
|
||||
this.format = undefined;
|
||||
this.toiText = undefined;
|
||||
@ -43,11 +43,11 @@ define(
|
||||
this[key] = TimeOfInterestController.prototype[key].bind(this);
|
||||
}.bind(this));
|
||||
|
||||
conductor.on('timeOfInterest', this.changeTimeOfInterest);
|
||||
conductor.on('timeSystem', this.changeTimeSystem);
|
||||
if (conductor.timeSystem()) {
|
||||
this.changeTimeSystem(conductor.timeSystem());
|
||||
var toi = conductor.timeOfInterest();
|
||||
this.conductor.on('timeOfInterest', this.changeTimeOfInterest);
|
||||
this.conductor.on('timeSystem', this.changeTimeSystem);
|
||||
if (this.conductor.timeSystem()) {
|
||||
this.changeTimeSystem(this.conductor.timeSystem());
|
||||
var toi = this.conductor.timeOfInterest();
|
||||
if (toi) {
|
||||
this.changeTimeOfInterest(toi);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ define(
|
||||
telemetryHandler,
|
||||
throttle,
|
||||
PLOT_FIXED_DURATION,
|
||||
conductor
|
||||
openmct
|
||||
) {
|
||||
var self = this,
|
||||
plotTelemetryFormatter =
|
||||
@ -82,6 +82,7 @@ define(
|
||||
lastRange,
|
||||
lastDomain,
|
||||
handle;
|
||||
var conductor = openmct.conductor;
|
||||
|
||||
// Populate the scope with axis information (specifically, options
|
||||
// available for each axis.)
|
||||
|
@ -36,7 +36,7 @@ define(
|
||||
* @param telemetryFormatter
|
||||
* @constructor
|
||||
*/
|
||||
function HistoricalTableController($scope, telemetryHandler, telemetryFormatter, $timeout, conductor) {
|
||||
function HistoricalTableController($scope, telemetryHandler, telemetryFormatter, $timeout, openmct) {
|
||||
var self = this;
|
||||
|
||||
this.$timeout = $timeout;
|
||||
@ -49,7 +49,7 @@ define(
|
||||
}
|
||||
});
|
||||
|
||||
TableController.call(this, $scope, telemetryHandler, telemetryFormatter, conductor);
|
||||
TableController.call(this, $scope, telemetryHandler, telemetryFormatter, openmct);
|
||||
}
|
||||
|
||||
HistoricalTableController.prototype = Object.create(TableController.prototype);
|
||||
|
@ -12,7 +12,7 @@ define(
|
||||
* @param element
|
||||
* @constructor
|
||||
*/
|
||||
function MCTTableController($scope, $timeout, element, exportService, formatService, conductor) {
|
||||
function MCTTableController($scope, $timeout, element, exportService, formatService, openmct) {
|
||||
var self = this;
|
||||
|
||||
this.$scope = $scope;
|
||||
@ -24,7 +24,7 @@ define(
|
||||
this.resultsHeader = this.element.find('.mct-table>thead').first();
|
||||
this.sizingTableBody = this.element.find('.sizing-table>tbody').first();
|
||||
this.$scope.sizingRow = {};
|
||||
this.conductor = conductor;
|
||||
this.conductor = openmct.conductor;
|
||||
this.toiFormatter = undefined;
|
||||
this.formatService = formatService;
|
||||
|
||||
@ -118,8 +118,8 @@ define(
|
||||
this.conductor.on('bounds', this.changeBounds);
|
||||
|
||||
// If time system defined, set initially
|
||||
if (conductor.timeSystem()) {
|
||||
this.changeTimeSystem(conductor.timeSystem());
|
||||
if (this.conductor.timeSystem()) {
|
||||
this.changeTimeSystem(this.conductor.timeSystem());
|
||||
}
|
||||
}
|
||||
}.bind(this));
|
||||
|
@ -44,7 +44,7 @@ define(
|
||||
$scope,
|
||||
telemetryHandler,
|
||||
telemetryFormatter,
|
||||
conductor
|
||||
openmct
|
||||
) {
|
||||
var self = this;
|
||||
|
||||
@ -55,7 +55,7 @@ define(
|
||||
this.table = new TableConfiguration($scope.domainObject,
|
||||
telemetryFormatter);
|
||||
this.changeListeners = [];
|
||||
this.conductor = conductor;
|
||||
this.conductor = openmct.conductor;
|
||||
|
||||
$scope.rows = [];
|
||||
|
||||
@ -73,8 +73,8 @@ define(
|
||||
|
||||
|
||||
this.sortByTimeSystem = this.sortByTimeSystem.bind(this);
|
||||
conductor.on('timeSystem', this.sortByTimeSystem);
|
||||
conductor.off('timeSystem', this.sortByTimeSystem);
|
||||
this.conductor.on('timeSystem', this.sortByTimeSystem);
|
||||
this.conductor.off('timeSystem', this.sortByTimeSystem);
|
||||
}
|
||||
|
||||
TelemetryTableController.prototype.sortByTimeSystem = function (timeSystem) {
|
||||
|
@ -87,7 +87,7 @@ define(
|
||||
'$element',
|
||||
'exportService',
|
||||
'formatService',
|
||||
'timeConductor',
|
||||
'openmct',
|
||||
MCTTableController
|
||||
],
|
||||
controllerAs: "table",
|
||||
|
Loading…
Reference in New Issue
Block a user