Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .cspell/omm-dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
smap
5 changes: 3 additions & 2 deletions .webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
__VUE_PROD_DEVTOOLS__: true,
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
}),
new VueLoaderPlugin(),
new MiniCssExtractPlugin({
Expand Down
7 changes: 5 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down
21 changes: 9 additions & 12 deletions loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we follow the previous format summary widgets followed, or just require an enabled flag now?

config.plugins.summaryWidgets === true ||
config.plugins.summaryWidgets?.enabled === true

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.`);
}
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openmct-mcws",
"version": "2512.02-next",
"version": "v5.4.0-rc2",
"description": "Open MCT for MCWS",
"devDependencies": {
"@babel/eslint-parser": "7.26.8",
Expand Down Expand Up @@ -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-rc2",
"prettier": "3.4.2",
"printj": "1.3.1",
"raw-loader": "^0.5.1",
Expand Down Expand Up @@ -75,7 +75,7 @@
"url": "https://github.com/NASA-AMMOS/openmct-mcws"
},
"engines": {
"node": ">=18.18.0"
"node": ">=18.18.0 <23"
},
"overrides": {
"core-js": "3.21.1"
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>gov.nasa.arc.wtd</groupId>
<artifactId>openmct-client</artifactId>
<name>Open MCT for MCWS Client</name>
<version>2512.02-next</version>
<version>v5.4.0-rc2</version>
<packaging>war</packaging>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion src/alarmsView/AlarmsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
6 changes: 3 additions & 3 deletions src/channelTable/channelTableSetPlugin/ChannelRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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();
Expand Down
8 changes: 4 additions & 4 deletions src/channelTable/channelTableSetPlugin/ChannelTableSet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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) {
Expand Down Expand Up @@ -102,7 +102,7 @@ export default {
this.ladTableObjects[reorderEvent.newIndex] = oldComposition[reorderEvent.oldIndex];
});
},
setTimesystem(timesystem) {
setTimeSystem(timesystem) {
this.timesystem = timesystem.name;
},
addTelemetryObject(ladTable) {
Expand Down
2 changes: 1 addition & 1 deletion src/globalFilters/GlobalFilterSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
2 changes: 1 addition & 1 deletion src/metadataAction/metadataAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class MetadataAction {
this.openmct.overlays.overlay({
element: el,
size: 'large',
dismissable: true,
dismissible: true,
onDestroy: () => {
destroy();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
4 changes: 2 additions & 2 deletions src/packetQuery/components/PacketQueryView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/product-status/DataProductCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default defineComponent({
this.openmct.overlays.overlay({
element,
size: 'small',
dismissable: true
dismissible: true
});

try {
Expand Down
2 changes: 1 addition & 1 deletion src/product-status/DataProductTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/filtering/FilterService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
9 changes: 7 additions & 2 deletions src/services/mcws/MCWSClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
8 changes: 4 additions & 4 deletions src/services/session/SessionService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -387,7 +387,7 @@ class SessionService {
end = format.endOfDay(end);
}

this.openmct.time.bounds({
this.openmct.time.setBounds({
start,
end
});
Expand All @@ -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());
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/services/session/test/service/SessionServiceSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down
2 changes: 1 addition & 1 deletion src/venues/VenueService.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class VenueService {
this.overlay = this.openmct.overlays.overlay({
element,
size: 'small',
dismissable: false,
dismissible: false,
onDestroy: () => {
this._destroy();
}
Expand Down
Loading