mirror of
https://github.com/nasa/openmct.git
synced 2025-06-10 19:31:42 +00:00
feat: AMD -> ES6 (#7029)
* feat: full amd -> es6 conversion * fix: move MCT to ES6 class * fix: default drop, correct imports * fix: correct all imports * fix: property typo * fix: avoid anonymous functions * fix: correct typo scarily small - can see why this e2e coverage issue is high priority * fix: use proper uuid format * style: fmt * fix: import vue correctly, get correct layout * fix: createApp without JSON fixes template issues * fix: don't use default on InspectorDataVisualization * fix: remove more .default calls * Update src/api/api.js Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com> * Update src/plugins/plugins.js Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com> * Update src/plugins/plugins.js Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com> * fix: suggestions * fix: drop unnecessary this.annotation initialization * fix: move all initialization calls to constructor * refactor: move vue dist import to webpack alias --------- Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
This commit is contained in:
parent
715a44864e
commit
2e03bc394c
@ -76,7 +76,8 @@ const config = {
|
|||||||
MCT: path.join(projectRootDir, 'src/MCT'),
|
MCT: path.join(projectRootDir, 'src/MCT'),
|
||||||
testUtils: path.join(projectRootDir, 'src/utils/testUtils.js'),
|
testUtils: path.join(projectRootDir, 'src/utils/testUtils.js'),
|
||||||
objectUtils: path.join(projectRootDir, 'src/api/objects/object-utils.js'),
|
objectUtils: path.join(projectRootDir, 'src/api/objects/object-utils.js'),
|
||||||
utils: path.join(projectRootDir, 'src/utils')
|
utils: path.join(projectRootDir, 'src/utils'),
|
||||||
|
vue: 'vue/dist/vue.esm-bundler'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
define(['lodash'], function (_) {
|
const METADATA_BY_TYPE = {
|
||||||
var METADATA_BY_TYPE = {
|
|
||||||
generator: {
|
generator: {
|
||||||
values: [
|
values: [
|
||||||
{
|
{
|
||||||
@ -124,7 +123,7 @@ define(['lodash'], function (_) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function GeneratorMetadataProvider() {}
|
export default function GeneratorMetadataProvider() {}
|
||||||
|
|
||||||
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
|
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
|
||||||
return Object.prototype.hasOwnProperty.call(METADATA_BY_TYPE, domainObject.type);
|
return Object.prototype.hasOwnProperty.call(METADATA_BY_TYPE, domainObject.type);
|
||||||
@ -133,6 +132,3 @@ define(['lodash'], function (_) {
|
|||||||
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
|
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
|
||||||
return Object.assign({}, domainObject.telemetry, METADATA_BY_TYPE[domainObject.type]);
|
return Object.assign({}, domainObject.telemetry, METADATA_BY_TYPE[domainObject.type]);
|
||||||
};
|
};
|
||||||
|
|
||||||
return GeneratorMetadataProvider;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,9 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./WorkerInterface'], function (WorkerInterface) {
|
import WorkerInterface from './WorkerInterface';
|
||||||
var REQUEST_DEFAULTS = {
|
|
||||||
|
const REQUEST_DEFAULTS = {
|
||||||
amplitude: 1,
|
amplitude: 1,
|
||||||
period: 10,
|
period: 10,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
@ -33,7 +34,7 @@ define(['./WorkerInterface'], function (WorkerInterface) {
|
|||||||
exceedFloat32: false
|
exceedFloat32: false
|
||||||
};
|
};
|
||||||
|
|
||||||
function GeneratorProvider(openmct, StalenessProvider) {
|
export default function GeneratorProvider(openmct, StalenessProvider) {
|
||||||
this.openmct = openmct;
|
this.openmct = openmct;
|
||||||
this.workerInterface = new WorkerInterface(openmct, StalenessProvider);
|
this.workerInterface = new WorkerInterface(openmct, StalenessProvider);
|
||||||
}
|
}
|
||||||
@ -100,6 +101,3 @@ define(['./WorkerInterface'], function (WorkerInterface) {
|
|||||||
|
|
||||||
return this.workerInterface.subscribe(workerRequest, callback);
|
return this.workerInterface.subscribe(workerRequest, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
return GeneratorProvider;
|
|
||||||
});
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
var PURPLE = {
|
var PURPLE = {
|
||||||
sin: 2.2,
|
sin: 2.2,
|
||||||
cos: 2.2
|
cos: 2.2
|
||||||
@ -68,7 +67,7 @@ define([], function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function SinewaveLimitProvider() {}
|
export default function SinewaveLimitProvider() {}
|
||||||
|
|
||||||
SinewaveLimitProvider.prototype.supportsLimits = function (domainObject) {
|
SinewaveLimitProvider.prototype.supportsLimits = function (domainObject) {
|
||||||
return domainObject.type === 'generator';
|
return domainObject.type === 'generator';
|
||||||
@ -161,6 +160,3 @@ define([], function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
return SinewaveLimitProvider;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
export default function StateGeneratorProvider() {}
|
||||||
function StateGeneratorProvider() {}
|
|
||||||
|
|
||||||
function pointForTimestamp(timestamp, duration, name) {
|
function pointForTimestamp(timestamp, duration, name) {
|
||||||
return {
|
return {
|
||||||
@ -70,6 +69,3 @@ define([], function () {
|
|||||||
|
|
||||||
return Promise.resolve(data);
|
return Promise.resolve(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
return StateGeneratorProvider;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,9 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['uuid'], function ({ v4: uuid }) {
|
import { v4 as uuid } from 'uuid';
|
||||||
function WorkerInterface(openmct, StalenessProvider) {
|
|
||||||
|
export default function WorkerInterface(openmct, StalenessProvider) {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
const workerUrl = `${openmct.getAssetPath()}${__OPENMCT_ROOT_RELATIVE__}generatorWorker.js`;
|
const workerUrl = `${openmct.getAssetPath()}${__OPENMCT_ROOT_RELATIVE__}generatorWorker.js`;
|
||||||
this.StalenessProvider = StalenessProvider;
|
this.StalenessProvider = StalenessProvider;
|
||||||
@ -102,6 +103,3 @@ define(['uuid'], function ({ v4: uuid }) {
|
|||||||
delete this.callbacks[messageId];
|
delete this.callbacks[messageId];
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
return WorkerInterface;
|
|
||||||
});
|
|
||||||
|
@ -75,7 +75,7 @@ if (document.currentScript) {
|
|||||||
* @property {OpenMCTComponent[]} components
|
* @property {OpenMCTComponent[]} components
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const MCT = require('./src/MCT');
|
const { MCT } = require('./src/MCT');
|
||||||
|
|
||||||
/** @type {OpenMCT} */
|
/** @type {OpenMCT} */
|
||||||
const openmct = new MCT();
|
const openmct = new MCT();
|
||||||
|
257
src/MCT.js
257
src/MCT.js
@ -20,55 +20,46 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/* eslint-disable no-undef */
|
/* eslint-disable no-undef */
|
||||||
define([
|
import EventEmitter from 'EventEmitter';
|
||||||
'EventEmitter',
|
import { createApp, markRaw } from 'vue';
|
||||||
'./api/api',
|
|
||||||
'./api/overlays/OverlayAPI',
|
import ActionsAPI from './api/actions/ActionsAPI';
|
||||||
'./api/tooltips/ToolTipAPI',
|
import AnnotationAPI from './api/annotation/AnnotationAPI';
|
||||||
'./selection/Selection',
|
import BrandingAPI from './api/Branding';
|
||||||
'./plugins/plugins',
|
import CompositionAPI from './api/composition/CompositionAPI';
|
||||||
'./ui/registries/ViewRegistry',
|
import EditorAPI from './api/Editor';
|
||||||
'./plugins/imagery/plugin',
|
import FaultManagementAPI from './api/faultmanagement/FaultManagementAPI';
|
||||||
'./ui/registries/InspectorViewRegistry',
|
import FormsAPI from './api/forms/FormsAPI';
|
||||||
'./ui/registries/ToolbarRegistry',
|
import IndicatorAPI from './api/indicators/IndicatorAPI';
|
||||||
'./ui/router/ApplicationRouter',
|
import MenuAPI from './api/menu/MenuAPI';
|
||||||
'./ui/router/Browse',
|
import NotificationAPI from './api/notifications/NotificationAPI';
|
||||||
'./ui/layout/AppLayout.vue',
|
import ObjectAPI from './api/objects/ObjectAPI';
|
||||||
'./ui/preview/plugin',
|
import OverlayAPI from './api/overlays/OverlayAPI';
|
||||||
'./api/Branding',
|
import PriorityAPI from './api/priority/PriorityAPI';
|
||||||
'./plugins/licenses/plugin',
|
import StatusAPI from './api/status/StatusAPI';
|
||||||
'./plugins/remove/plugin',
|
import TelemetryAPI from './api/telemetry/TelemetryAPI';
|
||||||
'./plugins/move/plugin',
|
import TimeAPI from './api/time/TimeAPI';
|
||||||
'./plugins/linkAction/plugin',
|
import ToolTipAPI from './api/tooltips/ToolTipAPI';
|
||||||
'./plugins/duplicate/plugin',
|
import TypeRegistry from './api/types/TypeRegistry';
|
||||||
'./plugins/importFromJSONAction/plugin',
|
import UserAPI from './api/user/UserAPI';
|
||||||
'./plugins/exportAsJSONAction/plugin',
|
import DuplicateActionPlugin from './plugins/duplicate/plugin';
|
||||||
'vue'
|
import ExportAsJSONAction from './plugins/exportAsJSONAction/plugin';
|
||||||
], function (
|
import ImageryPlugin from './plugins/imagery/plugin';
|
||||||
EventEmitter,
|
import ImportFromJSONAction from './plugins/importFromJSONAction/plugin';
|
||||||
api,
|
import LicensesPlugin from './plugins/licenses/plugin';
|
||||||
OverlayAPI,
|
import LinkActionPlugin from './plugins/linkAction/plugin';
|
||||||
ToolTipAPI,
|
import MoveActionPlugin from './plugins/move/plugin';
|
||||||
Selection,
|
import plugins from './plugins/plugins';
|
||||||
plugins,
|
import RemoveActionPlugin from './plugins/remove/plugin';
|
||||||
ViewRegistry,
|
import Selection from './selection/Selection';
|
||||||
ImageryPlugin,
|
import Layout from './ui/layout/AppLayout.vue';
|
||||||
InspectorViewRegistry,
|
import PreviewPlugin from './ui/preview/plugin';
|
||||||
ToolbarRegistry,
|
import InspectorViewRegistry from './ui/registries/InspectorViewRegistry';
|
||||||
ApplicationRouter,
|
import ToolbarRegistry from './ui/registries/ToolbarRegistry';
|
||||||
Browse,
|
import ViewRegistry from './ui/registries/ViewRegistry';
|
||||||
Layout,
|
import ApplicationRouter from './ui/router/ApplicationRouter';
|
||||||
PreviewPlugin,
|
import Browse from './ui/router/Browse';
|
||||||
BrandingAPI,
|
|
||||||
LicensesPlugin,
|
|
||||||
RemoveActionPlugin,
|
|
||||||
MoveActionPlugin,
|
|
||||||
LinkActionPlugin,
|
|
||||||
DuplicateActionPlugin,
|
|
||||||
ImportFromJSONAction,
|
|
||||||
ExportAsJSONAction,
|
|
||||||
Vue
|
|
||||||
) {
|
|
||||||
/**
|
/**
|
||||||
* Open MCT is an extensible web application for building mission
|
* Open MCT is an extensible web application for building mission
|
||||||
* control user interfaces. This module is itself an instance of
|
* control user interfaces. This module is itself an instance of
|
||||||
@ -84,8 +75,11 @@ define([
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @memberof module:openmct
|
* @memberof module:openmct
|
||||||
*/
|
*/
|
||||||
function MCT() {
|
export class MCT extends EventEmitter {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
EventEmitter.call(this);
|
EventEmitter.call(this);
|
||||||
|
|
||||||
this.buildInfo = {
|
this.buildInfo = {
|
||||||
version: __OPENMCT_VERSION__,
|
version: __OPENMCT_VERSION__,
|
||||||
buildDate: __OPENMCT_BUILD_DATE__,
|
buildDate: __OPENMCT_BUILD_DATE__,
|
||||||
@ -95,12 +89,14 @@ define([
|
|||||||
|
|
||||||
this.destroy = this.destroy.bind(this);
|
this.destroy = this.destroy.bind(this);
|
||||||
this.defaultClock = 'local';
|
this.defaultClock = 'local';
|
||||||
[
|
|
||||||
|
this.plugins = plugins;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tracks current selection state of the application.
|
* Tracks current selection state of the application.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
['selection', () => new Selection.default(this)],
|
this.selection = new Selection(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MCT's time conductor, which may be used to synchronize view contents
|
* MCT's time conductor, which may be used to synchronize view contents
|
||||||
@ -109,7 +105,7 @@ define([
|
|||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @name conductor
|
* @name conductor
|
||||||
*/
|
*/
|
||||||
['time', () => new api.TimeAPI(this)],
|
this.time = new TimeAPI(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An interface for interacting with the composition of domain objects.
|
* An interface for interacting with the composition of domain objects.
|
||||||
@ -124,7 +120,7 @@ define([
|
|||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @name composition
|
* @name composition
|
||||||
*/
|
*/
|
||||||
['composition', () => new api.CompositionAPI.default(this)],
|
this.composition = new CompositionAPI(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registry for views of domain objects which should appear in the
|
* Registry for views of domain objects which should appear in the
|
||||||
@ -134,7 +130,7 @@ define([
|
|||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @name objectViews
|
* @name objectViews
|
||||||
*/
|
*/
|
||||||
['objectViews', () => new ViewRegistry()],
|
this.objectViews = new ViewRegistry();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registry for views which should appear in the Inspector area.
|
* Registry for views which should appear in the Inspector area.
|
||||||
@ -144,7 +140,7 @@ define([
|
|||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @name inspectorViews
|
* @name inspectorViews
|
||||||
*/
|
*/
|
||||||
['inspectorViews', () => new InspectorViewRegistry.default()],
|
this.inspectorViews = new InspectorViewRegistry();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registry for views which should appear in Edit Properties
|
* Registry for views which should appear in Edit Properties
|
||||||
@ -155,7 +151,7 @@ define([
|
|||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @name propertyEditors
|
* @name propertyEditors
|
||||||
*/
|
*/
|
||||||
['propertyEditors', () => new ViewRegistry()],
|
this.propertyEditors = new ViewRegistry();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registry for views which should appear in the toolbar area while
|
* Registry for views which should appear in the toolbar area while
|
||||||
@ -165,7 +161,7 @@ define([
|
|||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @name toolbars
|
* @name toolbars
|
||||||
*/
|
*/
|
||||||
['toolbars', () => new ToolbarRegistry()],
|
this.toolbars = new ToolbarRegistry();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registry for domain object types which may exist within this
|
* Registry for domain object types which may exist within this
|
||||||
@ -175,7 +171,7 @@ define([
|
|||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @name types
|
* @name types
|
||||||
*/
|
*/
|
||||||
['types', () => new api.TypeRegistry()],
|
this.types = new TypeRegistry();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An interface for interacting with domain objects and the domain
|
* An interface for interacting with domain objects and the domain
|
||||||
@ -185,7 +181,7 @@ define([
|
|||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @name objects
|
* @name objects
|
||||||
*/
|
*/
|
||||||
['objects', () => new api.ObjectAPI.default(this.types, this)],
|
this.objects = new ObjectAPI(this.types, this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An interface for retrieving and interpreting telemetry data associated
|
* An interface for retrieving and interpreting telemetry data associated
|
||||||
@ -195,7 +191,7 @@ define([
|
|||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @name telemetry
|
* @name telemetry
|
||||||
*/
|
*/
|
||||||
['telemetry', () => new api.TelemetryAPI.default(this)],
|
this.telemetry = new TelemetryAPI(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An interface for creating new indicators and changing them dynamically.
|
* An interface for creating new indicators and changing them dynamically.
|
||||||
@ -204,7 +200,7 @@ define([
|
|||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @name indicators
|
* @name indicators
|
||||||
*/
|
*/
|
||||||
['indicators', () => new api.IndicatorAPI(this)],
|
this.indicators = new IndicatorAPI(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MCT's user awareness management, to enable user and
|
* MCT's user awareness management, to enable user and
|
||||||
@ -213,31 +209,20 @@ define([
|
|||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @name user
|
* @name user
|
||||||
*/
|
*/
|
||||||
['user', () => new api.UserAPI(this)],
|
this.user = new UserAPI(this);
|
||||||
|
|
||||||
['notifications', () => new api.NotificationAPI()],
|
this.notifications = new NotificationAPI();
|
||||||
|
this.editor = new EditorAPI(this);
|
||||||
['editor', () => new api.EditorAPI.default(this)],
|
this.overlays = new OverlayAPI();
|
||||||
|
this.tooltips = new ToolTipAPI();
|
||||||
['overlays', () => new OverlayAPI.default()],
|
this.menus = new MenuAPI(this);
|
||||||
|
this.actions = new ActionsAPI(this);
|
||||||
['tooltips', () => new ToolTipAPI.default()],
|
this.status = new StatusAPI(this);
|
||||||
|
this.priority = PriorityAPI;
|
||||||
['menus', () => new api.MenuAPI(this)],
|
this.router = new ApplicationRouter(this);
|
||||||
|
this.faults = new FaultManagementAPI(this);
|
||||||
['actions', () => new api.ActionsAPI(this)],
|
this.forms = new FormsAPI(this);
|
||||||
|
this.branding = BrandingAPI;
|
||||||
['status', () => new api.StatusAPI(this)],
|
|
||||||
|
|
||||||
['priority', () => api.PriorityAPI],
|
|
||||||
|
|
||||||
['router', () => new ApplicationRouter(this)],
|
|
||||||
|
|
||||||
['faults', () => new api.FaultManagementAPI.default(this)],
|
|
||||||
|
|
||||||
['forms', () => new api.FormsAPI.default(this)],
|
|
||||||
|
|
||||||
['branding', () => BrandingAPI.default],
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MCT's annotation API that enables
|
* MCT's annotation API that enables
|
||||||
@ -246,43 +231,23 @@ define([
|
|||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @name annotation
|
* @name annotation
|
||||||
*/
|
*/
|
||||||
['annotation', () => new api.AnnotationAPI(this)]
|
this.annotation = new AnnotationAPI(this);
|
||||||
].forEach((apiEntry) => {
|
|
||||||
const apiName = apiEntry[0];
|
|
||||||
const apiObject = apiEntry[1]();
|
|
||||||
|
|
||||||
Object.defineProperty(this, apiName, {
|
|
||||||
value: apiObject,
|
|
||||||
enumerable: false,
|
|
||||||
configurable: false,
|
|
||||||
writable: true
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MCT's annotation API that enables
|
|
||||||
* human-created comments and categorization linked to data products
|
|
||||||
* @type {module:openmct.AnnotationAPI}
|
|
||||||
* @memberof module:openmct.MCT#
|
|
||||||
* @name annotation
|
|
||||||
*/
|
|
||||||
this.annotation = new api.AnnotationAPI(this);
|
|
||||||
|
|
||||||
// Plugins that are installed by default
|
// Plugins that are installed by default
|
||||||
this.install(this.plugins.Plot());
|
this.install(this.plugins.Plot());
|
||||||
this.install(this.plugins.TelemetryTable.default());
|
this.install(this.plugins.TelemetryTable());
|
||||||
this.install(PreviewPlugin.default());
|
this.install(PreviewPlugin());
|
||||||
this.install(LicensesPlugin.default());
|
this.install(LicensesPlugin());
|
||||||
this.install(RemoveActionPlugin.default());
|
this.install(RemoveActionPlugin());
|
||||||
this.install(MoveActionPlugin.default());
|
this.install(MoveActionPlugin());
|
||||||
this.install(LinkActionPlugin.default());
|
this.install(LinkActionPlugin());
|
||||||
this.install(DuplicateActionPlugin.default());
|
this.install(DuplicateActionPlugin());
|
||||||
this.install(ExportAsJSONAction.default());
|
this.install(ExportAsJSONAction());
|
||||||
this.install(ImportFromJSONAction.default());
|
this.install(ImportFromJSONAction());
|
||||||
this.install(this.plugins.FormActions.default());
|
this.install(this.plugins.FormActions());
|
||||||
this.install(this.plugins.FolderView());
|
this.install(this.plugins.FolderView());
|
||||||
this.install(this.plugins.Tabs());
|
this.install(this.plugins.Tabs());
|
||||||
this.install(ImageryPlugin.default());
|
this.install(ImageryPlugin());
|
||||||
this.install(this.plugins.FlexibleLayout());
|
this.install(this.plugins.FlexibleLayout());
|
||||||
this.install(this.plugins.GoToOriginalAction());
|
this.install(this.plugins.GoToOriginalAction());
|
||||||
this.install(this.plugins.OpenInNewTabAction());
|
this.install(this.plugins.OpenInNewTabAction());
|
||||||
@ -300,26 +265,20 @@ define([
|
|||||||
this.install(this.plugins.Gauge());
|
this.install(this.plugins.Gauge());
|
||||||
this.install(this.plugins.InspectorViews());
|
this.install(this.plugins.InspectorViews());
|
||||||
}
|
}
|
||||||
|
|
||||||
MCT.prototype = Object.create(EventEmitter.prototype);
|
|
||||||
|
|
||||||
MCT.prototype.MCT = MCT;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set path to where assets are hosted. This should be the path to main.js.
|
* Set path to where assets are hosted. This should be the path to main.js.
|
||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @method setAssetPath
|
* @method setAssetPath
|
||||||
*/
|
*/
|
||||||
MCT.prototype.setAssetPath = function (assetPath) {
|
setAssetPath(assetPath) {
|
||||||
this._assetPath = assetPath;
|
this._assetPath = assetPath;
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get path to where assets are hosted.
|
* Get path to where assets are hosted.
|
||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
* @method getAssetPath
|
* @method getAssetPath
|
||||||
*/
|
*/
|
||||||
MCT.prototype.getAssetPath = function () {
|
getAssetPath() {
|
||||||
const assetPathLength = this._assetPath && this._assetPath.length;
|
const assetPathLength = this._assetPath && this._assetPath.length;
|
||||||
if (!assetPathLength) {
|
if (!assetPathLength) {
|
||||||
return '/';
|
return '/';
|
||||||
@ -330,8 +289,7 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
return this._assetPath;
|
return this._assetPath;
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start running Open MCT. This should be called only after any plugins
|
* Start running Open MCT. This should be called only after any plugins
|
||||||
* have been installed.
|
* have been installed.
|
||||||
@ -341,10 +299,7 @@ define([
|
|||||||
* @param {HTMLElement} [domElement] the DOM element in which to run
|
* @param {HTMLElement} [domElement] the DOM element in which to run
|
||||||
* MCT; if undefined, MCT will be run in the body of the document
|
* MCT; if undefined, MCT will be run in the body of the document
|
||||||
*/
|
*/
|
||||||
MCT.prototype.start = function (
|
start(domElement = document.body.firstElementChild, isHeadlessMode = false) {
|
||||||
domElement = document.body.firstElementChild,
|
|
||||||
isHeadlessMode = false
|
|
||||||
) {
|
|
||||||
// Create element to mount Layout if it doesn't exist
|
// Create element to mount Layout if it doesn't exist
|
||||||
if (domElement === null) {
|
if (domElement === null) {
|
||||||
domElement = document.createElement('div');
|
domElement = document.createElement('div');
|
||||||
@ -376,20 +331,12 @@ define([
|
|||||||
* @event start
|
* @event start
|
||||||
* @memberof module:openmct.MCT~
|
* @memberof module:openmct.MCT~
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!isHeadlessMode) {
|
if (!isHeadlessMode) {
|
||||||
const appLayout = Vue.createApp({
|
const appLayout = createApp(Layout);
|
||||||
components: {
|
appLayout.provide('openmct', markRaw(this));
|
||||||
Layout: Layout.default
|
|
||||||
},
|
|
||||||
provide: {
|
|
||||||
openmct: Vue.markRaw(this)
|
|
||||||
},
|
|
||||||
template: '<Layout ref="layout"></Layout>'
|
|
||||||
});
|
|
||||||
const component = appLayout.mount(domElement);
|
const component = appLayout.mount(domElement);
|
||||||
component.$nextTick(() => {
|
component.$nextTick(() => {
|
||||||
this.layout = component.$refs.layout;
|
this.layout = component;
|
||||||
this.app = appLayout;
|
this.app = appLayout;
|
||||||
Browse(this);
|
Browse(this);
|
||||||
window.addEventListener('beforeunload', this.destroy);
|
window.addEventListener('beforeunload', this.destroy);
|
||||||
@ -402,14 +349,12 @@ define([
|
|||||||
this.router.start();
|
this.router.start();
|
||||||
this.emit('start');
|
this.emit('start');
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
startHeadless() {
|
||||||
MCT.prototype.startHeadless = function () {
|
|
||||||
let unreachableNode = document.createElement('div');
|
let unreachableNode = document.createElement('div');
|
||||||
|
|
||||||
return this.start(unreachableNode, true);
|
return this.start(unreachableNode, true);
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Install a plugin in MCT.
|
* Install a plugin in MCT.
|
||||||
*
|
*
|
||||||
@ -417,17 +362,13 @@ define([
|
|||||||
* invoked with the mct instance.
|
* invoked with the mct instance.
|
||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
*/
|
*/
|
||||||
MCT.prototype.install = function (plugin) {
|
install(plugin) {
|
||||||
plugin(this);
|
plugin(this);
|
||||||
};
|
}
|
||||||
|
|
||||||
MCT.prototype.destroy = function () {
|
destroy() {
|
||||||
window.removeEventListener('beforeunload', this.destroy);
|
window.removeEventListener('beforeunload', this.destroy);
|
||||||
this.emit('destroy');
|
this.emit('destroy');
|
||||||
this.router.destroy();
|
this.router.destroy();
|
||||||
};
|
}
|
||||||
|
}
|
||||||
MCT.prototype.plugins = plugins;
|
|
||||||
|
|
||||||
return MCT;
|
|
||||||
});
|
|
||||||
|
@ -20,7 +20,10 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./plugins/plugins', 'utils/testing'], function (plugins, testUtils) {
|
import * as testUtils from 'utils/testing';
|
||||||
|
|
||||||
|
import plugins from './plugins/plugins';
|
||||||
|
|
||||||
describe('MCT', function () {
|
describe('MCT', function () {
|
||||||
let openmct;
|
let openmct;
|
||||||
let mockPlugin;
|
let mockPlugin;
|
||||||
@ -112,4 +115,3 @@ define(['./plugins/plugins', 'utils/testing'], function (plugins, testUtils) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -20,24 +20,24 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
import ActionsAPI from './actions/ActionsAPI';
|
||||||
'./actions/ActionsAPI',
|
import AnnotationAPI from './annotation/AnnotationAPI';
|
||||||
'./composition/CompositionAPI',
|
import CompositionAPI from './composition/CompositionAPI';
|
||||||
'./Editor',
|
import EditorAPI from './Editor';
|
||||||
'./faultmanagement/FaultManagementAPI',
|
import FaultManagementAPI from './faultmanagement/FaultManagementAPI';
|
||||||
'./forms/FormsAPI',
|
import FormsAPI from './forms/FormsAPI';
|
||||||
'./indicators/IndicatorAPI',
|
import IndicatorAPI from './indicators/IndicatorAPI';
|
||||||
'./menu/MenuAPI',
|
import MenuAPI from './menu/MenuAPI';
|
||||||
'./notifications/NotificationAPI',
|
import NotificationAPI from './notifications/NotificationAPI';
|
||||||
'./objects/ObjectAPI',
|
import ObjectAPI from './objects/ObjectAPI';
|
||||||
'./priority/PriorityAPI',
|
import PriorityAPI from './priority/PriorityAPI';
|
||||||
'./status/StatusAPI',
|
import StatusAPI from './status/StatusAPI';
|
||||||
'./telemetry/TelemetryAPI',
|
import TelemetryAPI from './telemetry/TelemetryAPI';
|
||||||
'./time/TimeAPI',
|
import TimeAPI from './time/TimeAPI';
|
||||||
'./types/TypeRegistry',
|
import TypeRegistry from './types/TypeRegistry';
|
||||||
'./user/UserAPI',
|
import UserAPI from './user/UserAPI';
|
||||||
'./annotation/AnnotationAPI'
|
|
||||||
], function (
|
export default {
|
||||||
ActionsAPI,
|
ActionsAPI,
|
||||||
CompositionAPI,
|
CompositionAPI,
|
||||||
EditorAPI,
|
EditorAPI,
|
||||||
@ -54,23 +54,4 @@ define([
|
|||||||
TypeRegistry,
|
TypeRegistry,
|
||||||
UserAPI,
|
UserAPI,
|
||||||
AnnotationAPI
|
AnnotationAPI
|
||||||
) {
|
|
||||||
return {
|
|
||||||
ActionsAPI: ActionsAPI.default,
|
|
||||||
CompositionAPI: CompositionAPI,
|
|
||||||
EditorAPI: EditorAPI,
|
|
||||||
FaultManagementAPI: FaultManagementAPI,
|
|
||||||
FormsAPI: FormsAPI,
|
|
||||||
IndicatorAPI: IndicatorAPI.default,
|
|
||||||
MenuAPI: MenuAPI.default,
|
|
||||||
NotificationAPI: NotificationAPI.default,
|
|
||||||
ObjectAPI: ObjectAPI,
|
|
||||||
PriorityAPI: PriorityAPI.default,
|
|
||||||
StatusAPI: StatusAPI.default,
|
|
||||||
TelemetryAPI: TelemetryAPI,
|
|
||||||
TimeAPI: TimeAPI.default,
|
|
||||||
TypeRegistry: TypeRegistry.default,
|
|
||||||
UserAPI: UserAPI.default,
|
|
||||||
AnnotationAPI: AnnotationAPI.default
|
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
/**
|
/**
|
||||||
* Utility for checking if a thing is an Open MCT Identifier.
|
* Utility for checking if a thing is an Open MCT Identifier.
|
||||||
* @private
|
* @private
|
||||||
@ -169,7 +168,7 @@ define([], function () {
|
|||||||
Object.assign(oldObject, newObject);
|
Object.assign(oldObject, newObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
export default {
|
||||||
isIdentifier: isIdentifier,
|
isIdentifier: isIdentifier,
|
||||||
toOldFormat: toOldFormat,
|
toOldFormat: toOldFormat,
|
||||||
toNewFormat: toNewFormat,
|
toNewFormat: toNewFormat,
|
||||||
@ -179,4 +178,3 @@ define([], function () {
|
|||||||
identifierEquals: identifierEquals,
|
identifierEquals: identifierEquals,
|
||||||
refresh: refresh
|
refresh: refresh
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
define(['objectUtils'], function (objectUtils) {
|
import objectUtils from 'objectUtils';
|
||||||
|
|
||||||
describe('objectUtils', function () {
|
describe('objectUtils', function () {
|
||||||
describe('keyString util', function () {
|
describe('keyString util', function () {
|
||||||
const EXPECTATIONS = {
|
const EXPECTATIONS = {
|
||||||
@ -144,4 +145,3 @@ define(['objectUtils'], function (objectUtils) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['lodash'], function (_) {
|
import _ from 'lodash';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the default metadata provider; for any object with a "telemetry"
|
* This is the default metadata provider; for any object with a "telemetry"
|
||||||
* property, this provider will return the value of that property as the
|
* property, this provider will return the value of that property as the
|
||||||
@ -30,7 +31,8 @@ define(['lodash'], function (_) {
|
|||||||
* defined on the type. Telemetry metadata definitions on type will be
|
* defined on the type. Telemetry metadata definitions on type will be
|
||||||
* depreciated in the future.
|
* depreciated in the future.
|
||||||
*/
|
*/
|
||||||
function DefaultMetadataProvider(openmct) {
|
export default class DefaultMetadataProvider {
|
||||||
|
constructor(openmct) {
|
||||||
this.openmct = openmct;
|
this.openmct = openmct;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,9 +40,37 @@ define(['lodash'], function (_) {
|
|||||||
* Applies to any domain object with a telemetry property, or whose type
|
* Applies to any domain object with a telemetry property, or whose type
|
||||||
* definition has a telemetry property.
|
* definition has a telemetry property.
|
||||||
*/
|
*/
|
||||||
DefaultMetadataProvider.prototype.supportsMetadata = function (domainObject) {
|
supportsMetadata(domainObject) {
|
||||||
return Boolean(domainObject.telemetry) || Boolean(this.typeHasTelemetry(domainObject));
|
return Boolean(domainObject.telemetry) || Boolean(this.typeHasTelemetry(domainObject));
|
||||||
};
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns telemetry metadata for a given domain object.
|
||||||
|
*/
|
||||||
|
getMetadata(domainObject) {
|
||||||
|
const metadata = domainObject.telemetry || {};
|
||||||
|
if (this.typeHasTelemetry(domainObject)) {
|
||||||
|
const typeMetadata = this.openmct.types.get(domainObject.type).definition.telemetry;
|
||||||
|
|
||||||
|
Object.assign(metadata, typeMetadata);
|
||||||
|
|
||||||
|
if (!metadata.values) {
|
||||||
|
metadata.values = valueMetadatasFromOldFormat(metadata);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return metadata;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
typeHasTelemetry(domainObject) {
|
||||||
|
const type = this.openmct.types.get(domainObject.type);
|
||||||
|
|
||||||
|
return Boolean(type.definition.telemetry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves valueMetadata from legacy metadata.
|
* Retrieves valueMetadata from legacy metadata.
|
||||||
@ -92,33 +122,3 @@ define(['lodash'], function (_) {
|
|||||||
|
|
||||||
return valueMetadatas;
|
return valueMetadatas;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns telemetry metadata for a given domain object.
|
|
||||||
*/
|
|
||||||
DefaultMetadataProvider.prototype.getMetadata = function (domainObject) {
|
|
||||||
const metadata = domainObject.telemetry || {};
|
|
||||||
if (this.typeHasTelemetry(domainObject)) {
|
|
||||||
const typeMetadata = this.openmct.types.get(domainObject.type).definition.telemetry;
|
|
||||||
|
|
||||||
Object.assign(metadata, typeMetadata);
|
|
||||||
|
|
||||||
if (!metadata.values) {
|
|
||||||
metadata.values = valueMetadatasFromOldFormat(metadata);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return metadata;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
DefaultMetadataProvider.prototype.typeHasTelemetry = function (domainObject) {
|
|
||||||
const type = this.openmct.types.get(domainObject.type);
|
|
||||||
|
|
||||||
return Boolean(type.definition.telemetry);
|
|
||||||
};
|
|
||||||
|
|
||||||
return DefaultMetadataProvider;
|
|
||||||
});
|
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['lodash'], function (_) {
|
import _ from 'lodash';
|
||||||
|
|
||||||
function applyReasonableDefaults(valueMetadata, index) {
|
function applyReasonableDefaults(valueMetadata, index) {
|
||||||
valueMetadata.source = valueMetadata.source || valueMetadata.key;
|
valueMetadata.source = valueMetadata.source || valueMetadata.key;
|
||||||
valueMetadata.hints = valueMetadata.hints || {};
|
valueMetadata.hints = valueMetadata.hints || {};
|
||||||
@ -67,7 +68,7 @@ define(['lodash'], function (_) {
|
|||||||
* reasonable defaults to simplify the task of providing metadata, while
|
* reasonable defaults to simplify the task of providing metadata, while
|
||||||
* also providing methods for interrogating telemetry metadata.
|
* also providing methods for interrogating telemetry metadata.
|
||||||
*/
|
*/
|
||||||
function TelemetryMetadataManager(metadata) {
|
export default function TelemetryMetadataManager(metadata) {
|
||||||
this.metadata = metadata;
|
this.metadata = metadata;
|
||||||
|
|
||||||
this.valueMetadatas = this.metadata.values
|
this.valueMetadatas = this.metadata.values
|
||||||
@ -157,6 +158,3 @@ define(['lodash'], function (_) {
|
|||||||
|
|
||||||
return valueMetadata;
|
return valueMetadata;
|
||||||
};
|
};
|
||||||
|
|
||||||
return TelemetryMetadataManager;
|
|
||||||
});
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
// Set of connection states; changing among these states will be
|
// Set of connection states; changing among these states will be
|
||||||
// reflected in the indicator's appearance.
|
// reflected in the indicator's appearance.
|
||||||
// CONNECTED: Everything nominal, expect to be able to read/write.
|
// CONNECTED: Everything nominal, expect to be able to read/write.
|
||||||
@ -35,7 +34,7 @@ define([], function () {
|
|||||||
const DISCONNECTED = {
|
const DISCONNECTED = {
|
||||||
statusClass: 's-status-warning-hi'
|
statusClass: 's-status-warning-hi'
|
||||||
};
|
};
|
||||||
function URLIndicator(options, simpleIndicator) {
|
export default function URLIndicator(options, simpleIndicator) {
|
||||||
this.bindMethods();
|
this.bindMethods();
|
||||||
this.count = 0;
|
this.count = 0;
|
||||||
|
|
||||||
@ -110,6 +109,3 @@ define([], function () {
|
|||||||
this.handleError = this.handleError.bind(this);
|
this.handleError = this.handleError.bind(this);
|
||||||
this.setIndicatorToState = this.setIndicatorToState.bind(this);
|
this.setIndicatorToState = this.setIndicatorToState.bind(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
return URLIndicator;
|
|
||||||
});
|
|
||||||
|
@ -19,8 +19,9 @@
|
|||||||
* 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.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
define(['./URLIndicator'], function URLIndicatorPlugin(URLIndicator) {
|
import URLIndicator from './URLIndicator';
|
||||||
return function (opts) {
|
|
||||||
|
export default function URLIndicatorPlugin(opts) {
|
||||||
return function install(openmct) {
|
return function install(openmct) {
|
||||||
const simpleIndicator = openmct.indicators.simpleIndicator();
|
const simpleIndicator = openmct.indicators.simpleIndicator();
|
||||||
const urlIndicator = new URLIndicator(opts, simpleIndicator);
|
const urlIndicator = new URLIndicator(opts, simpleIndicator);
|
||||||
@ -29,5 +30,4 @@ define(['./URLIndicator'], function URLIndicatorPlugin(URLIndicator) {
|
|||||||
|
|
||||||
return urlIndicator;
|
return urlIndicator;
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
@ -20,12 +20,10 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['utils/testing', './URLIndicator', './URLIndicatorPlugin', '../../MCT'], function (
|
import * as testingUtils from 'utils/testing';
|
||||||
testingUtils,
|
|
||||||
URLIndicator,
|
import URLIndicatorPlugin from './URLIndicatorPlugin';
|
||||||
URLIndicatorPlugin,
|
|
||||||
MCT
|
|
||||||
) {
|
|
||||||
describe('The URLIndicator', function () {
|
describe('The URLIndicator', function () {
|
||||||
let openmct;
|
let openmct;
|
||||||
let indicatorElement;
|
let indicatorElement;
|
||||||
@ -134,4 +132,3 @@ define(['utils/testing', './URLIndicator', './URLIndicatorPlugin', '../../MCT'],
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -20,15 +20,13 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
/**
|
/**
|
||||||
* Constant values used by the Autoflow Tabular View.
|
* Constant values used by the Autoflow Tabular View.
|
||||||
*/
|
*/
|
||||||
return {
|
export default {
|
||||||
ROW_HEIGHT: 16,
|
ROW_HEIGHT: 16,
|
||||||
SLIDER_HEIGHT: 10,
|
SLIDER_HEIGHT: 10,
|
||||||
INITIAL_COLUMN_WIDTH: 225,
|
INITIAL_COLUMN_WIDTH: 225,
|
||||||
MAX_COLUMN_WIDTH: 525,
|
MAX_COLUMN_WIDTH: 525,
|
||||||
COLUMN_WIDTH_STEP: 25
|
COLUMN_WIDTH_STEP: 25
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./AutoflowTabularRowController'], function (AutoflowTabularRowController) {
|
import AutoflowTabularRowController from './AutoflowTabularRowController';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controller for an Autoflow Tabular View. Subscribes to telemetry
|
* Controller for an Autoflow Tabular View. Subscribes to telemetry
|
||||||
* associated with children of the domain object and passes that
|
* associated with children of the domain object and passes that
|
||||||
@ -30,7 +31,7 @@ define(['./AutoflowTabularRowController'], function (AutoflowTabularRowControlle
|
|||||||
* @param {*} data the view data
|
* @param {*} data the view data
|
||||||
* @param openmct a reference to the openmct application
|
* @param openmct a reference to the openmct application
|
||||||
*/
|
*/
|
||||||
function AutoflowTabularController(domainObject, data, openmct) {
|
export default function AutoflowTabularController(domainObject, data, openmct) {
|
||||||
this.composition = openmct.composition.get(domainObject);
|
this.composition = openmct.composition.get(domainObject);
|
||||||
this.data = data;
|
this.data = data;
|
||||||
this.openmct = openmct;
|
this.openmct = openmct;
|
||||||
@ -118,6 +119,3 @@ define(['./AutoflowTabularRowController'], function (AutoflowTabularRowControlle
|
|||||||
this.composition.off('add', this.addRow);
|
this.composition.off('add', this.addRow);
|
||||||
this.composition.off('remove', this.removeRow);
|
this.composition.off('remove', this.removeRow);
|
||||||
};
|
};
|
||||||
|
|
||||||
return AutoflowTabularController;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,9 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./AutoflowTabularView'], function (AutoflowTabularView) {
|
import AutoflowTabularView from './AutoflowTabularView';
|
||||||
return function (options) {
|
|
||||||
|
export default function (options) {
|
||||||
return function (openmct) {
|
return function (openmct) {
|
||||||
const views = openmct.mainViews || openmct.objectViews;
|
const views = openmct.mainViews || openmct.objectViews;
|
||||||
|
|
||||||
@ -38,5 +39,4 @@ define(['./AutoflowTabularView'], function (AutoflowTabularView) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
/**
|
/**
|
||||||
* Controller for individual rows of an Autoflow Tabular View.
|
* Controller for individual rows of an Autoflow Tabular View.
|
||||||
* Subscribes to telemetry and updates row data.
|
* Subscribes to telemetry and updates row data.
|
||||||
@ -30,7 +29,7 @@ define([], function () {
|
|||||||
* @param openmct a reference to the openmct application
|
* @param openmct a reference to the openmct application
|
||||||
* @param {Function} callback a callback to invoke with "last updated" timestamps
|
* @param {Function} callback a callback to invoke with "last updated" timestamps
|
||||||
*/
|
*/
|
||||||
function AutoflowTabularRowController(domainObject, data, openmct, callback) {
|
export default function AutoflowTabularRowController(domainObject, data, openmct, callback) {
|
||||||
this.domainObject = domainObject;
|
this.domainObject = domainObject;
|
||||||
this.data = data;
|
this.data = data;
|
||||||
this.openmct = openmct;
|
this.openmct = openmct;
|
||||||
@ -90,6 +89,3 @@ define([], function () {
|
|||||||
this.unsubscribe();
|
this.unsubscribe();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return AutoflowTabularRowController;
|
|
||||||
});
|
|
||||||
|
@ -20,12 +20,11 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
import autoflowTemplate from './autoflow-tabular.html';
|
||||||
'./AutoflowTabularController',
|
import AutoflowTabularConstants from './AutoflowTabularConstants';
|
||||||
'./AutoflowTabularConstants',
|
import AutoflowTabularController from './AutoflowTabularController';
|
||||||
'./VueView',
|
import VueView from './VueView';
|
||||||
'./autoflow-tabular.html'
|
|
||||||
], function (AutoflowTabularController, AutoflowTabularConstants, VueView, autoflowTemplate) {
|
|
||||||
const ROW_HEIGHT = AutoflowTabularConstants.ROW_HEIGHT;
|
const ROW_HEIGHT = AutoflowTabularConstants.ROW_HEIGHT;
|
||||||
const SLIDER_HEIGHT = AutoflowTabularConstants.SLIDER_HEIGHT;
|
const SLIDER_HEIGHT = AutoflowTabularConstants.SLIDER_HEIGHT;
|
||||||
const INITIAL_COLUMN_WIDTH = AutoflowTabularConstants.INITIAL_COLUMN_WIDTH;
|
const INITIAL_COLUMN_WIDTH = AutoflowTabularConstants.INITIAL_COLUMN_WIDTH;
|
||||||
@ -35,7 +34,7 @@ define([
|
|||||||
/**
|
/**
|
||||||
* Implements the Autoflow Tabular view of a domain object.
|
* Implements the Autoflow Tabular view of a domain object.
|
||||||
*/
|
*/
|
||||||
function AutoflowTabularView(domainObject, openmct) {
|
export default function AutoflowTabularView(domainObject, openmct) {
|
||||||
const data = {
|
const data = {
|
||||||
items: [],
|
items: [],
|
||||||
columns: [],
|
columns: [],
|
||||||
@ -109,7 +108,4 @@ define([
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
AutoflowTabularView.prototype = Object.create(VueView.default.prototype);
|
AutoflowTabularView.prototype = Object.create(VueView.prototype);
|
||||||
|
|
||||||
return AutoflowTabularView;
|
|
||||||
});
|
|
||||||
|
@ -22,13 +22,15 @@
|
|||||||
|
|
||||||
import mount from 'utils/mount';
|
import mount from 'utils/mount';
|
||||||
export default function () {
|
export default function () {
|
||||||
return function VueView(options) {
|
class VueView {
|
||||||
|
constructor(options) {
|
||||||
const { vNode, destroy } = mount(options);
|
const { vNode, destroy } = mount(options);
|
||||||
|
|
||||||
this.show = function (container) {
|
this.show = function (container) {
|
||||||
container.appendChild(vNode.el);
|
container.appendChild(vNode.el);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.destroy = destroy;
|
this.destroy = destroy;
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return VueView;
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
export default function DOMObserver(element) {
|
||||||
function DOMObserver(element) {
|
|
||||||
this.element = element;
|
this.element = element;
|
||||||
this.observers = [];
|
this.observers = [];
|
||||||
}
|
}
|
||||||
@ -58,6 +57,3 @@ define([], function () {
|
|||||||
}.bind(this)
|
}.bind(this)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return DOMObserver;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(function () {
|
export default function DisplayLayoutType() {
|
||||||
function DisplayLayoutType() {
|
|
||||||
return {
|
return {
|
||||||
name: 'Display Layout',
|
name: 'Display Layout',
|
||||||
creatable: true,
|
creatable: true,
|
||||||
@ -67,6 +66,3 @@ define(function () {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return DisplayLayoutType;
|
|
||||||
});
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
/**
|
/**
|
||||||
* Handles drag interactions on frames in layouts. This will
|
* Handles drag interactions on frames in layouts. This will
|
||||||
* provides new positions/dimensions for frames based on
|
* provides new positions/dimensions for frames based on
|
||||||
@ -48,7 +47,7 @@ define([], function () {
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @memberof platform/features/layout
|
* @memberof platform/features/layout
|
||||||
*/
|
*/
|
||||||
function LayoutDrag(rawPosition, posFactor, dimFactor, gridSize) {
|
export default function LayoutDrag(rawPosition, posFactor, dimFactor, gridSize) {
|
||||||
this.rawPosition = rawPosition;
|
this.rawPosition = rawPosition;
|
||||||
this.posFactor = posFactor;
|
this.posFactor = posFactor;
|
||||||
this.dimFactor = dimFactor;
|
this.dimFactor = dimFactor;
|
||||||
@ -107,6 +106,3 @@ define([], function () {
|
|||||||
position: max(add(this.rawPosition.position, multiply(gridDelta, this.posFactor)), [0, 0])
|
position: max(add(this.rawPosition.position, multiply(gridDelta, this.posFactor)), [0, 0])
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
return LayoutDrag;
|
|
||||||
});
|
|
||||||
|
@ -20,12 +20,12 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./FiltersInspectorViewProvider'], function (FiltersInspectorViewProvider) {
|
import FiltersInspectorViewProvider from './FiltersInspectorViewProvider';
|
||||||
return function plugin(supportedObjectTypesArray) {
|
|
||||||
|
export default function plugin(supportedObjectTypesArray) {
|
||||||
return function install(openmct) {
|
return function install(openmct) {
|
||||||
openmct.inspectorViews.addProvider(
|
openmct.inspectorViews.addProvider(
|
||||||
new FiltersInspectorViewProvider.default(openmct, supportedObjectTypesArray)
|
new FiltersInspectorViewProvider(openmct, supportedObjectTypesArray)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
@ -20,14 +20,13 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./flexibleLayoutViewProvider', './utils/container', './toolbarProvider'], function (
|
import FlexibleLayoutViewProvider from './flexibleLayoutViewProvider';
|
||||||
FlexibleLayoutViewProvider,
|
import ToolBarProvider from './toolbarProvider';
|
||||||
Container,
|
import Container from './utils/container';
|
||||||
ToolBarProvider
|
|
||||||
) {
|
export default function plugin() {
|
||||||
return function plugin() {
|
|
||||||
return function install(openmct) {
|
return function install(openmct) {
|
||||||
openmct.objectViews.addProvider(new FlexibleLayoutViewProvider.default(openmct));
|
openmct.objectViews.addProvider(new FlexibleLayoutViewProvider(openmct));
|
||||||
|
|
||||||
openmct.types.addType('flexible-layout', {
|
openmct.types.addType('flexible-layout', {
|
||||||
name: 'Flexible Layout',
|
name: 'Flexible Layout',
|
||||||
@ -37,16 +36,15 @@ define(['./flexibleLayoutViewProvider', './utils/container', './toolbarProvider'
|
|||||||
cssClass: 'icon-flexible-layout',
|
cssClass: 'icon-flexible-layout',
|
||||||
initialize: function (domainObject) {
|
initialize: function (domainObject) {
|
||||||
domainObject.configuration = {
|
domainObject.configuration = {
|
||||||
containers: [new Container.default(50), new Container.default(50)],
|
containers: [new Container(50), new Container(50)],
|
||||||
rowsLayout: false
|
rowsLayout: false
|
||||||
};
|
};
|
||||||
domainObject.composition = [];
|
domainObject.composition = [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let toolbar = ToolBarProvider.default(openmct);
|
let toolbar = ToolBarProvider(openmct);
|
||||||
|
|
||||||
openmct.toolbars.addProvider(toolbar);
|
openmct.toolbars.addProvider(toolbar);
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
const helperFunctions = {
|
const helperFunctions = {
|
||||||
listenTo: function (object, event, callback, context) {
|
listenTo: function (object, event, callback, context) {
|
||||||
if (!this._listeningTo) {
|
if (!this._listeningTo) {
|
||||||
@ -95,5 +94,4 @@ define([], function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return helperFunctions;
|
export default helperFunctions;
|
||||||
});
|
|
||||||
|
@ -20,24 +20,24 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['../../../src/plugins/utcTimeSystem/LocalClock'], function (LocalClock) {
|
import LocalClock from '../../../src/plugins/utcTimeSystem/LocalClock';
|
||||||
|
|
||||||
|
class LADClock extends LocalClock {
|
||||||
/**
|
/**
|
||||||
* A {@link Clock} that mocks a "latest available data" type tick source.
|
* A {@link Clock} that mocks a "latest available data" type tick source.
|
||||||
* This is for testing purposes only, and behaves identically to a local clock.
|
* This is for testing purposes only, and behaves identically to a local clock.
|
||||||
* It DOES NOT tick on receipt of data.
|
* It DOES NOT tick on receipt of data.
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function LADClock(period) {
|
constructor(period) {
|
||||||
LocalClock.call(this, period);
|
super(period);
|
||||||
|
|
||||||
this.key = 'test-lad';
|
this.key = 'test-lad';
|
||||||
this.mode = 'lad';
|
this.mode = 'lad';
|
||||||
this.cssClass = 'icon-suitcase';
|
this.cssClass = 'icon-suitcase';
|
||||||
this.name = 'Latest available data';
|
this.name = 'Latest available data';
|
||||||
this.description = 'Updates when when new data is available';
|
this.description = 'Updates when new data is available';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LADClock.prototype = Object.create(LocalClock.prototype);
|
export default LADClock;
|
||||||
|
|
||||||
return LADClock;
|
|
||||||
});
|
|
||||||
|
@ -20,10 +20,10 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./LADClock'], function (LADClock) {
|
import LADClock from './LADClock';
|
||||||
return function () {
|
|
||||||
|
export default function () {
|
||||||
return function (openmct) {
|
return function (openmct) {
|
||||||
openmct.time.addClock(new LADClock());
|
openmct.time.addClock(new LADClock());
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['moment'], function (moment) {
|
import moment from 'moment';
|
||||||
|
|
||||||
const DATE_FORMAT = 'YYYY-MM-DD h:mm:ss.SSS a';
|
const DATE_FORMAT = 'YYYY-MM-DD h:mm:ss.SSS a';
|
||||||
|
|
||||||
const DATE_FORMATS = [DATE_FORMAT, 'YYYY-MM-DD h:mm:ss a', 'YYYY-MM-DD h:mm a', 'YYYY-MM-DD'];
|
const DATE_FORMATS = [DATE_FORMAT, 'YYYY-MM-DD h:mm:ss a', 'YYYY-MM-DD h:mm a', 'YYYY-MM-DD'];
|
||||||
@ -39,7 +40,7 @@ define(['moment'], function (moment) {
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @memberof platform/commonUI/formats
|
* @memberof platform/commonUI/formats
|
||||||
*/
|
*/
|
||||||
function LocalTimeFormat() {
|
export default function LocalTimeFormat() {
|
||||||
this.key = 'local-format';
|
this.key = 'local-format';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,6 +64,3 @@ define(['moment'], function (moment) {
|
|||||||
LocalTimeFormat.prototype.validate = function (text) {
|
LocalTimeFormat.prototype.validate = function (text) {
|
||||||
return moment(text, DATE_FORMATS).isValid();
|
return moment(text, DATE_FORMATS).isValid();
|
||||||
};
|
};
|
||||||
|
|
||||||
return LocalTimeFormat;
|
|
||||||
});
|
|
||||||
|
@ -20,13 +20,13 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
/**
|
/**
|
||||||
* This time system supports UTC dates and provides a ticking clock source.
|
* This time system supports UTC dates and provides a ticking clock source.
|
||||||
* @implements TimeSystem
|
* @implements TimeSystem
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function LocalTimeSystem() {
|
export default class LocalTimeSystem {
|
||||||
|
constructor() {
|
||||||
/**
|
/**
|
||||||
* Some metadata, which will be used to identify the time system in
|
* Some metadata, which will be used to identify the time system in
|
||||||
* the UI
|
* the UI
|
||||||
@ -41,6 +41,4 @@ define([], function () {
|
|||||||
|
|
||||||
this.isUTCBased = true;
|
this.isUTCBased = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return LocalTimeSystem;
|
|
||||||
});
|
|
||||||
|
@ -20,11 +20,12 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./LocalTimeSystem', './LocalTimeFormat'], function (LocalTimeSystem, LocalTimeFormat) {
|
import LocalTimeFormat from './LocalTimeFormat';
|
||||||
return function () {
|
import LocalTimeSystem from './LocalTimeSystem';
|
||||||
|
|
||||||
|
export default function () {
|
||||||
return function (openmct) {
|
return function (openmct) {
|
||||||
openmct.time.addTimeSystem(new LocalTimeSystem());
|
openmct.time.addTimeSystem(new LocalTimeSystem());
|
||||||
openmct.telemetry.addFormat(new LocalTimeFormat());
|
openmct.telemetry.addFormat(new LocalTimeFormat());
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
@ -20,8 +20,9 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['uuid'], function ({ v4: uuid }) {
|
import { v4 as uuid } from 'uuid';
|
||||||
return function Migrations(openmct) {
|
|
||||||
|
export default function Migrations(openmct) {
|
||||||
function getColumnNameKeyMap(domainObject) {
|
function getColumnNameKeyMap(domainObject) {
|
||||||
let composition = openmct.composition.get(domainObject);
|
let composition = openmct.composition.get(domainObject);
|
||||||
if (composition) {
|
if (composition) {
|
||||||
@ -275,5 +276,4 @@ define(['uuid'], function ({ v4: uuid }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
@ -20,158 +20,89 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
import ExampleDataVisualizationSourcePlugin from '../../example/dataVisualization/plugin';
|
||||||
'lodash',
|
import EventGeneratorPlugin from '../../example/eventGenerator/plugin';
|
||||||
'./utcTimeSystem/plugin',
|
import ExampleTags from '../../example/exampleTags/plugin';
|
||||||
'./remoteClock/plugin',
|
import ExampleUser from '../../example/exampleUser/plugin';
|
||||||
'./localTimeSystem/plugin',
|
import ExampleFaultSource from '../../example/faultManagement/exampleFaultSource';
|
||||||
'./ISOTimeFormat/plugin',
|
import GeneratorPlugin from '../../example/generator/plugin';
|
||||||
'./myItems/plugin',
|
import ExampleImagery from '../../example/imagery/plugin';
|
||||||
'../../example/generator/plugin',
|
import AutoflowPlugin from './autoflow/AutoflowTabularPlugin';
|
||||||
'../../example/eventGenerator/plugin',
|
import BarChartPlugin from './charts/bar/plugin';
|
||||||
'../../example/dataVisualization/plugin',
|
import ScatterPlotPlugin from './charts/scatter/plugin';
|
||||||
'./autoflow/AutoflowTabularPlugin',
|
import ClearData from './clearData/plugin';
|
||||||
'./timeConductor/plugin',
|
import Clock from './clock/plugin';
|
||||||
'../../example/imagery/plugin',
|
import ConditionPlugin from './condition/plugin';
|
||||||
'../../example/faultManagement/exampleFaultSource',
|
import ConditionWidgetPlugin from './conditionWidget/plugin';
|
||||||
'./imagery/plugin',
|
import CouchDBSearchFolder from './CouchDBSearchFolder/plugin';
|
||||||
'./summaryWidget/plugin',
|
import DefaultRootName from './defaultRootName/plugin';
|
||||||
'./URLIndicatorPlugin/URLIndicatorPlugin',
|
import DeviceClassifier from './DeviceClassifier/plugin';
|
||||||
'./telemetryMean/plugin',
|
import DisplayLayoutPlugin from './displayLayout/plugin';
|
||||||
'./plot/plugin',
|
import FaultManagementPlugin from './faultManagement/FaultManagementPlugin';
|
||||||
'./charts/bar/plugin',
|
import Filters from './filters/plugin';
|
||||||
'./charts/scatter/plugin',
|
import FlexibleLayout from './flexibleLayout/plugin';
|
||||||
'./telemetryTable/plugin',
|
import FolderView from './folderView/plugin';
|
||||||
'./staticRootPlugin/plugin',
|
import FormActions from './formActions/plugin';
|
||||||
'./notebook/plugin',
|
import GaugePlugin from './gauge/GaugePlugin';
|
||||||
'./displayLayout/plugin',
|
import GoToOriginalAction from './goToOriginalAction/plugin';
|
||||||
'./formActions/plugin',
|
import Hyperlink from './hyperlink/plugin';
|
||||||
'./folderView/plugin',
|
import ImageryPlugin from './imagery/plugin';
|
||||||
'./flexibleLayout/plugin',
|
import InspectorDataVisualization from './inspectorDataVisualization/plugin';
|
||||||
'./tabs/plugin',
|
import InspectorViews from './inspectorViews/plugin';
|
||||||
'./LADTable/plugin',
|
import ObjectInterceptors from './interceptors/plugin';
|
||||||
'./filters/plugin',
|
import ISOTimeFormat from './ISOTimeFormat/plugin';
|
||||||
'./objectMigration/plugin',
|
import LADTable from './LADTable/plugin';
|
||||||
'./goToOriginalAction/plugin',
|
import LocalStorage from './localStorage/plugin';
|
||||||
'./openInNewTabAction/plugin',
|
import LocalTimeSystem from './localTimeSystem/plugin';
|
||||||
'./clearData/plugin',
|
import MyItems from './myItems/plugin';
|
||||||
'./webPage/plugin',
|
import NewFolderAction from './newFolderAction/plugin';
|
||||||
'./condition/plugin',
|
import { NotebookPlugin, RestrictedNotebookPlugin } from './notebook/plugin';
|
||||||
'./conditionWidget/plugin',
|
import NotificationIndicator from './notificationIndicator/plugin';
|
||||||
'./themes/espresso',
|
import ObjectMigration from './objectMigration/plugin';
|
||||||
'./themes/snow',
|
import OpenInNewTabAction from './openInNewTabAction/plugin';
|
||||||
'./URLTimeSettingsSynchronizer/plugin',
|
import OperatorStatus from './operatorStatus/plugin';
|
||||||
'./notificationIndicator/plugin',
|
import PerformanceIndicator from './performanceIndicator/plugin';
|
||||||
'./newFolderAction/plugin',
|
import CouchDBPlugin from './persistence/couch/plugin';
|
||||||
'./persistence/couch/plugin',
|
import PlanLayout from './plan/plugin';
|
||||||
'./defaultRootName/plugin',
|
import PlotPlugin from './plot/plugin';
|
||||||
'./plan/plugin',
|
import RemoteClock from './remoteClock/plugin';
|
||||||
'./viewDatumAction/plugin',
|
import StaticRootPlugin from './staticRootPlugin/plugin';
|
||||||
'./viewLargeAction/plugin',
|
import SummaryWidget from './summaryWidget/plugin';
|
||||||
'./interceptors/plugin',
|
import Tabs from './tabs/plugin';
|
||||||
'./performanceIndicator/plugin',
|
import TelemetryMean from './telemetryMean/plugin';
|
||||||
'./CouchDBSearchFolder/plugin',
|
import TelemetryTablePlugin from './telemetryTable/plugin';
|
||||||
'./timeline/plugin',
|
import Espresso from './themes/espresso';
|
||||||
'./hyperlink/plugin',
|
import Snow from './themes/snow';
|
||||||
'./clock/plugin',
|
import TimeConductorPlugin from './timeConductor/plugin';
|
||||||
'./DeviceClassifier/plugin',
|
import Timeline from './timeline/plugin';
|
||||||
'./timer/plugin',
|
import TimeList from './timelist/plugin';
|
||||||
'./userIndicator/plugin',
|
import Timer from './timer/plugin';
|
||||||
'../../example/exampleUser/plugin',
|
import URLIndicatorPlugin from './URLIndicatorPlugin/URLIndicatorPlugin';
|
||||||
'./localStorage/plugin',
|
import URLTimeSettingsSynchronizer from './URLTimeSettingsSynchronizer/plugin';
|
||||||
'./operatorStatus/plugin',
|
import UserIndicator from './userIndicator/plugin';
|
||||||
'./gauge/GaugePlugin',
|
import UTCTimeSystem from './utcTimeSystem/plugin';
|
||||||
'./timelist/plugin',
|
import ViewDatumAction from './viewDatumAction/plugin';
|
||||||
'./faultManagement/FaultManagementPlugin',
|
import ViewLargeAction from './viewLargeAction/plugin';
|
||||||
'../../example/exampleTags/plugin',
|
import WebPagePlugin from './webPage/plugin';
|
||||||
'./inspectorViews/plugin',
|
|
||||||
'./inspectorDataVisualization/plugin'
|
|
||||||
], function (
|
|
||||||
_,
|
|
||||||
UTCTimeSystem,
|
|
||||||
RemoteClock,
|
|
||||||
LocalTimeSystem,
|
|
||||||
ISOTimeFormat,
|
|
||||||
MyItems,
|
|
||||||
GeneratorPlugin,
|
|
||||||
EventGeneratorPlugin,
|
|
||||||
ExampleDataVisualizationSourcePlugin,
|
|
||||||
AutoflowPlugin,
|
|
||||||
TimeConductorPlugin,
|
|
||||||
ExampleImagery,
|
|
||||||
ExampleFaultSource,
|
|
||||||
ImageryPlugin,
|
|
||||||
SummaryWidget,
|
|
||||||
URLIndicatorPlugin,
|
|
||||||
TelemetryMean,
|
|
||||||
PlotPlugin,
|
|
||||||
BarChartPlugin,
|
|
||||||
ScatterPlotPlugin,
|
|
||||||
TelemetryTablePlugin,
|
|
||||||
StaticRootPlugin,
|
|
||||||
Notebook,
|
|
||||||
DisplayLayoutPlugin,
|
|
||||||
FormActions,
|
|
||||||
FolderView,
|
|
||||||
FlexibleLayout,
|
|
||||||
Tabs,
|
|
||||||
LADTable,
|
|
||||||
Filters,
|
|
||||||
ObjectMigration,
|
|
||||||
GoToOriginalAction,
|
|
||||||
OpenInNewTabAction,
|
|
||||||
ClearData,
|
|
||||||
WebPagePlugin,
|
|
||||||
ConditionPlugin,
|
|
||||||
ConditionWidgetPlugin,
|
|
||||||
Espresso,
|
|
||||||
Snow,
|
|
||||||
URLTimeSettingsSynchronizer,
|
|
||||||
NotificationIndicator,
|
|
||||||
NewFolderAction,
|
|
||||||
CouchDBPlugin,
|
|
||||||
DefaultRootName,
|
|
||||||
PlanLayout,
|
|
||||||
ViewDatumAction,
|
|
||||||
ViewLargeAction,
|
|
||||||
ObjectInterceptors,
|
|
||||||
PerformanceIndicator,
|
|
||||||
CouchDBSearchFolder,
|
|
||||||
Timeline,
|
|
||||||
Hyperlink,
|
|
||||||
Clock,
|
|
||||||
DeviceClassifier,
|
|
||||||
Timer,
|
|
||||||
UserIndicator,
|
|
||||||
ExampleUser,
|
|
||||||
LocalStorage,
|
|
||||||
OperatorStatus,
|
|
||||||
GaugePlugin,
|
|
||||||
TimeList,
|
|
||||||
FaultManagementPlugin,
|
|
||||||
ExampleTags,
|
|
||||||
InspectorViews,
|
|
||||||
InspectorDataVisualization
|
|
||||||
) {
|
|
||||||
const plugins = {};
|
const plugins = {};
|
||||||
|
|
||||||
plugins.example = {};
|
plugins.example = {};
|
||||||
plugins.example.ExampleUser = ExampleUser.default;
|
plugins.example.ExampleUser = ExampleUser;
|
||||||
plugins.example.ExampleImagery = ExampleImagery.default;
|
plugins.example.ExampleImagery = ExampleImagery;
|
||||||
plugins.example.ExampleFaultSource = ExampleFaultSource.default;
|
plugins.example.ExampleFaultSource = ExampleFaultSource;
|
||||||
plugins.example.EventGeneratorPlugin = EventGeneratorPlugin.default;
|
plugins.example.EventGeneratorPlugin = EventGeneratorPlugin;
|
||||||
plugins.example.ExampleDataVisualizationSourcePlugin =
|
plugins.example.ExampleDataVisualizationSourcePlugin = ExampleDataVisualizationSourcePlugin;
|
||||||
ExampleDataVisualizationSourcePlugin.default;
|
plugins.example.ExampleTags = ExampleTags;
|
||||||
plugins.example.ExampleTags = ExampleTags.default;
|
plugins.example.Generator = () => GeneratorPlugin;
|
||||||
plugins.example.Generator = () => GeneratorPlugin.default;
|
|
||||||
|
|
||||||
plugins.UTCTimeSystem = UTCTimeSystem.default;
|
plugins.UTCTimeSystem = UTCTimeSystem;
|
||||||
plugins.LocalTimeSystem = LocalTimeSystem;
|
plugins.LocalTimeSystem = LocalTimeSystem;
|
||||||
plugins.RemoteClock = RemoteClock.default;
|
plugins.RemoteClock = RemoteClock;
|
||||||
|
|
||||||
plugins.MyItems = MyItems.default;
|
plugins.MyItems = MyItems;
|
||||||
|
|
||||||
plugins.StaticRootPlugin = StaticRootPlugin.default;
|
plugins.StaticRootPlugin = StaticRootPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A tabular view showing the latest values of multiple telemetry points at
|
* A tabular view showing the latest values of multiple telemetry points at
|
||||||
@ -184,61 +115,60 @@ define([
|
|||||||
*/
|
*/
|
||||||
plugins.AutoflowView = AutoflowPlugin;
|
plugins.AutoflowView = AutoflowPlugin;
|
||||||
|
|
||||||
plugins.Conductor = TimeConductorPlugin.default;
|
plugins.Conductor = TimeConductorPlugin;
|
||||||
|
|
||||||
plugins.CouchDB = CouchDBPlugin.default;
|
plugins.CouchDB = CouchDBPlugin;
|
||||||
|
|
||||||
plugins.ImageryPlugin = ImageryPlugin;
|
plugins.ImageryPlugin = ImageryPlugin;
|
||||||
plugins.Plot = PlotPlugin.default;
|
plugins.Plot = PlotPlugin;
|
||||||
plugins.BarChart = BarChartPlugin.default;
|
plugins.BarChart = BarChartPlugin;
|
||||||
plugins.ScatterPlot = ScatterPlotPlugin.default;
|
plugins.ScatterPlot = ScatterPlotPlugin;
|
||||||
plugins.TelemetryTable = TelemetryTablePlugin;
|
plugins.TelemetryTable = TelemetryTablePlugin;
|
||||||
|
|
||||||
plugins.SummaryWidget = SummaryWidget;
|
plugins.SummaryWidget = SummaryWidget;
|
||||||
plugins.TelemetryMean = TelemetryMean;
|
plugins.TelemetryMean = TelemetryMean;
|
||||||
plugins.URLIndicator = URLIndicatorPlugin;
|
plugins.URLIndicator = URLIndicatorPlugin;
|
||||||
plugins.Notebook = Notebook.NotebookPlugin;
|
plugins.Notebook = NotebookPlugin;
|
||||||
plugins.RestrictedNotebook = Notebook.RestrictedNotebookPlugin;
|
plugins.RestrictedNotebook = RestrictedNotebookPlugin;
|
||||||
plugins.DisplayLayout = DisplayLayoutPlugin.default;
|
plugins.DisplayLayout = DisplayLayoutPlugin;
|
||||||
plugins.FaultManagement = FaultManagementPlugin.default;
|
plugins.FaultManagement = FaultManagementPlugin;
|
||||||
plugins.FormActions = FormActions;
|
plugins.FormActions = FormActions;
|
||||||
plugins.FolderView = FolderView.default;
|
plugins.FolderView = FolderView;
|
||||||
plugins.Tabs = Tabs;
|
plugins.Tabs = Tabs;
|
||||||
plugins.FlexibleLayout = FlexibleLayout;
|
plugins.FlexibleLayout = FlexibleLayout;
|
||||||
plugins.LADTable = LADTable.default;
|
plugins.LADTable = LADTable;
|
||||||
plugins.Filters = Filters;
|
plugins.Filters = Filters;
|
||||||
plugins.ObjectMigration = ObjectMigration.default;
|
plugins.ObjectMigration = ObjectMigration;
|
||||||
plugins.GoToOriginalAction = GoToOriginalAction.default;
|
plugins.GoToOriginalAction = GoToOriginalAction;
|
||||||
plugins.OpenInNewTabAction = OpenInNewTabAction.default;
|
plugins.OpenInNewTabAction = OpenInNewTabAction;
|
||||||
plugins.ClearData = ClearData.default;
|
plugins.ClearData = ClearData;
|
||||||
plugins.WebPage = WebPagePlugin.default;
|
plugins.WebPage = WebPagePlugin;
|
||||||
plugins.Espresso = Espresso.default;
|
plugins.Espresso = Espresso;
|
||||||
plugins.Snow = Snow.default;
|
plugins.Snow = Snow;
|
||||||
plugins.Condition = ConditionPlugin.default;
|
plugins.Condition = ConditionPlugin;
|
||||||
plugins.ConditionWidget = ConditionWidgetPlugin.default;
|
plugins.ConditionWidget = ConditionWidgetPlugin;
|
||||||
plugins.URLTimeSettingsSynchronizer = URLTimeSettingsSynchronizer.default;
|
plugins.URLTimeSettingsSynchronizer = URLTimeSettingsSynchronizer;
|
||||||
plugins.NotificationIndicator = NotificationIndicator.default;
|
plugins.NotificationIndicator = NotificationIndicator;
|
||||||
plugins.NewFolderAction = NewFolderAction.default;
|
plugins.NewFolderAction = NewFolderAction;
|
||||||
plugins.ISOTimeFormat = ISOTimeFormat.default;
|
plugins.ISOTimeFormat = ISOTimeFormat;
|
||||||
plugins.DefaultRootName = DefaultRootName.default;
|
plugins.DefaultRootName = DefaultRootName;
|
||||||
plugins.PlanLayout = PlanLayout.default;
|
plugins.PlanLayout = PlanLayout;
|
||||||
plugins.ViewDatumAction = ViewDatumAction.default;
|
plugins.ViewDatumAction = ViewDatumAction;
|
||||||
plugins.ViewLargeAction = ViewLargeAction.default;
|
plugins.ViewLargeAction = ViewLargeAction;
|
||||||
plugins.ObjectInterceptors = ObjectInterceptors.default;
|
plugins.ObjectInterceptors = ObjectInterceptors;
|
||||||
plugins.PerformanceIndicator = PerformanceIndicator.default;
|
plugins.PerformanceIndicator = PerformanceIndicator;
|
||||||
plugins.CouchDBSearchFolder = CouchDBSearchFolder.default;
|
plugins.CouchDBSearchFolder = CouchDBSearchFolder;
|
||||||
plugins.Timeline = Timeline.default;
|
plugins.Timeline = Timeline;
|
||||||
plugins.Hyperlink = Hyperlink.default;
|
plugins.Hyperlink = Hyperlink;
|
||||||
plugins.Clock = Clock.default;
|
plugins.Clock = Clock;
|
||||||
plugins.Timer = Timer.default;
|
plugins.Timer = Timer;
|
||||||
plugins.DeviceClassifier = DeviceClassifier.default;
|
plugins.DeviceClassifier = DeviceClassifier;
|
||||||
plugins.UserIndicator = UserIndicator.default;
|
plugins.UserIndicator = UserIndicator;
|
||||||
plugins.LocalStorage = LocalStorage.default;
|
plugins.LocalStorage = LocalStorage;
|
||||||
plugins.OperatorStatus = OperatorStatus.default;
|
plugins.OperatorStatus = OperatorStatus;
|
||||||
plugins.Gauge = GaugePlugin.default;
|
plugins.Gauge = GaugePlugin;
|
||||||
plugins.Timelist = TimeList.default;
|
plugins.Timelist = TimeList;
|
||||||
plugins.InspectorViews = InspectorViews.default;
|
plugins.InspectorViews = InspectorViews;
|
||||||
plugins.InspectorDataVisualization = InspectorDataVisualization.default;
|
plugins.InspectorDataVisualization = InspectorDataVisualization;
|
||||||
|
|
||||||
return plugins;
|
export default plugins;
|
||||||
});
|
|
||||||
|
@ -20,12 +20,11 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
/**
|
/**
|
||||||
* Policy determining which views can apply to summary widget. Disables
|
* Policy determining which views can apply to summary widget. Disables
|
||||||
* any view other than normal summary widget view.
|
* any view other than normal summary widget view.
|
||||||
*/
|
*/
|
||||||
function SummaryWidgetViewPolicy() {}
|
export default function SummaryWidgetViewPolicy() {}
|
||||||
|
|
||||||
SummaryWidgetViewPolicy.prototype.allow = function (view, domainObject) {
|
SummaryWidgetViewPolicy.prototype.allow = function (view, domainObject) {
|
||||||
if (domainObject.getModel().type === 'summary-widget') {
|
if (domainObject.getModel().type === 'summary-widget') {
|
||||||
@ -34,6 +33,3 @@ define([], function () {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
return SummaryWidgetViewPolicy;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
export default function SummaryWidgetsCompositionPolicy(openmct) {
|
||||||
function SummaryWidgetsCompositionPolicy(openmct) {
|
|
||||||
this.openmct = openmct;
|
this.openmct = openmct;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,6 +33,3 @@ define([], function () {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
return SummaryWidgetsCompositionPolicy;
|
|
||||||
});
|
|
||||||
|
@ -1,17 +1,9 @@
|
|||||||
define([
|
import SummaryWidgetMetadataProvider from './src/telemetry/SummaryWidgetMetadataProvider';
|
||||||
'./SummaryWidgetsCompositionPolicy',
|
import SummaryWidgetTelemetryProvider from './src/telemetry/SummaryWidgetTelemetryProvider';
|
||||||
'./src/telemetry/SummaryWidgetMetadataProvider',
|
import SummaryWidgetViewProvider from './src/views/SummaryWidgetViewProvider';
|
||||||
'./src/telemetry/SummaryWidgetTelemetryProvider',
|
import SummaryWidgetsCompositionPolicy from './SummaryWidgetsCompositionPolicy';
|
||||||
'./src/views/SummaryWidgetViewProvider',
|
|
||||||
'./SummaryWidgetViewPolicy'
|
export default function plugin() {
|
||||||
], function (
|
|
||||||
SummaryWidgetsCompositionPolicy,
|
|
||||||
SummaryWidgetMetadataProvider,
|
|
||||||
SummaryWidgetTelemetryProvider,
|
|
||||||
SummaryWidgetViewProvider,
|
|
||||||
SummaryWidgetViewPolicy
|
|
||||||
) {
|
|
||||||
function plugin() {
|
|
||||||
const widgetType = {
|
const widgetType = {
|
||||||
name: 'Summary Widget',
|
name: 'Summary Widget',
|
||||||
description: 'A compact status update for collections of telemetry-producing items',
|
description: 'A compact status update for collections of telemetry-producing items',
|
||||||
@ -93,6 +85,3 @@ define([
|
|||||||
openmct.objectViews.addProvider(new SummaryWidgetViewProvider(openmct));
|
openmct.objectViews.addProvider(new SummaryWidgetViewProvider(openmct));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return plugin;
|
|
||||||
});
|
|
||||||
|
@ -19,23 +19,16 @@
|
|||||||
* 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.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
define([
|
|
||||||
'../res/conditionTemplate.html',
|
import EventEmitter from 'EventEmitter';
|
||||||
'./input/ObjectSelect',
|
|
||||||
'./input/KeySelect',
|
import * as templateHelpers from '../../../utils/template/templateHelpers';
|
||||||
'./input/OperationSelect',
|
import conditionTemplate from '../res/conditionTemplate.html';
|
||||||
'./eventHelpers',
|
import eventHelpers from './eventHelpers';
|
||||||
'../../../utils/template/templateHelpers',
|
import KeySelect from './input/KeySelect';
|
||||||
'EventEmitter'
|
import ObjectSelect from './input/ObjectSelect';
|
||||||
], function (
|
import OperationSelect from './input/OperationSelect';
|
||||||
conditionTemplate,
|
|
||||||
ObjectSelect,
|
|
||||||
KeySelect,
|
|
||||||
OperationSelect,
|
|
||||||
eventHelpers,
|
|
||||||
templateHelpers,
|
|
||||||
EventEmitter
|
|
||||||
) {
|
|
||||||
/**
|
/**
|
||||||
* Represents an individual condition for a summary widget rule. Manages the
|
* Represents an individual condition for a summary widget rule. Manages the
|
||||||
* associated inputs and view.
|
* associated inputs and view.
|
||||||
@ -46,7 +39,7 @@ define([
|
|||||||
* @param {ConditionManager} conditionManager A ConditionManager instance for populating
|
* @param {ConditionManager} conditionManager A ConditionManager instance for populating
|
||||||
* selects with configuration data
|
* selects with configuration data
|
||||||
*/
|
*/
|
||||||
function Condition(conditionConfig, index, conditionManager) {
|
export default function Condition(conditionConfig, index, conditionManager) {
|
||||||
eventHelpers.extend(this);
|
eventHelpers.extend(this);
|
||||||
this.config = conditionConfig;
|
this.config = conditionConfig;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
@ -255,6 +248,3 @@ define([
|
|||||||
|
|
||||||
return fragment;
|
return fragment;
|
||||||
};
|
};
|
||||||
|
|
||||||
return Condition;
|
|
||||||
});
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
define([], function () {
|
|
||||||
/**
|
/**
|
||||||
* Responsible for maintaining the possible operations for conditions
|
* Responsible for maintaining the possible operations for conditions
|
||||||
* in this widget, and evaluating the boolean value of conditions passed as
|
* in this widget, and evaluating the boolean value of conditions passed as
|
||||||
@ -10,7 +9,7 @@ define([], function () {
|
|||||||
* @param {Object} compositionObjs The current set of composition objects to
|
* @param {Object} compositionObjs The current set of composition objects to
|
||||||
* evaluate for 'any' and 'all' conditions
|
* evaluate for 'any' and 'all' conditions
|
||||||
*/
|
*/
|
||||||
function ConditionEvaluator(subscriptionCache, compositionObjs) {
|
export default function ConditionEvaluator(subscriptionCache, compositionObjs) {
|
||||||
this.subscriptionCache = subscriptionCache;
|
this.subscriptionCache = subscriptionCache;
|
||||||
this.compositionObjs = compositionObjs;
|
this.compositionObjs = compositionObjs;
|
||||||
|
|
||||||
@ -481,6 +480,3 @@ define([], function () {
|
|||||||
ConditionEvaluator.prototype.useTestData = function (useTestCache) {
|
ConditionEvaluator.prototype.useTestData = function (useTestCache) {
|
||||||
this.useTestCache = useTestCache;
|
this.useTestCache = useTestCache;
|
||||||
};
|
};
|
||||||
|
|
||||||
return ConditionEvaluator;
|
|
||||||
});
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
define(['./ConditionEvaluator', 'objectUtils', 'EventEmitter', 'lodash'], function (
|
import EventEmitter from 'EventEmitter';
|
||||||
ConditionEvaluator,
|
import _ from 'lodash';
|
||||||
objectUtils,
|
import objectUtils from 'objectUtils';
|
||||||
EventEmitter,
|
|
||||||
_
|
import ConditionEvaluator from './ConditionEvaluator';
|
||||||
) {
|
|
||||||
/**
|
/**
|
||||||
* Provides a centralized content manager for conditions in the summary widget.
|
* Provides a centralized content manager for conditions in the summary widget.
|
||||||
* Loads and caches composition and telemetry subscriptions, and maintains a
|
* Loads and caches composition and telemetry subscriptions, and maintains a
|
||||||
@ -12,7 +12,7 @@ define(['./ConditionEvaluator', 'objectUtils', 'EventEmitter', 'lodash'], functi
|
|||||||
* @param {Object} domainObject the Summary Widget domain object
|
* @param {Object} domainObject the Summary Widget domain object
|
||||||
* @param {MCT} openmct an MCT instance
|
* @param {MCT} openmct an MCT instance
|
||||||
*/
|
*/
|
||||||
function ConditionManager(domainObject, openmct) {
|
export default function ConditionManager(domainObject, openmct) {
|
||||||
this.domainObject = domainObject;
|
this.domainObject = domainObject;
|
||||||
this.openmct = openmct;
|
this.openmct = openmct;
|
||||||
|
|
||||||
@ -381,6 +381,3 @@ define(['./ConditionEvaluator', 'objectUtils', 'EventEmitter', 'lodash'], functi
|
|||||||
this.composition.off('remove', this.onCompositionRemove, this);
|
this.composition.off('remove', this.onCompositionRemove, this);
|
||||||
this.composition.off('load', this.onCompositionLoad, this);
|
this.composition.off('load', this.onCompositionLoad, this);
|
||||||
};
|
};
|
||||||
|
|
||||||
return ConditionManager;
|
|
||||||
});
|
|
||||||
|
@ -1,22 +1,13 @@
|
|||||||
define([
|
import EventEmitter from 'EventEmitter';
|
||||||
'../res/ruleTemplate.html',
|
import _ from 'lodash';
|
||||||
'./Condition',
|
|
||||||
'./input/ColorPalette',
|
import * as templateHelpers from '../../../utils/template/templateHelpers';
|
||||||
'./input/IconPalette',
|
import ruleTemplate from '../res/ruleTemplate.html';
|
||||||
'./eventHelpers',
|
import Condition from './Condition';
|
||||||
'../../../utils/template/templateHelpers',
|
import eventHelpers from './eventHelpers';
|
||||||
'EventEmitter',
|
import ColorPalette from './input/ColorPalette';
|
||||||
'lodash'
|
import IconPalette from './input/IconPalette';
|
||||||
], function (
|
|
||||||
ruleTemplate,
|
|
||||||
Condition,
|
|
||||||
ColorPalette,
|
|
||||||
IconPalette,
|
|
||||||
eventHelpers,
|
|
||||||
templateHelpers,
|
|
||||||
EventEmitter,
|
|
||||||
_
|
|
||||||
) {
|
|
||||||
/**
|
/**
|
||||||
* An object representing a summary widget rule. Maintains a set of text
|
* An object representing a summary widget rule. Maintains a set of text
|
||||||
* and css properties for output, and a set of conditions for configuring
|
* and css properties for output, and a set of conditions for configuring
|
||||||
@ -29,7 +20,14 @@ define([
|
|||||||
* @param {WidgetDnD} widgetDnD A WidgetDnD instance to handle dragging and dropping rules
|
* @param {WidgetDnD} widgetDnD A WidgetDnD instance to handle dragging and dropping rules
|
||||||
* @param {element} container The DOM element which contains this summary widget
|
* @param {element} container The DOM element which contains this summary widget
|
||||||
*/
|
*/
|
||||||
function Rule(ruleConfig, domainObject, openmct, conditionManager, widgetDnD, container) {
|
export default function Rule(
|
||||||
|
ruleConfig,
|
||||||
|
domainObject,
|
||||||
|
openmct,
|
||||||
|
conditionManager,
|
||||||
|
widgetDnD,
|
||||||
|
container
|
||||||
|
) {
|
||||||
eventHelpers.extend(this);
|
eventHelpers.extend(this);
|
||||||
const self = this;
|
const self = this;
|
||||||
const THUMB_ICON_CLASS = 'c-sw__icon js-sw__icon';
|
const THUMB_ICON_CLASS = 'c-sw__icon js-sw__icon';
|
||||||
@ -164,9 +162,7 @@ define([
|
|||||||
function onDragStart(event) {
|
function onDragStart(event) {
|
||||||
document.querySelectorAll('.t-drag-indicator').forEach((indicator) => {
|
document.querySelectorAll('.t-drag-indicator').forEach((indicator) => {
|
||||||
// eslint-disable-next-line no-invalid-this
|
// eslint-disable-next-line no-invalid-this
|
||||||
const ruleHeader = self.domElement
|
const ruleHeader = self.domElement.querySelectorAll('.widget-rule-header')[0].cloneNode(true);
|
||||||
.querySelectorAll('.widget-rule-header')[0]
|
|
||||||
.cloneNode(true);
|
|
||||||
indicator.textContent = '';
|
indicator.textContent = '';
|
||||||
indicator.appendChild(ruleHeader);
|
indicator.appendChild(ruleHeader);
|
||||||
});
|
});
|
||||||
@ -532,6 +528,3 @@ define([
|
|||||||
this.description.innerText = self.config.description;
|
this.description.innerText = self.config.description;
|
||||||
this.config.description = description;
|
this.config.description = description;
|
||||||
};
|
};
|
||||||
|
|
||||||
return Rule;
|
|
||||||
});
|
|
||||||
|
@ -1,26 +1,13 @@
|
|||||||
define([
|
import * as urlSanitizeLib from '@braintree/sanitize-url';
|
||||||
'../res/widgetTemplate.html',
|
|
||||||
'./Rule',
|
import * as templateHelpers from '../../../utils/template/templateHelpers';
|
||||||
'./ConditionManager',
|
import widgetTemplate from '../res/widgetTemplate.html';
|
||||||
'./TestDataManager',
|
import ConditionManager from './ConditionManager';
|
||||||
'./WidgetDnD',
|
import eventHelpers from './eventHelpers';
|
||||||
'./eventHelpers',
|
import Rule from './Rule';
|
||||||
'../../../utils/template/templateHelpers',
|
import TestDataManager from './TestDataManager';
|
||||||
'objectUtils',
|
import WidgetDnD from './WidgetDnD';
|
||||||
'lodash',
|
|
||||||
'@braintree/sanitize-url'
|
|
||||||
], function (
|
|
||||||
widgetTemplate,
|
|
||||||
Rule,
|
|
||||||
ConditionManager,
|
|
||||||
TestDataManager,
|
|
||||||
WidgetDnD,
|
|
||||||
eventHelpers,
|
|
||||||
templateHelpers,
|
|
||||||
objectUtils,
|
|
||||||
_,
|
|
||||||
urlSanitizeLib
|
|
||||||
) {
|
|
||||||
//default css configuration for new rules
|
//default css configuration for new rules
|
||||||
const DEFAULT_PROPS = {
|
const DEFAULT_PROPS = {
|
||||||
color: '#cccccc',
|
color: '#cccccc',
|
||||||
@ -36,7 +23,7 @@ define([
|
|||||||
* @param {Object} domainObject The domain Object represented by this Widget
|
* @param {Object} domainObject The domain Object represented by this Widget
|
||||||
* @param {MCT} openmct An MCT instance
|
* @param {MCT} openmct An MCT instance
|
||||||
*/
|
*/
|
||||||
function SummaryWidget(domainObject, openmct) {
|
export default function SummaryWidget(domainObject, openmct) {
|
||||||
eventHelpers.extend(this);
|
eventHelpers.extend(this);
|
||||||
|
|
||||||
this.domainObject = domainObject;
|
this.domainObject = domainObject;
|
||||||
@ -402,12 +389,5 @@ define([
|
|||||||
* Mutate this domain object's configuration with the current local configuration
|
* Mutate this domain object's configuration with the current local configuration
|
||||||
*/
|
*/
|
||||||
SummaryWidget.prototype.updateDomainObject = function () {
|
SummaryWidget.prototype.updateDomainObject = function () {
|
||||||
this.openmct.objects.mutate(
|
this.openmct.objects.mutate(this.domainObject, 'configuration', this.domainObject.configuration);
|
||||||
this.domainObject,
|
|
||||||
'configuration',
|
|
||||||
this.domainObject.configuration
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return SummaryWidget;
|
|
||||||
});
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
define([
|
import EventEmitter from 'EventEmitter';
|
||||||
'../res/testDataItemTemplate.html',
|
|
||||||
'./input/ObjectSelect',
|
import * as templateHelpers from '../../../utils/template/templateHelpers';
|
||||||
'./input/KeySelect',
|
import itemTemplate from '../res/testDataItemTemplate.html';
|
||||||
'./eventHelpers',
|
import eventHelpers from './eventHelpers';
|
||||||
'../../../utils/template/templateHelpers',
|
import KeySelect from './input/KeySelect';
|
||||||
'EventEmitter'
|
import ObjectSelect from './input/ObjectSelect';
|
||||||
], function (itemTemplate, ObjectSelect, KeySelect, eventHelpers, templateHelpers, EventEmitter) {
|
|
||||||
/**
|
/**
|
||||||
* An object representing a single mock telemetry value
|
* An object representing a single mock telemetry value
|
||||||
* @param {object} itemConfig the configuration for this item, consisting of
|
* @param {object} itemConfig the configuration for this item, consisting of
|
||||||
@ -17,7 +17,7 @@ define([
|
|||||||
* for populating selects with configuration data
|
* for populating selects with configuration data
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function TestDataItem(itemConfig, index, conditionManager) {
|
export default function TestDataItem(itemConfig, index, conditionManager) {
|
||||||
eventHelpers.extend(this);
|
eventHelpers.extend(this);
|
||||||
this.config = itemConfig;
|
this.config = itemConfig;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
@ -188,6 +188,3 @@ define([
|
|||||||
inputArea.append(this.valueInput);
|
inputArea.append(this.valueInput);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return TestDataItem;
|
|
||||||
});
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
define([
|
import _ from 'lodash';
|
||||||
'./eventHelpers',
|
|
||||||
'../res/testDataTemplate.html',
|
import * as templateHelpers from '../../../utils/template/templateHelpers';
|
||||||
'./TestDataItem',
|
import testDataTemplate from '../res/testDataTemplate.html';
|
||||||
'../../../utils/template/templateHelpers',
|
import eventHelpers from './eventHelpers';
|
||||||
'lodash'
|
import TestDataItem from './TestDataItem';
|
||||||
], function (eventHelpers, testDataTemplate, TestDataItem, templateHelpers, _) {
|
|
||||||
/**
|
/**
|
||||||
* Controls the input and usage of test data in the summary widget.
|
* Controls the input and usage of test data in the summary widget.
|
||||||
* @constructor
|
* @constructor
|
||||||
@ -12,7 +12,7 @@ define([
|
|||||||
* @param {ConditionManager} conditionManager A conditionManager instance
|
* @param {ConditionManager} conditionManager A conditionManager instance
|
||||||
* @param {MCT} openmct and MCT instance
|
* @param {MCT} openmct and MCT instance
|
||||||
*/
|
*/
|
||||||
function TestDataManager(domainObject, conditionManager, openmct) {
|
export default function TestDataManager(domainObject, conditionManager, openmct) {
|
||||||
eventHelpers.extend(this);
|
eventHelpers.extend(this);
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
@ -196,6 +196,3 @@ define([
|
|||||||
item.remove();
|
item.remove();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
return TestDataManager;
|
|
||||||
});
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
define([
|
import EventEmitter from 'EventEmitter';
|
||||||
'../res/ruleImageTemplate.html',
|
|
||||||
'EventEmitter',
|
import * as templateHelpers from '../../../utils/template/templateHelpers';
|
||||||
'../../../utils/template/templateHelpers'
|
import ruleImageTemplate from '../res/ruleImageTemplate.html';
|
||||||
], function (ruleImageTemplate, EventEmitter, templateHelpers) {
|
|
||||||
/**
|
/**
|
||||||
* Manages the Sortable List interface for reordering rules by drag and drop
|
* Manages the Sortable List interface for reordering rules by drag and drop
|
||||||
* @param {Element} container The DOM element that contains this Summary Widget's view
|
* @param {Element} container The DOM element that contains this Summary Widget's view
|
||||||
* @param {string[]} ruleOrder An array of rule IDs representing the current rule order
|
* @param {string[]} ruleOrder An array of rule IDs representing the current rule order
|
||||||
* @param {Object} rulesById An object mapping rule IDs to rule configurations
|
* @param {Object} rulesById An object mapping rule IDs to rule configurations
|
||||||
*/
|
*/
|
||||||
function WidgetDnD(container, ruleOrder, rulesById) {
|
export default function WidgetDnD(container, ruleOrder, rulesById) {
|
||||||
this.container = container;
|
this.container = container;
|
||||||
this.ruleOrder = ruleOrder;
|
this.ruleOrder = ruleOrder;
|
||||||
this.rulesById = rulesById;
|
this.rulesById = rulesById;
|
||||||
@ -160,6 +160,3 @@ define([
|
|||||||
this.imageContainer.hide();
|
this.imageContainer.hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return WidgetDnD;
|
|
||||||
});
|
|
||||||
|
@ -20,9 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
const helperFunctions = {
|
const helperFunctions = {
|
||||||
listenTo: function (object, event, callback, context) {
|
listenTo(object, event, callback, context) {
|
||||||
if (!this._listeningTo) {
|
if (!this._listeningTo) {
|
||||||
this._listeningTo = [];
|
this._listeningTo = [];
|
||||||
}
|
}
|
||||||
@ -48,7 +47,7 @@ define([], function () {
|
|||||||
this._listeningTo.push(listener);
|
this._listeningTo.push(listener);
|
||||||
},
|
},
|
||||||
|
|
||||||
stopListening: function (object, event, callback, context) {
|
stopListening(object, event, callback, context) {
|
||||||
if (!this._listeningTo) {
|
if (!this._listeningTo) {
|
||||||
this._listeningTo = [];
|
this._listeningTo = [];
|
||||||
}
|
}
|
||||||
@ -95,5 +94,4 @@ define([], function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return helperFunctions;
|
export default helperFunctions;
|
||||||
});
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
define(['./Palette'], function (Palette) {
|
import Palette from './Palette';
|
||||||
|
|
||||||
// The colors that will be used to instantiate this palette if none are provided
|
// The colors that will be used to instantiate this palette if none are provided
|
||||||
const DEFAULT_COLORS = [
|
const DEFAULT_COLORS = [
|
||||||
'#000000',
|
'#000000',
|
||||||
@ -91,7 +92,7 @@ define(['./Palette'], function (Palette) {
|
|||||||
* @param {Element} container The view that contains this palette
|
* @param {Element} container The view that contains this palette
|
||||||
* @param {string[]} colors (optional) A list of colors that should be used to instantiate this palette
|
* @param {string[]} colors (optional) A list of colors that should be used to instantiate this palette
|
||||||
*/
|
*/
|
||||||
function ColorPalette(cssClass, container, colors) {
|
export default function ColorPalette(cssClass, container, colors) {
|
||||||
this.colors = colors || DEFAULT_COLORS;
|
this.colors = colors || DEFAULT_COLORS;
|
||||||
this.palette = new Palette(cssClass, container, this.colors);
|
this.palette = new Palette(cssClass, container, this.colors);
|
||||||
|
|
||||||
@ -123,6 +124,3 @@ define(['./Palette'], function (Palette) {
|
|||||||
|
|
||||||
return this.palette;
|
return this.palette;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ColorPalette;
|
|
||||||
});
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
define(['./Palette'], function (Palette) {
|
import Palette from './Palette';
|
||||||
|
|
||||||
//The icons that will be used to instantiate this palette if none are provided
|
//The icons that will be used to instantiate this palette if none are provided
|
||||||
const DEFAULT_ICONS = [
|
const DEFAULT_ICONS = [
|
||||||
'icon-alert-rect',
|
'icon-alert-rect',
|
||||||
@ -35,7 +36,7 @@ define(['./Palette'], function (Palette) {
|
|||||||
* @param {Element} container The view that contains this palette
|
* @param {Element} container The view that contains this palette
|
||||||
* @param {string[]} icons (optional) A list of icons that should be used to instantiate this palette
|
* @param {string[]} icons (optional) A list of icons that should be used to instantiate this palette
|
||||||
*/
|
*/
|
||||||
function IconPalette(cssClass, container, icons) {
|
export default function IconPalette(cssClass, container, icons) {
|
||||||
this.icons = icons || DEFAULT_ICONS;
|
this.icons = icons || DEFAULT_ICONS;
|
||||||
this.palette = new Palette(cssClass, container, this.icons);
|
this.palette = new Palette(cssClass, container, this.icons);
|
||||||
|
|
||||||
@ -72,6 +73,3 @@ define(['./Palette'], function (Palette) {
|
|||||||
|
|
||||||
return this.palette;
|
return this.palette;
|
||||||
}
|
}
|
||||||
|
|
||||||
return IconPalette;
|
|
||||||
});
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
define(['./Select'], function (Select) {
|
import Select from './Select';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a {Select} element whose composition is dynamically updated with
|
* Create a {Select} element whose composition is dynamically updated with
|
||||||
* the telemetry fields of a particular domain object
|
* the telemetry fields of a particular domain object
|
||||||
@ -15,7 +16,7 @@ define(['./Select'], function (Select) {
|
|||||||
*/
|
*/
|
||||||
const NULLVALUE = '- Select Field -';
|
const NULLVALUE = '- Select Field -';
|
||||||
|
|
||||||
function KeySelect(config, objectSelect, manager, changeCallback) {
|
export default function KeySelect(config, objectSelect, manager, changeCallback) {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
this.config = config;
|
this.config = config;
|
||||||
@ -90,6 +91,3 @@ define(['./Select'], function (Select) {
|
|||||||
KeySelect.prototype.destroy = function () {
|
KeySelect.prototype.destroy = function () {
|
||||||
this.objectSelect.destroy();
|
this.objectSelect.destroy();
|
||||||
};
|
};
|
||||||
|
|
||||||
return KeySelect;
|
|
||||||
});
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
define(['./Select', 'objectUtils'], function (Select, objectUtils) {
|
import objectUtils from 'objectUtils';
|
||||||
|
|
||||||
|
import Select from './Select';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a {Select} element whose composition is dynamically updated with
|
* Create a {Select} element whose composition is dynamically updated with
|
||||||
* the current composition of the Summary Widget
|
* the current composition of the Summary Widget
|
||||||
@ -10,7 +13,7 @@ define(['./Select', 'objectUtils'], function (Select, objectUtils) {
|
|||||||
* @param {string[][]} baseOptions A set of [value, label] keyword pairs to
|
* @param {string[][]} baseOptions A set of [value, label] keyword pairs to
|
||||||
* display regardless of the composition state
|
* display regardless of the composition state
|
||||||
*/
|
*/
|
||||||
function ObjectSelect(config, manager, baseOptions) {
|
export default function ObjectSelect(config, manager, baseOptions) {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
this.config = config;
|
this.config = config;
|
||||||
@ -81,6 +84,3 @@ define(['./Select', 'objectUtils'], function (Select, objectUtils) {
|
|||||||
});
|
});
|
||||||
this.select.setOptions(items);
|
this.select.setOptions(items);
|
||||||
};
|
};
|
||||||
|
|
||||||
return ObjectSelect;
|
|
||||||
});
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
define(['./Select', '../eventHelpers'], function (Select, eventHelpers) {
|
import eventHelpers from '../eventHelpers';
|
||||||
|
import Select from './Select';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a {Select} element whose composition is dynamically updated with
|
* Create a {Select} element whose composition is dynamically updated with
|
||||||
* the operations applying to a particular telemetry property
|
* the operations applying to a particular telemetry property
|
||||||
@ -15,7 +17,7 @@ define(['./Select', '../eventHelpers'], function (Select, eventHelpers) {
|
|||||||
*/
|
*/
|
||||||
const NULLVALUE = '- Select Comparison -';
|
const NULLVALUE = '- Select Comparison -';
|
||||||
|
|
||||||
function OperationSelect(config, keySelect, manager, changeCallback) {
|
export default function OperationSelect(config, keySelect, manager, changeCallback) {
|
||||||
eventHelpers.extend(this);
|
eventHelpers.extend(this);
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
@ -115,6 +117,3 @@ define(['./Select', '../eventHelpers'], function (Select, eventHelpers) {
|
|||||||
OperationSelect.prototype.destroy = function () {
|
OperationSelect.prototype.destroy = function () {
|
||||||
this.stopListening();
|
this.stopListening();
|
||||||
};
|
};
|
||||||
|
|
||||||
return OperationSelect;
|
|
||||||
});
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
define([
|
import EventEmitter from 'EventEmitter';
|
||||||
'../eventHelpers',
|
|
||||||
'../../res/input/paletteTemplate.html',
|
import * as templateHelpers from '../../../../utils/template/templateHelpers';
|
||||||
'../../../../utils/template/templateHelpers',
|
import paletteTemplate from '../../res/input/paletteTemplate.html';
|
||||||
'EventEmitter'
|
import eventHelpers from '../eventHelpers';
|
||||||
], function (eventHelpers, paletteTemplate, templateHelpers, EventEmitter) {
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new Open MCT Color Palette input
|
* Instantiates a new Open MCT Color Palette input
|
||||||
* @constructor
|
* @constructor
|
||||||
@ -14,7 +14,7 @@ define([
|
|||||||
* palette item in the view; how this data is represented is
|
* palette item in the view; how this data is represented is
|
||||||
* up to the descendent class
|
* up to the descendent class
|
||||||
*/
|
*/
|
||||||
function Palette(cssClass, container, items) {
|
export default function Palette(cssClass, container, items) {
|
||||||
eventHelpers.extend(this);
|
eventHelpers.extend(this);
|
||||||
|
|
||||||
const self = this;
|
const self = this;
|
||||||
@ -179,6 +179,3 @@ define([
|
|||||||
this.domElement.querySelector('.c-palette__item-none').style.display = 'none';
|
this.domElement.querySelector('.c-palette__item-none').style.display = 'none';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return Palette;
|
|
||||||
});
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
define([
|
import EventEmitter from 'EventEmitter';
|
||||||
'../eventHelpers',
|
|
||||||
'../../res/input/selectTemplate.html',
|
import * as templateHelpers from '../../../../utils/template/templateHelpers';
|
||||||
'../../../../utils/template/templateHelpers',
|
import selectTemplate from '../../res/input/selectTemplate.html';
|
||||||
'EventEmitter'
|
import eventHelpers from '../eventHelpers';
|
||||||
], function (eventHelpers, selectTemplate, templateHelpers, EventEmitter) {
|
|
||||||
/**
|
/**
|
||||||
* Wraps an HTML select element, and provides methods for dynamically altering
|
* Wraps an HTML select element, and provides methods for dynamically altering
|
||||||
* its composition from the data model
|
* its composition from the data model
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function Select() {
|
export default function Select() {
|
||||||
eventHelpers.extend(this);
|
eventHelpers.extend(this);
|
||||||
|
|
||||||
const self = this;
|
const self = this;
|
||||||
@ -163,6 +163,3 @@ define([
|
|||||||
Select.prototype.destroy = function () {
|
Select.prototype.destroy = function () {
|
||||||
this.stopListening();
|
this.stopListening();
|
||||||
};
|
};
|
||||||
|
|
||||||
return Select;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,11 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./SummaryWidgetEvaluator', 'objectUtils'], function (SummaryWidgetEvaluator, objectUtils) {
|
import objectUtils from 'objectUtils';
|
||||||
function EvaluatorPool(openmct) {
|
|
||||||
|
import SummaryWidgetEvaluator from './SummaryWidgetEvaluator';
|
||||||
|
|
||||||
|
export default function EvaluatorPool(openmct) {
|
||||||
this.openmct = openmct;
|
this.openmct = openmct;
|
||||||
this.byObjectId = {};
|
this.byObjectId = {};
|
||||||
this.byEvaluator = new WeakMap();
|
this.byEvaluator = new WeakMap();
|
||||||
@ -54,6 +57,3 @@ define(['./SummaryWidgetEvaluator', 'objectUtils'], function (SummaryWidgetEvalu
|
|||||||
delete this.byObjectId[poolEntry.objectId];
|
delete this.byObjectId[poolEntry.objectId];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return EvaluatorPool;
|
|
||||||
});
|
|
||||||
|
@ -20,10 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./EvaluatorPool', './SummaryWidgetEvaluator'], function (
|
import EvaluatorPool from './EvaluatorPool';
|
||||||
EvaluatorPool,
|
|
||||||
SummaryWidgetEvaluator
|
|
||||||
) {
|
|
||||||
describe('EvaluatorPool', function () {
|
describe('EvaluatorPool', function () {
|
||||||
let pool;
|
let pool;
|
||||||
let openmct;
|
let openmct;
|
||||||
@ -94,4 +92,3 @@ define(['./EvaluatorPool', './SummaryWidgetEvaluator'], function (
|
|||||||
expect(evaluatorA).not.toBe(evaluatorC);
|
expect(evaluatorA).not.toBe(evaluatorC);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -20,8 +20,9 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./operations'], function (OPERATIONS) {
|
import OPERATIONS from './operations';
|
||||||
function SummaryWidgetCondition(definition) {
|
|
||||||
|
export default function SummaryWidgetCondition(definition) {
|
||||||
this.object = definition.object;
|
this.object = definition.object;
|
||||||
this.key = definition.key;
|
this.key = definition.key;
|
||||||
this.values = definition.values;
|
this.values = definition.values;
|
||||||
@ -71,6 +72,3 @@ define(['./operations'], function (OPERATIONS) {
|
|||||||
|
|
||||||
return this.comparator(testValues);
|
return this.comparator(testValues);
|
||||||
};
|
};
|
||||||
|
|
||||||
return SummaryWidgetCondition;
|
|
||||||
});
|
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./SummaryWidgetCondition'], function (SummaryWidgetCondition) {
|
import SummaryWidgetCondition from './SummaryWidgetCondition';
|
||||||
|
|
||||||
describe('SummaryWidgetCondition', function () {
|
describe('SummaryWidgetCondition', function () {
|
||||||
let condition;
|
let condition;
|
||||||
let telemetryState;
|
let telemetryState;
|
||||||
@ -122,4 +123,3 @@ define(['./SummaryWidgetCondition'], function (SummaryWidgetCondition) {
|
|||||||
expect(condition.evaluate(telemetryState)).toBe(true);
|
expect(condition.evaluate(telemetryState)).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -20,18 +20,18 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./SummaryWidgetRule', '../eventHelpers', 'objectUtils', 'lodash'], function (
|
import _ from 'lodash';
|
||||||
SummaryWidgetRule,
|
import objectUtils from 'objectUtils';
|
||||||
eventHelpers,
|
|
||||||
objectUtils,
|
import eventHelpers from '../eventHelpers';
|
||||||
_
|
import SummaryWidgetRule from './SummaryWidgetRule';
|
||||||
) {
|
|
||||||
/**
|
/**
|
||||||
* evaluates rules defined in a summary widget against either lad or
|
* evaluates rules defined in a summary widget against either lad or
|
||||||
* realtime state.
|
* realtime state.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function SummaryWidgetEvaluator(domainObject, openmct) {
|
export default function SummaryWidgetEvaluator(domainObject, openmct) {
|
||||||
this.openmct = openmct;
|
this.openmct = openmct;
|
||||||
this.baseState = {};
|
this.baseState = {};
|
||||||
|
|
||||||
@ -69,10 +69,7 @@ define(['./SummaryWidgetRule', '../eventHelpers', 'objectUtils', 'lodash'], func
|
|||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
/* eslint-disable you-dont-need-lodash-underscore/map */
|
/* eslint-disable you-dont-need-lodash-underscore/map */
|
||||||
unsubscribes = _.map(
|
unsubscribes = _.map(realtimeStates, this.subscribeToObjectState.bind(this, updateCallback));
|
||||||
realtimeStates,
|
|
||||||
this.subscribeToObjectState.bind(this, updateCallback)
|
|
||||||
);
|
|
||||||
/* eslint-enable you-dont-need-lodash-underscore/map */
|
/* eslint-enable you-dont-need-lodash-underscore/map */
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
);
|
);
|
||||||
@ -196,8 +193,7 @@ define(['./SummaryWidgetRule', '../eventHelpers', 'objectUtils', 'lodash'], func
|
|||||||
SummaryWidgetEvaluator.prototype.getTimestamps = function (childId, datum) {
|
SummaryWidgetEvaluator.prototype.getTimestamps = function (childId, datum) {
|
||||||
const timestampedDatum = {};
|
const timestampedDatum = {};
|
||||||
this.openmct.time.getAllTimeSystems().forEach(function (timeSystem) {
|
this.openmct.time.getAllTimeSystems().forEach(function (timeSystem) {
|
||||||
timestampedDatum[timeSystem.key] =
|
timestampedDatum[timeSystem.key] = this.baseState[childId].formats[timeSystem.key].parse(datum);
|
||||||
this.baseState[childId].formats[timeSystem.key].parse(datum);
|
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
return timestampedDatum;
|
return timestampedDatum;
|
||||||
@ -265,6 +261,3 @@ define(['./SummaryWidgetRule', '../eventHelpers', 'objectUtils', 'lodash'], func
|
|||||||
this.stopListening();
|
this.stopListening();
|
||||||
this.removeObserver();
|
this.removeObserver();
|
||||||
};
|
};
|
||||||
|
|
||||||
return SummaryWidgetEvaluator;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
export default function SummaryWidgetMetadataProvider(openmct) {
|
||||||
function SummaryWidgetMetadataProvider(openmct) {
|
|
||||||
this.openmct = openmct;
|
this.openmct = openmct;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,6 +107,3 @@ define([], function () {
|
|||||||
|
|
||||||
return metadata;
|
return metadata;
|
||||||
};
|
};
|
||||||
|
|
||||||
return SummaryWidgetMetadataProvider;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,9 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./SummaryWidgetCondition'], function (SummaryWidgetCondition) {
|
import SummaryWidgetCondition from './SummaryWidgetCondition';
|
||||||
function SummaryWidgetRule(definition) {
|
|
||||||
|
export default function SummaryWidgetRule(definition) {
|
||||||
this.name = definition.name;
|
this.name = definition.name;
|
||||||
this.label = definition.label;
|
this.label = definition.label;
|
||||||
this.id = definition.id;
|
this.id = definition.id;
|
||||||
@ -65,6 +66,3 @@ define(['./SummaryWidgetCondition'], function (SummaryWidgetCondition) {
|
|||||||
throw new Error('Invalid rule trigger: ' + this.trigger);
|
throw new Error('Invalid rule trigger: ' + this.trigger);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return SummaryWidgetRule;
|
|
||||||
});
|
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./SummaryWidgetRule'], function (SummaryWidgetRule) {
|
import SummaryWidgetRule from './SummaryWidgetRule';
|
||||||
|
|
||||||
describe('SummaryWidgetRule', function () {
|
describe('SummaryWidgetRule', function () {
|
||||||
let rule;
|
let rule;
|
||||||
let telemetryState;
|
let telemetryState;
|
||||||
@ -150,4 +151,3 @@ define(['./SummaryWidgetRule'], function (SummaryWidgetRule) {
|
|||||||
expect(rule.evaluate(telemetryState)).toBe(true);
|
expect(rule.evaluate(telemetryState)).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -20,8 +20,9 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./EvaluatorPool'], function (EvaluatorPool) {
|
import EvaluatorPool from './EvaluatorPool';
|
||||||
function SummaryWidgetTelemetryProvider(openmct) {
|
|
||||||
|
export default function SummaryWidgetTelemetryProvider(openmct) {
|
||||||
this.pool = new EvaluatorPool(openmct);
|
this.pool = new EvaluatorPool(openmct);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,6 +59,3 @@ define(['./EvaluatorPool'], function (EvaluatorPool) {
|
|||||||
unsubscribe();
|
unsubscribe();
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
return SummaryWidgetTelemetryProvider;
|
|
||||||
});
|
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./SummaryWidgetTelemetryProvider'], function (SummaryWidgetTelemetryProvider) {
|
import SummaryWidgetTelemetryProvider from './SummaryWidgetTelemetryProvider';
|
||||||
|
|
||||||
xdescribe('SummaryWidgetTelemetryProvider', function () {
|
xdescribe('SummaryWidgetTelemetryProvider', function () {
|
||||||
let telemObjectA;
|
let telemObjectA;
|
||||||
let telemObjectB;
|
let telemObjectB;
|
||||||
@ -460,4 +461,3 @@ define(['./SummaryWidgetTelemetryProvider'], function (SummaryWidgetTelemetryPro
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
const OPERATIONS = {
|
const OPERATIONS = {
|
||||||
equalTo: {
|
equalTo: {
|
||||||
operation: function (input) {
|
operation: function (input) {
|
||||||
@ -211,5 +210,4 @@ define([], function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return OPERATIONS;
|
export default OPERATIONS;
|
||||||
});
|
|
||||||
|
@ -1,13 +1,30 @@
|
|||||||
define(['../SummaryWidget', './SummaryWidgetView', 'objectUtils'], function (
|
/*****************************************************************************
|
||||||
SummaryWidgetEditView,
|
* Open MCT, Copyright (c) 2014-2023, United States Government
|
||||||
SummaryWidgetView,
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
objectUtils
|
* Administration. All rights reserved.
|
||||||
) {
|
|
||||||
const DEFAULT_VIEW_PRIORITY = 100;
|
|
||||||
/**
|
|
||||||
*
|
*
|
||||||
*/
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
function SummaryWidgetViewProvider(openmct) {
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
import SummaryWidgetEditView from '../SummaryWidget';
|
||||||
|
import SummaryWidgetView from './SummaryWidgetView';
|
||||||
|
|
||||||
|
const DEFAULT_VIEW_PRIORITY = 100;
|
||||||
|
export default function SummaryWidgetViewProvider(openmct) {
|
||||||
return {
|
return {
|
||||||
key: 'summary-widget-viewer',
|
key: 'summary-widget-viewer',
|
||||||
name: 'Summary View',
|
name: 'Summary View',
|
||||||
@ -33,6 +50,3 @@ define(['../SummaryWidget', './SummaryWidgetView', 'objectUtils'], function (
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return SummaryWidgetViewProvider;
|
|
||||||
});
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
define(['../src/ConditionEvaluator'], function (ConditionEvaluator) {
|
import ConditionEvaluator from '../src/ConditionEvaluator';
|
||||||
|
|
||||||
describe('A Summary Widget Rule Evaluator', function () {
|
describe('A Summary Widget Rule Evaluator', function () {
|
||||||
let evaluator;
|
let evaluator;
|
||||||
let testEvaluator;
|
let testEvaluator;
|
||||||
@ -360,4 +361,3 @@ define(['../src/ConditionEvaluator'], function (ConditionEvaluator) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['../src/ConditionManager'], function (ConditionManager) {
|
import ConditionManager from '../src/ConditionManager';
|
||||||
|
|
||||||
describe('A Summary Widget Condition Manager', function () {
|
describe('A Summary Widget Condition Manager', function () {
|
||||||
let conditionManager;
|
let conditionManager;
|
||||||
let mockDomainObject;
|
let mockDomainObject;
|
||||||
@ -180,12 +181,7 @@ define(['../src/ConditionManager'], function (ConditionManager) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
mockComposition = jasmine.createSpyObj('composition', [
|
mockComposition = jasmine.createSpyObj('composition', ['on', 'off', 'load', 'triggerCallback']);
|
||||||
'on',
|
|
||||||
'off',
|
|
||||||
'load',
|
|
||||||
'triggerCallback'
|
|
||||||
]);
|
|
||||||
mockComposition.on.and.callFake(function (event, callback, context) {
|
mockComposition.on.and.callFake(function (event, callback, context) {
|
||||||
mockEventCallbacks[event] = callback.bind(context);
|
mockEventCallbacks[event] = callback.bind(context);
|
||||||
});
|
});
|
||||||
@ -440,4 +436,3 @@ define(['../src/ConditionManager'], function (ConditionManager) {
|
|||||||
expect(telemetryCallbackSpy).toHaveBeenCalled();
|
expect(telemetryCallbackSpy).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['../src/Condition'], function (Condition) {
|
import Condition from '../src/Condition';
|
||||||
|
|
||||||
describe('A summary widget condition', function () {
|
describe('A summary widget condition', function () {
|
||||||
let testCondition;
|
let testCondition;
|
||||||
let mockConfig;
|
let mockConfig;
|
||||||
@ -202,4 +203,3 @@ define(['../src/Condition'], function (Condition) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -1,4 +1,27 @@
|
|||||||
define(['../src/Rule'], function (Rule) {
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2023, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
import Rule from '../src/Rule';
|
||||||
|
|
||||||
describe('A Summary Widget Rule', function () {
|
describe('A Summary Widget Rule', function () {
|
||||||
let mockRuleConfig;
|
let mockRuleConfig;
|
||||||
let mockDomainObject;
|
let mockDomainObject;
|
||||||
@ -290,4 +313,3 @@ define(['../src/Rule'], function (Rule) {
|
|||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['../src/SummaryWidget'], function (SummaryWidget) {
|
import SummaryWidget from '../src/SummaryWidget';
|
||||||
|
|
||||||
describe('The Summary Widget', function () {
|
describe('The Summary Widget', function () {
|
||||||
let summaryWidget;
|
let summaryWidget;
|
||||||
let mockDomainObject;
|
let mockDomainObject;
|
||||||
@ -189,4 +190,3 @@ define(['../src/SummaryWidget'], function (SummaryWidget) {
|
|||||||
expect(widgetButton.target).toEqual('_blank');
|
expect(widgetButton.target).toEqual('_blank');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['../SummaryWidgetViewPolicy'], function (SummaryWidgetViewPolicy) {
|
import SummaryWidgetViewPolicy from '../SummaryWidgetViewPolicy';
|
||||||
|
|
||||||
describe('SummaryWidgetViewPolicy', function () {
|
describe('SummaryWidgetViewPolicy', function () {
|
||||||
let policy;
|
let policy;
|
||||||
let domainObject;
|
let domainObject;
|
||||||
@ -55,4 +56,3 @@ define(['../SummaryWidgetViewPolicy'], function (SummaryWidgetViewPolicy) {
|
|||||||
expect(policy.allow(view, domainObject)).toBe(false);
|
expect(policy.allow(view, domainObject)).toBe(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
define(['../src/TestDataItem'], function (TestDataItem) {
|
import TestDataItem from '../src/TestDataItem';
|
||||||
|
|
||||||
describe('A summary widget test data item', function () {
|
describe('A summary widget test data item', function () {
|
||||||
let testDataItem;
|
let testDataItem;
|
||||||
let mockConfig;
|
let mockConfig;
|
||||||
@ -164,4 +165,3 @@ define(['../src/TestDataItem'], function (TestDataItem) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
define(['../src/TestDataManager'], function (TestDataManager) {
|
import TestDataManager from '../src/TestDataManager';
|
||||||
|
|
||||||
describe('A Summary Widget Rule', function () {
|
describe('A Summary Widget Rule', function () {
|
||||||
let mockDomainObject;
|
let mockDomainObject;
|
||||||
let mockOpenMCT;
|
let mockOpenMCT;
|
||||||
@ -118,9 +119,7 @@ define(['../src/TestDataManager'], function (TestDataManager) {
|
|||||||
|
|
||||||
it('exposes a DOM element to represent itself in the view', function () {
|
it('exposes a DOM element to represent itself in the view', function () {
|
||||||
mockContainer.append(testDataManager.getDOM());
|
mockContainer.append(testDataManager.getDOM());
|
||||||
expect(mockContainer.querySelectorAll('.t-widget-test-data-content').length).toBeGreaterThan(
|
expect(mockContainer.querySelectorAll('.t-widget-test-data-content').length).toBeGreaterThan(0);
|
||||||
0
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('generates a test cache in the format expected by a condition evaluator', function () {
|
it('generates a test cache in the format expected by a condition evaluator', function () {
|
||||||
@ -137,10 +136,7 @@ define(['../src/TestDataManager'], function (TestDataManager) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it(
|
it('updates its configuration on a item change and provides an updated cache to the evaluator', function () {
|
||||||
'updates its configuration on a item change and provides an updated' +
|
|
||||||
'cache to the evaluator',
|
|
||||||
function () {
|
|
||||||
testDataManager.onItemChange({
|
testDataManager.onItemChange({
|
||||||
value: 26,
|
value: 26,
|
||||||
property: 'value',
|
property: 'value',
|
||||||
@ -157,8 +153,7 @@ define(['../src/TestDataManager'], function (TestDataManager) {
|
|||||||
property4: 'Text It Is'
|
property4: 'Text It Is'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
it('allows initializing a new item with a default configuration', function () {
|
it('allows initializing a new item with a default configuration', function () {
|
||||||
testDataManager.initItem();
|
testDataManager.initItem();
|
||||||
@ -247,4 +242,3 @@ define(['../src/TestDataManager'], function (TestDataManager) {
|
|||||||
|
|
||||||
it('exposes a UI element to toggle test data on and off', function () {});
|
it('exposes a UI element to toggle test data on and off', function () {});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
define(['../../src/input/ColorPalette'], function (ColorPalette) {
|
import ColorPalette from '../../src/input/ColorPalette';
|
||||||
|
|
||||||
describe('An Open MCT color palette', function () {
|
describe('An Open MCT color palette', function () {
|
||||||
let colorPalette;
|
let colorPalette;
|
||||||
let changeCallback;
|
let changeCallback;
|
||||||
@ -21,4 +22,3 @@ define(['../../src/input/ColorPalette'], function (ColorPalette) {
|
|||||||
expect(colorPalette.getCurrent()).toBeDefined();
|
expect(colorPalette.getCurrent()).toBeDefined();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
define(['../../src/input/IconPalette'], function (IconPalette) {
|
import IconPalette from '../../src/input/IconPalette';
|
||||||
|
|
||||||
describe('An Open MCT icon palette', function () {
|
describe('An Open MCT icon palette', function () {
|
||||||
let iconPalette;
|
let iconPalette;
|
||||||
let changeCallback;
|
let changeCallback;
|
||||||
@ -21,4 +22,3 @@ define(['../../src/input/IconPalette'], function (IconPalette) {
|
|||||||
expect(iconPalette.getCurrent()).toBeDefined();
|
expect(iconPalette.getCurrent()).toBeDefined();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
define(['../../src/input/KeySelect'], function (KeySelect) {
|
import KeySelect from '../../src/input/KeySelect';
|
||||||
|
|
||||||
describe('A select for choosing composition object properties', function () {
|
describe('A select for choosing composition object properties', function () {
|
||||||
let mockConfig;
|
let mockConfig;
|
||||||
let mockBadConfig;
|
let mockBadConfig;
|
||||||
@ -120,4 +121,3 @@ define(['../../src/input/KeySelect'], function (KeySelect) {
|
|||||||
expect(keySelect.getSelected()).toEqual('a');
|
expect(keySelect.getSelected()).toEqual('a');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -1,4 +1,27 @@
|
|||||||
define(['../../src/input/ObjectSelect'], function (ObjectSelect) {
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2023, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
import ObjectSelect from '../../src/input/ObjectSelect';
|
||||||
|
|
||||||
describe('A select for choosing composition objects', function () {
|
describe('A select for choosing composition objects', function () {
|
||||||
let mockConfig;
|
let mockConfig;
|
||||||
let mockBadConfig;
|
let mockBadConfig;
|
||||||
@ -109,4 +132,3 @@ define(['../../src/input/ObjectSelect'], function (ObjectSelect) {
|
|||||||
expect(objectSelect.getSelected()).not.toEqual('key1');
|
expect(objectSelect.getSelected()).not.toEqual('key1');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -1,4 +1,27 @@
|
|||||||
define(['../../src/input/OperationSelect'], function (OperationSelect) {
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2023, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
import OperationSelect from '../../src/input/OperationSelect';
|
||||||
|
|
||||||
describe('A select for choosing composition object properties', function () {
|
describe('A select for choosing composition object properties', function () {
|
||||||
let mockConfig;
|
let mockConfig;
|
||||||
let mockBadConfig;
|
let mockBadConfig;
|
||||||
@ -140,4 +163,3 @@ define(['../../src/input/OperationSelect'], function (OperationSelect) {
|
|||||||
expect(operationSelect.getSelected()).toEqual('operation1');
|
expect(operationSelect.getSelected()).toEqual('operation1');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
define(['../../src/input/Palette'], function (Palette) {
|
import Palette from '../../src/input/Palette';
|
||||||
|
|
||||||
describe('A generic Open MCT palette input', function () {
|
describe('A generic Open MCT palette input', function () {
|
||||||
let palette;
|
let palette;
|
||||||
let callbackSpy1;
|
let callbackSpy1;
|
||||||
@ -41,4 +42,3 @@ define(['../../src/input/Palette'], function (Palette) {
|
|||||||
expect(palette.getCurrent()).not.toEqual('foobar');
|
expect(palette.getCurrent()).not.toEqual('foobar');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
define(['../../src/input/Select'], function (Select) {
|
import Select from '../../src/input/Select';
|
||||||
|
|
||||||
describe('A select wrapper', function () {
|
describe('A select wrapper', function () {
|
||||||
let select;
|
let select;
|
||||||
let testOptions;
|
let testOptions;
|
||||||
@ -58,4 +59,3 @@ define(['../../src/input/Select'], function (Select) {
|
|||||||
expect(select.getSelected()).not.toEqual('foobar');
|
expect(select.getSelected()).not.toEqual('foobar');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
* 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.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
import Tabs from './tabs';
|
||||||
|
|
||||||
define(['./tabs'], function (Tabs) {
|
export default function plugin() {
|
||||||
return function plugin() {
|
|
||||||
return function install(openmct) {
|
return function install(openmct) {
|
||||||
openmct.objectViews.addProvider(new Tabs.default(openmct));
|
openmct.objectViews.addProvider(new Tabs(openmct));
|
||||||
|
|
||||||
openmct.types.addType('tabs', {
|
openmct.types.addType('tabs', {
|
||||||
name: 'Tabs View',
|
name: 'Tabs View',
|
||||||
@ -55,5 +55,4 @@ define(['./tabs'], function (Tabs) {
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
@ -47,7 +47,7 @@ export default class Tabs {
|
|||||||
let component = null;
|
let component = null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
show: function (element, editMode) {
|
show(element, editMode) {
|
||||||
const { vNode, destroy } = mount(
|
const { vNode, destroy } = mount(
|
||||||
{
|
{
|
||||||
el: element,
|
el: element,
|
||||||
|
@ -20,10 +20,11 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['./src/MeanTelemetryProvider'], function (MeanTelemetryProvider) {
|
import MeanTelemetryProvider from './src/MeanTelemetryProvider';
|
||||||
|
|
||||||
const DEFAULT_SAMPLES = 10;
|
const DEFAULT_SAMPLES = 10;
|
||||||
|
|
||||||
function plugin() {
|
export default function plugin() {
|
||||||
return function install(openmct) {
|
return function install(openmct) {
|
||||||
openmct.types.addType('telemetry-mean', {
|
openmct.types.addType('telemetry-mean', {
|
||||||
name: 'Telemetry Filter',
|
name: 'Telemetry Filter',
|
||||||
@ -73,6 +74,3 @@ define(['./src/MeanTelemetryProvider'], function (MeanTelemetryProvider) {
|
|||||||
openmct.telemetry.addProvider(new MeanTelemetryProvider(openmct));
|
openmct.telemetry.addProvider(new MeanTelemetryProvider(openmct));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return plugin;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,11 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['objectUtils', './TelemetryAverager'], function (objectUtils, TelemetryAverager) {
|
import objectUtils from 'objectUtils';
|
||||||
function MeanTelemetryProvider(openmct) {
|
|
||||||
|
import TelemetryAverager from './TelemetryAverager';
|
||||||
|
|
||||||
|
export default function MeanTelemetryProvider(openmct) {
|
||||||
this.openmct = openmct;
|
this.openmct = openmct;
|
||||||
this.telemetryAPI = openmct.telemetry;
|
this.telemetryAPI = openmct.telemetry;
|
||||||
this.timeAPI = openmct.time;
|
this.timeAPI = openmct.time;
|
||||||
@ -128,6 +131,3 @@ define(['objectUtils', './TelemetryAverager'], function (objectUtils, TelemetryA
|
|||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return MeanTelemetryProvider;
|
|
||||||
});
|
|
||||||
|
@ -20,10 +20,10 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/* eslint-disable no-invalid-this */
|
/* eslint-disable no-invalid-this */
|
||||||
define(['./MeanTelemetryProvider', './MockTelemetryApi'], function (
|
|
||||||
MeanTelemetryProvider,
|
import MeanTelemetryProvider from './MeanTelemetryProvider';
|
||||||
MockTelemetryApi
|
import MockTelemetryApi from './MockTelemetryApi';
|
||||||
) {
|
|
||||||
const RANGE_KEY = 'value';
|
const RANGE_KEY = 'value';
|
||||||
|
|
||||||
describe('The Mean Telemetry Provider', function () {
|
describe('The Mean Telemetry Provider', function () {
|
||||||
@ -620,4 +620,3 @@ define(['./MeanTelemetryProvider', './MockTelemetryApi'], function (
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
export default function MockTelemetryApi() {
|
||||||
function MockTelemetryApi() {
|
|
||||||
this.createSpy('subscribe');
|
this.createSpy('subscribe');
|
||||||
this.createSpy('getMetadata');
|
this.createSpy('getMetadata');
|
||||||
|
|
||||||
@ -96,6 +95,3 @@ define([], function () {
|
|||||||
spyOn(this, functionName);
|
spyOn(this, functionName);
|
||||||
this[functionName].and.callThrough();
|
this[functionName].and.callThrough();
|
||||||
};
|
};
|
||||||
|
|
||||||
return MockTelemetryApi;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,13 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
export default function TelemetryAverager(
|
||||||
function TelemetryAverager(telemetryAPI, timeAPI, domainObject, samples, averageDatumCallback) {
|
telemetryAPI,
|
||||||
|
timeAPI,
|
||||||
|
domainObject,
|
||||||
|
samples,
|
||||||
|
averageDatumCallback
|
||||||
|
) {
|
||||||
this.telemetryAPI = telemetryAPI;
|
this.telemetryAPI = telemetryAPI;
|
||||||
this.timeAPI = timeAPI;
|
this.timeAPI = timeAPI;
|
||||||
|
|
||||||
@ -114,6 +119,3 @@ define([], function () {
|
|||||||
|
|
||||||
return this.telemetryAPI.getValueFormatter(valueMetadata);
|
return this.telemetryAPI.getValueFormatter(valueMetadata);
|
||||||
};
|
};
|
||||||
|
|
||||||
return TelemetryAverager;
|
|
||||||
});
|
|
||||||
|
@ -20,28 +20,18 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([
|
import EventEmitter from 'EventEmitter';
|
||||||
'EventEmitter',
|
import _ from 'lodash';
|
||||||
'lodash',
|
|
||||||
'./collections/TableRowCollection',
|
import StalenessUtils from '../../utils/staleness';
|
||||||
'./TelemetryTableRow',
|
import TableRowCollection from './collections/TableRowCollection';
|
||||||
'./TelemetryTableNameColumn',
|
import TelemetryTableColumn from './TelemetryTableColumn';
|
||||||
'./TelemetryTableColumn',
|
import TelemetryTableConfiguration from './TelemetryTableConfiguration';
|
||||||
'./TelemetryTableUnitColumn',
|
import TelemetryTableNameColumn from './TelemetryTableNameColumn';
|
||||||
'./TelemetryTableConfiguration',
|
import TelemetryTableRow from './TelemetryTableRow';
|
||||||
'../../utils/staleness'
|
import TelemetryTableUnitColumn from './TelemetryTableUnitColumn';
|
||||||
], function (
|
|
||||||
EventEmitter,
|
export default class TelemetryTable extends EventEmitter {
|
||||||
_,
|
|
||||||
TableRowCollection,
|
|
||||||
TelemetryTableRow,
|
|
||||||
TelemetryTableNameColumn,
|
|
||||||
TelemetryTableColumn,
|
|
||||||
TelemetryTableUnitColumn,
|
|
||||||
TelemetryTableConfiguration,
|
|
||||||
StalenessUtils
|
|
||||||
) {
|
|
||||||
class TelemetryTable extends EventEmitter {
|
|
||||||
constructor(domainObject, openmct) {
|
constructor(domainObject, openmct) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
@ -195,7 +185,7 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.stalenessSubscription[keyString] = {};
|
this.stalenessSubscription[keyString] = {};
|
||||||
this.stalenessSubscription[keyString].stalenessUtils = new StalenessUtils.default(
|
this.stalenessSubscription[keyString].stalenessUtils = new StalenessUtils(
|
||||||
this.openmct,
|
this.openmct,
|
||||||
domainObject
|
domainObject
|
||||||
);
|
);
|
||||||
@ -471,6 +461,3 @@ define([
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TelemetryTable;
|
|
||||||
});
|
|
||||||
|
@ -19,8 +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.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
define(function () {
|
export default class TelemetryTableColumn {
|
||||||
class TelemetryTableColumn {
|
|
||||||
constructor(openmct, metadatum, options = { selectable: false }) {
|
constructor(openmct, metadatum, options = { selectable: false }) {
|
||||||
this.metadatum = metadatum;
|
this.metadatum = metadatum;
|
||||||
this.formatter = openmct.telemetry.getValueFormatter(metadatum);
|
this.formatter = openmct.telemetry.getValueFormatter(metadatum);
|
||||||
@ -61,6 +60,3 @@ define(function () {
|
|||||||
return this.formatter.parse(telemetryDatum);
|
return this.formatter.parse(telemetryDatum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TelemetryTableColumn;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,10 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['lodash', 'EventEmitter'], function (_, EventEmitter) {
|
import EventEmitter from 'EventEmitter';
|
||||||
class TelemetryTableConfiguration extends EventEmitter {
|
import _ from 'lodash';
|
||||||
|
|
||||||
|
export default class TelemetryTableConfiguration extends EventEmitter {
|
||||||
constructor(domainObject, openmct) {
|
constructor(domainObject, openmct) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
@ -163,6 +165,3 @@ define(['lodash', 'EventEmitter'], function (_, EventEmitter) {
|
|||||||
this.unlistenFromMutation();
|
this.unlistenFromMutation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TelemetryTableConfiguration;
|
|
||||||
});
|
|
||||||
|
@ -19,8 +19,10 @@
|
|||||||
* 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.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
define(['./TelemetryTableColumn.js'], function (TelemetryTableColumn) {
|
|
||||||
class TelemetryTableNameColumn extends TelemetryTableColumn {
|
import TelemetryTableColumn from './TelemetryTableColumn';
|
||||||
|
|
||||||
|
export default class TelemetryTableNameColumn extends TelemetryTableColumn {
|
||||||
constructor(openmct, telemetryObject, metadatum) {
|
constructor(openmct, telemetryObject, metadatum) {
|
||||||
super(openmct, metadatum);
|
super(openmct, metadatum);
|
||||||
|
|
||||||
@ -35,6 +37,3 @@ define(['./TelemetryTableColumn.js'], function (TelemetryTableColumn) {
|
|||||||
return this.telemetryObject.name;
|
return this.telemetryObject.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TelemetryTableNameColumn;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
export default class TelemetryTableRow {
|
||||||
class TelemetryTableRow {
|
|
||||||
constructor(datum, columns, objectKeyString, limitEvaluator, inPlaceUpdateKey) {
|
constructor(datum, columns, objectKeyString, limitEvaluator, inPlaceUpdateKey) {
|
||||||
this.columns = columns;
|
this.columns = columns;
|
||||||
|
|
||||||
@ -122,6 +121,3 @@ define([], function () {
|
|||||||
|
|
||||||
return normalizedDatum;
|
return normalizedDatum;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TelemetryTableRow;
|
|
||||||
});
|
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(function () {
|
export default {
|
||||||
return {
|
|
||||||
name: 'Telemetry Table',
|
name: 'Telemetry Table',
|
||||||
description:
|
description:
|
||||||
'Display values for one or more telemetry end points in a scrolling table. Each row is a time-stamped value.',
|
'Display values for one or more telemetry end points in a scrolling table. Each row is a time-stamped value.',
|
||||||
@ -35,4 +34,3 @@ define(function () {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
* 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.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
define(['./TelemetryTableColumn.js'], function (TelemetryTableColumn) {
|
import TelemetryTableColumn from './TelemetryTableColumn.js';
|
||||||
|
|
||||||
class TelemetryTableUnitColumn extends TelemetryTableColumn {
|
class TelemetryTableUnitColumn extends TelemetryTableColumn {
|
||||||
constructor(openmct, metadatum) {
|
constructor(openmct, metadatum) {
|
||||||
super(openmct, metadatum);
|
super(openmct, metadatum);
|
||||||
@ -52,5 +53,4 @@ define(['./TelemetryTableColumn.js'], function (TelemetryTableColumn) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TelemetryTableUnitColumn;
|
export default TelemetryTableUnitColumn;
|
||||||
});
|
|
||||||
|
@ -19,12 +19,13 @@
|
|||||||
* 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.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
import EventEmitter from 'EventEmitter';
|
||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
define(['lodash', 'EventEmitter'], function (_, EventEmitter) {
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
class TableRowCollection extends EventEmitter {
|
export default class TableRowCollection extends EventEmitter {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
@ -384,6 +385,3 @@ define(['lodash', 'EventEmitter'], function (_, EventEmitter) {
|
|||||||
this.removeAllListeners();
|
this.removeAllListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TableRowCollection;
|
|
||||||
});
|
|
||||||
|
@ -20,17 +20,17 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
/**
|
/**
|
||||||
* This time system supports UTC dates.
|
* This time system supports UTC dates.
|
||||||
* @implements TimeSystem
|
* @implements TimeSystem
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function UTCTimeSystem() {
|
class UTCTimeSystem {
|
||||||
/**
|
/**
|
||||||
* Metadata used to identify the time system in
|
* Metadata used to identify the time system in
|
||||||
* the UI
|
* the UI
|
||||||
*/
|
*/
|
||||||
|
constructor() {
|
||||||
this.key = 'utc';
|
this.key = 'utc';
|
||||||
this.name = 'UTC';
|
this.name = 'UTC';
|
||||||
this.cssClass = 'icon-clock';
|
this.cssClass = 'icon-clock';
|
||||||
@ -38,6 +38,6 @@ define([], function () {
|
|||||||
this.durationFormat = 'duration';
|
this.durationFormat = 'duration';
|
||||||
this.isUTCBased = true;
|
this.isUTCBased = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return UTCTimeSystem;
|
export default UTCTimeSystem;
|
||||||
});
|
|
||||||
|
@ -20,14 +20,13 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
/**
|
/**
|
||||||
* A ToolbarRegistry maintains the definitions for toolbars.
|
* A ToolbarRegistry maintains the definitions for toolbars.
|
||||||
*
|
*
|
||||||
* @interface ToolbarRegistry
|
* @interface ToolbarRegistry
|
||||||
* @memberof module:openmct
|
* @memberof module:openmct
|
||||||
*/
|
*/
|
||||||
function ToolbarRegistry() {
|
export default function ToolbarRegistry() {
|
||||||
this.providers = {};
|
this.providers = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,6 +115,3 @@ define([], function () {
|
|||||||
* @param {object} selection the selection object
|
* @param {object} selection the selection object
|
||||||
* @returns {Object[]} an array of objects defining controls for the toolbar.
|
* @returns {Object[]} an array of objects defining controls for the toolbar.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return ToolbarRegistry;
|
|
||||||
});
|
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['EventEmitter'], function (EventEmitter) {
|
import EventEmitter from 'EventEmitter';
|
||||||
|
|
||||||
const DEFAULT_VIEW_PRIORITY = 100;
|
const DEFAULT_VIEW_PRIORITY = 100;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,7 +30,7 @@ define(['EventEmitter'], function (EventEmitter) {
|
|||||||
* @interface ViewRegistry
|
* @interface ViewRegistry
|
||||||
* @memberof module:openmct
|
* @memberof module:openmct
|
||||||
*/
|
*/
|
||||||
function ViewRegistry() {
|
export default function ViewRegistry() {
|
||||||
EventEmitter.apply(this);
|
EventEmitter.apply(this);
|
||||||
this.providers = {};
|
this.providers = {};
|
||||||
}
|
}
|
||||||
@ -269,6 +270,3 @@ define(['EventEmitter'], function (EventEmitter) {
|
|||||||
* @param {*} object the object to be edit
|
* @param {*} object the object to be edit
|
||||||
* @returns {module:openmct.View} an editable view of this domain object
|
* @returns {module:openmct.View} an editable view of this domain object
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return ViewRegistry;
|
|
||||||
});
|
|
||||||
|
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