diff --git a/platform/features/conductor/core/src/ui/TimeConductorController.js b/platform/features/conductor/core/src/ui/TimeConductorController.js index e13625db17..003e8f5faf 100644 --- a/platform/features/conductor/core/src/ui/TimeConductorController.js +++ b/platform/features/conductor/core/src/ui/TimeConductorController.js @@ -144,13 +144,13 @@ define( TimeConductorController.prototype.getClock = function (key) { - return this.timeAPI.allClocks().filter(function (clock) { + return this.timeAPI.getAllClocks().filter(function (clock) { return clock.key === key; })[0]; }; TimeConductorController.prototype.getTimeSystem = function (key) { - return this.timeAPI.allTimeSystems().filter(function (timeSystem) { + return this.timeAPI.getAllTimeSystems().filter(function (timeSystem) { return timeSystem.key === key; })[0]; }; diff --git a/src/api/time/TimeAPI.js b/src/api/time/TimeAPI.js index eb0342e04c..0720c9c073 100644 --- a/src/api/time/TimeAPI.js +++ b/src/api/time/TimeAPI.js @@ -83,7 +83,7 @@ define(['EventEmitter'], function (EventEmitter) { this.timeSystems.set(timeSystem.key, timeSystem); }; - TimeAPI.prototype.allTimeSystems = function () { + TimeAPI.prototype.getAllTimeSystems = function () { return Array.from(this.timeSystems.values()); }; @@ -91,7 +91,7 @@ define(['EventEmitter'], function (EventEmitter) { this.clocks.set(clock.key, clock); }; - TimeAPI.prototype.allClocks = function () { + TimeAPI.prototype.getAllClocks = function () { return Array.from(this.clocks.values()); }; diff --git a/src/plugins/timeConductor/plugin.js b/src/plugins/timeConductor/plugin.js index b763eb46b6..aaedd2da2c 100644 --- a/src/plugins/timeConductor/plugin.js +++ b/src/plugins/timeConductor/plugin.js @@ -34,7 +34,7 @@ define([], function () { return function (openmct) { function getTimeSystem(key) { - return openmct.time.allTimeSystems().filter(function (timeSystem) { + return openmct.time.getAllTimeSystems().filter(function (timeSystem) { return timeSystem.key === key; })[0]; } @@ -68,7 +68,7 @@ define([], function () { } var configForTimeSystem = config.menuOptions.filter(function (menuOption) { - return menuOption.timeSystem === (timeSystem && timeSystem.key) && menuOption.clock === (clock && clock.key); + return menuOption.timeSystem === timeSystem.key && menuOption.clock === (clock && clock.key); })[0]; if (configForTimeSystem !== undefined) {