diff --git a/.cspell/omm-dictionary.txt b/.cspell/omm-dictionary.txt index 4c299452..ef6e4b61 100644 --- a/.cspell/omm-dictionary.txt +++ b/.cspell/omm-dictionary.txt @@ -48,8 +48,4 @@ mslsol # names dsanto peterr -smap - -# TODO fix -# remove dismissable when implementing https://github.com/NASA-AMMOS/openmct-mcws/issues/209 -dismissable \ No newline at end of file +smap \ No newline at end of file diff --git a/.webpack/webpack.common.js b/.webpack/webpack.common.js index 69441f03..925fcee4 100644 --- a/.webpack/webpack.common.js +++ b/.webpack/webpack.common.js @@ -114,8 +114,9 @@ const config = { __OMM_BUILD_DATE__: `'${new Date()}'`, __OMM_REVISION__: `'${gitRevision}'`, __OMM_BUILD_BRANCH__: `'${gitBranch}'`, - __VUE_OPTIONS_API__: true, // enable/disable Options API support, default: true - __VUE_PROD_DEVTOOLS__: false // enable/disable devtools support in production, default: false + __VUE_OPTIONS_API__: true, // Options API support, default: true + __VUE_PROD_DEVTOOLS__: false, // devtools support in production, default: false + __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false // detailed hydration mismatch support when using esm-bundler, default: false }), new VueLoaderPlugin(), new MiniCssExtractPlugin({ diff --git a/config.js b/config.js index 6696089d..6d1720b4 100644 --- a/config.js +++ b/config.js @@ -378,12 +378,15 @@ /** * Enable/disable summary widgets. Added in R3.4.0. */ - summaryWidgets: { - enabled: true + SummaryWidget: { + enabled: false }, BarChart: { enabled: false }, + CorrelationTelemetry: { + enabled: false + }, ScatterPlot: { enabled: false }, diff --git a/loader.js b/loader.js index d1394d3e..687cc238 100644 --- a/loader.js +++ b/loader.js @@ -113,23 +113,20 @@ define([ }); } - // install optional plugins, summary widget is handled separately as it was added long ago + // install optional plugins if (config.plugins) { - if ( - config.plugins.summaryWidgets === true || - config.plugins.summaryWidgets?.enabled === true - ) { - openmct.install(openmct.plugins.SummaryWidget()); - } - Object.entries(config.plugins).forEach(([plugin, pluginConfig]) => { - const pluginExists = openmct.plugins[plugin] || openmct.plugins.example[plugin]; + const examplePluginExists = openmct.plugins.example[plugin]; + const pluginExists = openmct.plugins[plugin] || examplePluginExists; const pluginEnabled = pluginConfig?.enabled; - const isSummaryWidget = plugin === 'summaryWidgets'; - const installPlugin = pluginExists && pluginEnabled && !isSummaryWidget; + const installPlugin = pluginExists && pluginEnabled; if (installPlugin) { - openmct.install(openmct.plugins[plugin](...(pluginConfig.configuration ?? []))); + if (examplePluginExists) { + openmct.install(openmct.plugins.example[plugin](...(pluginConfig.configuration ?? []))); + } else { + openmct.install(openmct.plugins[plugin](...(pluginConfig.configuration ?? []))); + } } else if (!pluginExists) { console.warn(`Plugin ${plugin} does not exist. Check the plugin name and try again.`); } diff --git a/package.json b/package.json index 181f7cf0..a54e440f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openmct-mcws", - "version": "2512.02-next", + "version": "v5.4.0-rc6", "description": "Open MCT for MCWS", "devDependencies": { "@babel/eslint-parser": "7.26.8", @@ -40,7 +40,7 @@ "mini-css-extract-plugin": "2.7.6", "moment": "2.30.1", "node-bourbon": "^4.2.3", - "openmct": "github:nasa/openmct#omm-r5.4.0-rc1", + "openmct": "github:nasa/openmct#omm-r5.4.0-rc8", "prettier": "3.4.2", "printj": "1.3.1", "raw-loader": "^0.5.1", @@ -75,11 +75,11 @@ "url": "https://github.com/NASA-AMMOS/openmct-mcws" }, "engines": { - "node": ">=18.18.0" + "node": ">=18.18.0 <23" }, "overrides": { "core-js": "3.21.1" }, "author": "", "license": "Apache-2.0" -} +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index bdb03be9..50129834 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ gov.nasa.arc.wtd openmct-client Open MCT for MCWS Client - 2512.02-next + v5.4.0-rc6 war diff --git a/src/alarmsView/AlarmsTable.js b/src/alarmsView/AlarmsTable.js index 6c05c975..24935d15 100644 --- a/src/alarmsView/AlarmsTable.js +++ b/src/alarmsView/AlarmsTable.js @@ -55,7 +55,7 @@ export default class AlarmsTable extends TelemetryTable { //If no persisted sort order, default to sorting by time system, ascending. sortOptions = sortOptions || { - key: this.openmct.time.timeSystem().key, + key: this.openmct.time.getTimeSystem().key, direction: 'asc' }; diff --git a/src/channelTable/channelTablePlugin/ChannelTableRowCollection.js b/src/channelTable/channelTablePlugin/ChannelTableRowCollection.js index 6c698b5f..eeaf75b4 100644 --- a/src/channelTable/channelTablePlugin/ChannelTableRowCollection.js +++ b/src/channelTable/channelTablePlugin/ChannelTableRowCollection.js @@ -6,7 +6,7 @@ export default class ChannelTableRowCollection extends TableRowCollection { this.openmct = openmct; this.ladMap = new Map(); - this.timeColumn = openmct.time.timeSystem().key; + this.timeColumn = openmct.time.getTimeSystem().key; this.addOrUpdateRow = this.addOrUpdateRow.bind(this); } diff --git a/src/channelTable/channelTableSetPlugin/ChannelRow.vue b/src/channelTable/channelTableSetPlugin/ChannelRow.vue index 5d713d28..7e692342 100644 --- a/src/channelTable/channelTableSetPlugin/ChannelRow.vue +++ b/src/channelTable/channelTableSetPlugin/ChannelRow.vue @@ -78,8 +78,8 @@ export default { this.keyString = this.openmct.objects.makeKeyString(this.domainObject.identifier); // this.timeContext = this.openmct.time.getContextForView(this.objectPath); this.limitEvaluator = this.openmct.telemetry.limitEvaluator(this.domainObject); - this.openmct.time.on('timeSystem', this.updateTimeSystem); - this.timestampKey = this.openmct.time.timeSystem().key; + this.openmct.time.on('timeSystemChanged', this.updateTimeSystem); + this.timestampKey = this.openmct.time.getTimeSystem().key; this.valueMetadata = undefined; if (this.metadata) { this.valueMetadata = @@ -96,7 +96,7 @@ export default { this.telemetryCollection.load(); }, beforeUnmount() { - this.openmct.time.off('timeSystem', this.updateTimeSystem); + this.openmct.time.off('timeSystemChanged', this.updateTimeSystem); this.telemetryCollection.off('add', this.setLatestValues); this.telemetryCollection.off('clear', this.resetValues); this.telemetryCollection.destroy(); diff --git a/src/channelTable/channelTableSetPlugin/ChannelTableSet.vue b/src/channelTable/channelTableSetPlugin/ChannelTableSet.vue index 555518f0..1084aaea 100644 --- a/src/channelTable/channelTableSetPlugin/ChannelTableSet.vue +++ b/src/channelTable/channelTableSetPlugin/ChannelTableSet.vue @@ -54,8 +54,8 @@ export default { this.composition.on('add', this.addLadTable); this.composition.on('remove', this.removeLadTable); this.composition.on('reorder', this.reorderLadTables); - this.openmct.time.on('timeSystem', this.setTimesystem); - this.setTimesystem(this.openmct.time.timeSystem()); + this.openmct.time.on('timeSystemChanged', this.setTimeSystem); + this.setTimeSystem(this.openmct.time.getTimeSystem()); this.composition.load(); }, beforeUnmount() { @@ -66,7 +66,7 @@ export default { c.composition.off('add', c.addCallback); c.composition.off('remove', c.removeCallback); }); - this.openmct.time.off('timeSystem', this.setTimesystem); + this.openmct.time.off('timeSystemChanged', this.setTimeSystem); }, methods: { addLadTable(domainObject) { @@ -102,7 +102,7 @@ export default { this.ladTableObjects[reorderEvent.newIndex] = oldComposition[reorderEvent.oldIndex]; }); }, - setTimesystem(timesystem) { + setTimeSystem(timesystem) { this.timesystem = timesystem.name; }, addTelemetryObject(ladTable) { diff --git a/src/formats/UTCDayOfYearFormat.js b/src/formats/UTCDayOfYearFormat.js index c7d2cbf7..2ed1c320 100644 --- a/src/formats/UTCDayOfYearFormat.js +++ b/src/formats/UTCDayOfYearFormat.js @@ -49,56 +49,60 @@ function getScaledFormat(m) { * @implements {Format} * @constructor */ -function UTCDayOfYearFormat() { - this.key = 'utc.day-of-year'; -} - -UTCDayOfYearFormat.prototype.FORMAT = 'YYYY-DDDDTHH:mm:ss.SSS'; -UTCDayOfYearFormat.prototype.ACCEPTABLE_FORMATS = [ - UTCDayOfYearFormat.prototype.FORMAT, - 'YYYY-DDDTHH:mm:ss', - 'YYYY-DDDTHH:mm', - 'YYYY-DDDTHH', - 'YYYY-DDD', - 'YYYY-MM-DDTHH:mm:ss.SSS', - 'YYYY-MM-DDTHH:mm:ss', - 'YYYY-MM-DDTHH:mm', - 'YYYY-MM-DDTHH', - 'YYYY-MM-DD' -]; - -UTCDayOfYearFormat.prototype.format = function (value, scale) { - if (value === undefined || value === '') { - return value; +export default class UTCDayOfYearFormat { + constructor() { + this.key = 'utc.day-of-year'; + this.FORMAT = 'YYYY-DDDDTHH:mm:ss.SSS'; + this.ACCEPTABLE_FORMATS = [ + this.FORMAT, + 'YYYY-DDDTHH:mm:ss', + 'YYYY-DDDTHH:mm', + 'YYYY-DDDTHH', + 'YYYY-DDD', + 'YYYY-MM-DDTHH:mm:ss.SSS', + 'YYYY-MM-DDTHH:mm:ss', + 'YYYY-MM-DDTHH:mm', + 'YYYY-MM-DDTHH', + 'YYYY-MM-DD' + ]; } - var m = moment.utc(value); - if (typeof scale !== 'undefined') { - var scaledFormat = getScaledFormat(m); - if (scaledFormat) { - return m.format(scaledFormat); + + format(value, scale) { + if (value === undefined || value === '') { + return value; + } + var m = moment.utc(value); + if (typeof scale !== 'undefined') { + var scaledFormat = getScaledFormat(m); + if (scaledFormat) { + return m.format(scaledFormat); + } } + return m.format(this.FORMAT); } - return m.format(this.FORMAT); -}; -UTCDayOfYearFormat.prototype.endOfDay = function (value) { - return moment.utc(value).endOf('day').valueOf(); -}; - -UTCDayOfYearFormat.prototype.parse = function (text) { - if (text === undefined || typeof text === 'number') { - return text; + formatDate(value) { + const m = moment.utc(value); + return m.format('YYYY-DDD'); } - if (DOY_PATTERN.test(text)) { - return +inlineParseDOYString(text); + endOfDay(value) { + return moment.utc(value).endOf('day').valueOf(); } - return moment.utc(text, this.ACCEPTABLE_FORMATS, true).valueOf(); -}; + parse = function (text) { + if (text === undefined || typeof text === 'number') { + return text; + } + + if (DOY_PATTERN.test(text)) { + return +inlineParseDOYString(text); + } -UTCDayOfYearFormat.prototype.validate = function (text) { - return text !== undefined && moment.utc(text, this.ACCEPTABLE_FORMATS, true).isValid(); -}; + return moment.utc(text, this.ACCEPTABLE_FORMATS, true).valueOf(); + }; -export default UTCDayOfYearFormat; + validate(text) { + return text !== undefined && moment.utc(text, this.ACCEPTABLE_FORMATS, true).isValid(); + } +} diff --git a/src/formats/UTCFormat.js b/src/formats/UTCFormat.js index 486a6bbb..e27bc213 100644 --- a/src/formats/UTCFormat.js +++ b/src/formats/UTCFormat.js @@ -55,49 +55,53 @@ function getScaledFormat(m) { * @implements {Format} * @constructor */ -function UTCFormat() { - this.key = 'utc'; -} - -UTCFormat.prototype.FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSS'; -UTCFormat.prototype.ACCEPTABLE_FORMATS = [ - UTCFormat.prototype.FORMAT, - 'YYYY-MM-DDTHH:mm:ss', - 'YYYY-MM-DDTHH:mm', - 'YYYY-MM-DDTHH', - 'YYYY-MM-DD', - 'YYYY-DDDDTHH:mm:ss.SSS', - 'YYYY-DDDTHH:mm:ss', - 'YYYY-DDDTHH:mm', - 'YYYY-DDDTHH', - 'YYYY-DDD' -]; - -UTCFormat.prototype.format = function (value, scale) { - var m = moment.utc(value); - if (typeof scale !== 'undefined') { - var scaledFormat = getScaledFormat(m); - if (scaledFormat) { - return m.format(scaledFormat); - } +export default class UTCFormat { + constructor() { + this.key = 'utc'; + this.FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSS'; + this.ACCEPTABLE_FORMATS = [ + this.FORMAT, + 'YYYY-MM-DDTHH:mm:ss', + 'YYYY-MM-DDTHH:mm', + 'YYYY-MM-DDTHH', + 'YYYY-MM-DD', + 'YYYY-DDDDTHH:mm:ss.SSS', + 'YYYY-DDDTHH:mm:ss', + 'YYYY-DDDTHH:mm', + 'YYYY-DDDTHH', + 'YYYY-DDD' + ]; } - return m.format(this.FORMAT); -}; -UTCFormat.prototype.parse = function (text) { - if (text === undefined || typeof text === 'number') { - return text; + formatDate(value) { + const m = moment.utc(value); + return m.format('YYYY-MM-DD'); } - if (DOY_PATTERN.test(text)) { - return +inlineParseDOYString(text); + format(value, scale) { + var m = moment.utc(value); + if (typeof scale !== 'undefined') { + var scaledFormat = getScaledFormat(m); + if (scaledFormat) { + return m.format(scaledFormat); + } + } + return m.format(this.FORMAT); } - return moment.utc(text, this.ACCEPTABLE_FORMATS, true).valueOf(); -}; + parse(text) { + if (text === undefined || typeof text === 'number') { + return text; + } + + if (DOY_PATTERN.test(text)) { + return +inlineParseDOYString(text); + } -UTCFormat.prototype.validate = function (text) { - return text !== undefined && moment.utc(text, this.ACCEPTABLE_FORMATS, true).isValid(); -}; + return moment.utc(text, this.ACCEPTABLE_FORMATS, true).valueOf(); + } -export default UTCFormat; + validate(text) { + return text !== undefined && moment.utc(text, this.ACCEPTABLE_FORMATS, true).isValid(); + } +} diff --git a/src/globalFilters/GlobalFilterSelector.vue b/src/globalFilters/GlobalFilterSelector.vue index c1e24f48..763cfec5 100644 --- a/src/globalFilters/GlobalFilterSelector.vue +++ b/src/globalFilters/GlobalFilterSelector.vue @@ -94,7 +94,7 @@ export default { this.overlay = this.openmct.overlays.overlay({ element: this.$el, size: 'fit', - dismissable: true, + dismissible: true, onDestroy: () => { this.$emit('close-filter-selector'); } diff --git a/src/metadataAction/metadataAction.js b/src/metadataAction/metadataAction.js index e1366ce3..3c10ef2d 100644 --- a/src/metadataAction/metadataAction.js +++ b/src/metadataAction/metadataAction.js @@ -32,7 +32,7 @@ export default class MetadataAction { this.openmct.overlays.overlay({ element: el, size: 'large', - dismissable: true, + dismissible: true, onDestroy: () => { destroy(); } diff --git a/src/multipleHistoricalSessions/sessionSelector/historicalSessionSelector.vue b/src/multipleHistoricalSessions/sessionSelector/historicalSessionSelector.vue index ed60a86b..4ddbb988 100644 --- a/src/multipleHistoricalSessions/sessionSelector/historicalSessionSelector.vue +++ b/src/multipleHistoricalSessions/sessionSelector/historicalSessionSelector.vue @@ -210,7 +210,7 @@ export default { this.overlay = this.openmct.overlays.overlay({ element: this.$el, size: 'large', - dismissable: true, + dismissible: true, onDestroy: () => { this.$emit('close-session-selector'); } diff --git a/src/packetQuery/components/PacketQueryView.vue b/src/packetQuery/components/PacketQueryView.vue index f2e176fc..6bcdb87d 100644 --- a/src/packetQuery/components/PacketQueryView.vue +++ b/src/packetQuery/components/PacketQueryView.vue @@ -203,10 +203,10 @@ export default { } if (queryModel.useTimeConductor) { - const bounds = this.openmct.time.bounds(); + const bounds = this.openmct.time.getBounds(); const start = bounds.start; const end = bounds.end; - const timeSystem = this.openmct.time.timeSystem(); + const timeSystem = this.openmct.time.getTimeSystem(); const domain = timeSystem.key; const format = this.openmct.telemetry.getFormatter(timeSystem.timeFormat); diff --git a/src/product-status/DataProductCell.js b/src/product-status/DataProductCell.js index 0ad65d3f..f06cdf27 100644 --- a/src/product-status/DataProductCell.js +++ b/src/product-status/DataProductCell.js @@ -36,7 +36,7 @@ export default defineComponent({ this.openmct.overlays.overlay({ element, size: 'small', - dismissable: true + dismissible: true }); try { diff --git a/src/product-status/DataProductTable.js b/src/product-status/DataProductTable.js index a7761a7b..c65841ed 100644 --- a/src/product-status/DataProductTable.js +++ b/src/product-status/DataProductTable.js @@ -38,7 +38,7 @@ export default class DataProductTable extends TelemetryTable { //If no persisted sort order, default to sorting by time system, ascending. sortOptions = sortOptions || { - key: this.openmct.time.timeSystem().key, + key: this.openmct.time.getTimeSystem().key, direction: 'asc' }; this.tableRows.sortBy(sortOptions); diff --git a/src/realtimeSessions/components/RealtimeSessionSelector.vue b/src/realtimeSessions/components/RealtimeSessionSelector.vue index ca4c325b..41456846 100644 --- a/src/realtimeSessions/components/RealtimeSessionSelector.vue +++ b/src/realtimeSessions/components/RealtimeSessionSelector.vue @@ -172,7 +172,7 @@ export default { this.overlay = this.openmct.overlays.overlay({ element: this.$el, size: 'large', - dismissable: true, + dismissible: true, onDestroy: () => { this.$emit('close-session-selector'); } diff --git a/src/services/filtering/FilterService.js b/src/services/filtering/FilterService.js index a2494b81..69e8b045 100644 --- a/src/services/filtering/FilterService.js +++ b/src/services/filtering/FilterService.js @@ -61,7 +61,7 @@ class FilterService extends EventEmitter { // and then force a requery handleFilterChange() { this.openmct.objectViews.emit('clearData'); - this.openmct.time.bounds(this.openmct.time.bounds()); + this.openmct.time.setBounds(this.openmct.time.getBounds()); } updateFiltersFromParams(params) { diff --git a/src/services/mcws/MCWSClient.js b/src/services/mcws/MCWSClient.js index fb0edbac..13543894 100644 --- a/src/services/mcws/MCWSClient.js +++ b/src/services/mcws/MCWSClient.js @@ -66,8 +66,13 @@ class MCWSClient { try { response = await fetch(url, options); } catch (error) { - console.error('Error in base request', error); - throw error; + if (error.name === 'AbortError') { + console.warn('Request aborted', error); + return; + } else { + console.error('Error in base request', error); + throw error; + } } finally { this._updatePending(); } diff --git a/src/services/session/SessionService.js b/src/services/session/SessionService.js index a1e2869c..f1d55183 100644 --- a/src/services/session/SessionService.js +++ b/src/services/session/SessionService.js @@ -376,8 +376,8 @@ class SessionService { if ( model?.start_time && model?.end_time && - this.openmct.time.timeSystem().key === 'ert' && - !this.openmct.time.clock() + this.openmct.time.getTimeSystem().key === 'ert' && + !this.openmct.time.getClock() ) { const format = this.openmct.telemetry.getFormatter('utc.day-of-year'); const start = format.parse(model.start_time); @@ -387,7 +387,7 @@ class SessionService { end = format.endOfDay(end); } - this.openmct.time.bounds({ + this.openmct.time.setBounds({ start, end }); @@ -397,7 +397,7 @@ class SessionService { if (!boundsChanged) { //force a bounds change to trigger a requery for views - this.openmct.time.bounds(this.openmct.time.bounds()); + this.openmct.time.setBounds(this.openmct.time.getBounds()); } } diff --git a/src/services/session/test/service/SessionServiceSpec.js b/src/services/session/test/service/SessionServiceSpec.js index 4133d5b4..39c6d78a 100644 --- a/src/services/session/test/service/SessionServiceSpec.js +++ b/src/services/session/test/service/SessionServiceSpec.js @@ -51,10 +51,10 @@ describe('SessionService', () => { }; openmct = jasmine.createSpyObj('openmct', ['time', 'objectViews', 'notifications', 'on']); - openmct.time = jasmine.createSpyObj('time', ['timeSystem', 'bounds', 'clock']); + openmct.time = jasmine.createSpyObj('time', ['getTimeSystem', 'getBounds', 'getClock']); openmct.objectViews = jasmine.createSpyObj('objectViews', ['emit']); - openmct.time.timeSystem.and.returnValue({ key: 'ert' }); - openmct.time.clock.and.returnValue(true); + openmct.time.getTimeSystem.and.returnValue({ key: 'ert' }); + openmct.time.getClock.and.returnValue(true); openmct.on.and.returnValue(Promise.resolve()); openmct.notifications = jasmine.createSpyObj('notificationApi', ['info', 'alert']); diff --git a/src/venues/VenueService.js b/src/venues/VenueService.js index 9bb49910..8640c20c 100644 --- a/src/venues/VenueService.js +++ b/src/venues/VenueService.js @@ -28,7 +28,7 @@ class VenueService { this.overlay = this.openmct.overlays.overlay({ element, size: 'small', - dismissable: false, + dismissible: false, onDestroy: () => { this._destroy(); }