mirror of
https://github.com/nasa/openmct.git
synced 2025-03-03 04:49:43 +00:00
Merge branch 'master' into iso-date-format
Merg'n master
This commit is contained in:
commit
2fa8a8d61d
@ -11,12 +11,12 @@ jobs:
|
|||||||
name: Update npm
|
name: Update npm
|
||||||
command: 'sudo npm install -g npm@latest'
|
command: 'sudo npm install -g npm@latest'
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
key: dependency-cache-13-{{ checksum "package.json" }}
|
key: dependency-cache-{{ checksum "package.json" }}
|
||||||
- run:
|
- run:
|
||||||
name: Installing dependencies (npm install)
|
name: Installing dependencies (npm install)
|
||||||
command: npm install
|
command: npm install
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: dependency-cache-13-{{ checksum "package.json" }}
|
key: dependency-cache-{{ checksum "package.json" }}
|
||||||
paths:
|
paths:
|
||||||
- node_modules
|
- node_modules
|
||||||
- run:
|
- run:
|
||||||
|
50
.eslintrc.js
50
.eslintrc.js
@ -120,6 +120,38 @@ module.exports = {
|
|||||||
"no-useless-computed-key": "error",
|
"no-useless-computed-key": "error",
|
||||||
// https://eslint.org/docs/rules/rest-spread-spacing
|
// https://eslint.org/docs/rules/rest-spread-spacing
|
||||||
"rest-spread-spacing": ["error"],
|
"rest-spread-spacing": ["error"],
|
||||||
|
// https://eslint.org/docs/rules/no-var
|
||||||
|
"no-var": "error",
|
||||||
|
// https://eslint.org/docs/rules/one-var
|
||||||
|
"one-var": ["error", "never"],
|
||||||
|
// https://eslint.org/docs/rules/default-case-last
|
||||||
|
"default-case-last": "error",
|
||||||
|
// https://eslint.org/docs/rules/default-param-last
|
||||||
|
"default-param-last": "error",
|
||||||
|
// https://eslint.org/docs/rules/grouped-accessor-pairs
|
||||||
|
"grouped-accessor-pairs": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-constructor-return
|
||||||
|
"no-constructor-return": "error",
|
||||||
|
// https://eslint.org/docs/rules/array-callback-return
|
||||||
|
"array-callback-return": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-invalid-this
|
||||||
|
"no-invalid-this": "error", // Believe this one actually surfaces some bugs
|
||||||
|
// https://eslint.org/docs/rules/func-style
|
||||||
|
"func-style": ["error", "declaration"],
|
||||||
|
// https://eslint.org/docs/rules/no-unused-expressions
|
||||||
|
"no-unused-expressions": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-useless-concat
|
||||||
|
"no-useless-concat": "error",
|
||||||
|
// https://eslint.org/docs/rules/radix
|
||||||
|
"radix": "error",
|
||||||
|
// https://eslint.org/docs/rules/require-await
|
||||||
|
"require-await": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-alert
|
||||||
|
"no-alert": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-useless-constructor
|
||||||
|
"no-useless-constructor": "error",
|
||||||
|
// https://eslint.org/docs/rules/no-duplicate-imports
|
||||||
|
"no-duplicate-imports": "error",
|
||||||
|
|
||||||
// https://eslint.org/docs/rules/no-implicit-coercion
|
// https://eslint.org/docs/rules/no-implicit-coercion
|
||||||
"no-implicit-coercion": "error",
|
"no-implicit-coercion": "error",
|
||||||
@ -204,28 +236,24 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
"vue/multiline-html-element-content-newline": "off",
|
"vue/multiline-html-element-content-newline": "off",
|
||||||
"vue/singleline-html-element-content-newline": "off"
|
"vue/singleline-html-element-content-newline": "off",
|
||||||
|
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": ["*Spec.js"],
|
"files": LEGACY_FILES,
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-unused-vars": [
|
"no-unused-vars": [
|
||||||
"warn",
|
"warn",
|
||||||
{
|
{
|
||||||
"vars": "all",
|
"vars": "all",
|
||||||
"args": "none",
|
"args": "none",
|
||||||
"varsIgnorePattern": "controller",
|
"varsIgnorePattern": "controller"
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
}
|
|
||||||
}, {
|
|
||||||
"files": LEGACY_FILES,
|
|
||||||
"rules": {
|
|
||||||
// https://eslint.org/docs/rules/no-nested-ternary
|
|
||||||
"no-nested-ternary": "off",
|
"no-nested-ternary": "off",
|
||||||
"no-var": "off"
|
"no-var": "off",
|
||||||
|
"one-var": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/EventTelemetryProvider"
|
"./src/EventTelemetryProvider"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module defining EventTelemetry.
|
* Module defining EventTelemetry.
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define,Promise*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module defining EventTelemetryProvider. Created by chacskaylo on 06/18/2015.
|
* Module defining EventTelemetryProvider. Created by chacskaylo on 06/18/2015.
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([], function () {
|
define([], function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'./ExportTelemetryAsCSVAction'
|
'./ExportTelemetryAsCSVAction'
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ExampleFormController"
|
"./src/ExampleFormController"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define,window*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
@ -80,7 +79,7 @@ define(
|
|||||||
control: "button",
|
control: "button",
|
||||||
csslass: "icon-save",
|
csslass: "icon-save",
|
||||||
click: function () {
|
click: function () {
|
||||||
window.alert("Save");
|
console.log("Save");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -88,7 +87,7 @@ define(
|
|||||||
csslass: "icon-x",
|
csslass: "icon-x",
|
||||||
description: "Button B",
|
description: "Button B",
|
||||||
click: function () {
|
click: function () {
|
||||||
window.alert("Cancel");
|
console.log("Cancel");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -97,7 +96,7 @@ define(
|
|||||||
description: "Button C",
|
description: "Button C",
|
||||||
disabled: true,
|
disabled: true,
|
||||||
click: function () {
|
click: function () {
|
||||||
window.alert("Delete");
|
console.log("Delete");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -117,7 +117,7 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
|
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
|
||||||
return METADATA_BY_TYPE.hasOwnProperty(domainObject.type);
|
return Object.prototype.hasOwnProperty.call(METADATA_BY_TYPE, domainObject.type);
|
||||||
};
|
};
|
||||||
|
|
||||||
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
|
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
|
||||||
|
@ -62,15 +62,15 @@ define([
|
|||||||
var workerRequest = {};
|
var workerRequest = {};
|
||||||
|
|
||||||
props.forEach(function (prop) {
|
props.forEach(function (prop) {
|
||||||
if (domainObject.telemetry && domainObject.telemetry.hasOwnProperty(prop)) {
|
if (domainObject.telemetry && Object.prototype.hasOwnProperty.call(domainObject.telemetry, prop)) {
|
||||||
workerRequest[prop] = domainObject.telemetry[prop];
|
workerRequest[prop] = domainObject.telemetry[prop];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request && request.hasOwnProperty(prop)) {
|
if (request && Object.prototype.hasOwnProperty.call(request, prop)) {
|
||||||
workerRequest[prop] = request[prop];
|
workerRequest[prop] = request[prop];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!workerRequest.hasOwnProperty(prop)) {
|
if (!Object.prototype.hasOwnProperty.call(workerRequest, prop)) {
|
||||||
workerRequest[prop] = REQUEST_DEFAULTS[prop];
|
workerRequest[prop] = REQUEST_DEFAULTS[prop];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
|
|
||||||
|
@ -72,6 +72,7 @@ define([
|
|||||||
});
|
});
|
||||||
var messageId;
|
var messageId;
|
||||||
|
|
||||||
|
let self = this;
|
||||||
function callback(message) {
|
function callback(message) {
|
||||||
if (message.error) {
|
if (message.error) {
|
||||||
deferred.reject(message.error);
|
deferred.reject(message.error);
|
||||||
@ -79,7 +80,8 @@ define([
|
|||||||
deferred.resolve(message.data);
|
deferred.resolve(message.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete this.callbacks[messageId];
|
delete self.callbacks[messageId];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
messageId = this.dispatch('request', request, callback.bind(this));
|
messageId = this.dispatch('request', request, callback.bind(this));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -20,8 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global self*/
|
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|
||||||
var FIFTEEN_MINUTES = 15 * 60 * 1000;
|
var FIFTEEN_MINUTES = 15 * 60 * 1000;
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./GeneratorProvider",
|
"./GeneratorProvider",
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ExampleIdentityService"
|
"./src/ExampleIdentityService"
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
function () {
|
function () {
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([], function () {
|
define([], function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/RemsTelemetryServerAdapter",
|
"./src/RemsTelemetryServerAdapter",
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
function () {
|
function () {
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define */
|
|
||||||
define (
|
define (
|
||||||
['./RemsTelemetrySeries'],
|
['./RemsTelemetrySeries'],
|
||||||
function (RemsTelemetrySeries) {
|
function (RemsTelemetrySeries) {
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define */
|
|
||||||
define(
|
define(
|
||||||
function () {
|
function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
/*jslint es5: true */
|
/*jslint es5: true */
|
||||||
|
|
||||||
define(
|
define(
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/DialogLaunchController",
|
"./src/DialogLaunchController",
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define,window*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define,window*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/BrowserPersistenceProvider"
|
"./src/BrowserPersistenceProvider"
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stubbed implementation of a persistence provider,
|
* Stubbed implementation of a persistence provider,
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ExamplePolicy"
|
"./src/ExamplePolicy"
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/WatchIndicator",
|
"./src/WatchIndicator",
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/ScratchPersistenceProvider"
|
"./src/ScratchPersistenceProvider"
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global define,window*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
function () {
|
function () {
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
3
indexTest.js
Normal file
3
indexTest.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const testsContext = require.context('.', true, /\/(src|platform)\/.*Spec.js$/);
|
||||||
|
|
||||||
|
testsContext.keys().forEach(testsContext);
|
@ -52,12 +52,16 @@ module.exports = (config) => {
|
|||||||
basePath: '',
|
basePath: '',
|
||||||
frameworks: ['jasmine'],
|
frameworks: ['jasmine'],
|
||||||
files: [
|
files: [
|
||||||
'platform/**/*Spec.js',
|
'indexTest.js'
|
||||||
'src/**/*Spec.js'
|
|
||||||
],
|
],
|
||||||
port: 9876,
|
port: 9876,
|
||||||
reporters: reporters,
|
reporters: reporters,
|
||||||
browsers: browsers,
|
browsers: browsers,
|
||||||
|
client: {
|
||||||
|
jasmine: {
|
||||||
|
random: false
|
||||||
|
}
|
||||||
|
},
|
||||||
customLaunchers: {
|
customLaunchers: {
|
||||||
ChromeDebugging: {
|
ChromeDebugging: {
|
||||||
base: 'Chrome',
|
base: 'Chrome',
|
||||||
@ -82,20 +86,20 @@ module.exports = (config) => {
|
|||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
reports: ['html', 'lcovonly', 'text-summary'],
|
||||||
thresholds: {
|
thresholds: {
|
||||||
global: {
|
global: {
|
||||||
lines: 62
|
lines: 64
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
'platform/**/*Spec.js': ['webpack', 'sourcemap'],
|
'indexTest.js': ['webpack', 'sourcemap']
|
||||||
'src/**/*Spec.js': ['webpack', 'sourcemap']
|
|
||||||
},
|
},
|
||||||
webpack: webpackConfig,
|
webpack: webpackConfig,
|
||||||
webpackMiddleware: {
|
webpackMiddleware: {
|
||||||
stats: 'errors-only',
|
stats: 'errors-only',
|
||||||
logLevel: 'warn'
|
logLevel: 'warn'
|
||||||
},
|
},
|
||||||
|
concurrency: 1,
|
||||||
singleRun: true,
|
singleRun: true,
|
||||||
browserNoActivityTimeout: 90000
|
browserNoActivityTimeout: 90000
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
@ -32,6 +32,6 @@ if (document.currentScript) {
|
|||||||
|
|
||||||
const MCT = require('./src/MCT');
|
const MCT = require('./src/MCT');
|
||||||
|
|
||||||
var openmct = new MCT();
|
const openmct = new MCT();
|
||||||
|
|
||||||
module.exports = openmct;
|
module.exports = openmct;
|
||||||
|
28
package.json
28
package.json
@ -6,7 +6,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"angular": ">=1.8.0",
|
"angular": ">=1.8.0",
|
||||||
"angular-route": "1.4.14",
|
"angular-route": "1.4.14",
|
||||||
"babel-eslint": "8.2.6",
|
"babel-eslint": "10.0.3",
|
||||||
"comma-separated-values": "^3.6.4",
|
"comma-separated-values": "^3.6.4",
|
||||||
"concurrently": "^3.6.1",
|
"concurrently": "^3.6.1",
|
||||||
"copy-webpack-plugin": "^4.5.2",
|
"copy-webpack-plugin": "^4.5.2",
|
||||||
@ -22,7 +22,7 @@
|
|||||||
"d3-selection": "1.3.x",
|
"d3-selection": "1.3.x",
|
||||||
"d3-time": "1.0.x",
|
"d3-time": "1.0.x",
|
||||||
"d3-time-format": "2.1.x",
|
"d3-time-format": "2.1.x",
|
||||||
"eslint": "5.2.0",
|
"eslint": "7.0.0",
|
||||||
"eslint-plugin-vue": "^6.0.0",
|
"eslint-plugin-vue": "^6.0.0",
|
||||||
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
|
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
|
||||||
"eventemitter3": "^1.2.0",
|
"eventemitter3": "^1.2.0",
|
||||||
@ -39,27 +39,27 @@
|
|||||||
"istanbul-instrumenter-loader": "^3.0.1",
|
"istanbul-instrumenter-loader": "^3.0.1",
|
||||||
"jasmine-core": "^3.1.0",
|
"jasmine-core": "^3.1.0",
|
||||||
"jsdoc": "^3.3.2",
|
"jsdoc": "^3.3.2",
|
||||||
"karma": "^2.0.3",
|
"karma": "5.1.1",
|
||||||
"karma-chrome-launcher": "^2.2.0",
|
"karma-chrome-launcher": "3.1.0",
|
||||||
"karma-firefox-launcher": "^1.3.0",
|
"karma-firefox-launcher": "1.3.0",
|
||||||
"karma-cli": "^1.0.1",
|
"karma-cli": "2.0.0",
|
||||||
"karma-coverage": "^1.1.2",
|
"karma-coverage": "2.0.3",
|
||||||
"karma-coverage-istanbul-reporter": "^2.1.1",
|
"karma-coverage-istanbul-reporter": "3.0.3",
|
||||||
"karma-html-reporter": "^0.2.7",
|
"karma-html-reporter": "0.2.7",
|
||||||
"karma-jasmine": "^1.1.2",
|
"karma-jasmine": "3.3.1",
|
||||||
"karma-sourcemap-loader": "^0.3.7",
|
"karma-sourcemap-loader": "0.3.7",
|
||||||
"karma-webpack": "^3.0.0",
|
"karma-webpack": "4.0.2",
|
||||||
"location-bar": "^3.0.1",
|
"location-bar": "^3.0.1",
|
||||||
"lodash": "^4.17.12",
|
"lodash": "^4.17.12",
|
||||||
"markdown-toc": "^0.11.7",
|
"markdown-toc": "^0.11.7",
|
||||||
"marked": "^0.3.5",
|
"marked": "^0.3.5",
|
||||||
"mini-css-extract-plugin": "^0.4.1",
|
"mini-css-extract-plugin": "^0.4.1",
|
||||||
"minimist": "^1.1.1",
|
"minimist": "^1.2.5",
|
||||||
"moment": "2.25.3",
|
"moment": "2.25.3",
|
||||||
"moment-duration-format": "^2.2.2",
|
"moment-duration-format": "^2.2.2",
|
||||||
"moment-timezone": "0.5.28",
|
"moment-timezone": "0.5.28",
|
||||||
"node-bourbon": "^4.2.3",
|
"node-bourbon": "^4.2.3",
|
||||||
"node-sass": "^4.9.2",
|
"node-sass": "^4.14.1",
|
||||||
"painterro": "^1.0.35",
|
"painterro": "^1.0.35",
|
||||||
"printj": "^1.2.1",
|
"printj": "^1.2.1",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
|
@ -25,9 +25,9 @@ define(
|
|||||||
function (AboutController) {
|
function (AboutController) {
|
||||||
|
|
||||||
describe("The About controller", function () {
|
describe("The About controller", function () {
|
||||||
var testVersions,
|
let testVersions;
|
||||||
mockWindow,
|
let mockWindow;
|
||||||
controller;
|
let controller;
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
testVersions = [
|
testVersions = [
|
||||||
@ -56,7 +56,6 @@ define(
|
|||||||
controller.openLicenses();
|
controller.openLicenses();
|
||||||
expect(mockWindow.open).toHaveBeenCalledWith("#/licenses");
|
expect(mockWindow.open).toHaveBeenCalledWith("#/licenses");
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ function (
|
|||||||
}
|
}
|
||||||
|
|
||||||
function saveAfterClone(clonedObject) {
|
function saveAfterClone(clonedObject) {
|
||||||
return this.openmct.editor.save().then(() => {
|
return self.openmct.editor.save().then(() => {
|
||||||
// Force mutation for search indexing
|
// Force mutation for search indexing
|
||||||
return clonedObject;
|
return clonedObject;
|
||||||
});
|
});
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
['./TransactionalPersistenceCapability'],
|
['./TransactionalPersistenceCapability'],
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
[],
|
||||||
|
@ -56,10 +56,11 @@ define(
|
|||||||
*/
|
*/
|
||||||
CreateWizard.prototype.getFormStructure = function (includeLocation) {
|
CreateWizard.prototype.getFormStructure = function (includeLocation) {
|
||||||
var sections = [],
|
var sections = [],
|
||||||
domainObject = this.domainObject;
|
domainObject = this.domainObject,
|
||||||
|
self = this;
|
||||||
|
|
||||||
function validateLocation(parent) {
|
function validateLocation(parent) {
|
||||||
return parent && this.openmct.composition.checkPolicy(parent.useCapability('adapter'), domainObject.useCapability('adapter'));
|
return parent && self.openmct.composition.checkPolicy(parent.useCapability('adapter'), domainObject.useCapability('adapter'));
|
||||||
}
|
}
|
||||||
|
|
||||||
sections.push({
|
sections.push({
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
define(
|
define(
|
||||||
['./Transaction', './NestedTransaction'],
|
['./Transaction', './NestedTransaction'],
|
||||||
function (Transaction, NestedTransaction) {
|
function (Transaction, NestedTransaction) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global describe,it,expect,beforeEach,jasmine*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
["../../src/actions/SaveAction"],
|
["../../src/actions/SaveAction"],
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global describe,it,expect,beforeEach,jasmine*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
["../../src/actions/SaveAndStopEditingAction"],
|
["../../src/actions/SaveAndStopEditingAction"],
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global describe,it,expect,beforeEach,jasmine,spyOn*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
["../../src/actions/SaveAsAction"],
|
["../../src/actions/SaveAsAction"],
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define,describe,it,expect,beforeEach,jasmine*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global describe,it,expect,beforeEach,jasmine*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
["../../src/controllers/EditActionController"],
|
["../../src/controllers/EditActionController"],
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define,describe,it,expect,beforeEach,jasmine*/
|
|
||||||
|
|
||||||
define(["../../src/services/NestedTransaction"], function (NestedTransaction) {
|
define(["../../src/services/NestedTransaction"], function (NestedTransaction) {
|
||||||
var TRANSACTION_METHODS = ['add', 'commit', 'cancel', 'size'];
|
var TRANSACTION_METHODS = ['add', 'commit', 'cancel', 'size'];
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define,describe,it,expect,beforeEach,jasmine*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
["../../src/services/TransactionManager"],
|
["../../src/services/TransactionManager"],
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define,describe,it,expect,beforeEach,jasmine*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
["../../src/services/TransactionService"],
|
["../../src/services/TransactionService"],
|
||||||
@ -28,6 +27,7 @@ define(
|
|||||||
describe("The Transaction Service", function () {
|
describe("The Transaction Service", function () {
|
||||||
var mockQ,
|
var mockQ,
|
||||||
mockLog,
|
mockLog,
|
||||||
|
mockCacheService,
|
||||||
transactionService;
|
transactionService;
|
||||||
|
|
||||||
function fastPromise(val) {
|
function fastPromise(val) {
|
||||||
@ -40,9 +40,10 @@ define(
|
|||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
mockQ = jasmine.createSpyObj("$q", ["all"]);
|
mockQ = jasmine.createSpyObj("$q", ["all"]);
|
||||||
|
mockCacheService = jasmine.createSpyObj("cacheService", ["flush"]);
|
||||||
mockQ.all.and.returnValue(fastPromise());
|
mockQ.all.and.returnValue(fastPromise());
|
||||||
mockLog = jasmine.createSpyObj("$log", ["error"]);
|
mockLog = jasmine.createSpyObj("$log", ["error"]);
|
||||||
transactionService = new TransactionService(mockQ, mockLog);
|
transactionService = new TransactionService(mockQ, mockLog, mockCacheService);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("isActive returns true if a transaction is in progress", function () {
|
it("isActive returns true if a transaction is in progress", function () {
|
||||||
@ -85,18 +86,21 @@ define(
|
|||||||
|
|
||||||
it("commit calls all queued commit functions", function () {
|
it("commit calls all queued commit functions", function () {
|
||||||
expect(transactionService.size()).toBe(3);
|
expect(transactionService.size()).toBe(3);
|
||||||
transactionService.commit();
|
|
||||||
|
return transactionService.commit().then(() => {
|
||||||
onCommits.forEach(function (spy) {
|
onCommits.forEach(function (spy) {
|
||||||
expect(spy).toHaveBeenCalled();
|
expect(spy).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it("commit resets active state and clears queues", function () {
|
it("commit resets active state and clears queues", function () {
|
||||||
transactionService.commit();
|
return transactionService.commit().then(() => {
|
||||||
expect(transactionService.isActive()).toBe(false);
|
expect(transactionService.isActive()).toBe(false);
|
||||||
expect(transactionService.size()).toBe(0);
|
expect(transactionService.size()).toBe(0);
|
||||||
expect(transactionService.size()).toBe(0);
|
expect(transactionService.size()).toBe(0);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define,describe,it,expect,beforeEach,jasmine*/
|
|
||||||
|
|
||||||
define(
|
define(
|
||||||
["../../src/services/Transaction"],
|
["../../src/services/Transaction"],
|
||||||
|
@ -58,7 +58,8 @@ define(
|
|||||||
var removeSelectable = openmct.selection.selectable(
|
var removeSelectable = openmct.selection.selectable(
|
||||||
element[0],
|
element[0],
|
||||||
scope.$eval(attrs.mctSelectable),
|
scope.$eval(attrs.mctSelectable),
|
||||||
attrs.hasOwnProperty('mctInitSelect') && scope.$eval(attrs.mctInitSelect) !== false
|
Object.prototype.hasOwnProperty.call(attrs, 'mctInitSelect')
|
||||||
|
&& scope.$eval(attrs.mctInitSelect) !== false
|
||||||
);
|
);
|
||||||
|
|
||||||
scope.$on("$destroy", function () {
|
scope.$on("$destroy", function () {
|
||||||
|
@ -76,7 +76,7 @@ define(
|
|||||||
var search = this.$location.search(),
|
var search = this.$location.search(),
|
||||||
arr = [];
|
arr = [];
|
||||||
for (var key in search) {
|
for (var key in search) {
|
||||||
if (search.hasOwnProperty(key)) {
|
if (Object.prototype.hasOwnProperty.call(search, key)) {
|
||||||
arr.push(key + '=' + search[key]);
|
arr.push(key + '=' + search[key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/* global console*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'../../src/directives/MCTTree',
|
'../../src/directives/MCTTree',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global describe,beforeEach,jasmine,it,expect*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'../../src/ui/TreeView',
|
'../../src/ui/TreeView',
|
||||||
|
@ -27,7 +27,7 @@ export default class NotificationService {
|
|||||||
if (typeof message === 'string') {
|
if (typeof message === 'string') {
|
||||||
return this.openmct.notifications.info(message);
|
return this.openmct.notifications.info(message);
|
||||||
} else {
|
} else {
|
||||||
if (message.hasOwnProperty('progress')) {
|
if (Object.prototype.hasOwnProperty.call(message, 'progress')) {
|
||||||
return this.openmct.notifications.progress(message.title, message.progress, message.progressText);
|
return this.openmct.notifications.progress(message.title, message.progress, message.progressText);
|
||||||
} else {
|
} else {
|
||||||
return this.openmct.notifications.info(message.title);
|
return this.openmct.notifications.info(message.title);
|
||||||
|
@ -56,7 +56,7 @@ define([], function () {
|
|||||||
* @returns {boolean} true if present; false if not
|
* @returns {boolean} true if present; false if not
|
||||||
*/
|
*/
|
||||||
ModelCacheService.prototype.has = function (id) {
|
ModelCacheService.prototype.has = function (id) {
|
||||||
return this.cache.hasOwnProperty(id);
|
return Object.prototype.hasOwnProperty.call(this.cache, id);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([], function () {
|
define([], function () {
|
||||||
|
|
||||||
|
@ -75,13 +75,13 @@ define(
|
|||||||
function mergeObjects(a, b) {
|
function mergeObjects(a, b) {
|
||||||
var result = {};
|
var result = {};
|
||||||
Object.keys(a).forEach(function (k) {
|
Object.keys(a).forEach(function (k) {
|
||||||
result[k] = b.hasOwnProperty(k)
|
result[k] = Object.prototype.hasOwnProperty.call(b, k)
|
||||||
? mergeModels(a[k], b[k], (merger || {})[k])
|
? mergeModels(a[k], b[k], (merger || {})[k])
|
||||||
: a[k];
|
: a[k];
|
||||||
});
|
});
|
||||||
Object.keys(b).forEach(function (k) {
|
Object.keys(b).forEach(function (k) {
|
||||||
// Copy any properties not already merged
|
// Copy any properties not already merged
|
||||||
if (!a.hasOwnProperty(k)) {
|
if (!Object.prototype.hasOwnProperty.call(a, k)) {
|
||||||
result[k] = b[k];
|
result[k] = b[k];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global spyOn*/
|
|
||||||
define(
|
define(
|
||||||
function () {
|
function () {
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -20,7 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global jasmine*/
|
|
||||||
define(
|
define(
|
||||||
function () {
|
function () {
|
||||||
|
|
||||||
@ -110,7 +109,7 @@ define(
|
|||||||
* @returns {*} capability object
|
* @returns {*} capability object
|
||||||
*/
|
*/
|
||||||
domainObject.getCapability.and.callFake(function (capability) {
|
domainObject.getCapability.and.callFake(function (capability) {
|
||||||
if (config.capabilities.hasOwnProperty(capability)) {
|
if (Object.prototype.hasOwnProperty.call(config.capabilities, capability)) {
|
||||||
return config.capabilities[capability];
|
return config.capabilities[capability];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -124,7 +123,7 @@ define(
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
domainObject.hasCapability.and.callFake(function (capability) {
|
domainObject.hasCapability.and.callFake(function (capability) {
|
||||||
return config.capabilities.hasOwnProperty(capability);
|
return Object.prototype.hasOwnProperty.call(config.capabilities, capability);
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -137,7 +136,7 @@ define(
|
|||||||
* @returns {*} result whatever was returned by `invoke`.
|
* @returns {*} result whatever was returned by `invoke`.
|
||||||
*/
|
*/
|
||||||
domainObject.useCapability.and.callFake(function (capability) {
|
domainObject.useCapability.and.callFake(function (capability) {
|
||||||
if (config.capabilities.hasOwnProperty(capability)) {
|
if (Object.prototype.hasOwnProperty.call(config.capabilities, capability)) {
|
||||||
if (!config.capabilities[capability].invoke) {
|
if (!config.capabilities[capability].invoke) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
capability + ' missing invoke function.'
|
capability + ' missing invoke function.'
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global jasmine*/
|
|
||||||
define(
|
define(
|
||||||
function () {
|
function () {
|
||||||
|
|
||||||
@ -60,7 +59,7 @@ define(
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
mockCopyService.perform.and.callFake(function () {
|
mockCopyService.perform.and.callFake(() => {
|
||||||
var performPromise,
|
var performPromise,
|
||||||
callExtensions,
|
callExtensions,
|
||||||
spy;
|
spy;
|
||||||
@ -79,7 +78,7 @@ define(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
spy = this.perform;
|
spy = mockCopyService.perform;
|
||||||
|
|
||||||
Object.keys(callExtensions).forEach(function (key) {
|
Object.keys(callExtensions).forEach(function (key) {
|
||||||
spy.calls.mostRecent()[key] = callExtensions[key];
|
spy.calls.mostRecent()[key] = callExtensions[key];
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global jasmine*/
|
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'../ControlledPromise'
|
'../ControlledPromise'
|
||||||
@ -63,11 +62,11 @@ define(
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
mockLinkService.perform.and.callFake(function (object) {
|
mockLinkService.perform.and.callFake(object => {
|
||||||
var performPromise = new ControlledPromise();
|
var performPromise = new ControlledPromise();
|
||||||
|
|
||||||
this.perform.calls.mostRecent().promise = performPromise;
|
mockLinkService.perform.calls.mostRecent().promise = performPromise;
|
||||||
this.perform.calls.all()[this.perform.calls.count() - 1].promise =
|
mockLinkService.perform.calls.all()[mockLinkService.perform.calls.count() - 1].promise =
|
||||||
performPromise;
|
performPromise;
|
||||||
|
|
||||||
return performPromise.then(function (overrideObject) {
|
return performPromise.then(function (overrideObject) {
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global jasmine*/
|
|
||||||
define(
|
define(
|
||||||
function () {
|
function () {
|
||||||
|
|
||||||
@ -60,7 +59,7 @@ define(
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
mockMoveService.perform.and.callFake(function () {
|
mockMoveService.perform.and.callFake(() => {
|
||||||
var performPromise,
|
var performPromise,
|
||||||
callExtensions,
|
callExtensions,
|
||||||
spy;
|
spy;
|
||||||
@ -79,7 +78,7 @@ define(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
spy = this.perform;
|
spy = mockMoveService.perform;
|
||||||
|
|
||||||
Object.keys(callExtensions).forEach(function (key) {
|
Object.keys(callExtensions).forEach(function (key) {
|
||||||
spy.calls.mostRecent()[key] = callExtensions[key];
|
spy.calls.mostRecent()[key] = callExtensions[key];
|
||||||
|
@ -47,6 +47,7 @@ define(["zepto"], function ($) {
|
|||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
input.trigger("click");
|
input.trigger("click");
|
||||||
input.on('change', function (event) {
|
input.on('change', function (event) {
|
||||||
|
// eslint-disable-next-line no-invalid-this
|
||||||
file = this.files[0];
|
file = this.files[0];
|
||||||
input.remove();
|
input.remove();
|
||||||
if (file) {
|
if (file) {
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global window*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'./Constants',
|
'./Constants',
|
||||||
'./FrameworkInitializer',
|
'./FrameworkInitializer',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -20,8 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global window*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements the framework layer, which handles the loading of bundles
|
* Implements the framework layer, which handles the loading of bundles
|
||||||
* and the wiring-together of the extensions they expose.
|
* and the wiring-together of the extensions they expose.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
/* eslint-disable no-invalid-this */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module defining CustomRegistrars. Created by vwoeltje on 11/3/14.
|
* Module defining CustomRegistrars. Created by vwoeltje on 11/3/14.
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
"./src/actions/ExportAsJSONAction",
|
"./src/actions/ExportAsJSONAction",
|
||||||
|
@ -86,7 +86,7 @@ define(['lodash'], function (_) {
|
|||||||
// Only export if object is creatable
|
// Only export if object is creatable
|
||||||
if (this.isCreatable(child)) {
|
if (this.isCreatable(child)) {
|
||||||
// Prevents infinite export of self-contained objs
|
// Prevents infinite export of self-contained objs
|
||||||
if (!this.tree.hasOwnProperty(this.getId(child))) {
|
if (!Object.prototype.hasOwnProperty.call(this.tree, this.getId(child))) {
|
||||||
// If object is a link to something absent from
|
// If object is a link to something absent from
|
||||||
// tree, generate new id and treat as new object
|
// tree, generate new id and treat as new object
|
||||||
if (this.isExternal(child, parent)) {
|
if (this.isExternal(child, parent)) {
|
||||||
|
@ -144,7 +144,7 @@ define(
|
|||||||
setTimeout(resolve, 100);
|
setTimeout(resolve, 100);
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
expect(Object.keys(action.tree).length).toBe(1);
|
expect(Object.keys(action.tree).length).toBe(1);
|
||||||
expect(action.tree.hasOwnProperty("parentId"))
|
expect(Object.prototype.hasOwnProperty.call(action.tree, "parentId"))
|
||||||
.toBeTruthy();
|
.toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -184,9 +184,9 @@ define(
|
|||||||
setTimeout(resolve, 100);
|
setTimeout(resolve, 100);
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
expect(Object.keys(action.tree).length).toBe(2);
|
expect(Object.keys(action.tree).length).toBe(2);
|
||||||
expect(action.tree.hasOwnProperty("infiniteParentId"))
|
expect(Object.prototype.hasOwnProperty.call(action.tree, "infiniteParentId"))
|
||||||
.toBeTruthy();
|
.toBeTruthy();
|
||||||
expect(action.tree.hasOwnProperty("infiniteChildId"))
|
expect(Object.prototype.hasOwnProperty.call(action.tree, "infiniteChildId"))
|
||||||
.toBeTruthy();
|
.toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -224,9 +224,9 @@ define(
|
|||||||
setTimeout(resolve, 100);
|
setTimeout(resolve, 100);
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
expect(Object.keys(action.tree).length).toBe(2);
|
expect(Object.keys(action.tree).length).toBe(2);
|
||||||
expect(action.tree.hasOwnProperty('parentId'))
|
expect(Object.prototype.hasOwnProperty.call(action.tree, "parentId"))
|
||||||
.toBeTruthy();
|
.toBeTruthy();
|
||||||
expect(action.tree.hasOwnProperty('brandNewId'))
|
expect(Object.prototype.hasOwnProperty.call(action.tree, "brandNewId"))
|
||||||
.toBeTruthy();
|
.toBeTruthy();
|
||||||
expect(action.tree.brandNewId.location).toBe('parentId');
|
expect(action.tree.brandNewId.location).toBe('parentId');
|
||||||
});
|
});
|
||||||
@ -239,8 +239,8 @@ define(
|
|||||||
setTimeout(resolve, 100);
|
setTimeout(resolve, 100);
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
expect(Object.keys(exportedTree).length).toBe(2);
|
expect(Object.keys(exportedTree).length).toBe(2);
|
||||||
expect(exportedTree.hasOwnProperty('openmct')).toBeTruthy();
|
expect(Object.prototype.hasOwnProperty.call(exportedTree, "openmct")).toBeTruthy();
|
||||||
expect(exportedTree.hasOwnProperty('rootId')).toBeTruthy();
|
expect(Object.prototype.hasOwnProperty.call(exportedTree, "rootId")).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -46,18 +46,26 @@ define([
|
|||||||
spyOn(provider, 'cleanTerm').and.returnValue('cleanedTerm');
|
spyOn(provider, 'cleanTerm').and.returnValue('cleanedTerm');
|
||||||
spyOn(provider, 'fuzzyMatchUnquotedTerms').and.returnValue('fuzzy');
|
spyOn(provider, 'fuzzyMatchUnquotedTerms').and.returnValue('fuzzy');
|
||||||
spyOn(provider, 'parseResponse').and.returnValue('parsedResponse');
|
spyOn(provider, 'parseResponse').and.returnValue('parsedResponse');
|
||||||
$http.and.returnValue(Promise.resolve({}));
|
$http.and.returnValue(Promise.resolve({
|
||||||
|
data: {
|
||||||
|
hits: {
|
||||||
|
hits: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('cleans terms and adds fuzzyness', function () {
|
it('cleans terms and adds fuzzyness', function () {
|
||||||
provider.query('hello', 10);
|
return provider.query('hello', 10)
|
||||||
|
.then(() => {
|
||||||
expect(provider.cleanTerm).toHaveBeenCalledWith('hello');
|
expect(provider.cleanTerm).toHaveBeenCalledWith('hello');
|
||||||
expect(provider.fuzzyMatchUnquotedTerms)
|
expect(provider.fuzzyMatchUnquotedTerms)
|
||||||
.toHaveBeenCalledWith('cleanedTerm');
|
.toHaveBeenCalledWith('cleanedTerm');
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('calls through to $http', function () {
|
it('calls through to $http', function () {
|
||||||
provider.query('hello', 10);
|
return provider.query('hello', 10).then(() => {
|
||||||
expect($http).toHaveBeenCalledWith({
|
expect($http).toHaveBeenCalledWith({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: {
|
params: {
|
||||||
@ -67,6 +75,7 @@ define([
|
|||||||
url: 'http://localhost:9200/_search/'
|
url: 'http://localhost:9200/_search/'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('gracefully fails when http fails', function () {
|
it('gracefully fails when http fails', function () {
|
||||||
$http.and.returnValue(Promise.reject());
|
$http.and.returnValue(Promise.reject());
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global self*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module defining BareBonesSearchWorker. Created by deeptailor on 10/03/2019.
|
* Module defining BareBonesSearchWorker. Created by deeptailor on 10/03/2019.
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -19,7 +19,6 @@
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global setTimeout*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module defining GenericSearchProvider. Created by shale on 07/16/2015.
|
* Module defining GenericSearchProvider. Created by shale on 07/16/2015.
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global self*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module defining GenericSearchWorker. Created by shale on 07/21/2015.
|
* Module defining GenericSearchWorker. Created by shale on 07/21/2015.
|
||||||
*/
|
*/
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/*global require*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SearchSpec. Created by shale on 07/31/2015.
|
* SearchSpec. Created by shale on 07/31/2015.
|
||||||
*/
|
*/
|
||||||
|
@ -27,7 +27,7 @@ define([
|
|||||||
"../../src/services/SearchAggregator"
|
"../../src/services/SearchAggregator"
|
||||||
], function (SearchAggregator) {
|
], function (SearchAggregator) {
|
||||||
|
|
||||||
describe("SearchAggregator", function () {
|
xdescribe("SearchAggregator", function () {
|
||||||
var $q,
|
var $q,
|
||||||
objectService,
|
objectService,
|
||||||
providers,
|
providers,
|
||||||
@ -91,18 +91,19 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('filters results with a function', function () {
|
it('filters results with a function', function () {
|
||||||
var modelResults = {
|
const modelResults = {
|
||||||
hits: [
|
hits: [
|
||||||
{model: {thing: 1}},
|
{model: {thing: 1}},
|
||||||
{model: {thing: 2}},
|
{model: {thing: 2}},
|
||||||
{model: {thing: 3}}
|
{model: {thing: 3}}
|
||||||
],
|
],
|
||||||
total: 3
|
total: 3
|
||||||
},
|
};
|
||||||
filterFunc = function (model) {
|
let filtered = aggregator.applyFilter(modelResults, filterFunc);
|
||||||
|
|
||||||
|
function filterFunc(model) {
|
||||||
return model.thing < 2;
|
return model.thing < 2;
|
||||||
},
|
}
|
||||||
filtered = aggregator.applyFilter(modelResults, filterFunc);
|
|
||||||
|
|
||||||
expect(filtered.hits).toEqual([
|
expect(filtered.hits).toEqual([
|
||||||
{model: {thing: 1}}
|
{model: {thing: 1}}
|
||||||
|
@ -33,13 +33,10 @@ define(
|
|||||||
_
|
_
|
||||||
) {
|
) {
|
||||||
|
|
||||||
var ZERO = function () {
|
const EMPTY_SERIES = {
|
||||||
return 0;
|
getPointCount: () => 0,
|
||||||
},
|
getDomainValue: () => 0,
|
||||||
EMPTY_SERIES = {
|
getRangeValue: () => 0
|
||||||
getPointCount: ZERO,
|
|
||||||
getDomainValue: ZERO,
|
|
||||||
getRangeValue: ZERO
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,7 +28,7 @@ define(function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BundleRegistry.prototype.register = function (path, definition) {
|
BundleRegistry.prototype.register = function (path, definition) {
|
||||||
if (this.knownBundles.hasOwnProperty(path)) {
|
if (Object.prototype.hasOwnProperty.call(this.knownBundles, path)) {
|
||||||
throw new Error('Cannot register bundle with duplicate path', path);
|
throw new Error('Cannot register bundle with duplicate path', path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
define(['./BundleRegistry'], function (BundleRegistry) {
|
define(['./BundleRegistry'], function (BundleRegistry) {
|
||||||
|
|
||||||
describe("BundleRegistry", function () {
|
describe("BundleRegistry", function () {
|
||||||
var testPath,
|
let testPath;
|
||||||
bundleRegistry;
|
let bundleRegistry;
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
testPath = 'some/bundle';
|
testPath = 'some/bundle';
|
||||||
@ -46,7 +46,7 @@ define(['./BundleRegistry'], function (BundleRegistry) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("when a bundle has been registered", function () {
|
describe("when a bundle has been registered", function () {
|
||||||
var testBundleDef;
|
let testBundleDef;
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
testBundleDef = { someKey: "some value" };
|
testBundleDef = { someKey: "some value" };
|
||||||
@ -83,7 +83,6 @@ define(['./BundleRegistry'], function (BundleRegistry) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -292,7 +292,7 @@ define([
|
|||||||
let capabilityService = this.$injector.get('capabilityService');
|
let capabilityService = this.$injector.get('capabilityService');
|
||||||
|
|
||||||
function instantiate(model, keyString) {
|
function instantiate(model, keyString) {
|
||||||
var capabilities = capabilityService.getCapabilities(model, keyString);
|
const capabilities = capabilityService.getCapabilities(model, keyString);
|
||||||
model.id = keyString;
|
model.id = keyString;
|
||||||
|
|
||||||
return new DomainObjectImpl(keyString, model, capabilities);
|
return new DomainObjectImpl(keyString, model, capabilities);
|
||||||
@ -377,8 +377,8 @@ define([
|
|||||||
|
|
||||||
// TODO: remove with legacy types.
|
// TODO: remove with legacy types.
|
||||||
this.types.listKeys().forEach(function (typeKey) {
|
this.types.listKeys().forEach(function (typeKey) {
|
||||||
var type = this.types.get(typeKey);
|
const type = this.types.get(typeKey);
|
||||||
var legacyDefinition = type.toLegacyDefinition();
|
const legacyDefinition = type.toLegacyDefinition();
|
||||||
legacyDefinition.key = typeKey;
|
legacyDefinition.key = typeKey;
|
||||||
this.legacyExtension('types', legacyDefinition);
|
this.legacyExtension('types', legacyDefinition);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
@ -405,7 +405,7 @@ define([
|
|||||||
this.$injector.get('objectService');
|
this.$injector.get('objectService');
|
||||||
|
|
||||||
if (!isHeadlessMode) {
|
if (!isHeadlessMode) {
|
||||||
var appLayout = new Vue({
|
const appLayout = new Vue({
|
||||||
components: {
|
components: {
|
||||||
'Layout': Layout.default
|
'Layout': Layout.default
|
||||||
},
|
},
|
||||||
@ -444,6 +444,7 @@ define([
|
|||||||
|
|
||||||
MCT.prototype.destroy = function () {
|
MCT.prototype.destroy = function () {
|
||||||
this.emit('destroy');
|
this.emit('destroy');
|
||||||
|
this.router.destroy();
|
||||||
};
|
};
|
||||||
|
|
||||||
MCT.prototype.plugins = plugins;
|
MCT.prototype.plugins = plugins;
|
||||||
|
@ -26,15 +26,11 @@ define([
|
|||||||
'utils/testing'
|
'utils/testing'
|
||||||
], function (plugins, legacyRegistry, testUtils) {
|
], function (plugins, legacyRegistry, testUtils) {
|
||||||
describe("MCT", function () {
|
describe("MCT", function () {
|
||||||
var openmct;
|
let openmct;
|
||||||
var mockPlugin;
|
let mockPlugin;
|
||||||
var mockPlugin2;
|
let mockPlugin2;
|
||||||
var mockListener;
|
let mockListener;
|
||||||
var oldBundles;
|
let oldBundles;
|
||||||
|
|
||||||
beforeAll(() => {
|
|
||||||
testUtils.resetApplicationState();
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
mockPlugin = jasmine.createSpy('plugin');
|
mockPlugin = jasmine.createSpy('plugin');
|
||||||
@ -56,7 +52,8 @@ define([
|
|||||||
legacyRegistry.delete(bundle);
|
legacyRegistry.delete(bundle);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
testUtils.resetApplicationState(openmct);
|
|
||||||
|
return testUtils.resetApplicationState(openmct);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("exposes plugins", function () {
|
it("exposes plugins", function () {
|
||||||
@ -112,7 +109,7 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("setAssetPath", function () {
|
describe("setAssetPath", function () {
|
||||||
var testAssetPath;
|
let testAssetPath;
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
openmct.legacyExtension = jasmine.createSpy('legacyExtension');
|
openmct.legacyExtension = jasmine.createSpy('legacyExtension');
|
||||||
|
@ -29,15 +29,15 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
ActionDialogDecorator.prototype.getActions = function (context) {
|
ActionDialogDecorator.prototype.getActions = function (context) {
|
||||||
var mct = this.mct;
|
const mct = this.mct;
|
||||||
|
|
||||||
return this.actionService.getActions(context).map(function (action) {
|
return this.actionService.getActions(context).map(function (action) {
|
||||||
if (action.dialogService) {
|
if (action.dialogService) {
|
||||||
var domainObject = objectUtils.toNewFormat(
|
const domainObject = objectUtils.toNewFormat(
|
||||||
context.domainObject.getModel(),
|
context.domainObject.getModel(),
|
||||||
objectUtils.parseKeyString(context.domainObject.getId())
|
objectUtils.parseKeyString(context.domainObject.getId())
|
||||||
);
|
);
|
||||||
var providers = mct.propertyEditors.get(domainObject);
|
const providers = mct.propertyEditors.get(domainObject);
|
||||||
|
|
||||||
if (providers.length > 0) {
|
if (providers.length > 0) {
|
||||||
action.dialogService = Object.create(action.dialogService);
|
action.dialogService = Object.create(action.dialogService);
|
||||||
|
@ -43,7 +43,7 @@ define([
|
|||||||
model,
|
model,
|
||||||
id
|
id
|
||||||
) {
|
) {
|
||||||
var capabilities = this.capabilityService.getCapabilities(model, id);
|
const capabilities = this.capabilityService.getCapabilities(model, id);
|
||||||
if (capabilities.mutation) {
|
if (capabilities.mutation) {
|
||||||
capabilities.mutation =
|
capabilities.mutation =
|
||||||
synchronizeMutationCapability(capabilities.mutation);
|
synchronizeMutationCapability(capabilities.mutation);
|
||||||
|
@ -46,7 +46,7 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addChildToComposition(model) {
|
function addChildToComposition(model) {
|
||||||
var existingIndex = model.composition.indexOf(child.getId());
|
const existingIndex = model.composition.indexOf(child.getId());
|
||||||
if (existingIndex === -1) {
|
if (existingIndex === -1) {
|
||||||
model.composition.push(child.getId());
|
model.composition.push(child.getId());
|
||||||
}
|
}
|
||||||
@ -71,16 +71,16 @@ define([
|
|||||||
this.getDependencies();
|
this.getDependencies();
|
||||||
}
|
}
|
||||||
|
|
||||||
var keyString = objectUtils.makeKeyString(child.identifier);
|
const keyString = objectUtils.makeKeyString(child.identifier);
|
||||||
var oldModel = objectUtils.toOldFormat(child);
|
const oldModel = objectUtils.toOldFormat(child);
|
||||||
var newDO = this.instantiate(oldModel, keyString);
|
const newDO = this.instantiate(oldModel, keyString);
|
||||||
|
|
||||||
return new ContextualDomainObject(newDO, this.domainObject);
|
return new ContextualDomainObject(newDO, this.domainObject);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
AlternateCompositionCapability.prototype.invoke = function () {
|
AlternateCompositionCapability.prototype.invoke = function () {
|
||||||
var newFormatDO = objectUtils.toNewFormat(
|
const newFormatDO = objectUtils.toNewFormat(
|
||||||
this.domainObject.getModel(),
|
this.domainObject.getModel(),
|
||||||
this.domainObject.getId()
|
this.domainObject.getId()
|
||||||
);
|
);
|
||||||
@ -89,7 +89,7 @@ define([
|
|||||||
this.getDependencies();
|
this.getDependencies();
|
||||||
}
|
}
|
||||||
|
|
||||||
var collection = this.openmct.composition.get(newFormatDO);
|
const collection = this.openmct.composition.get(newFormatDO);
|
||||||
|
|
||||||
return collection.load()
|
return collection.load()
|
||||||
.then(function (children) {
|
.then(function (children) {
|
||||||
@ -104,5 +104,4 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
return AlternateCompositionCapability;
|
return AlternateCompositionCapability;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
@ -28,18 +28,18 @@ define([
|
|||||||
|
|
||||||
function patchViewCapability(viewConstructor) {
|
function patchViewCapability(viewConstructor) {
|
||||||
return function makeCapability(domainObject) {
|
return function makeCapability(domainObject) {
|
||||||
var capability = viewConstructor(domainObject);
|
const capability = viewConstructor(domainObject);
|
||||||
var oldInvoke = capability.invoke.bind(capability);
|
const oldInvoke = capability.invoke.bind(capability);
|
||||||
|
|
||||||
/* eslint-disable you-dont-need-lodash-underscore/map */
|
/* eslint-disable you-dont-need-lodash-underscore/map */
|
||||||
capability.invoke = function () {
|
capability.invoke = function () {
|
||||||
var availableViews = oldInvoke();
|
const availableViews = oldInvoke();
|
||||||
var newDomainObject = capability
|
const newDomainObject = capability
|
||||||
.domainObject
|
.domainObject
|
||||||
.useCapability('adapter');
|
.useCapability('adapter');
|
||||||
|
|
||||||
return _(availableViews).map(function (v, i) {
|
return _(availableViews).map(function (v, i) {
|
||||||
var vd = {
|
const vd = {
|
||||||
view: v,
|
view: v,
|
||||||
priority: i + 100 // arbitrary to allow new views to
|
priority: i + 100 // arbitrary to allow new views to
|
||||||
// be defaults by returning priority less than 100.
|
// be defaults by returning priority less than 100.
|
||||||
|
@ -32,8 +32,8 @@ define([
|
|||||||
function synchronizeMutationCapability(mutationConstructor) {
|
function synchronizeMutationCapability(mutationConstructor) {
|
||||||
|
|
||||||
return function makeCapability(domainObject) {
|
return function makeCapability(domainObject) {
|
||||||
var capability = mutationConstructor(domainObject);
|
const capability = mutationConstructor(domainObject);
|
||||||
var oldListen = capability.listen.bind(capability);
|
const oldListen = capability.listen.bind(capability);
|
||||||
capability.listen = function (listener) {
|
capability.listen = function (listener) {
|
||||||
return oldListen(function (newModel) {
|
return oldListen(function (newModel) {
|
||||||
capability.domainObject.model =
|
capability.domainObject.model =
|
||||||
|
@ -27,9 +27,9 @@ define([
|
|||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
link: function (scope, element, attrs) {
|
link: function (scope, element, attrs) {
|
||||||
var provider = openmct.objectViews.getByProviderKey(attrs.mctProviderKey);
|
const provider = openmct.objectViews.getByProviderKey(attrs.mctProviderKey);
|
||||||
var view = new provider.view(scope.domainObject.useCapability('adapter'));
|
const view = new provider.view(scope.domainObject.useCapability('adapter'));
|
||||||
var domElement = element[0];
|
const domElement = element[0];
|
||||||
|
|
||||||
view.show(domElement);
|
view.show(domElement);
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
define([], function () {
|
define([], function () {
|
||||||
var LEGACY_INDICATOR_TEMPLATE =
|
const LEGACY_INDICATOR_TEMPLATE =
|
||||||
'<mct-include '
|
'<mct-include '
|
||||||
+ ' ng-model="indicator" '
|
+ ' ng-model="indicator" '
|
||||||
+ ' class="h-indicator" '
|
+ ' class="h-indicator" '
|
||||||
@ -36,8 +36,8 @@ define([], function () {
|
|||||||
|
|
||||||
function addLegacyIndicators(legacyIndicators) {
|
function addLegacyIndicators(legacyIndicators) {
|
||||||
legacyIndicators.forEach(function (legacyIndicatorDef) {
|
legacyIndicators.forEach(function (legacyIndicatorDef) {
|
||||||
var legacyIndicator = initializeIfNeeded(legacyIndicatorDef);
|
const legacyIndicator = initializeIfNeeded(legacyIndicatorDef);
|
||||||
var legacyIndicatorElement = buildLegacyIndicator(legacyIndicator, legacyIndicatorDef.template);
|
const legacyIndicatorElement = buildLegacyIndicator(legacyIndicator, legacyIndicatorDef.template);
|
||||||
openmct.indicators.add({
|
openmct.indicators.add({
|
||||||
element: legacyIndicatorElement
|
element: legacyIndicatorElement
|
||||||
});
|
});
|
||||||
@ -45,7 +45,7 @@ define([], function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initializeIfNeeded(LegacyIndicatorDef) {
|
function initializeIfNeeded(LegacyIndicatorDef) {
|
||||||
var legacyIndicator;
|
let legacyIndicator;
|
||||||
if (typeof LegacyIndicatorDef === 'function') {
|
if (typeof LegacyIndicatorDef === 'function') {
|
||||||
legacyIndicator = new LegacyIndicatorDef();
|
legacyIndicator = new LegacyIndicatorDef();
|
||||||
} else {
|
} else {
|
||||||
@ -56,9 +56,9 @@ define([], function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function buildLegacyIndicator(legacyIndicator, template) {
|
function buildLegacyIndicator(legacyIndicator, template) {
|
||||||
var $compile = openmct.$injector.get('$compile');
|
const $compile = openmct.$injector.get('$compile');
|
||||||
var $rootScope = openmct.$injector.get('$rootScope');
|
const $rootScope = openmct.$injector.get('$rootScope');
|
||||||
var scope = $rootScope.$new(true);
|
const scope = $rootScope.$new(true);
|
||||||
scope.indicator = legacyIndicator;
|
scope.indicator = legacyIndicator;
|
||||||
scope.template = template || 'indicator';
|
scope.template = template || 'indicator';
|
||||||
|
|
||||||
|
@ -31,11 +31,11 @@ define(
|
|||||||
MCTIndicators,
|
MCTIndicators,
|
||||||
LegacyIndicatorsPlugin
|
LegacyIndicatorsPlugin
|
||||||
) {
|
) {
|
||||||
var openmct;
|
let openmct;
|
||||||
var directive;
|
let directive;
|
||||||
var holderElement;
|
let holderElement;
|
||||||
var legacyExtensionFunction = MCT.prototype.legacyExtension;
|
const legacyExtensionFunction = MCT.prototype.legacyExtension;
|
||||||
var legacyIndicatorsRunsFunction;
|
let legacyIndicatorsRunsFunction;
|
||||||
|
|
||||||
xdescribe('The legacy indicators plugin', function () {
|
xdescribe('The legacy indicators plugin', function () {
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
@ -63,10 +63,10 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mockAngularComponents() {
|
function mockAngularComponents() {
|
||||||
var mockInjector = jasmine.createSpyObj('$injector', ['get']);
|
const mockInjector = jasmine.createSpyObj('$injector', ['get']);
|
||||||
var mockCompile = jasmine.createSpy('$compile');
|
const mockCompile = jasmine.createSpy('$compile');
|
||||||
var mockRootScope = jasmine.createSpyObj('rootScope', ['$new']);
|
const mockRootScope = jasmine.createSpyObj('rootScope', ['$new']);
|
||||||
var mockScope = {};
|
const mockScope = {};
|
||||||
|
|
||||||
mockRootScope.$new.and.returnValue(mockScope);
|
mockRootScope.$new.and.returnValue(mockScope);
|
||||||
mockInjector.get.and.callFake(function (service) {
|
mockInjector.get.and.callFake(function (service) {
|
||||||
@ -85,7 +85,7 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
it("Displays any legacy indicators ", function () {
|
it("Displays any legacy indicators ", function () {
|
||||||
var legacyIndicators = [{}, {}, {}, {}];
|
const legacyIndicators = [{}, {}, {}, {}];
|
||||||
|
|
||||||
legacyIndicatorsRunsFunction(legacyIndicators);
|
legacyIndicatorsRunsFunction(legacyIndicators);
|
||||||
renderIndicators();
|
renderIndicators();
|
||||||
@ -95,8 +95,8 @@ define(
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("If legacy indicator is defined as a constructor function, executes function ", function () {
|
it("If legacy indicator is defined as a constructor function, executes function ", function () {
|
||||||
var mockConstructorFunction = jasmine.createSpy('mockIndicatorConstructor');
|
const mockConstructorFunction = jasmine.createSpy('mockIndicatorConstructor');
|
||||||
var legacyIndicators = [{}, mockConstructorFunction];
|
const legacyIndicators = [{}, mockConstructorFunction];
|
||||||
|
|
||||||
mockConstructorFunction.and.returnValue({});
|
mockConstructorFunction.and.returnValue({});
|
||||||
legacyIndicatorsRunsFunction(legacyIndicators);
|
legacyIndicatorsRunsFunction(legacyIndicators);
|
||||||
|
@ -29,8 +29,8 @@ define([], function () {
|
|||||||
view,
|
view,
|
||||||
legacyObject
|
legacyObject
|
||||||
) {
|
) {
|
||||||
if (view.hasOwnProperty('provider')) {
|
if (Object.prototype.hasOwnProperty.call(view, 'provider')) {
|
||||||
var domainObject = legacyObject.useCapability('adapter');
|
const domainObject = legacyObject.useCapability('adapter');
|
||||||
|
|
||||||
return view.provider.canView(domainObject);
|
return view.provider.canView(domainObject);
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ define([
|
|||||||
LegacyTelemetryProvider.prototype.canProvideTelemetry;
|
LegacyTelemetryProvider.prototype.canProvideTelemetry;
|
||||||
|
|
||||||
function createDatum(domainObject, metadata, legacySeries, i) {
|
function createDatum(domainObject, metadata, legacySeries, i) {
|
||||||
var datum;
|
let datum;
|
||||||
|
|
||||||
if (legacySeries.getDatum) {
|
if (legacySeries.getDatum) {
|
||||||
datum = legacySeries.getDatum(i);
|
datum = legacySeries.getDatum(i);
|
||||||
@ -77,9 +77,9 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
function adaptSeries(domainObject, metadata, legacySeries) {
|
function adaptSeries(domainObject, metadata, legacySeries) {
|
||||||
var series = [];
|
const series = [];
|
||||||
|
|
||||||
for (var i = 0; i < legacySeries.getPointCount(); i++) {
|
for (let i = 0; i < legacySeries.getPointCount(); i++) {
|
||||||
series.push(createDatum(domainObject, metadata, legacySeries, i));
|
series.push(createDatum(domainObject, metadata, legacySeries, i));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,9 +104,9 @@ define([
|
|||||||
* telemetry data.
|
* telemetry data.
|
||||||
*/
|
*/
|
||||||
LegacyTelemetryProvider.prototype.request = function (domainObject, request) {
|
LegacyTelemetryProvider.prototype.request = function (domainObject, request) {
|
||||||
var metadata = this.telemetryApi.getMetadata(domainObject);
|
const metadata = this.telemetryApi.getMetadata(domainObject);
|
||||||
var oldObject = this.instantiate(utils.toOldFormat(domainObject), utils.makeKeyString(domainObject.identifier));
|
const oldObject = this.instantiate(utils.toOldFormat(domainObject), utils.makeKeyString(domainObject.identifier));
|
||||||
var capability = oldObject.getCapability("telemetry");
|
const capability = oldObject.getCapability("telemetry");
|
||||||
|
|
||||||
return capability.requestData(request).then(function (telemetrySeries) {
|
return capability.requestData(request).then(function (telemetrySeries) {
|
||||||
return Promise.resolve(adaptSeries(domainObject, metadata, telemetrySeries));
|
return Promise.resolve(adaptSeries(domainObject, metadata, telemetrySeries));
|
||||||
@ -130,9 +130,9 @@ define([
|
|||||||
* @returns {platform|telemetry.TelemetrySubscription|*}
|
* @returns {platform|telemetry.TelemetrySubscription|*}
|
||||||
*/
|
*/
|
||||||
LegacyTelemetryProvider.prototype.subscribe = function (domainObject, callback, request) {
|
LegacyTelemetryProvider.prototype.subscribe = function (domainObject, callback, request) {
|
||||||
var metadata = this.telemetryApi.getMetadata(domainObject);
|
const metadata = this.telemetryApi.getMetadata(domainObject);
|
||||||
var oldObject = this.instantiate(utils.toOldFormat(domainObject), utils.makeKeyString(domainObject.identifier));
|
const oldObject = this.instantiate(utils.toOldFormat(domainObject), utils.makeKeyString(domainObject.identifier));
|
||||||
var capability = oldObject.getCapability("telemetry");
|
const capability = oldObject.getCapability("telemetry");
|
||||||
|
|
||||||
function callbackWrapper(series) {
|
function callbackWrapper(series) {
|
||||||
callback(createDatum(domainObject, metadata, series, series.getPointCount() - 1));
|
callback(createDatum(domainObject, metadata, series, series.getPointCount() - 1));
|
||||||
@ -142,7 +142,7 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
LegacyTelemetryProvider.prototype.supportsLimits = function (domainObject) {
|
LegacyTelemetryProvider.prototype.supportsLimits = function (domainObject) {
|
||||||
var oldObject = this.instantiate(
|
const oldObject = this.instantiate(
|
||||||
utils.toOldFormat(domainObject),
|
utils.toOldFormat(domainObject),
|
||||||
utils.makeKeyString(domainObject.identifier)
|
utils.makeKeyString(domainObject.identifier)
|
||||||
);
|
);
|
||||||
@ -151,11 +151,11 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
LegacyTelemetryProvider.prototype.getLimitEvaluator = function (domainObject) {
|
LegacyTelemetryProvider.prototype.getLimitEvaluator = function (domainObject) {
|
||||||
var oldObject = this.instantiate(
|
const oldObject = this.instantiate(
|
||||||
utils.toOldFormat(domainObject),
|
utils.toOldFormat(domainObject),
|
||||||
utils.makeKeyString(domainObject.identifier)
|
utils.makeKeyString(domainObject.identifier)
|
||||||
);
|
);
|
||||||
var limitEvaluator = oldObject.getCapability("limit");
|
const limitEvaluator = oldObject.getCapability("limit");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
evaluate: function (datum, property) {
|
evaluate: function (datum, property) {
|
||||||
@ -166,7 +166,7 @@ define([
|
|||||||
|
|
||||||
return function (openmct, instantiate) {
|
return function (openmct, instantiate) {
|
||||||
// Legacy provider should always be the fallback.
|
// Legacy provider should always be the fallback.
|
||||||
var provider = new LegacyTelemetryProvider(openmct, instantiate);
|
const provider = new LegacyTelemetryProvider(openmct, instantiate);
|
||||||
openmct.telemetry.legacyProvider = provider;
|
openmct.telemetry.legacyProvider = provider;
|
||||||
openmct.telemetry.requestProviders.push(provider);
|
openmct.telemetry.requestProviders.push(provider);
|
||||||
openmct.telemetry.subscriptionProviders.push(provider);
|
openmct.telemetry.subscriptionProviders.push(provider);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open openmct, Copyright (c) 2014-2018, United States Government
|
* Open openmct, Copyright (c) 2014-2020, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -20,7 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/* global console */
|
|
||||||
define([
|
define([
|
||||||
|
|
||||||
], function (
|
], function (
|
||||||
@ -28,7 +27,7 @@ define([
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
function checkForDeprecatedFunctionality(typeDef) {
|
function checkForDeprecatedFunctionality(typeDef) {
|
||||||
if (typeDef.hasOwnProperty('telemetry')) {
|
if (Object.prototype.hasOwnProperty.call(typeDef, 'telemetry')) {
|
||||||
console.warn(
|
console.warn(
|
||||||
'DEPRECATION WARNING: Telemetry data on type '
|
'DEPRECATION WARNING: Telemetry data on type '
|
||||||
+ 'registrations will be deprecated in a future version, '
|
+ 'registrations will be deprecated in a future version, '
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user