From b8ae741969ea177e88a23f1eb89a97a9def9eeaa Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Tue, 16 May 2017 14:13:08 -0700 Subject: [PATCH] [Conductor] remove misleading error When a menu option that specified an invalid time system with a clock, the time conductor controller would log an error claiming that the clock was unknown when in fact the time system is the culprit. Remove the error message as the plugin handles this validation already. Also removed some unused code. https://github.com/nasa/openmct/issues/1580 --- .../core/src/ui/TimeConductorController.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/platform/features/conductor/core/src/ui/TimeConductorController.js b/platform/features/conductor/core/src/ui/TimeConductorController.js index 6b9296916b..0d339fe3e2 100644 --- a/platform/features/conductor/core/src/ui/TimeConductorController.js +++ b/platform/features/conductor/core/src/ui/TimeConductorController.js @@ -98,7 +98,6 @@ define( this.validation = new TimeConductorValidation(this.timeAPI); this.formatService = formatService; this.config = config; - this.clocksForTimeSystem = {}; this.timeSystemsForClocks = {}; this.$scope.timeSystemModel = {}; this.$scope.boundsModel = {}; @@ -209,28 +208,17 @@ define( cssClass: 'icon-calendar' }]; var clocks = {}; - var clocksForTimeSystem = this.clocksForTimeSystem; var timeSystemsForClocks = this.timeSystemsForClocks; (config.menuOptions || []).forEach(function (menuOption) { - var clock = this.getClock(menuOption.clock); var clockKey = menuOption.clock || 'fixed'; var timeSystem = this.timeSystems[menuOption.timeSystem]; if (timeSystem !== undefined) { - if (clock !== undefined) { - // Use an associative array to built a set of unique - // clocks - clocks[clock.key] = clock; - clocksForTimeSystem[timeSystem.key] = clocksForTimeSystem[timeSystem.key] || []; - clocksForTimeSystem[timeSystem.key].push(clock); - } timeSystemsForClocks[clockKey] = timeSystemsForClocks[clockKey] || []; timeSystemsForClocks[clockKey].push(timeSystem); - } else if (menuOption.clock !== undefined) { - console.error('Unknown clock "' + clockKey + '", has it been registered?'); } - }.bind(this)); + }, this); /* * Populate the clocks menu with metadata from the available clocks