Skip to content

Commit

Permalink
Fixes to new issues found in r5.3.0-rc2 (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
davetsay authored Nov 8, 2024
1 parent 66eda9a commit d54f568
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 89 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openmct-mcws",
"version": "5.3.0-rc2",
"version": "5.3.0-rc3",
"description": "Open MCT for MCWS",
"devDependencies": {
"@braintree/sanitize-url": "6.0.4",
Expand Down Expand Up @@ -32,7 +32,7 @@
"mini-css-extract-plugin": "2.7.6",
"moment": "2.30.1",
"node-bourbon": "^4.2.3",
"openmct": "nasa/openmct#v5.3.0-release-candidate-3",
"openmct": "nasa/openmct#omm-r5.3.0-rc2",
"printj": "1.3.1",
"raw-loader": "^0.5.1",
"resolve-url-loader": "5.0.0",
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>5.3.0-rc2</version>
<version>5.3.0-rc3</version>
<packaging>war</packaging>

<properties>
Expand Down
5 changes: 3 additions & 2 deletions src/dictionaryView/dictionaryViewProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class DictionaryViewProvider {
};

const view = {
show: function (element, editMode) {
show: function (element, editMode, { renderWhenVisible }) {
const componentDefinition = {
components: {
DictionaryView
Expand All @@ -46,7 +46,8 @@ export default class DictionaryViewProvider {
domainObject,
table,
objectPath,
currentView: view
currentView: view,
renderWhenVisible
},
template: `
<dictionary-view
Expand Down
28 changes: 0 additions & 28 deletions src/dictionaryView/dictionaryViewTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,6 @@ export default class DictionaryViewTable extends TelemetryTable {
addTelemetryObject(telemetryObject) {
this.addColumnsForObject(telemetryObject, true);

const keyString = this.openmct.objects.makeKeyString(telemetryObject.identifier);
let requestOptions = this.buildOptionsFromConfiguration(telemetryObject);
let columnMap = this.getColumnMapForObject(keyString);
let limitEvaluator = this.openmct.telemetry.limitEvaluator(telemetryObject);

const telemetryProcessor = this.getTelemetryProcessor(keyString, columnMap, limitEvaluator);
const telemetryRemover = this.getTelemetryRemover();

this.removeTelemetryCollection(keyString);

this.telemetryCollections[keyString] = this.openmct.telemetry
.requestCollection(telemetryObject, requestOptions);

this.telemetryCollections[keyString].on('requestStarted', this.incrementOutstandingRequests);
this.telemetryCollections[keyString].on('requestEnded', this.decrementOutstandingRequests);
this.telemetryCollections[keyString].on('remove', telemetryRemover);
this.telemetryCollections[keyString].on('add', telemetryProcessor);
this.telemetryCollections[keyString].on('clear', this.clearData);
// this.telemetryCollections[keyString].load();

this.telemetryObjects[keyString] = {
telemetryObject,
keyString,
requestOptions,
columnMap,
limitEvaluator
};

this.emit('object-added', telemetryObject);
}

Expand Down
28 changes: 0 additions & 28 deletions src/multipleHistoricalSessions/sessionTable/SessionTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,6 @@ export default class SessionTable extends TelemetryTable {
addTelemetryObject(telemetryObject) {
this.addColumnsForObject(telemetryObject, true);

const keyString = this.openmct.objects.makeKeyString(telemetryObject.identifier);
let requestOptions = this.buildOptionsFromConfiguration(telemetryObject);
let columnMap = this.getColumnMapForObject(keyString);
let limitEvaluator = this.openmct.telemetry.limitEvaluator(telemetryObject);

const telemetryProcessor = this.getTelemetryProcessor(keyString, columnMap, limitEvaluator);
const telemetryRemover = this.getTelemetryRemover();

this.removeTelemetryCollection(keyString);

this.telemetryCollections[keyString] = this.openmct.telemetry
.requestCollection(telemetryObject, requestOptions);

this.telemetryCollections[keyString].on('requestStarted', this.incrementOutstandingRequests);
this.telemetryCollections[keyString].on('requestEnded', this.decrementOutstandingRequests);
this.telemetryCollections[keyString].on('remove', telemetryRemover);
this.telemetryCollections[keyString].on('add', telemetryProcessor);
this.telemetryCollections[keyString].on('clear', this.clearData);
// this.telemetryCollections[keyString].load();

this.telemetryObjects[keyString] = {
telemetryObject,
keyString,
requestOptions,
columnMap,
limitEvaluator
};

this.emit('object-added', telemetryObject);
}

Expand Down
3 changes: 1 addition & 2 deletions src/packetQuery/components/PacketQueryView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ const SORT_OPTIONS =
['session_id', 'rct', 'scet', 'ert', 'sclk', 'apid', 'spsc', 'vcid', 'ls'];
const MINIMUM_QUERY_MESSAGE =
'One of "Query by Session" or "Bound to Time Conductor"' +
' must be selected in order to query for packet content.';
`Select "Query by Session" or "Bound to Time Conductor" to query for packet content.`;
const SESSION_ID_MESSAGE =
'Must specify Session ID to query by session.';
Expand Down
9 changes: 7 additions & 2 deletions src/product-status/DataProductCell.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineComponent } from 'vue';
import mcws from '../services/mcws/mcws';

export default {
export default defineComponent({
inject: ['openmct'],
props: {
row: {
Expand All @@ -10,6 +11,10 @@ export default {
columnKey: {
type: String,
require: true
},
objectPath: {
type: Array,
required: true
}
},
computed: {
Expand Down Expand Up @@ -58,4 +63,4 @@ export default {
}
}
}
}
});
28 changes: 17 additions & 11 deletions src/product-status/DataProductViewProvider.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import mount from 'ommUtils/mountVueComponent';
import TableComponent from 'openmct.tables.components.Table';
import DataProductTable from './DataProductTable.js';
import DATDownloadCell from './DATDownloadCell.js';
import EMDDownloadCell from './EMDDownloadCell.js';
import EMDPreviewCell from './EMDPreviewCell.js';
import TXTDownloadCell from './TXTDownloadCell.js';

import { createApp, defineComponent } from 'vue';
export default class DataProductViewProvider {
constructor(openmct, options) {
this.openmct = openmct;
Expand Down Expand Up @@ -65,18 +69,20 @@ export default class DataProductViewProvider {
></table-component>`
};

const componentOptions = {
element
};
const mountingElement = element ?? document.createElement('div');

const vueComponent = defineComponent(componentDefinition);
const app = createApp(vueComponent);

app.component('vista-table-dat-cell', DATDownloadCell);
app.component('vista-table-emd-cell', EMDDownloadCell);
app.component('vista-table-emd-preview-cell', EMDPreviewCell);
app.component('vista-table-txt-cell', TXTDownloadCell);

const componentInstance = app.mount(mountingElement);

const {
componentInstance,
destroy,
el
} = mount(componentDefinition, componentOptions);

component = componentInstance;
_destroy = destroy;
_destroy = () => app.unmount();
},
onEditModeChange(editMode) {
component.isEditing = editMode;
Expand Down
13 changes: 0 additions & 13 deletions src/product-status/plugin.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import DataProductViewProvider from './DataProductViewProvider.js';
import DataProductInspectorViewProvider from './DataProductInspectorViewProvider.js';
import DATDownloadCell from './DATDownloadCell.js';
import EMDDownloadCell from './EMDDownloadCell.js';
import EMDPreviewCell from './EMDPreviewCell.js';
import TXTDownloadCell from './TXTDownloadCell.js';
import VistaTableConfigurationProvider from '../tables/VistaTableConfigurationProvider.js';
import DataProductViewActions from './DataProductViewActions.js';

Expand Down Expand Up @@ -41,14 +37,5 @@ export default function install(options) {
DataProductViewActions.forEach(action => {
openmct.actions.register(action);
});

// register cell components globally for dynamic component in core openmct table rows
openmct.on('start', () => {
openmct.app
.component('vista-table-dat-cell', DATDownloadCell)
.component('vista-table-emd-cell', EMDDownloadCell)
.component('vista-table-emd-preview-cell', EMDPreviewCell)
.component('vista-table-txt-cell', TXTDownloadCell);
});
}
}

0 comments on commit d54f568

Please sign in to comment.