Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump core openmct dependency #184

Merged
merged 50 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
aa7a5ca
bump to 5.3.0
davetsay Dec 22, 2023
26a57b7
upgrade to use vue 3 compatibility layer
davetsay Dec 26, 2023
b2019d6
add element to body for vue 3 component mounting
davetsay Dec 26, 2023
fba4c41
fix `resolve-url-loader` error
davetsay Dec 26, 2023
e357c4b
fix name of extended component changed in core
davetsay Dec 26, 2023
ca3cf6f
fix resolving of `@` alias in core
davetsay Dec 26, 2023
cfd6118
key should be bound to v-for
davetsay Dec 27, 2023
1080624
disable overlay on dev build
davetsay Dec 27, 2023
e885032
display loading or sessions, not both
davetsay Dec 27, 2023
6b9fb0b
conver import to vue 3 mount
davetsay Dec 28, 2023
4fdab44
convert alarms view to vue 3 mount
davetsay Dec 28, 2023
64ecc50
convert cell format view to vue 3 mount
davetsay Dec 28, 2023
e5ebd06
convert ChannelTableSet to vue 3 mount
davetsay Dec 28, 2023
e5c26f4
convert alarmsAutoclear to vue 3 mount
davetsay Dec 28, 2023
4bbf9cb
rename files
davetsay Dec 28, 2023
309dfe4
forgot to import after name change
davetsay Dec 28, 2023
63a1eb4
commit to full vue 3 upgrade with compat
davetsay Dec 29, 2023
f396070
fix createApp imports from 'vue'
davetsay Dec 29, 2023
fe2f6ca
convert channel tables to vue 3
davetsay Dec 29, 2023
d400b4e
helper for mounting vue components
davetsay Dec 29, 2023
8edd904
switch to use mountVueComponent utility
davetsay Dec 29, 2023
7306475
convert rest of view providers to use vue 3 mount
davetsay Jan 5, 2024
ccf7351
chain component registering
davetsay Jan 5, 2024
1b6ebc0
remove compat config
davetsay Jan 5, 2024
05375ad
change destroy and beforeDestroy hooks to beforeUnmount
davetsay Jan 5, 2024
d1a77de
`$set` not used in Vue 3
davetsay Jan 5, 2024
f2b2dbe
import nextTick directly from vue
davetsay Jan 5, 2024
e477f8a
use explicit ref instead of $children
davetsay Jan 9, 2024
40bbb42
fix missing indicator element
davetsay Jan 10, 2024
8cf4277
fix missing import
davetsay Jan 10, 2024
58a96c6
fix runtime compile warning
davetsay Jan 10, 2024
3235dc5
fix `mountVueComponent` and mounting of indicators
davetsay Jan 10, 2024
4207986
remove injector and fix historical session indicator
davetsay Jan 10, 2024
9ddcb93
rename mock domain object type
davetsay Jan 10, 2024
68d66cd
provide `renderWhenVisible` option to views
davetsay Jan 11, 2024
2a30fde
historical selector needs own `renderWhenVisible` func since manually…
davetsay Jan 11, 2024
55d902b
`renderWhenVisible` should be provided, not in data
davetsay Jan 11, 2024
5b93d33
fix vue props for views
davetsay Apr 2, 2024
9621f2d
Merge branch 'main' into topic/update-core
davetsay Jul 16, 2024
5629560
update to es6 for importing es6 modules from core openmct
davetsay Jul 18, 2024
8442362
convert tables to work with new performance mode options
davetsay Jul 19, 2024
98973c8
add back development overlay message
davetsay Jul 29, 2024
ca8b228
comment out dev mode configuration
davetsay Jul 29, 2024
aeee3df
add newline to EOF
davetsay Jul 29, 2024
0c3ece9
fix naming issue
davetsay Jul 29, 2024
382d423
revert change
davetsay Jul 29, 2024
9244cba
remove unnecessary constructor
davetsay Jul 29, 2024
04d6a71
pass table performance options to message tables
davetsay Jul 29, 2024
05d41bc
pass table performance options to packet summary table
davetsay Jul 29, 2024
a74d48a
use vue 3 component mounting
davetsay Jul 30, 2024
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
28 changes: 22 additions & 6 deletions .webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ const config = {
* Globals
**/
"openmct": path.join(__dirname, '..', "node_modules/openmct/dist/openmct.js"),
// this is a core openmct alias required to resolve '@' in core components
"@": path.join(__dirname, '..', "node_modules/openmct/src"),
davetsay marked this conversation as resolved.
Show resolved Hide resolved
"saveAs": "file-saver/src/FileSaver.js",
"EventEmitter": "eventemitter3",
"bourbon": "bourbon.scss",
Expand All @@ -53,6 +55,7 @@ const config = {
"services": path.join(__dirname, '..', "src/services"),
"lib": path.join(__dirname, '..', "src/lib"),
"tables": path.join(__dirname, '..', "src/tables"),
"utils": path.join(__dirname, '..', "src/utils"),
/**
* Open MCT Folder View Components
**/
Expand All @@ -72,16 +75,19 @@ const config = {
/**
* Telemetry Table Components
**/
"openmct.tables.components.Table": path.join(__dirname, '..', "node_modules/openmct/src/plugins/telemetryTable/components/table.vue"),
"openmct.tables.components.TableConfiguration": path.join(__dirname, '..', "node_modules/openmct/src/plugins/telemetryTable/components/table-configuration.vue"),
"openmct.tables.components.Table": path.join(__dirname, '..', "node_modules/openmct/src/plugins/telemetryTable/components/TableComponent.vue"),
"openmct.tables.components.TableConfiguration": path.join(__dirname, '..', "node_modules/openmct/src/plugins/telemetryTable/components/TableConfiguration.vue"),
"vue": "vue/dist/vue.esm-bundler.js"
}
},
plugins: [
new webpack.DefinePlugin({
__VISTA_VERSION__: `'${packageDefinition.version}'`,
__VISTA_BUILD_DATE__: `'${new Date()}'`,
__VISTA_REVISION__: `'${gitRevision}'`,
__VISTA_BUILD_BRANCH__: `'${gitBranch}'`
__VISTA_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
}),
new VueLoaderPlugin(),
new MiniCssExtractPlugin({
Expand All @@ -98,13 +104,23 @@ const config = {
{
loader: 'css-loader'
},
'resolve-url-loader',
'sass-loader'
{
loader: 'resolve-url-loader'
},
{
loader: 'sass-loader',
options: { sourceMap: true }
}
]
},
{
test: /\.vue$/,
use: 'vue-loader'
loader: 'vue-loader',
options: {
compilerOptions: {
whitespace: 'preserve'
}
}
},
{
test: /\.html$/,
Expand Down
8 changes: 2 additions & 6 deletions .webpack/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ module.exports = merge(common, {
entry: {
config: './config.js'
},
resolve: {
alias: {
vue: path.join(__dirname, '..', 'node_modules/vue/dist/vue.js'),
}
},
plugins: [
new CopyWebpackPlugin({
patterns: [
Expand Down Expand Up @@ -72,7 +67,8 @@ module.exports = merge(common, {
}],
client: {
progress: true,
overlay: true
// overlay: true
davetsay marked this conversation as resolved.
Show resolved Hide resolved
overlay: false
},
proxy: {
'/mcws-test': {
Expand Down
8 changes: 1 addition & 7 deletions .webpack/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,5 @@ const path = require('path');

/** @type {import('webpack').Configuration} */
module.exports = merge(common, {
mode: 'production',
resolve: {
alias: {
"vue": path.join(__dirname, '..', 'node_modules/vue/dist/vue.min.js'),
}
},
devtool: 'source-map'
mode: 'production'
});
20 changes: 18 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,13 +481,29 @@
}
],
*/
/**
* Table Performance Mode Configuration
* Can increase performance by limiting the maximum rows retained and displayed by tables
* Affects all bounded table types such as Telemetry and EVR tables
* Does not affect latest available tables such as Channel tables
* @typedef TablePerformanceOptions
* @type {object}
* @property {('performance'|'unlimited')} telemetryMode performance mode limits the maximum table rows
* @property {Boolean} persistModeChange whether changes in the UI are persisted with the table
* @property {Number} rowLimit the maximum number of rows in performance mode
*/
tablePerformanceOptions: {
davetsay marked this conversation as resolved.
Show resolved Hide resolved
telemetryMode: 'unlimited',
persistModeChange: false,
rowLimit: 50
},
/**
* Developer Settings-- do not modify these unless you know what
* they do!
*/
assetPath: 'node_modules/openmct/dist',
// proxyUrl: 'http://localhost:8080/',
// useDeveloperStorage: true
proxyUrl: 'http://localhost:8080/',
davetsay marked this conversation as resolved.
Show resolved Hide resolved
useDeveloperStorage: true
};

window.openmctMCWSConfig = openmctMCWSConfig;
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
<link rel="icon" type="image/png" href="node_modules/openmct/dist/favicons/favicon-16x16.png" sizes="16x16" type="image/x-icon">
</head>
<body class="user-environ">
<div id="app"></div>
</body>
</html>
10 changes: 5 additions & 5 deletions loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ define([
}
));
openmct.install(ClearDataIndicator.default(config.globalStalenessInterval));
openmct.install(CommandEventsViewPlugin.default());
openmct.install(MessagesPlugin.default());
openmct.install(ProductStatusPlugin.default());
openmct.install(CommandEventsViewPlugin.default(config.tablePerformanceOptions));
openmct.install(MessagesPlugin.default(config.tablePerformanceOptions));
openmct.install(ProductStatusPlugin.default(config.tablePerformanceOptions));
openmct.install(openmct.plugins.UTCTimeSystem())
openmct.install(openmct.plugins.Notebook());
openmct.install(MetadataActionPlugin.default());
openmct.install(DictionaryViewPlugin.default());
openmct.install(PacketSummaryPlugin.default());
openmct.install(DictionaryViewPlugin.default(config.tablePerformanceOptions));
openmct.install(PacketSummaryPlugin.default(config.tablePerformanceOptions));
openmct.install(ContainerViewPlugin.default());
openmct.install(openmct.plugins.Clock(
{ useClockIndicator: false }
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Open MCT for MCWS",
"devDependencies": {
"@braintree/sanitize-url": "6.0.2",
"@vue/compiler-sfc": "3.3.8",
"babel-loader": "8.2.3",
"babel-plugin-istanbul": "6.1.1",
"bower": "^1.7.7",
Expand Down Expand Up @@ -31,17 +32,16 @@
"mini-css-extract-plugin": "2.6.0",
"moment": "2.29.4",
"node-bourbon": "^4.2.3",
"openmct": "nasa/openmct#omm-r5.2.0-rc3",
"openmct": "nasa/openmct#omm-release/5.3-next",
"printj": "^1.2.1",
"raw-loader": "^0.5.1",
"resolve-url-loader": "5.0.0",
"sass": "1.52.2",
"sass-loader": "12.6.0",
"source-map-loader": "^0.2.4",
"style-loader": "^1.0.1",
"vue": "2.6.14",
"vue-loader": "15.9.8",
"vue-template-compiler": "2.6.14",
"vue": "3.3.8",
"vue-loader": "16.8.3",
"webpack": "5.76.3",
"webpack-cli": "5.0.0",
"webpack-dev-server": "4.11.1",
Expand Down
10 changes: 5 additions & 5 deletions src/AMMOSPlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ define([

mcwsClient.default.configure(options, identityPlugin.login);

openmct.install(MultipleHistoricalSessions.default());
openmct.install(MultipleHistoricalSessions.default(options.tablePerformanceOptions));
openmct.install(RealtimeSessions.default());

openmct.install(new HistoricalTelemetryPlugin(options));
Expand All @@ -108,12 +108,12 @@ define([
openmct.install(new VenuePlugin.default(options));
openmct.install(FrameWatchViewPlugin.default());
openmct.install(FrameEventFilterViewPlugin.default());
openmct.install(new ChannelTablePlugin.default());
openmct.install(new ChannelTablePlugin.default(options.tablePerformanceOptions));
openmct.install(new ChannelTableSetPlugin.default());
openmct.install(new ChannelLimitsPlugin.default());
openmct.install(new FrameAccountabilityPlugin.default(options.frameAccountabilityExpectedVcidList));
openmct.install(EVRViewPlugin.default(options.taxonomy));
openmct.install(new AlarmsViewPlugin.default());
openmct.install(new FrameAccountabilityPlugin.default(options));
openmct.install(EVRViewPlugin.default(options));
openmct.install(new AlarmsViewPlugin.default(options.tablePerformanceOptions));
openmct.install(MCWSIndicatorPlugin.default());

if (window.openmctMCWSConfig.messageStreamUrl && window.openmctMCWSConfig.messageStreamUrl !== '') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default {
const referencedDatasetKeyString = this.makeKeyString(referencedDataset);
const datasetKeyString = this.makeKeyString(this.datasets[0]);

this.$set(this.mapping, referencedDatasetKeyString, datasetKeyString);
this.mapping[referencedDatasetKeyString] = datasetKeyString;
});
},
makeKeyString(domainObject) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ImportWithDatasetsFormComponent from './ImportWithDatasetsFormComponent.vue';
import Vue from 'vue';
import mount from 'utils/mountVueComponent';
import DatasetCache from 'services/dataset/DatasetCache';
import Types from 'types/types';

Expand All @@ -9,6 +9,7 @@
let datasets;
let referencedDatasets;
let component;
jvigliotta marked this conversation as resolved.
Show resolved Hide resolved
let _destroy = null;

const importAsJSONAction = openmct.actions._allActions['import.JSON'];

Expand Down Expand Up @@ -75,7 +76,7 @@
onSave(domainObject, changes);
})
.catch(error => {
component.$destroy();
_destroy?.();
});
}

Expand Down Expand Up @@ -124,8 +125,7 @@
function getImportWithDatasetsFormController(openmct) {
return {
show(element, model, onChange) {
component = new Vue({
el: element,
const componentDefinition = {
components: {
ImportWithDatasetsFormComponent
},
Expand All @@ -149,12 +149,19 @@
this.hasImport = true
}
}
});
};
const componentOptions = { element };

return component;
const {
componentInstance,

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable componentInstance.
destroy,
el

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable el.
} = mount(componentDefinition, componentOptions)

_destroy = destroy;
},
destroy() {
component.$destroy();
_destroy?.();
resetAction();
}
};
Expand All @@ -164,6 +171,7 @@
datasets = undefined;
referencedDatasets = undefined;
component = undefined;
destroyForm = undefined;
davetsay marked this conversation as resolved.
Show resolved Hide resolved
}

function getReferencedDatasetsFromImport(json) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
this.unlisteners = [];
this.openmct.editor.on('isEditing', this.toggleEdit);
},
destroyed() {
beforeUnmount() {
this.openmct.editor.off('isEditing', this.toggleEdit);
this.unlisteners.forEach((unlisten) => unlisten());
}
Expand Down
61 changes: 61 additions & 0 deletions src/alarmsView/AlarmsAutoclearViewProvider.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import mount from 'utils/mountVueComponent';
import AlarmsAutoclear from './AlarmsAutoclear.vue';
import TelemetryTableConfiguration from 'openmct.tables.TelemetryTableConfiguration';

export default class AlarmsAutoClearViewProvider {
constructor(openmct, options) {
this.key = 'vista.alarmsView-configuration';
this.name = 'Autoclear';

this.openmct = openmct;
this.options = options;
this._destroy = null;
}

canView(selection) {
if (selection.length === 0) {
return false;
}

const domainObject = selection[0][0].context.item;

return domainObject?.type === 'vista.alarmsView';
}

view(selection) {
const domainObject = selection[0][0].context.item;
const tableConfiguration = new TelemetryTableConfiguration(domainObject, openmct, this.options);
davetsay marked this conversation as resolved.
Show resolved Hide resolved

return {
show: function (element) {
const componentDefinition = {
provide: {
openmct,
tableConfiguration
},
components: {
AlarmsAutoclear
},
template: '<AlarmsAutoclear />'
};
const componentOptions = {
element
};

const {
componentInstance,

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable componentInstance.
destroy,
el

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable el.
} = mount(componentDefinition, componentOptions);

this._destroy = destroy;
},
priority: function () {
return openmct.priority.HIGH;
},
destroy: function () {
this._destroy?.();
}
}
}
}
Loading