diff --git a/.cspell.json b/.cspell.json new file mode 100644 index 00000000..726f73bb --- /dev/null +++ b/.cspell.json @@ -0,0 +1,32 @@ +{ + "version": "0.2", + "language": "en,en-us", + "dictionaries": [ + "npm", + "softwareTerms", + "node", + "html", + "css", + "bash", + "en_US", + "en-gb", + "misc", + "omm" + ], + "dictionaryDefinitions": [ + { + "name": "omm", + "path": ".cspell/omm-dictionary.txt", + "description": "Open MCT for MCWS dictionary" + } + ], + "ignorePaths": [ + "package.json", + "dist/**", + "package-lock.json", + "node_modules", + "*.log", + "test_data/**", + "target/**" + ] +} \ No newline at end of file diff --git a/.cspell/omm-dictionary.txt b/.cspell/omm-dictionary.txt new file mode 100644 index 00000000..4c299452 --- /dev/null +++ b/.cspell/omm-dictionary.txt @@ -0,0 +1,55 @@ +# openmct +openmct +metadatas +metadatum +unlisten +unlisteners +persistable +Persistable +timesystem +TIMESYSTEM +frameaccountability +DDDTHH +DDDDTHH + +# dependencies +printj + +# testing +xdescribe + +# ammos +mcws +MCWSEVR +mcwsurl +ampcs +mpcs # root_topic was hardcoded as mpcs before name change to ampcs +atlo +rfsw +spsc +apid +apids +scid +vcid +vcids +vcfc +evrs +scmf +cltus +insync +datatable + +# time +scet +lmst +sclk +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 diff --git a/README.md b/README.md index b3a840b6..e270fdf7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Open MCT for MCWS -Open Mission Control Techologies for Mission Control Web Services (Open MCT for MCWS) is a next-generation web-based mission control framework for visualization of data on desktop and mobile devices. Open MCT for MCWS is built on the [Open MCT Framework](https://github.com/nasa/openmct), and includes adapter code for using MCWS as a telemetry and persistence provider. Open MCT is developed at NASA Ames Research Center in Silicon Valley, in collaboration with NASA AMMOS and the Jet Propulsion Laboratory, California Institute of Technology (under its contract with NASA, 80NM0018D0004). +Open Mission Control Technologies for Mission Control Web Services (Open MCT for MCWS) is a next-generation web-based mission control framework for visualization of data on desktop and mobile devices. Open MCT for MCWS is built on the [Open MCT Framework](https://github.com/nasa/openmct), and includes adapter code for using MCWS as a telemetry and persistence provider. Open MCT is developed at NASA Ames Research Center in Silicon Valley, in collaboration with NASA AMMOS and the Jet Propulsion Laboratory, California Institute of Technology (under its contract with NASA, 80NM0018D0004). ## Configuration Various configurations and customizations are available by editing `config.js`. Descriptions of each configuration reside with the configuration in the file. diff --git a/config.js b/config.js index f2474511..4f5672f2 100644 --- a/config.js +++ b/config.js @@ -84,11 +84,11 @@ evrDefaultBackgroundColor: undefined, /** - * evrDefaultForegoundColor: default foreground color for EVRs. + * evrDefaultForegroundColor: default foreground color for EVRs. * Set to `undefined` to use the theme default. Otherwise, specify * a hex string for an RGB color, e.g. `#ababab`. */ - evrDefaultForegoundColor: undefined, + evrDefaultForegroundColor: undefined, /** * evrBackgroundColorByLevel: specify the background color of EVRs @@ -206,7 +206,7 @@ * * modeSettings: object, optional - presets for convenience. * * * fixed: object, optional - valid objects are bounds objects and presets array. * * * realtime: object, optional - valid objects are clockOffsets and presets array. - * * * lad:object, optional - valid objects are clockoffsets. + * * * lad:object, optional - valid objects are clockOffsets. * * * * * * * * Optional objects: * * * * bounds: start and end bounds for preset as numbers @@ -360,9 +360,12 @@ * This list can be quickly extracted from apid.xml with the following * python code: * + * temporarily disable spellcheck, to be removed in https://github.com/NASA-AMMOS/openmct-mcws/issues/303 + * cspell:disable * import xml.etree.ElementTree as ET * tree = ET.parse('apid.xml') * apids = [int(a.attrib['number']) for a in tree.getroot() if a.tag == 'apid'] + * cspell:enable * */ realtimeProductAPIDs: [], diff --git a/docs/process/lines-of-code.md b/docs/process/lines-of-code.md index 909181e3..f3b5e5f1 100644 --- a/docs/process/lines-of-code.md +++ b/docs/process/lines-of-code.md @@ -1,3 +1,4 @@ + # Lines of code Per release, we report on total lines of code, plus the different in lines of diff --git a/eslint.config.js b/eslint.config.js index 29f253eb..e7b4f3a1 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,5 +1,6 @@ const globals = require('globals'); const js = require('@eslint/js'); +const vue = require('eslint-plugin-vue'); const vueParser = require('vue-eslint-parser'); const babelParser = require('@babel/eslint-parser'); // eslint-plugin-prettier/recommended must be last in configuration @@ -38,6 +39,7 @@ module.exports = [ } }, js.configs.recommended, + ...vue.configs['flat/recommended'], prettierRecommended, { rules: { diff --git a/karma.conf.js b/karma.conf.js index c6417a1c..73bd0e40 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -45,7 +45,7 @@ module.exports = function (config) { // Web server port. port: 9876, - // Wnable / disable colors in the output (reporters and logs). + // enable / disable colors in the output (reporters and logs). colors: true, logLevel: config.LOG_INFO, diff --git a/package.json b/package.json index 765d1b4a..c93d0783 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "bower": "^1.7.7", "comma-separated-values": "3.6.4", "copy-webpack-plugin": "12.0.2", + "cspell": "8.17.5", "css-loader": "6.10.0", "eslint": "9.19.0", "eslint-config-prettier": "10.0.1", @@ -61,6 +62,7 @@ "start": "npx webpack serve --config ./.webpack/webpack.dev.js", "lint": "eslint \"**\"", "lint:fix": "eslint \"**\" --fix", + "lint:spelling": "cspell \"**/*.{js,md,vue}\" --show-context --gitignore --quiet", "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", @@ -73,7 +75,7 @@ "url": "https://github.com/NASA-AMMOS/openmct-mcws" }, "engines": { - "node": ">=14.19.1" + "node": ">=18.18.0" }, "overrides": { "core-js": "3.21.1" diff --git a/scripts/rebundle-template.txt b/scripts/rebundle-template.txt deleted file mode 100644 index 2aa01a44..00000000 --- a/scripts/rebundle-template.txt +++ /dev/null @@ -1,13 +0,0 @@ -/*global define*/ - -define([ - <%= implPaths %> - 'legacyRegistry' -], function ( - <%= implNames %> - legacyRegistry -) { - "use strict"; - - legacyRegistry.register("<%= bundleName %>", <%= bundleContents %>); -}); diff --git a/scripts/rebundle.js b/scripts/rebundle.js deleted file mode 100644 index 4af45dde..00000000 --- a/scripts/rebundle.js +++ /dev/null @@ -1,76 +0,0 @@ -// Temporary utility script to rewrite bundle.json -// files as bundle.js files. - -var glob = require('glob'), - fs = require('fs'), - path = require('path'), - _ = require('lodash'), - template = _.template(fs.readFileSync(path.resolve(__dirname, 'rebundle-template.txt'), 'utf8')); - -function indent(str, depth) { - return _.trimLeft( - str - .split('\n') - .map(function (line) { - return _.repeat(' ', depth || 1) + line; - }) - .filter(function (line) { - return line.trim().length > 0; - }) - .join('\n') - ); -} - -function findImpls(bundleContents) { - return _(bundleContents.extensions || {}) - .map() - .flatten() - .map('implementation') - .filter() - .uniq() - .value(); -} - -function toIdentifier(impl) { - var parts = impl.replace('.js', '').split('/'); - return parts[parts.length - 1]; -} - -function toPath(impl) { - return '"./src/' + impl.replace('.js', '') + '"'; -} - -function replaceImpls(bundleText) { - var rx = /"implementation": "([^"]*)"/; - return bundleText - .split('\n') - .map(function (line) { - var m = line.match(rx); - return m !== null ? line.replace(rx, '"implementation": ' + toIdentifier(m[1])) : line; - }) - .join('\n'); -} - -function rebundle(file) { - var plainJson = fs.readFileSync(file, 'utf8'), - bundleContents = JSON.parse(plainJson), - impls = findImpls(bundleContents), - bundleName = file.replace('/bundle.json', ''), - outputFile = file.replace('.json', '.js'), - contents = template({ - bundleName: bundleName, - implPaths: indent(impls.map(toPath).concat(['']).join(',\n')), - implNames: indent(impls.map(toIdentifier).concat(['']).join(',\n')), - bundleContents: indent(replaceImpls(JSON.stringify(bundleContents, null, 4))) - }); - fs.writeFileSync(outputFile, contents, 'utf8'); -} - -glob('**/bundle.json', {}, function (err, files) { - if (err) { - console.log(err); - return; - } - - files.forEach(rebundle); -}); diff --git a/scripts/summarize-report.js b/scripts/summarize-report.js deleted file mode 100644 index cacbb2a6..00000000 --- a/scripts/summarize-report.js +++ /dev/null @@ -1,352 +0,0 @@ -var USAGE = [ - '', - 'Usage:', - '', - ' node scripts/summarize-report.js report-YYYYMMDD.md [options]', - '', - '...where report-YYYYMMDD.md is a completed versions of ' + - 'test procedures, and is found in docs/process/testing.', - '', - 'Options:', - '-a, --all show all procedures, including those', - ' that have not been implemented', - '-C, --exclude-coverage-summary exclude coverage summary', - '-c, --only-coverage-summary only show coverage summary', - '-R, --exclude-requirements-matrix exclude requirements matrix', - '-r, --only-requirements-matrix only show requirements matrix', - '-P, --exclude-procedure-summary exclude procedure summary', - '-p, --only-procedure-summary only show procedure summary' -]; - -var _ = require('lodash'); -var marked = require('marked'); -var fs = require('fs'); -var path = require('path'); -var minimist = require('minimist'); - -var columns = ['Test ID', 'Relevant reqs.', 'Conducted?', 'Passed?', 'Issues']; -var symbols = { - Yes: ':white_check_mark:', - 'Yes †': ':white_check_mark:', - No: ':x:' -}; -var transforms = { - 'Test ID': function (value, metrics, title, filename, procedure) { - var fragmentId = _.kebabCase(title); - var url = filename + '#' + fragmentId; - var link = '[' + value + '](' + url + ')'; - procedure.id = value; - procedure.link = link; - return link; - }, - 'Conducted?': function (value, metrics, title, filename, procedure) { - if (value.indexOf('Yes') !== -1) { - procedure.conducted = true; - metrics.conducted += 1; - } - return value + ' ' + (symbols[value] || ''); - }, - 'Passed?': function (value, metrics, title, filename, procedure) { - if (value.indexOf('Yes') !== -1) { - metrics.passed += 1; - procedure.passed = true; - } else if (value.indexOf('No') !== -1) { - metrics.failed += 1; - } - if (value.length > 16) { - value = value.substring(0, 16) + '...'; - } - return value + ' ' + (symbols[value] || ''); - }, - 'Relevant reqs.': function (value, metrics, title, filename, procedure) { - procedure.requirements = value.split(/[,;]\s*/); - return value; - } -}; - -var matchIssueUrl = /https:\/\/github\.jpl\.nasa\.gov\/MissionControl\/vista\/issues\/(\d+)\/?/; - -function SummaryRenderer(filename) { - marked.Renderer.call(this); - this.reportFilename = filename; - - this.metrics = { - total: 0, - implemented: 0, - conducted: 0, - passed: 0, - failed: 0 - }; - this.procedures = []; -} -SummaryRenderer.prototype = Object.create(marked.Renderer.prototype); - -function noText() { - return ''; -} - -[ - 'code', - 'blockquote', - 'html', - 'hr', - 'list', - 'listItem', - 'paragraph', - 'strong', - 'em', - 'codespan', - 'br', - 'del', - 'image' -].forEach(function (method) { - SummaryRenderer.prototype[method] = noText; -}); - -SummaryRenderer.prototype.heading = function (text, level) { - if (level === 1) { - this.inProcedures = text === 'Procedures'; - } else if (level === 2 && this.inProcedures) { - this.currentProcedure = text; - this.metrics.total += 1; - } - return ''; -}; - -SummaryRenderer.prototype.table = function (header, body) { - if (!this.inProcedures) { - return ''; - } - - var contents = body.split('\n').reduce(function (a, row) { - var cells = row.split('|').map(function (cell) { - return cell.trim(); - }); - a[cells[0]] = cells[1]; - return a; - }, {}); - - var title = this.currentProcedure; - var filename = this.reportFilename; - var procedure = { - conducted: false, - passed: false, - implemented: false - }; - this.procedures.push(procedure); - - var result = - columns - .map( - function (column) { - var value = contents[column]; - var transform = transforms[column]; - if (!value) { - return value; - } - return transform ? transform(value, this.metrics, title, filename, procedure) : value; - }.bind(this) - ) - .join(' | ') + '\n'; - - if (contents['Instructions'].indexOf('(') === 0) { - if (args['all']) { - return result; - } else { - return ''; - } - } else { - procedure.implemented = true; - this.metrics.implemented += 1; - return result; - } -}; - -SummaryRenderer.prototype.tablerow = function (text) { - return text + '\n'; -}; - -SummaryRenderer.prototype.tablecell = function (text) { - return text + '|'; -}; - -SummaryRenderer.prototype.link = function (href, title, text) { - if (text === href) { - if (matchIssueUrl.test(href)) { - text = matchIssueUrl.exec(href)[1]; - } else { - text = ':link:'; - } - } - return '[' + text + '](' + href + ')'; -}; - -if (!process.argv[2]) { - USAGE.forEach(function (line) { - console.log(line); - }); - process.exit(); -} - -var args = minimist(process.argv.slice(2), { - alias: { - a: 'all', - C: 'exclude-coverage-summary', - c: 'only-coverage-summary', - R: 'exclude-requirements-matrix', - r: 'only-requirements-matrix', - P: 'exclude-procedure-summary', - p: 'only-procedure-summary' - }, - boolean: [ - 'all', - 'exclude-coverage-summary', - 'only-coverage-summary', - 'exclude-requirements-matrix', - 'only-requirements-matrix', - 'exclude-procedure-summary', - 'only-procedure-summary' - ] -}); - -var exclusiveOptions = _(args) - .keys() - .filter(function (key) { - return key.indexOf('only') === 0; - }) - .value(); - -_(exclusiveOptions) - .filter(function (key) { - return args[key]; - }) - .each(function (key) { - _.each(exclusiveOptions, function (k) { - args[k.replace('only', 'no')] = true; - }); - args[key.replace('only', 'no')] = false; - }); - -var filename = args._[0]; -var filepath = path.resolve('docs/process/testing', filename); -var report = fs.readFileSync(filepath, 'utf8'); -var renderer = new SummaryRenderer(filename); -var summary = marked(report, { renderer: renderer }); -var metrics = renderer.metrics; -var requirements = {}; - -function getRequirement(id) { - if (!requirements[id]) { - requirements[id] = { - id: id, - procedures: [] - }; - } - return requirements[id]; -} - -_.each(renderer.procedures, function (procedure) { - if (!procedure.requirements) { - return; - } - _.each(procedure.requirements, function (requirementId) { - var requirement = getRequirement(requirementId); - requirement.procedures.push(procedure); - }); -}); - -var sortedRequirements = _(requirements) - .values() - .filter(function (r) { - if (args['all']) { - return true; - } else { - return _.some(r.procedures, { implemented: true }); - } - }) - .sortBy(function (requirement) { - return requirement.id.replace(/\d+/, function (n) { - while (n.length < 4) { - // look guys i rewrote leftpad! - n = '0' + n; - } - return n; - }); - }) - .value(); - -var hasError; -_.forEach(_.groupBy(renderer.procedures, 'id'), function (procs, id) { - if (procs.length > 1) { - console.log('Procedure ID ', id, ' has more than one associated procedure!'); - console.log(_.map(procs, 'id')); - hasError = true; - } -}); - -if (hasError) { - console.log('Duplicate procedure IDs, fix problem and try running again.'); - process.exit(1); -} - -console.log('# Summary\n'); - -if (!args['exclude-requirements-matrix']) { - console.log('## Requirements Coverage\n'); - console.log('Requirement ID | Test Procedures | Status'); - console.log('--- | --- | --- '); - _.each(sortedRequirements, function (requirement) { - 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; - console.log( - [ - requirement.id, - _.map(requirement.procedures, 'link').join('; '), - implemented === 0 - ? 'Not Implemented' - : conducted === 0 - ? 'Skipped' - : verified === 0 - ? 'Failed' - : 'Passed' - ].join(' | ') - ); - }); - console.log(''); -} - -if (!args['exclude-coverage-summary']) { - console.log('## Procedure Coverage\n'); - - console.log('Procedures | Count | % of All Procedures | % of Implemented | % of Conducted'); - console.log('---|---|---|---|---'); - Object.keys(metrics).forEach(function (key) { - var value = metrics[key]; - var name = key[0].toUpperCase() + key.substring(1); - console.log( - [ - name, - value, - ((value / metrics.total) * 100).toFixed(2), - ((value / metrics.implemented) * 100).toFixed(2), - ((value / metrics.conducted) * 100).toFixed(2) - ].join(' | ') - ); - }); - console.log(''); -} - -if (!args['exclude-procedure-summary']) { - console.log('## Results\n'); - - console.log(columns.join(' | ')); - console.log( - columns - .map(function (column) { - return '------'; - }) - .join('|') - ); - console.log(summary); -} diff --git a/src/AMMOSPlugins.js b/src/AMMOSPlugins.js index 76a4d105..b2c16428 100644 --- a/src/AMMOSPlugins.js +++ b/src/AMMOSPlugins.js @@ -13,12 +13,12 @@ define([ './venues/plugin', 'services/mcws/MCWSClient', './formats/UTCDayOfYearFormat', - './framesummary/plugin', + './frameSummary/plugin', './frameEventFilterView/plugin', './channelTable/channelTablePlugin/plugin', './channelTable/channelTableSetPlugin/plugin', './channelLimits/plugin', - './frameaccountability/plugin', + './frameAccountability/plugin', './alarmsView/plugin', './messageStreamProcessor/plugin', './evrView/plugin', @@ -69,7 +69,7 @@ define([ ) { function AMMOSPlugins(options) { return function install(openmct) { - // initialze session service, datasetCache service, global staleness + // initialize session service, datasetCache service, global staleness SessionService.default(openmct, options); DatasetCache.default(openmct); GlobalStaleness.default(openmct, options.globalStalenessInterval); diff --git a/src/Migrations.md b/src/Migrations.md deleted file mode 100644 index cab19ef9..00000000 --- a/src/Migrations.md +++ /dev/null @@ -1,8 +0,0 @@ -# migrations - -This vista migration tool changes some identifiers, for which migrations will -need to be run. - -1) EVR Nodes -2) Channel Nodes -3) Anything else? diff --git a/src/actionModifiers/ImportExportWithDatasets/ImportWithDatasetsFormComponent.vue b/src/actionModifiers/ImportExportWithDatasets/ImportWithDatasetsFormComponent.vue index be8af966..3be1a666 100644 --- a/src/actionModifiers/ImportExportWithDatasets/ImportWithDatasetsFormComponent.vue +++ b/src/actionModifiers/ImportExportWithDatasets/ImportWithDatasetsFormComponent.vue @@ -1,6 +1,6 @@ @@ -37,10 +37,12 @@ export default { required: true } }, - watch: { - testUrl() { - this.checkUrl(); - } + emits: ['on-change'], + data() { + return { + field: this.model.value, + warn: false + }; }, computed: { testUrl() { @@ -61,11 +63,10 @@ export default { return result; } }, - data() { - return { - field: this.model.value, - warn: false - }; + watch: { + testUrl() { + this.checkUrl(); + } }, mounted() { this.updateText = throttle(this.updateText, 500); @@ -80,7 +81,7 @@ export default { value: this.field }; - this.$emit('onChange', data); + this.$emit('on-change', data); }, async checkUrl() { if (this.testUrl === '') { diff --git a/src/customForms/UrlField/UrlFieldFormController.js b/src/customForms/UrlField/UrlFieldFormController.js index 7135a051..45a0fae2 100644 --- a/src/customForms/UrlField/UrlFieldFormController.js +++ b/src/customForms/UrlField/UrlFieldFormController.js @@ -19,7 +19,7 @@ export default function UrlFieldFormController(openmct) { onChange }; }, - template: `` + template: `` }; const componentOptions = { diff --git a/src/customForms/plugin.js b/src/customForms/plugin.js index 5488ba19..2ec35e61 100644 --- a/src/customForms/plugin.js +++ b/src/customForms/plugin.js @@ -2,6 +2,6 @@ import UrlFieldFormController from './UrlField/UrlFieldFormController'; export default function CustomFormsPlugin() { return function install(openmct) { - openmct.forms.addNewFormControl('urlfield', UrlFieldFormController(openmct)); + openmct.forms.addNewFormControl('url-field', UrlFieldFormController(openmct)); }; } diff --git a/src/dictionaryView/components/dictionaryView.vue b/src/dictionaryView/components/dictionaryView.vue index 67e5fe33..59ab3cbc 100644 --- a/src/dictionaryView/components/dictionaryView.vue +++ b/src/dictionaryView/components/dictionaryView.vue @@ -4,7 +4,7 @@ v-if="rowsLength" class="l-preview-window__object-view l-preview-window__object-view-no-padding" > - +
DataTable URL: @@ -28,10 +28,10 @@ import TelemetryTable from 'openmct.tables.components.Table'; export default { - inject: ['openmct', 'domainObject', 'table', 'objectPath', 'currentView'], components: { TelemetryTable }, + inject: ['openmct', 'domainObject', 'table', 'objectPath', 'currentView'], data() { return { headers: [], @@ -48,6 +48,15 @@ export default { error: undefined }; }, + mounted() { + this.isLoading = true; + + this.table.loadDictionary().then(() => { + this.rowsLength = this.table.tableRows.getRowsLength(); + this.error = this.table.error; + this.isLoading = false; + }); + }, methods: { processData(data) { this.populateTable(data); @@ -79,15 +88,6 @@ export default { processRows(data) { return data; } - }, - mounted() { - this.isLoading = true; - - this.table.loadDictionary().then(() => { - this.rowsLength = this.table.tableRows.getRowsLength(); - this.error = this.table.error; - this.isLoading = false; - }); } }; diff --git a/src/evrView/EVRViewLevelsConfigurationView.vue b/src/evrView/EVRViewLevelsConfigurationView.vue index 886caeeb..5868bce5 100644 --- a/src/evrView/EVRViewLevelsConfigurationView.vue +++ b/src/evrView/EVRViewLevelsConfigurationView.vue @@ -35,6 +35,11 @@ export default { required: true } }, + data() { + return { + isEditing: this.openmct.editor.isEditing() + }; + }, computed: { levels() { const existingLevels = @@ -85,10 +90,11 @@ export default { return styles; } }, - data() { - return { - isEditing: this.openmct.editor.isEditing() - }; + mounted() { + this.openmct.editor.on('isEditing', this.toggleEdit); + }, + beforeUnmount() { + this.openmct.editor.off('isEditing', this.toggleEdit); }, methods: { toggleEdit(isEditing) { @@ -100,12 +106,6 @@ export default { this.openmct.objects.mutate(this.domainObject, 'configuration.levels', levels); } - }, - mounted() { - this.openmct.editor.on('isEditing', this.toggleEdit); - }, - beforeUnmount() { - this.openmct.editor.off('isEditing', this.toggleEdit); } }; diff --git a/src/frameaccountability/components/frameAccountability.js b/src/frameaccountability/components/frameAccountability.js index 0f085d79..cab1534a 100644 --- a/src/frameaccountability/components/frameAccountability.js +++ b/src/frameaccountability/components/frameAccountability.js @@ -41,11 +41,11 @@ define([ } }, removeEvents(identifier) { - let keystring = this.openmct.objects.makeKeyString(identifier); + const keyString = this.openmct.objects.makeKeyString(identifier); - if (this.subscriptions[keystring] && typeof this.subscriptions[keystring] === 'function') { - this.subscriptions[keystring](); - delete this.subscriptions[keystring]; + if (this.subscriptions[keyString] && typeof this.subscriptions[keyString] === 'function') { + this.subscriptions[keyString](); + delete this.subscriptions[keyString]; } }, addCommandEvents(domainObject) { @@ -55,13 +55,13 @@ define([ this.commandEventValueMetadatas = this.commandEventMetadata.valueMetadatas; } - let unsubscribe = this.openmct.telemetry.subscribe( + const unsubscribe = this.openmct.telemetry.subscribe( domainObject, this.processRealtimeDatum('commandEvent') ); - let keystring = this.openmct.objects.makeKeyString(domainObject.identifier); + const keyString = this.openmct.objects.makeKeyString(domainObject.identifier); - this.subscriptions[keystring] = unsubscribe; + this.subscriptions[keyString] = unsubscribe; }, addFrameEvents(domainObject) { if (!this.frameEventMetadata || !this.frameEventFormats) { @@ -73,13 +73,13 @@ define([ this.table.addColumnsForObject(domainObject); } - let unsubscribe = this.openmct.telemetry.subscribe( + const unsubscribe = this.openmct.telemetry.subscribe( domainObject, this.processRealtimeDatum('frameEvent') ); - let keystring = this.openmct.objects.makeKeyString(domainObject.identifier); + const keyString = this.openmct.objects.makeKeyString(domainObject.identifier); - this.subscriptions[keystring] = unsubscribe; + this.subscriptions[keyString] = unsubscribe; }, processRealtimeDatum(eventType) { return (datum) => { diff --git a/src/frameaccountability/components/frameAccountabilityBadFrames.vue b/src/frameaccountability/components/frameAccountabilityBadFrames.vue index ba7a6653..01bbc09f 100644 --- a/src/frameaccountability/components/frameAccountabilityBadFrames.vue +++ b/src/frameaccountability/components/frameAccountabilityBadFrames.vue @@ -8,7 +8,7 @@
- +
@@ -18,6 +18,9 @@ import TelemetryTable from 'openmct.tables.components.Table'; export default { + components: { + TelemetryTable + }, inject: ['openmct', 'table', 'objectPath'], props: { vcid: { @@ -30,12 +33,10 @@ export default { }, badFrames: { type: Array, - default: [] + default: () => [] } }, - components: { - TelemetryTable - }, + emits: ['destroy-bad-frames'], data() { return { headers: undefined, @@ -54,11 +55,6 @@ export default { } } }, - methods: { - hideBadFrames() { - this.$emit('destroy:badframes', undefined); - } - }, mounted() { this.table.clearAndUpdateData(this.badFrames); @@ -79,6 +75,11 @@ export default { }, beforeUnmount() { this.table.sortBy({}); + }, + methods: { + hideBadFrames() { + this.$emit('destroy-bad-frames', undefined); + } } }; diff --git a/src/frameaccountability/components/res/frameAccountability.html b/src/frameaccountability/components/res/frameAccountability.html index 7a1f55ca..3a208e03 100644 --- a/src/frameaccountability/components/res/frameAccountability.html +++ b/src/frameaccountability/components/res/frameAccountability.html @@ -27,7 +27,7 @@ v-if="vcid" :vcid="vcid" :values="frameEventValueMetadatas" - :badFrames="badFrames" - @destroy:badframes="hideBadFrames" + :bad-frames="badFrames" + @destroy-bad-frames="hideBadFrames" /> diff --git a/src/frameaccountability/frameAccountabilityViewProvider.js b/src/frameaccountability/frameAccountabilityViewProvider.js index 1085a1b9..dd5014ad 100644 --- a/src/frameaccountability/frameAccountabilityViewProvider.js +++ b/src/frameaccountability/frameAccountabilityViewProvider.js @@ -12,7 +12,7 @@ const FLAG_COLORS = { export default class FrameAccountabilityViewProvider { constructor(domainObject, openmct, options) { this.domainObject = domainObject; - this.keystring = openmct.objects.makeKeyString(this.domainObject.identifier); + this.keyString = openmct.objects.makeKeyString(this.domainObject.identifier); this.openmct = openmct; this.expectedVcidList = options.frameAccountabilityExpectedVcidList; this.tablePerformanceOptions = options.tablePerformanceOptions; @@ -23,7 +23,7 @@ export default class FrameAccountabilityViewProvider { instantiateBadFramesTable() { const domainObject = { identifier: { - key: `bad-frames-${this.keystring}`, + key: `bad-frames-${this.keyString}`, namespace: '' }, name: 'Bad Frames Accountability', diff --git a/src/framesummary/FrameWatchTable.js b/src/framesummary/FrameWatchTable.js index a3b7fa63..50f01ffe 100644 --- a/src/framesummary/FrameWatchTable.js +++ b/src/framesummary/FrameWatchTable.js @@ -1,9 +1,9 @@ import TelemetryTable from 'openmct.tables.TelemetryTable'; -import FrameWatchRowCollection from './FrameWatchRowCollection'; -import FrameWatchRow from './FrameWatchRow'; -import EncodingWatchRow from './encodingwatch/EncodingWatchRow'; -import FrameWatchColumn from './FrameWatchColumn'; -import { ENCODING_WATCH_TYPE, FRAME_WATCH_TYPE, config } from './config'; +import FrameWatchRowCollection from './FrameWatchRowCollection.js'; +import FrameWatchRow from './FrameWatchRow.js'; +import EncodingWatchRow from './encodingWatch/EncodingWatchRow.js'; +import FrameWatchColumn from './FrameWatchColumn.js'; +import { ENCODING_WATCH_TYPE, FRAME_WATCH_TYPE, config } from './config.js'; import Types from '../types/types.js'; export default class FrameWatchTable extends TelemetryTable { diff --git a/src/framesummary/components/FrameWatchViewComponent.vue b/src/framesummary/components/FrameWatchViewComponent.vue index d9be2551..791ca187 100644 --- a/src/framesummary/components/FrameWatchViewComponent.vue +++ b/src/framesummary/components/FrameWatchViewComponent.vue @@ -8,8 +8,8 @@
@@ -17,32 +17,14 @@
- - + + diff --git a/src/globalFilters/FilterField.vue b/src/globalFilters/FilterField.vue index 1c4e0398..f33be649 100644 --- a/src/globalFilters/FilterField.vue +++ b/src/globalFilters/FilterField.vue @@ -48,6 +48,10 @@ export default { } } }, + emits: ['clear-filter', 'filter-single-selected'], + data() { + return {}; + }, computed: { name() { return this.filterName || this.filterKey; @@ -56,9 +60,6 @@ export default { return this.filter.defaultLabel ?? 'None'; } }, - data() { - return {}; - }, mounted() {}, beforeUnmount() {}, methods: { diff --git a/src/globalFilters/GlobalFilterIndicator.vue b/src/globalFilters/GlobalFilterIndicator.vue index ec6f125b..99b8aa70 100644 --- a/src/globalFilters/GlobalFilterIndicator.vue +++ b/src/globalFilters/GlobalFilterIndicator.vue @@ -57,12 +57,6 @@ export default { showFilterSelector: false }; }, - mounted() { - this.filterService = filterService(this.openmct, this.filters); - this.filterService.on('update', this.updateActiveFilters); - - this.updateActiveFilters(); - }, computed: { hasFilters() { return this.filters?.length; @@ -74,6 +68,12 @@ export default { return Object.keys(this.activeFilters)?.length > 1; } }, + mounted() { + this.filterService = filterService(this.openmct, this.filters); + this.filterService.on('update', this.updateActiveFilters); + + this.updateActiveFilters(); + }, methods: { updateFilters(filters) { this.filterService.updateFilters(filters); diff --git a/src/globalFilters/GlobalFilterSelector.vue b/src/globalFilters/GlobalFilterSelector.vue index 515a604c..c1e24f48 100644 --- a/src/globalFilters/GlobalFilterSelector.vue +++ b/src/globalFilters/GlobalFilterSelector.vue @@ -32,7 +32,7 @@ > Update Filters - + @@ -42,6 +42,9 @@ import FilterField from './FilterField.vue'; import { toRaw } from 'vue'; export default { + components: { + FilterField + }, inject: ['openmct', 'filters'], props: { activeFilters: { @@ -49,8 +52,12 @@ export default { required: true } }, - components: { - FilterField + emits: ['close-filter-selector', 'update-filters'], + data() { + return { + updatedFilters: {}, + hasFiltersChanged: true + }; }, watch: { updatedFilters: { @@ -60,12 +67,6 @@ export default { deep: true } }, - data() { - return { - updatedFilters: {}, - hasFiltersChanged: true - }; - }, mounted() { this.updatedFilters = structuredClone(toRaw(this.activeFilters)); this.openOverlay(); diff --git a/src/historical/HistoricalProvider.js b/src/historical/HistoricalProvider.js index 0d938910..dde2ee74 100644 --- a/src/historical/HistoricalProvider.js +++ b/src/historical/HistoricalProvider.js @@ -406,7 +406,7 @@ define([ let minutes = padTime(Math.floor(duration.minutes())); let seconds = padTime(Math.floor(duration.seconds())); - this.formatedQueryTimespanLimit = `${hours}:${minutes}:${seconds} hrs`; + this.formattedQueryTimespanLimit = `${hours}:${minutes}:${seconds} hrs`; } } @@ -494,10 +494,10 @@ define([ return Promise.resolve([]); } - if (this.formatedQueryTimespanLimit && this.isTimespanLimitExceeded(provider, options)) { + if (this.formattedQueryTimespanLimit && this.isTimespanLimitExceeded(provider, options)) { const notificationMessage = 'Time Conductor bounds exceed the limit of ' + - this.formatedQueryTimespanLimit + + this.formattedQueryTimespanLimit + ' - some views may not display data as expected.'; this.openmct.notifications.error(notificationMessage); diff --git a/src/historical/HistoricalProviderSpec.js b/src/historical/HistoricalProviderSpec.js index 86bf1940..633b49b2 100644 --- a/src/historical/HistoricalProviderSpec.js +++ b/src/historical/HistoricalProviderSpec.js @@ -41,7 +41,7 @@ describe('Historical Provider', function () { beforeEach(function () { mockDomainObject = { identifier: { - namespace: 'test-namesapce', + namespace: 'test-namespace', key: 'test-key' }, type: 'vista.channel', @@ -70,7 +70,7 @@ describe('Historical Provider', function () { }); it('when filters are empty', function () { options.filters = { - somekey: {} + someKey: {} }; historicalProvider.request(mockDomainObject, options).then(resolveCallback, rejectCallback); expect(mockOpenMct.notifications.alert).not.toHaveBeenCalled(); @@ -81,7 +81,7 @@ describe('Historical Provider', function () { beforeEach(function () { mockDomainObject = { identifier: { - namespace: 'test-namesapce', + namespace: 'test-namespace', key: 'test-key' }, type: 'vista.channel', diff --git a/src/mcwsIndicator/MCWSIndicator.vue b/src/mcwsIndicator/MCWSIndicator.vue index beb86835..6ea8f4bb 100644 --- a/src/mcwsIndicator/MCWSIndicator.vue +++ b/src/mcwsIndicator/MCWSIndicator.vue @@ -29,6 +29,12 @@ const CONNECTION_STATES = { export default { inject: ['openmct'], + data() { + return { + state: CONNECTION_STATES.PENDING, + namespace: '' + }; + }, computed: { statusClass() { let mcwsState = this.state; @@ -46,12 +52,6 @@ export default { return mcwsState.description; } }, - data() { - return { - state: CONNECTION_STATES.PENDING, - namespace: '' - }; - }, beforeUnmount() { clearInterval(this.intervalId); }, diff --git a/src/messageStreamProcessor/MessageStreamProcessor.js b/src/messageStreamProcessor/MessageStreamProcessor.js index 961857cf..e43449ed 100644 --- a/src/messageStreamProcessor/MessageStreamProcessor.js +++ b/src/messageStreamProcessor/MessageStreamProcessor.js @@ -114,7 +114,7 @@ class MessageStreamProcessor { * @param {String} suspectChannel - Name of suspect channel * @param {Array} datasetsIdentifiers - Array of dataset identifiers * - * @returns {Array} of suspect channel keystrings + * @returns {Array} of suspect channel keyStrings */ buildSuspectKeyStrings(suspectChannel, datasetsIdentifiers) { let suspectKeyStrings = []; diff --git a/src/metadataAction/components/metadataList.vue b/src/metadataAction/components/metadataList.vue index 646b600a..83bdf638 100644 --- a/src/metadataAction/components/metadataList.vue +++ b/src/metadataAction/components/metadataList.vue @@ -14,6 +14,12 @@ + + - - diff --git a/src/multipleHistoricalSessions/indicator/historicalSessionIndicator.vue b/src/multipleHistoricalSessions/indicator/historicalSessionIndicator.vue index 40989b90..5f1e3ff2 100644 --- a/src/multipleHistoricalSessions/indicator/historicalSessionIndicator.vue +++ b/src/multipleHistoricalSessions/indicator/historicalSessionIndicator.vue @@ -11,27 +11,13 @@ Historical Session Filtering Disabled in Config - - - - - + + diff --git a/src/notes.md b/src/notes.md deleted file mode 100644 index 3db75771..00000000 --- a/src/notes.md +++ /dev/null @@ -1,44 +0,0 @@ -### - - -* Need to fix location handling in OpenMCT - -* need to implement new clock handling -* need to implement new MCWS persistence details - -* implement EVRS -* implement login window wrapper. -* re-implement telemetry providers - - -* [ ] Search navigation broken? (search composition?) -* [ ] Tree nav slow due to huge number of nodes (zzz) -* [ ] Fix clocks for realtime. - - - -# Did I get this right? (check later) - -Relationship between dictionary parsing and everything else... - -I'd like the following methods: - -getDataset(identifer) - .then(function (dataset) { - return dataset.getChannels() - }) - .then(function (channels) { - return channels.modules - }); - -getDataset(identifer) - .then(function (dataset) { - return dataset.getChannels() - }) - .then(function (channels) { - return channels[id]; - }); - - -getChannel(id) - diff --git a/src/packetQuery/MCWSURLBuilder.js b/src/packetQuery/MCWSURLBuilder.js index e7ba4a14..74a9a4e1 100644 --- a/src/packetQuery/MCWSURLBuilder.js +++ b/src/packetQuery/MCWSURLBuilder.js @@ -41,7 +41,7 @@ define(['lodash'], function (_) { /** * Get a URL including all sort and filter parameters previously specified. - * @returns {string} the fully-paramaterized URL + * @returns {string} the fully-parameterized URL */ MCWSURLBuilder.prototype.url = function () { var filterValue = diff --git a/src/packetQuery/components/PacketQueryView.vue b/src/packetQuery/components/PacketQueryView.vue index bf5365a4..f2e176fc 100644 --- a/src/packetQuery/components/PacketQueryView.vue +++ b/src/packetQuery/components/PacketQueryView.vue @@ -81,9 +81,18 @@ export default { props: { domainObject: { type: Object, - require: true + required: true } }, + data() { + return { + queryModel: { + useSession: undefined, + sessionId: undefined, + useTimeConductor: undefined + } + }; + }, computed: { filterRows() { return FILTER_OPTIONS.map((key) => { @@ -133,15 +142,6 @@ export default { } } }, - data() { - return { - queryModel: { - useSession: undefined, - sessionId: undefined, - useTimeConductor: undefined - } - }; - }, mounted() { this.formElement = this.$refs.form; this.setFilterOptions(); diff --git a/src/packetSummary/components/PacketSummaryViewComponent.vue b/src/packetSummary/components/PacketSummaryViewComponent.vue index 78c6692a..67aaac6b 100644 --- a/src/packetSummary/components/PacketSummaryViewComponent.vue +++ b/src/packetSummary/components/PacketSummaryViewComponent.vue @@ -8,8 +8,8 @@
@@ -17,32 +17,14 @@
- - + + diff --git a/src/persistence/BaseMCWSPersistenceProvider.js b/src/persistence/BaseMCWSPersistenceProvider.js index 49995155..017661a8 100644 --- a/src/persistence/BaseMCWSPersistenceProvider.js +++ b/src/persistence/BaseMCWSPersistenceProvider.js @@ -9,10 +9,10 @@ const USERNAME_FROM_PATH_REGEX = new RegExp('.*/(.*?)$'); * * @typedef {Object} NamespaceDefinition * @property {Boolean} containsNamespaces true if this namespace has - * subnamespaces. + * sub-namespaces. * @property {string} id an persistence identifier for the namespace root. * Should include a unique persistence space prefix. - * @property {string} key the machine-readable presistence space identifier + * @property {string} key the machine-readable persistence space identifier * for this namespace. * @property {string} name the human readable name of the namespace. * @property {string} url the url to the MCWS namespace. diff --git a/src/persistence/MCWSPersistenceProvider.js b/src/persistence/MCWSPersistenceProvider.js index b4f4de15..d43d7ff6 100644 --- a/src/persistence/MCWSPersistenceProvider.js +++ b/src/persistence/MCWSPersistenceProvider.js @@ -27,7 +27,7 @@ export default class MCWSPersistenceProvider extends BaseMCWSPersistenceProvider return result; } catch (error) { - console.warn('MCWSPersistneceProvider:get', error); + console.warn('MCWSPersistenceProvider:get', error); return; } @@ -51,7 +51,7 @@ export default class MCWSPersistenceProvider extends BaseMCWSPersistenceProvider return true; } catch (error) { - console.warn('MCWSPersistneceProvider:create', error); + console.warn('MCWSPersistenceProvider:create', error); return false; } @@ -75,7 +75,7 @@ export default class MCWSPersistenceProvider extends BaseMCWSPersistenceProvider return result; } catch (error) { - console.warn('MCWSPersistneceProvider:update', error); + console.warn('MCWSPersistenceProvider:update', error); return false; } diff --git a/src/persistence/existingNamespaceUpdateInterceptor.js b/src/persistence/existingNamespaceUpdateInterceptor.js index 2fc54594..aac2962d 100644 --- a/src/persistence/existingNamespaceUpdateInterceptor.js +++ b/src/persistence/existingNamespaceUpdateInterceptor.js @@ -16,14 +16,14 @@ export default function existingNamespaceUpdateInterceptor(openmct, usersNamespa if (object.composition?.length) { let updatedComposition = false; - object.composition = object.composition.map((keystring) => { - if (typeof keystring === 'string') { + object.composition = object.composition.map((keyString) => { + if (typeof keyString === 'string') { updatedComposition = true; - return openmct.objects.parseKeyString(keystring); + return openmct.objects.parseKeyString(keyString); } - return keystring; + return keyString; }); if (updatedComposition) { diff --git a/src/product-status/DataProductCell.js b/src/product-status/DataProductCell.js index add90fbe..0ad65d3f 100644 --- a/src/product-status/DataProductCell.js +++ b/src/product-status/DataProductCell.js @@ -10,7 +10,7 @@ export default defineComponent({ }, columnKey: { type: String, - require: true + required: true }, objectPath: { type: Array, diff --git a/src/product-status/DataProductRowSpec.js b/src/product-status/DataProductRowSpec.js index 5e4718ae..0d235935 100644 --- a/src/product-status/DataProductRowSpec.js +++ b/src/product-status/DataProductRowSpec.js @@ -1,3 +1,4 @@ +/* cspell:ignore Mcam */ import DataProductRow from './DataProductRow'; describe('The Data Product Row', () => { diff --git a/src/product-status/DataProductViewProvider.js b/src/product-status/DataProductViewProvider.js index 350835e1..9f512a48 100644 --- a/src/product-status/DataProductViewProvider.js +++ b/src/product-status/DataProductViewProvider.js @@ -75,10 +75,10 @@ export default class DataProductViewProvider { 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); + app.component('VistaTableDatCell', DATDownloadCell); + app.component('VistaTableEmdCell', EMDDownloadCell); + app.component('VistaTableEmdPreviewCell', EMDPreviewCell); + app.component('VistaTableTxtCell', TXTDownloadCell); const componentInstance = app.mount(mountingElement); diff --git a/src/product-status/data-product-autoclear.vue b/src/product-status/data-product-autoclear.vue index 567725b8..c73554ce 100644 --- a/src/product-status/data-product-autoclear.vue +++ b/src/product-status/data-product-autoclear.vue @@ -12,10 +12,10 @@
{{ autoClearTimeout }} @@ -34,18 +34,6 @@ export default { autoClearTimeout: undefined }; }, - methods: { - toggleEdit(isEditing) { - this.isEditing = isEditing; - }, - setAutoClearTimeout() { - this.openmct.objects.mutate( - this.domainObject, - 'configuration.autoClearTimeout', - this.autoClearTimeout - ); - } - }, mounted() { this.domainObject = this.openmct.selection.get()[0][0].context.item; if (this.domainObject.configuration && this.domainObject.configuration.autoClearTimeout) { @@ -57,6 +45,18 @@ export default { beforeUnmount() { this.openmct.editor.off('isEditing', this.toggleEdit); this.unlisteners.forEach((unlisten) => unlisten()); + }, + methods: { + toggleEdit(isEditing) { + this.isEditing = isEditing; + }, + setAutoClearTimeout() { + this.openmct.objects.mutate( + this.domainObject, + 'configuration.autoClearTimeout', + this.autoClearTimeout + ); + } } }; diff --git a/src/realtime/MCWSAlarmMessageStreamProvider.js b/src/realtime/MCWSAlarmMessageStreamProvider.js index 90783538..2dfe4fda 100644 --- a/src/realtime/MCWSAlarmMessageStreamProvider.js +++ b/src/realtime/MCWSAlarmMessageStreamProvider.js @@ -56,10 +56,10 @@ class MCWSAlarmMessageStreamProvider extends MCWSStreamProvider { object.telemetry.values = domainObject.telemetry.values; }); - let unsubscribers = objects.map((object) => super.subscribe(object, callback, options)); + let unsubscribes = objects.map((object) => super.subscribe(object, callback, options)); return () => { - unsubscribers.forEach((unsubscribe) => unsubscribe()); + unsubscribes.forEach((unsubscribe) => unsubscribe()); }; } } diff --git a/src/realtimeIndicator/RealtimeIndicator.vue b/src/realtimeIndicator/RealtimeIndicator.vue index 6500b91a..71d75d0b 100644 --- a/src/realtimeIndicator/RealtimeIndicator.vue +++ b/src/realtimeIndicator/RealtimeIndicator.vue @@ -17,6 +17,26 @@ export default { } }; }, + computed: { + cssClass() { + let className = this.currentValue['cssClass']; + let classObject = {}; + classObject[className] = className.length > 0; + return classObject; + } + }, + mounted() { + this.lastTimestamp = new Date(); + + if (this.vistaTime.ladClocks.ert) { + this.vistaTime.ladClocks.ert.on('tick', this.setTick.bind(this)); + } + }, + beforeUnmount() { + if (this.vistaTime.ladClocks.ert) { + this.vistaTime.ladClocks.ert.off('tick', this.setTick.bind(this)); + } + }, methods: { isRefreshRateNominal(newTimestamp, lastTimestamp) { if (newTimestamp - lastTimestamp <= 100) { @@ -45,26 +65,6 @@ export default { console.warn('Error setting tick', e); } } - }, - computed: { - cssClass() { - let className = this.currentValue['cssClass']; - let classObject = {}; - classObject[className] = className.length > 0; - return classObject; - } - }, - mounted() { - this.lastTimestamp = new Date(); - - if (this.vistaTime.ladClocks.ert) { - this.vistaTime.ladClocks.ert.on('tick', this.setTick.bind(this)); - } - }, - beforeUnmount() { - if (this.vistaTime.ladClocks.ert) { - this.vistaTime.ladClocks.ert.off('tick', this.setTick.bind(this)); - } } }; diff --git a/src/realtimeSessions/components/RealtimeSessionIndicator.vue b/src/realtimeSessions/components/RealtimeSessionIndicator.vue index 1052f0bc..94ed3029 100644 --- a/src/realtimeSessions/components/RealtimeSessionIndicator.vue +++ b/src/realtimeSessions/components/RealtimeSessionIndicator.vue @@ -51,6 +51,11 @@ export default { realtimeSessionDisabled: undefined }; }, + computed: { + hasActiveSession() { + return this.activeSession !== undefined; + } + }, mounted() { this.sessionService = SessionService(); this.realtimeSessionDisabled = this.sessionService.realtimeSessionConfig.disable; @@ -62,11 +67,6 @@ export default { beforeUnmount() { this.stopListening?.(); }, - computed: { - hasActiveSession() { - return this.activeSession !== undefined; - } - }, methods: { pollForSessions() { if (!this.activeSession) { diff --git a/src/realtimeSessions/components/RealtimeSessionSelector.vue b/src/realtimeSessions/components/RealtimeSessionSelector.vue index cfc77940..ca4c325b 100644 --- a/src/realtimeSessions/components/RealtimeSessionSelector.vue +++ b/src/realtimeSessions/components/RealtimeSessionSelector.vue @@ -20,7 +20,7 @@
    -
  • +
    • -
    • +
    • Connect - +
@@ -83,6 +87,7 @@ import SessionService from 'services/session/SessionService'; export default { inject: ['openmct'], + emits: ['close-session-selector'], data() { return { isLoading: true, diff --git a/src/services/mcws/NamespaceMIO.js b/src/services/mcws/NamespaceMIO.js index 2f6aca17..5c203651 100644 --- a/src/services/mcws/NamespaceMIO.js +++ b/src/services/mcws/NamespaceMIO.js @@ -23,7 +23,7 @@ class NamespaceMIO extends MIO { /** * Create the namespace. Returns a promise from the underlying - * AbstractMIO's `request` method. + * AbstractMIOs `request` method. * @memberof NamespaceMIO * @returns {Promise} a promise that is resolved when the namespace * is created, or rejected if there is an error. diff --git a/src/types/DatasetType.js b/src/types/DatasetType.js index d1e135d2..d432fa69 100644 --- a/src/types/DatasetType.js +++ b/src/types/DatasetType.js @@ -25,37 +25,37 @@ define(['./VISTAType'], function (VISTAType) { { name: 'MCWS Root URL', key: 'mcwsRootUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { name: 'Channel Dictionary URL', key: 'channelDictionaryUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { name: 'Channel Enumeration Dictionary URL', key: 'channelEnumerationDictionaryUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { name: 'Channel Historical URL', key: 'channelHistoricalUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { name: 'Channel MinMax URL', key: 'channelMinMaxUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { name: 'Channel LAD URL', key: 'channelLADUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { @@ -74,31 +74,31 @@ define(['./VISTAType'], function (VISTAType) { { name: 'Session URL', key: 'sessionUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { name: 'Session LAD URL', key: 'sessionLADUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { name: 'Event Record Dictionary URL', key: 'eventRecordDictionaryUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { name: 'EVR Historical URL', key: 'evrHistoricalUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { name: 'EVR LAD URL', key: 'evrLADUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { @@ -110,13 +110,13 @@ define(['./VISTAType'], function (VISTAType) { { name: 'Data Product URL', key: 'dataProductUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { name: 'Data Product Content URL', key: 'dataProductContentUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { @@ -128,13 +128,13 @@ define(['./VISTAType'], function (VISTAType) { { name: 'Packet URL', key: 'packetUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { name: 'Packet Content URL', key: 'packetContentUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { @@ -146,7 +146,7 @@ define(['./VISTAType'], function (VISTAType) { { name: 'Command Event Historical URL', key: 'commandEventUrl', - control: 'urlfield', + control: 'url-field', cssClass: 'l-input-lg' }, { diff --git a/src/types/EVRType.js b/src/types/EVRType.js index fdeb18bd..e731f780 100644 --- a/src/types/EVRType.js +++ b/src/types/EVRType.js @@ -21,7 +21,7 @@ define(['./VISTAType', './EVRModuleType', '../constants', 'lodash'], function ( }; }, getLocation: function (dataset, data) { - // FIXME: this works soley because the dataset must have loaded for + // FIXME: this works solely because the dataset must have loaded for // the EVRType to load. return EVRModuleType.makeIdentifier( dataset.evrs.byName[data.name].module, diff --git a/src/venues/Venue.js b/src/venues/Venue.js index 031fd151..d4b40b7e 100644 --- a/src/venues/Venue.js +++ b/src/venues/Venue.js @@ -44,7 +44,7 @@ class Venue { return this.sessionService.getActiveSessions(this.domainObject.sessionLADUrl); } - getdomainObject() { + getDomainObject() { const domainObject = JSON.parse(JSON.stringify(this.domainObject)); domainObject.name += ' Dataset'; diff --git a/src/venues/VenueSpec.js b/src/venues/VenueSpec.js index 950ebd69..1097d007 100644 --- a/src/venues/VenueSpec.js +++ b/src/venues/VenueSpec.js @@ -56,7 +56,7 @@ describe('Venue', () => { }); it('returns a domain object', () => { - const domainObject = venue.getdomainObject(); + const domainObject = venue.getDomainObject(); expect(domainObject.name).toBe(`${configuration.name} Dataset`); expect(domainObject.host).not.toBeDefined(); expect(domainObject.prefix).toBe(configuration.prefix); diff --git a/src/venues/components/ActiveSessionSelectorComponent.vue b/src/venues/components/ActiveSessionSelectorComponent.vue index 8b2e3d7b..1d2b5d33 100644 --- a/src/venues/components/ActiveSessionSelectorComponent.vue +++ b/src/venues/components/ActiveSessionSelectorComponent.vue @@ -9,11 +9,11 @@
@@ -23,24 +23,25 @@
- +
  • - {{ session.number }} {{ session.name }} on {{ session.host }} + {{ sessionSelection.number }} {{ sessionSelection.name }} on + {{ sessionSelection.host }}
    @@ -67,6 +68,7 @@ export default { default: () => {} } }, + emits: ['session-selected'], data() { return { topics: [], diff --git a/src/venues/components/ActiveVenueSelectorComponent.vue b/src/venues/components/ActiveVenueSelectorComponent.vue index 79324a8c..9cbee758 100644 --- a/src/venues/components/ActiveVenueSelectorComponent.vue +++ b/src/venues/components/ActiveVenueSelectorComponent.vue @@ -14,9 +14,12 @@ import VenueComponent from './VenueComponent.vue'; export default { + components: { + VenueComponent + }, inject: ['venueService'], props: { - venue: { + selectedVenue: { type: Object, required: false, default: () => { @@ -24,9 +27,7 @@ export default { } } }, - components: { - VenueComponent - }, + emits: ['venue-selected'], data() { return { venues: [], @@ -51,7 +52,7 @@ export default { } }, isSelected(venue) { - return this.venue === venue; + return this.selectedVenue === venue; }, selectVenue(venue) { this.$emit('venue-selected', venue); diff --git a/src/venues/components/HistoricalSessionSelectorComponent.vue b/src/venues/components/HistoricalSessionSelectorComponent.vue index ffe2cccd..3f17e5a3 100644 --- a/src/venues/components/HistoricalSessionSelectorComponent.vue +++ b/src/venues/components/HistoricalSessionSelectorComponent.vue @@ -20,14 +20,14 @@ Downlink Stream Id - - - - - - - - + + + + + + + + @@ -62,6 +62,7 @@ export default { required: true } }, + emits: ['session-selected'], data() { return { sessions: [], @@ -90,10 +91,10 @@ export default { select(session) { if (this.isSelected(session)) { this.currentSelection = undefined; - this.$emit('sessionSelected', undefined); + this.$emit('session-selected', undefined); } else { this.currentSelection = session; - this.$emit('sessionSelected', session); + this.$emit('session-selected', session); } }, getSessionKey(session) { diff --git a/src/venues/components/VenueComponent.vue b/src/venues/components/VenueComponent.vue index cf297671..0872d3db 100644 --- a/src/venues/components/VenueComponent.vue +++ b/src/venues/components/VenueComponent.vue @@ -6,8 +6,8 @@ 'is-selected': isSelected, 'is-active': isActive }" - @click="selectVenue(venue)" :disabled="!isActive" + @click="selectVenue(venue)" > {{ name }} @@ -25,6 +25,7 @@ export default { required: true } }, + emits: ['venue-selected'], data() { return { name: '', diff --git a/src/venues/components/VenueDialogComponent.vue b/src/venues/components/VenueDialogComponent.vue index 5bfdcf71..af2555b6 100644 --- a/src/venues/components/VenueDialogComponent.vue +++ b/src/venues/components/VenueDialogComponent.vue @@ -79,7 +79,7 @@
    -
    @@ -99,15 +99,14 @@ export default { HistoricalSessionSelectorComponent }, inject: ['venueService'], - watch: { - isActiveVenueSelect(newVal) { - this.selectedSession = null; - if (!newVal) { - this.fetchAndSetUrlsForHistoricalSessions(); - } else { - this.urlsForHistoricalSessions = []; - } - } + emits: ['submit'], + data() { + return { + isActiveVenueSelect: true, + selectedVenue: null, + selectedSession: null, + urlsForHistoricalSessions: [] + }; }, computed: { isSelectedVenue() { @@ -122,13 +121,15 @@ export default { : Boolean(this.selectedSession); } }, - data() { - return { - isActiveVenueSelect: true, - selectedVenue: null, - selectedSession: null, - urlsForHistoricalSessions: [] - }; + watch: { + isActiveVenueSelect(newVal) { + this.selectedSession = null; + if (!newVal) { + this.fetchAndSetUrlsForHistoricalSessions(); + } else { + this.urlsForHistoricalSessions = []; + } + } }, methods: { selectVenue(venue) {