[Time] Always include basic formats

Always include basic formats; removing them from the utc format
bundle.  This way, they can be utilized by third parties without
them having to commit to the utc time system.

Fixes https://github.com/nasa/openmct/issues/1574
This commit is contained in:
Pete Richards 2017-05-10 17:41:25 -07:00
parent 6481ddbd7f
commit 88223f5e6d
5 changed files with 25 additions and 16 deletions

View File

@ -22,15 +22,19 @@
define([
"./src/FormatProvider",
"./src/UTCTimeFormat",
"./src/DurationFormat",
'legacyRegistry'
], function (
FormatProvider,
UTCTimeFormat,
DurationFormat,
legacyRegistry
) {
legacyRegistry.register("platform/commonUI/formats", {
"name": "Time services bundle",
"description": "Defines interfaces and provides default implementations for handling different time systems.",
"name": "Format Registry",
"description": "Provides a registry for formats, which allow parsing and formatting of values.",
"extensions": {
"components": [
{
@ -42,6 +46,22 @@ define([
]
}
],
"formats": [
{
"key": "utc",
"implementation": UTCTimeFormat
},
{
"key": "duration",
"implementation": DurationFormat
}
],
"constants": [
{
"key": "DEFAULT_TIME_FORMAT",
"value": "utc"
}
],
"licenses": [
{
"name": "d3",

View File

@ -21,7 +21,7 @@
*****************************************************************************/
define([
"./UTCTimeFormat",
"../src/UTCTimeFormat",
"moment"
], function (
UTCTimeFormat,

View File

@ -22,14 +22,10 @@
define([
"./UTCTimeSystem",
"./LocalClock",
"./UTCTimeFormat",
"./DurationFormat"
"./LocalClock"
], function (
UTCTimeSystem,
LocalClock,
UTCTimeFormat,
DurationFormat
LocalClock
) {
/**
* Install a time system that supports UTC times. It also installs a local
@ -40,13 +36,6 @@ define([
var timeSystem = new UTCTimeSystem();
openmct.time.addTimeSystem(timeSystem);
openmct.time.addClock(new LocalClock(100));
openmct.telemetry.addFormat(new UTCTimeFormat());
openmct.telemetry.addFormat(new DurationFormat());
openmct.legacyExtension("constants", {
"key": "DEFAULT_TIME_FORMAT",
"value": "utc"
});
};
};
});