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
12 changes: 5 additions & 7 deletions .webpack/webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* global __dirname module */

const path = require('path');
const packageDefinition = require('../package.json');
const webpack = require('webpack');
Expand Down Expand Up @@ -100,7 +98,7 @@ const config = {
bourbon: 'bourbon.scss',
printj: path.join(__dirname, '..', 'node_modules/printj/dist/printj.min.js'),
/**
* VISTA Paths
* OMM Paths
**/
types: path.join(__dirname, '..', 'src/types'),
services: path.join(__dirname, '..', 'src/services'),
Expand All @@ -112,10 +110,10 @@ const config = {
},
plugins: [
new webpack.DefinePlugin({
__VISTA_VERSION__: `'${packageDefinition.version}'`,
__VISTA_BUILD_DATE__: `'${new Date()}'`,
__VISTA_REVISION__: `'${gitRevision}'`,
__VISTA_BUILD_BRANCH__: `'${gitBranch}'`,
__OMM_VERSION__: `'${packageDefinition.version}'`,
__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
}),
Expand Down
2 changes: 0 additions & 2 deletions .webpack/webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* global __dirname module*/

/*
This configuration should be used for development purposes. It contains full source map, a
devServer (which be invoked using by `npm start`), and a non-minified Vue.js distribution.
Expand Down
3 changes: 0 additions & 3 deletions .webpack/webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/* global __dirname module */

/*
This configuration should be used for production installs.
It is the default webpack configuration.
*/

const { merge } = require('webpack-merge');
const common = require('./webpack.common');
const path = require('path');

/** @type {import('webpack').Configuration} */
module.exports = merge(common, {
Expand Down
54 changes: 54 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
const globals = require('globals');
const js = require('@eslint/js');
const vueParser = require('vue-eslint-parser');
const babelParser = require('@babel/eslint-parser');
// eslint-plugin-prettier/recommended must be last in configuration
// so that eslint-config-prettier has the opportunity to override other configs
const prettierRecommended = require('eslint-plugin-prettier/recommended');

/** @type {import('eslint').Linter.Config[]} */
module.exports = [
{
ignores: ['**/dist/*', '**/target/*']
},
{
languageOptions: {
globals: {
...globals.browser,
...globals.es2024,
...globals.jasmine,
...globals.amd,
...globals.node,
__OMM_VERSION__: 'readonly',
__OMM_BUILD_DATE__: 'readonly',
__OMM_REVISION__: 'readonly',
__OMM_BUILD_BRANCH__: 'readonly'
},
parser: vueParser,
parserOptions: {
parser: babelParser,
requireConfigFile: false,
allowImportExportEverywhere: true,
ecmaVersion: 'latest',
ecmaFeatures: {
impliedStrict: true
},
sourceType: 'module'
}
}
},
js.configs.recommended,
prettierRecommended,
{
rules: {
'no-unused-vars': [
'error',
{
vars: 'all',
args: 'none'
}
],
'prettier/prettier': 'error'
}
}
];
3 changes: 0 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/*global module*/

const path = require('path');

module.exports = function (config) {
Expand All @@ -13,7 +11,6 @@ module.exports = function (config) {
use: {
loader: 'babel-loader',
options: {
// eslint-disable-next-line no-undef
configFile: path.resolve(process.cwd(), 'babel.coverage.js')
}
}
Expand Down
8 changes: 4 additions & 4 deletions loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ define([
*/
function insertBuildInfo(markup) {
return markup
.replace(/\$\{project\.version\}/g, __VISTA_VERSION__)
.replace(/\$\{timestamp\}/g, __VISTA_BUILD_DATE__)
.replace(/\$\{buildNumber\}/g, __VISTA_REVISION__)
.replace(/\$\{branch\}/g, __VISTA_BUILD_BRANCH__);
.replace(/\$\{project\.version\}/g, __OMM_VERSION__)
.replace(/\$\{timestamp\}/g, __OMM_BUILD_DATE__)
.replace(/\$\{buildNumber\}/g, __OMM_REVISION__)
.replace(/\$\{branch\}/g, __OMM_BUILD_BRANCH__);
}

return loader;
Expand Down
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,24 @@
"version": "2512.01-next",
"description": "Open MCT for MCWS",
"devDependencies": {
"@babel/eslint-parser": "7.26.8",
"@braintree/sanitize-url": "6.0.4",
"@eslint/js": "9.19.0",
"@vue/compiler-sfc": "3.4.3",
"babel-loader": "8.2.0",
"babel-plugin-istanbul": "6.1.1",
"bower": "^1.7.7",
"comma-separated-values": "3.6.4",
"copy-webpack-plugin": "12.0.2",
"css-loader": "6.10.0",
"eslint": "9.19.0",
"eslint-config-prettier": "10.0.1",
"eslint-plugin-prettier": "5.2.3",
"eslint-plugin-vue": "9.32.0",
"eventemitter3": "5.0.1",
"file-saver": "2.0.5",
"git-rev-sync": "3.0.2",
"globals": "15.14.0",
"html2canvas": "1.4.1",
"imports-loader": "0.8.0",
"jasmine-core": "5.1.1",
Expand Down Expand Up @@ -42,6 +49,7 @@
"source-map-loader": "^0.2.4",
"style-loader": "3.3.3",
"vue": "3.4.24",
"vue-eslint-parser": "^9.4.3",
"vue-loader": "16.8.3",
"webpack": "5.94.0",
"webpack-cli": "5.1.1",
Expand All @@ -51,8 +59,8 @@
"scripts": {
"clean": "npm cache clean --force;rm -rf ./dist ./node_modules ./target ./package-lock.json",
"start": "npx webpack serve --config ./.webpack/webpack.dev.js",
"lint": "npx prettier --check \"**\"",
"lint:fix": "npx prettier --write \"**\"",
"lint": "eslint \"**\"",
"lint:fix": "eslint \"**\" --fix",
"build:prod": "webpack --config ./.webpack/webpack.prod.js",
"build:dev": "webpack --config ./.webpack/webpack.dev.js",
"build:watch": "webpack --config ./.webpack/webpack.dev.js --watch",
Expand All @@ -72,4 +80,4 @@
},
"author": "",
"license": "Apache-2.0"
}
}
1 change: 0 additions & 1 deletion scripts/summarize-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ if (!args['exclude-requirements-matrix']) {
console.log('Requirement ID | Test Procedures | Status');
console.log('--- | --- | --- ');
_.each(sortedRequirements, function (requirement) {
var procedureCount = requirement.procedures.length;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we even use this file anymore? should we just axe it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

probably. can create a maintenance ticket to prune unnecessary files

Copy link
Collaborator

Choose a reason for hiding this comment

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

var implemented = _.filter(requirement.procedures, { implemented: true }).length;
var conducted = _.filter(requirement.procedures, { conducted: true }).length;
var verified = _.filter(requirement.procedures, { conducted: true, passed: true }).length;
Expand Down
2 changes: 1 addition & 1 deletion src/AMMOSPlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ define([
options: timePlugin,
format: utcFormat
});
openmct.install(RealtimeIndicatorPlugin.default(vistaTime));
openmct.install(RealtimeIndicatorPlugin.default(vistaTime, utcFormat));

mcwsClient.default.configure(options);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function importWithDatasetsModifier(openmct) {
try {
json = JSON.parse(objectTree);
} catch (error) {
console.error('Error parsing object tree.', error);
success = false;
}

Expand All @@ -115,6 +116,7 @@ function importWithDatasetsModifier(openmct) {

component.updateData(referencedDatasets, datasets);
} catch (error) {
console.error('Error updating referenced datasets.', error);
success = false;
}
}
Expand Down Expand Up @@ -158,7 +160,7 @@ function importWithDatasetsModifier(openmct) {
};
const componentOptions = { element };

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

component = componentInstance;

Expand Down
13 changes: 9 additions & 4 deletions src/alarmsView/AlarmsAutoclearViewProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@ export default class AlarmsAutoClearViewProvider {
}

view(selection) {
const self = this;
const domainObject = selection[0][0].context.item;
const tableConfiguration = new TelemetryTableConfiguration(domainObject, openmct, this.options);
const tableConfiguration = new TelemetryTableConfiguration(
domainObject,
this.openmct,
this.options
);

return {
show: function (element) {
const componentDefinition = {
provide: {
openmct,
openmct: self.openmct,
tableConfiguration
},
components: {
Expand All @@ -42,12 +47,12 @@ export default class AlarmsAutoClearViewProvider {
element
};

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

this._destroy = destroy;
},
priority: function () {
return openmct.priority.HIGH;
return self.openmct.priority.HIGH;
},
destroy: function () {
this._destroy?.();
Expand Down
7 changes: 4 additions & 3 deletions src/alarmsView/AlarmsViewProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ export default class AlarmsViewProvider {
view(domainObject, objectPath) {
let component;
let _destroy = null;
const self = this;

const table = new AlarmsTable(domainObject, openmct, this.options);
const table = new AlarmsTable(domainObject, this.openmct, this.options);
const markingProp = {
enable: true,
useAlternateControlBar: false,
Expand All @@ -43,7 +44,7 @@ export default class AlarmsViewProvider {
};
},
provide: {
openmct,
openmct: self.openmct,
table,
objectPath,
currentView: view,
Expand All @@ -61,7 +62,7 @@ export default class AlarmsViewProvider {
element
};

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

component = componentInstance;
_destroy = destroy;
Expand Down
1 change: 1 addition & 0 deletions src/alarmsView/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default function AlarmsViewPlugin(options) {
'vista.alarm-view-configuration',
'Config',
'vista.alarmsView',
openmct,
options
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function ChannelTableFormatViewProvider(openmct, options) {
element
};

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

_destroy = destroy;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default class ChannelTableViewProvider {
view(domainObject, objectPath) {
let component;
let _destroy = null;
const self = this;

const markingProp = {
enable: true,
Expand All @@ -48,7 +49,7 @@ export default class ChannelTableViewProvider {
TableComponent
},
provide: {
openmct,
openmct: self.openmct,
table,
objectPath,
currentView: view,
Expand All @@ -69,7 +70,7 @@ export default class ChannelTableViewProvider {
element
};

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

component = componentInstance;
_destroy = destroy;
Expand Down
1 change: 1 addition & 0 deletions src/channelTable/channelTablePlugin/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default function install(options) {
'vista.channel-list-configuration',
'Config',
CHANNEL_TABLE_KEY,
openmct,
options
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class ChannelTableSetView {
element
};

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

this.component = componentInstance;
this._destroy = destroy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class ChannelTableSetViewProvider {
}

view(domainObject, objectPath) {
return new ChannelTableSetView(openmct, domainObject, objectPath);
return new ChannelTableSetView(this.openmct, domainObject, objectPath);
}

canEdit(domainObject) {
Expand Down
2 changes: 1 addition & 1 deletion src/clearDataIndicator/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function plugin(globalStalenessMs) {
template: '<ClearDataIndicator />'
};

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

const indicator = {
key: 'clear-data-indicator',
Expand Down
7 changes: 4 additions & 3 deletions src/commandEventsView/CommandEventsViewProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ export default class CommandEventsViewProvider {
view(domainObject, objectPath) {
let component;
let _destroy = null;
const self = this;

const table = new CommandEventsTable(domainObject, openmct, this.options);
const table = new CommandEventsTable(domainObject, this.openmct, this.options);
const markingProp = {
enable: true,
useAlternateControlBar: false,
Expand All @@ -41,7 +42,7 @@ export default class CommandEventsViewProvider {
};
},
provide: {
openmct,
openmct: self.openmct,
table,
objectPath,
currentView: view,
Expand All @@ -64,7 +65,7 @@ export default class CommandEventsViewProvider {
element
};

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

component = componentInstance;
_destroy = destroy;
Expand Down
Loading