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