Compare commits

...

1 Commits

Author SHA1 Message Date
0d1d2161d8 Check for time system and error if absent 2018-05-07 11:10:51 -07:00
3 changed files with 10 additions and 4 deletions

View File

@ -46,7 +46,7 @@
openmct.install(openmct.plugins.AutoflowView({
type: "telemetry.panel"
}));
openmct.install(openmct.plugins.Conductor({
/*openmct.install(openmct.plugins.Conductor({
menuOptions: [
{
name: "Fixed",
@ -66,7 +66,7 @@
}
}
]
}));
}));*/
openmct.install(openmct.plugins.SummaryWidget());
openmct.time.clock('local', {start: -THIRTY_MINUTES, end: 0});
openmct.time.timeSystem('utc');

View File

@ -85,7 +85,7 @@ define([
* @memberof module:openmct.MCT#
* @name conductor
*/
this.time = new api.TimeAPI();
this.time = new api.TimeAPI(this);
/**
* An interface for interacting with the composition of domain objects.

View File

@ -41,7 +41,7 @@ define(['EventEmitter'], function (EventEmitter) {
* @interface
* @memberof module:openmct
*/
function TimeAPI() {
function TimeAPI(openmct) {
EventEmitter.call(this);
//The Time System
@ -61,6 +61,12 @@ define(['EventEmitter'], function (EventEmitter) {
this.tick = this.tick.bind(this);
openmct.on('start', () => {
if (this.getAllTimeSystems().length === 0) {
throw 'Open MCT must be configured with at least one time system';
}
})
}
TimeAPI.prototype = Object.create(EventEmitter.prototype);