Compare commits

..

44 Commits

Author SHA1 Message Date
2d8afa1456 parsing datum itself rather than specific key of datum, let telemetry api do the work 2020-07-24 11:26:28 -07:00
f4ef82ef74 Merge branch 'master' into imagery-timestamp-parsing
Merg'n master
2020-07-24 11:23:15 -07:00
f43121a38a updating karma timeouts for testing purposes 2020-07-24 10:57:29 -07:00
9f7d788c86 weird merge issues 2020-07-24 09:36:19 -07:00
d2374920ff merging 2020-07-24 09:32:26 -07:00
a6b9ba184c Merge latest master, resolve conflicts and fix constants 2020-07-23 14:33:48 -07:00
c00ab72d04 linting fixes 2020-07-23 11:46:37 -07:00
98fb507f01 removing "my other items" testing references 2020-07-23 11:43:25 -07:00
5258227d87 Merge branch 'new-tree-refactor' of https://github.com/nasa/openmct into new-tree-refactor
Merging
2020-07-23 11:38:05 -07:00
f43ba8f8f4 fixed issues when multiple root children exist, added plugin to change the name of the default root object 2020-07-23 11:37:30 -07:00
0ff9821091 Merge latest master, resolve conflicts 2020-07-17 15:23:36 -07:00
353bdb5ca5 Remove unneeded hard-coded CSS color property 2020-07-16 17:16:58 -07:00
28a93fb262 some PR comment updates!; 2020-07-16 16:15:11 -07:00
8882e5f3b3 updated addChild and removeChild functions as they were not working at all 2020-07-02 12:06:43 -07:00
9cfabe0054 Merge branch 'master' into new-tree-refactor
Merging master
2020-07-02 10:15:39 -07:00
7975cf89ef lint fixes 2020-06-29 15:35:59 -07:00
a9c0e5a139 dynamic item height for desktop and mobile views 2020-06-29 15:10:39 -07:00
92a7ac18a2 Styling for new-tree-refactor
- Using new glyphs for items expand/collapse in Status area;
2020-06-26 18:13:55 -07:00
240bc9e713 Adding new glyphs
- Added `icon-items-collapse` and `icon-items-expand`;
2020-06-26 18:10:26 -07:00
d09013ba28 Styling for new-tree-refactor
- Normalizing status area expand/collapse iconography to match new
approach in panes;
2020-06-26 17:58:27 -07:00
d99d414c84 Styling for new-tree-refactor
- Fix styles for Snow theme;
- Sync Maelstrom and Espresso themes;
- Remove too-broad `<a>` hover styling from global.scss;
- Disallow pointer-events on `is-navigated` object's label (click on
c-nav__down element still allowed);
2020-06-26 17:17:18 -07:00
2638302dab Styling for new-tree-refactor
- Significant consolidation and cleanups in mct-tree.scss;
- Normalize base and hover styles across new tree, legacy tree,
list-items (used in Notebook) and Folder List View;
- Class naming normalization, change `c-list-item__name-value` to
`c-list-item__name`;
- Add styling to override and remove `<a> outline: dotted` coming from
normalize-min;
- Removed too-broad `<a>` coloring in tables;
2020-06-26 16:28:19 -07:00
8241ed8bb8 Styling for new-tree-refactor WIP
- Nav up arrows now left-align properly;
2020-06-25 21:28:46 -07:00
23dffe33a9 Styling for new-tree-refactor WIP
- WIP!
- Refinements to "empty" object element;
- Changed sync-tree icon glyph;
2020-06-25 19:23:21 -07:00
92e08f19bd Merge branch 'new-tree-refactor' of https://github.com/nasa/openmct into new-tree-refactor 2020-06-25 14:12:08 -07:00
c644e5266a remove arrows for search results, hightlight "my items" correctly, added empty folder notic 2020-06-25 13:32:09 -07:00
7fa93c18f3 More new glyphs, updated art
- New glyphs: icon-unlocked and icon-target;
- Updated art for icon-lock glyph;
2020-06-25 10:48:02 -07:00
5b6e61d95a Styling for new-tree-refactor WIP
- WIP!
- Significant mods and simplification in pane.vue and assoc CSS for
expand/collapse functionality;
- Wait spinner when in tree: cleanups, simplification;
2020-06-24 19:05:44 -07:00
474b1ed2bf Styling for new-tree-refactor WIP
- WIP!
- Added new `c-click-link` CSS class;
- Move tree sync button into tree pane area;
- Added named "controls" slot to pane.vue;
- _up and _down arrows now use visibility instead of opacity to prevent
accidental clicks;
2020-06-24 16:49:37 -07:00
0d0de1ed64 Styling for new-tree-refactor WIP
- WIP!
- New glyphs, markup changes in BrowseBar.vue;
- Refinements to tree items, WIP;
- TODO: move hard-coded CSS values into _constants, make
theme-compatible;
2020-06-23 19:30:37 -07:00
85ab5cb319 Adding new glyphs
- Multiple new glyphs cherrypicked from branch `add-new-glyphs-062320`;
2020-06-23 18:28:30 -07:00
299005982f eslint fix 2020-06-18 14:12:04 -07:00
8d3b277ef4 modified so search now uses the same container and virtual scroll 2020-06-18 13:39:58 -07:00
8eae707833 Merge branch 'new-tree-refactor' of https://github.com/nasa/openmct into new-tree-refactor
Merge.
2020-06-18 10:29:04 -07:00
f62b39054a Merge branch 'master' into new-tree-refactor
Merging master.
.
2020-06-18 10:27:33 -07:00
7515ce504e Merge branch 'master' into new-tree-refactor 2020-06-17 13:37:16 -07:00
0b5ca621ec initial PR review updates 2020-06-17 13:06:18 -07:00
0e0644cd1f loading, sync bug, search issues, opitmization 2020-06-17 12:48:41 -07:00
6089ae3531 added scrollTo on load if in viewed objects directory 2020-06-16 17:33:27 -07:00
876eb59787 checking domainobject composition for length to verify children instead of composition object itself 2020-06-16 10:29:05 -07:00
17be0d7132 removing console logs 2020-06-15 16:34:38 -07:00
ace880dd41 Merge branch 'master' into new-tree-refactor
Merging master.
2020-06-15 13:35:52 -07:00
dc3781c8e5 scrollTo set for sync, bug fixes, window resize handling 2020-06-15 13:35:12 -07:00
b76b4e4098 revised new tree refactor, moved most of the logic to mct-tree instead of tree-item 2020-06-09 12:55:00 -07:00
1247 changed files with 10732 additions and 33073 deletions

View File

@ -11,12 +11,12 @@ jobs:
name: Update npm name: Update npm
command: 'sudo npm install -g npm@latest' command: 'sudo npm install -g npm@latest'
- restore_cache: - restore_cache:
key: dependency-cache-{{ checksum "package.json" }} key: dependency-cache-13-{{ checksum "package.json" }}
- run: - run:
name: Installing dependencies (npm install) name: Installing dependencies (npm install)
command: npm install command: npm install
- save_cache: - save_cache:
key: dependency-cache-{{ checksum "package.json" }} key: dependency-cache-13-{{ checksum "package.json" }}
paths: paths:
- node_modules - node_modules
- run: - run:

View File

@ -54,7 +54,7 @@ module.exports = {
{ {
"anonymous": "always", "anonymous": "always",
"asyncArrow": "always", "asyncArrow": "always",
"named": "never" "named": "never",
} }
], ],
"array-bracket-spacing": "error", "array-bracket-spacing": "error",
@ -120,100 +120,6 @@ module.exports = {
"no-useless-computed-key": "error", "no-useless-computed-key": "error",
// https://eslint.org/docs/rules/rest-spread-spacing // https://eslint.org/docs/rules/rest-spread-spacing
"rest-spread-spacing": ["error"], "rest-spread-spacing": ["error"],
// https://eslint.org/docs/rules/no-var
"no-var": "error",
// https://eslint.org/docs/rules/one-var
"one-var": ["error", "never"],
// https://eslint.org/docs/rules/default-case-last
"default-case-last": "error",
// https://eslint.org/docs/rules/default-param-last
"default-param-last": "error",
// https://eslint.org/docs/rules/grouped-accessor-pairs
"grouped-accessor-pairs": "error",
// https://eslint.org/docs/rules/no-constructor-return
"no-constructor-return": "error",
// https://eslint.org/docs/rules/array-callback-return
"array-callback-return": "error",
// https://eslint.org/docs/rules/no-invalid-this
"no-invalid-this": "error", // Believe this one actually surfaces some bugs
// https://eslint.org/docs/rules/func-style
"func-style": ["error", "declaration"],
// https://eslint.org/docs/rules/no-unused-expressions
"no-unused-expressions": "error",
// https://eslint.org/docs/rules/no-useless-concat
"no-useless-concat": "error",
// https://eslint.org/docs/rules/radix
"radix": "error",
// https://eslint.org/docs/rules/require-await
"require-await": "error",
// https://eslint.org/docs/rules/no-alert
"no-alert": "error",
// https://eslint.org/docs/rules/no-useless-constructor
"no-useless-constructor": "error",
// https://eslint.org/docs/rules/no-duplicate-imports
"no-duplicate-imports": "error",
// https://eslint.org/docs/rules/no-implicit-coercion
"no-implicit-coercion": "error",
//https://eslint.org/docs/rules/no-unneeded-ternary
"no-unneeded-ternary": "error",
// https://eslint.org/docs/rules/semi
"semi": ["error", "always"],
// https://eslint.org/docs/rules/no-multi-spaces
"no-multi-spaces": "error",
// https://eslint.org/docs/rules/key-spacing
"key-spacing": ["error", {
"afterColon": true
}],
// https://eslint.org/docs/rules/keyword-spacing
"keyword-spacing": ["error", {
"before": true,
"after": true
}],
// https://eslint.org/docs/rules/comma-spacing
// Also requires one line code fix
"comma-spacing": ["error", {
"after": true
}],
//https://eslint.org/docs/rules/no-whitespace-before-property
"no-whitespace-before-property": "error",
// https://eslint.org/docs/rules/object-curly-newline
"object-curly-newline": ["error", {
"consistent": true,
"multiline": true
}],
// https://eslint.org/docs/rules/object-property-newline
"object-property-newline": "error",
// https://eslint.org/docs/rules/brace-style
"brace-style": "error",
// https://eslint.org/docs/rules/no-multiple-empty-lines
"no-multiple-empty-lines": ["error", {"max": 1}],
// https://eslint.org/docs/rules/operator-linebreak
"operator-linebreak": ["error", "before", {"overrides": {"=": "after"}}],
// https://eslint.org/docs/rules/padding-line-between-statements
"padding-line-between-statements": ["error", {
"blankLine": "always",
"prev": "multiline-block-like",
"next": "*"
}, {
"blankLine": "always",
"prev": "*",
"next": "return"
}],
// https://eslint.org/docs/rules/space-infix-ops
"space-infix-ops": "error",
// https://eslint.org/docs/rules/space-unary-ops
"space-unary-ops": ["error", {
"words": true,
"nonwords": false
}],
// https://eslint.org/docs/rules/arrow-spacing
"arrow-spacing": "error",
// https://eslint.org/docs/rules/semi-spacing
"semi-spacing": ["error", {
"before": false,
"after": true
}],
"vue/html-indent": [ "vue/html-indent": [
"error", "error",
@ -245,25 +151,28 @@ module.exports = {
} }
}], }],
"vue/multiline-html-element-content-newline": "off", "vue/multiline-html-element-content-newline": "off",
"vue/singleline-html-element-content-newline": "off", "vue/singleline-html-element-content-newline": "off"
"vue/no-mutating-props": "off"
}, },
"overrides": [ "overrides": [
{ {
"files": LEGACY_FILES, "files": ["*Spec.js"],
"rules": { "rules": {
"no-unused-vars": [ "no-unused-vars": [
"warn", "warn",
{ {
"vars": "all", "vars": "all",
"args": "none", "args": "none",
"varsIgnorePattern": "controller" "varsIgnorePattern": "controller",
} }
], ]
}
}, {
"files": LEGACY_FILES,
"rules": {
// https://eslint.org/docs/rules/no-nested-ternary
"no-nested-ternary": "off", "no-nested-ternary": "off",
"no-var": "off", "no-var": "off"
"one-var": "off"
} }
} }
] ]

View File

@ -182,7 +182,7 @@ The following guidelines are provided for anyone contributing source code to the
1. Avoid the use of "magic" values. 1. Avoid the use of "magic" values.
eg. eg.
```JavaScript ```JavaScript
const UNAUTHORIZED = 401; Const UNAUTHORIZED = 401
if (responseCode === UNAUTHORIZED) if (responseCode === UNAUTHORIZED)
``` ```
is preferable to is preferable to

View File

@ -1,6 +1,6 @@
# Open MCT License # Open MCT License
Open MCT, Copyright (c) 2014-2021, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved. Open MCT, Copyright (c) 2014-2020, 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. 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.

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
#***************************************************************************** #*****************************************************************************
#* Open MCT, Copyright (c) 2014-2021, United States Government #* Open MCT, Copyright (c) 2014-2017, United States Government
#* as represented by the Administrator of the National Aeronautics and Space #* as represented by the Administrator of the National Aeronautics and Space
#* Administration. All rights reserved. #* Administration. All rights reserved.
#* #*

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2020, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2020, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -92,59 +92,47 @@ should update (or delegate the task of updating) Open MCT version
numbers by the following process: numbers by the following process:
1. Update version number in `package.json` 1. Update version number in `package.json`
1. Create a new branch off the `master` branch. 1. Remove `-SNAPSHOT` suffix.
2. Remove `-SNAPSHOT` suffix from the version in `package.json`. 2. Verify that resulting version number meets semantic versioning
3. Verify that resulting version number meets semantic versioning requirements relative to previous stable version. Increment if
requirements relative to previous stable version. Increment the necessary.
version number if necessary. 3. If version is considered unstable (which may be the case during
4. If version is considered unstable (which may be the case during
the first three sprints of a release), apply a new suffix per the first three sprints of a release), apply a new suffix per
[Version Numbering](#version-numbering) guidance above. [Version Numbering](#version-numbering) guidance above.
2. Tag the release. 2. Tag the release.
1. Commit changes to `package.json` on the new branch created in 1. Commit changes to `package.json` on the `master` branch.
the previous step.
The commit message should reference the sprint being closed, The commit message should reference the sprint being closed,
preferably by a URL reference to the associated Milestone in preferably by a URL reference to the associated Milestone in
GitHub. GitHub.
2. Verify that build still completes, that application passes 2. Verify that build still completes, that application passes
smoke-testing, and that only differences from tested versions smoke-testing, and that only differences from tested versions
are the changes to version number above. are the changes to version number above.
3. Push the new branch. 3. Push the `master` branch.
4. Tag this commit with the version number, prepending the letter "v". 4. Tag this commit with the version number, prepending the letter "v".
(e.g. `git tag v0.9.3-alpha`) (e.g. `git tag v0.9.3-alpha`)
5. Push the tag to GitHub. (e.g. `git push origin v0.9.3-alpha`). 5. Push the tag to GitHub. (e.g. `git push origin v0.9.3-alpha`).
3. Upload a release archive. 3. Upload a release archive.
1. Use the [GitHub release interface](https://github.com/nasa/openmct/releases) 1. Run `npm pack` to generate the archive.
2. Use the [GitHub release interface](https://github.com/nasa/openmct/releases)
to draft a new release. to draft a new release.
2. Choose the existing tag for the new version (created and pushed above.) 3. Choose the existing tag for the new version (created and pushed above.)
Enter the tag name as the release name as well; see existing releases Enter the tag name as the release name as well; see existing releases
for examples. (e.g. `Open MCT v0.9.3-alpha`) for examples.
3. Designate the release as a "pre-release" as appropriate (for instance, 4. Attach the release archive.
5. Designate the release as a "pre-release" as appropriate (for instance,
when the version number has been suffixed as unstable, or when when the version number has been suffixed as unstable, or when
the version number is below 1.0.0.) the version number is below 1.0.0.)
4. Add release notes including any breaking changes, enhancements, 4. Restore snapshot status in `package.json`
bug fixes with solutions in brief. 1. Remove any suffix from the version number, or increment the
5. Publish the release. _patch_ version if there is no suffix.
4. Publish the release to npm 2. Append a `-SNAPSHOT` suffix.
1. Login to npm 3. Commit changes to `package.json` on the `master` branch.
2. Checkout the tag created in the previous step.
3. In `package.json` change package to be public (private: false)
4. Test the package before publishing by doing `npm publish --dry-run`
if necessary.
5. Publish the package to the npmjs registry (e.g. `npm publish --access public`)
6. Confirm the package has been published (e.g. `https://www.npmjs.com/package/openmct`)
5. Update snapshot status in `package.json`
1. Create a new branch off the `master` branch.
2. Remove any suffix from the version number,
or increment the _patch_ version if there is no suffix.
3. Append a `-SNAPSHOT` suffix.
4. Commit changes to `package.json` on the `master` branch.
The commit message should reference the sprint being opened, The commit message should reference the sprint being opened,
preferably by a URL reference to the associated Milestone in preferably by a URL reference to the associated Milestone in
GitHub. GitHub.
5. Verify that build still completes, that application passes 4. Verify that build still completes, that application passes
smoke-testing. smoke-testing.
6. Create a PR to be merged into the `master` branch. 5. Push the `master` branch.
Projects dependent on Open MCT being co-developed by the Open MCT Projects dependent on Open MCT being co-developed by the Open MCT
team should follow a similar process, except that they should team should follow a similar process, except that they should

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([ define([
"./src/EventTelemetryProvider" "./src/EventTelemetryProvider"
@ -28,7 +29,7 @@ define([
"use strict"; "use strict";
return { return {
name: "example/eventGenerator", name:"example/eventGenerator",
definition: { definition: {
"name": "Event Message Generator", "name": "Event Message Generator",
"description": "For development use. Creates sample event message data that mimics a live data stream.", "description": "For development use. Creates sample event message data that mimics a live data stream.",

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define */
/** /**
* Module defining EventTelemetry. * Module defining EventTelemetry.
@ -43,14 +44,13 @@ define(
}; };
generatorData.getDomainValue = function (i, domain) { generatorData.getDomainValue = function (i, domain) {
return i * interval return i * interval +
+ (domain !== 'delta' ? firstObservedTime : 0); (domain !== 'delta' ? firstObservedTime : 0);
}; };
generatorData.getRangeValue = function (i, range) { generatorData.getRangeValue = function (i, range) {
var domainDelta = this.getDomainValue(i) - firstObservedTime, var domainDelta = this.getDomainValue(i) - firstObservedTime,
ind = i % messages.length; ind = i % messages.length;
return messages[ind] + " - [" + domainDelta.toString() + "]"; return messages[ind] + " - [" + domainDelta.toString() + "]";
}; };

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,Promise*/
/** /**
* Module defining EventTelemetryProvider. Created by chacskaylo on 06/18/2015. * Module defining EventTelemetryProvider. Created by chacskaylo on 06/18/2015.
@ -56,7 +57,6 @@ define(
results.forEach(function (result) { results.forEach(function (result) {
packaged[result.key] = result.telemetry; packaged[result.key] = result.telemetry;
}); });
// Format as expected (sources -> keys -> telemetry) // Format as expected (sources -> keys -> telemetry)
return { eventGenerator: packaged }; return { eventGenerator: packaged };
} }

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([], function () { define([], function () {
'use strict'; 'use strict';
@ -75,14 +76,13 @@ define([], function () {
copyRangesToRow(row, i); copyRangesToRow(row, i);
rows.push(row); rows.push(row);
} }
exportService.exportCSV(rows, { headers: headers }); exportService.exportCSV(rows, { headers: headers });
}); });
}; };
ExportTelemetryAsCSVAction.appliesTo = function (context) { ExportTelemetryAsCSVAction.appliesTo = function (context) {
return context.domainObject return context.domainObject &&
&& context.domainObject.hasCapability("telemetry"); context.domainObject.hasCapability("telemetry");
}; };
return ExportTelemetryAsCSVAction; return ExportTelemetryAsCSVAction;

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([ define([
'./ExportTelemetryAsCSVAction' './ExportTelemetryAsCSVAction'
@ -26,7 +27,7 @@ define([
"use strict"; "use strict";
return { return {
name: "example/export", name:"example/export",
definition: { definition: {
"name": "Example of using CSV Export", "name": "Example of using CSV Export",
"extensions": { "extensions": {

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([ define([
"./src/ExampleFormController" "./src/ExampleFormController"
@ -28,7 +29,7 @@ define([
"use strict"; "use strict";
return { return {
name: "example/forms", name:"example/forms",
definition: { definition: {
"name": "Declarative Forms example", "name": "Declarative Forms example",
"sources": "src", "sources": "src",

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2017, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,window*/
define( define(
[], [],
@ -79,7 +80,7 @@ define(
control: "button", control: "button",
csslass: "icon-save", csslass: "icon-save",
click: function () { click: function () {
console.log("Save"); window.alert("Save");
} }
}, },
{ {
@ -87,7 +88,7 @@ define(
csslass: "icon-x", csslass: "icon-x",
description: "Button B", description: "Button B",
click: function () { click: function () {
console.log("Cancel"); window.alert("Cancel");
} }
}, },
{ {
@ -96,7 +97,7 @@ define(
description: "Button C", description: "Button C",
disabled: true, disabled: true,
click: function () { click: function () {
console.log("Delete"); window.alert("Delete");
} }
} }
] ]
@ -151,22 +152,10 @@ define(
name: "Choose something", name: "Choose something",
control: "select", control: "select",
options: [ options: [
{ { name: "Hats", value: "hats" },
name: "Hats", { name: "Bats", value: "bats" },
value: "hats" { name: "Cats", value: "cats" },
}, { name: "Mats", value: "mats" }
{
name: "Bats",
value: "bats"
},
{
name: "Cats",
value: "cats"
},
{
name: "Mats",
value: "mats"
}
], ],
key: "aChoice" key: "aChoice"
}, },
@ -175,22 +164,10 @@ define(
control: "select", control: "select",
required: true, required: true,
options: [ options: [
{ { name: "Hats", value: "hats" },
name: "Hats", { name: "Bats", value: "bats" },
value: "hats" { name: "Cats", value: "cats" },
}, { name: "Mats", value: "mats" }
{
name: "Bats",
value: "bats"
},
{
name: "Cats",
value: "cats"
},
{
name: "Mats",
value: "mats"
}
], ],
key: "aRequiredChoice" key: "aRequiredChoice"
} }

View File

@ -41,7 +41,6 @@ define([
{ {
key: "sin", key: "sin",
name: "Sine", name: "Sine",
unit: "Hz",
formatString: '%0.2f', formatString: '%0.2f',
hints: { hints: {
range: 1 range: 1
@ -50,7 +49,6 @@ define([
{ {
key: "cos", key: "cos",
name: "Cosine", name: "Cosine",
unit: "deg",
formatString: '%0.2f', formatString: '%0.2f',
hints: { hints: {
range: 2 range: 2
@ -110,14 +108,14 @@ define([
} }
] ]
} }
}; }
function GeneratorMetadataProvider() { function GeneratorMetadataProvider() {
} }
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) { GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
return Object.prototype.hasOwnProperty.call(METADATA_BY_TYPE, domainObject.type); return METADATA_BY_TYPE.hasOwnProperty(domainObject.type);
}; };
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) { GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -62,23 +62,18 @@ define([
var workerRequest = {}; var workerRequest = {};
props.forEach(function (prop) { props.forEach(function (prop) {
if (domainObject.telemetry && Object.prototype.hasOwnProperty.call(domainObject.telemetry, prop)) { if (domainObject.telemetry && domainObject.telemetry.hasOwnProperty(prop)) {
workerRequest[prop] = domainObject.telemetry[prop]; workerRequest[prop] = domainObject.telemetry[prop];
} }
if (request && request.hasOwnProperty(prop)) {
if (request && Object.prototype.hasOwnProperty.call(request, prop)) {
workerRequest[prop] = request[prop]; workerRequest[prop] = request[prop];
} }
if (!workerRequest.hasOwnProperty(prop)) {
if (!Object.prototype.hasOwnProperty.call(workerRequest, prop)) {
workerRequest[prop] = REQUEST_DEFAULTS[prop]; workerRequest[prop] = REQUEST_DEFAULTS[prop];
} }
workerRequest[prop] = Number(workerRequest[prop]); workerRequest[prop] = Number(workerRequest[prop]);
}); });
workerRequest.name = domainObject.name; workerRequest.name = domainObject.name;
return workerRequest; return workerRequest;
}; };
@ -86,13 +81,11 @@ define([
var workerRequest = this.makeWorkerRequest(domainObject, request); var workerRequest = this.makeWorkerRequest(domainObject, request);
workerRequest.start = request.start; workerRequest.start = request.start;
workerRequest.end = request.end; workerRequest.end = request.end;
return this.workerInterface.request(workerRequest); return this.workerInterface.request(workerRequest);
}; };
GeneratorProvider.prototype.subscribe = function (domainObject, callback) { GeneratorProvider.prototype.subscribe = function (domainObject, callback) {
var workerRequest = this.makeWorkerRequest(domainObject, {}); var workerRequest = this.makeWorkerRequest(domainObject, {});
return this.workerInterface.subscribe(workerRequest, callback); return this.workerInterface.subscribe(workerRequest, callback);
}; };

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([ define([
@ -77,15 +78,12 @@ define([
if (datum[range] > RED[range]) { if (datum[range] > RED[range]) {
return LIMITS.rh; return LIMITS.rh;
} }
if (datum[range] < -RED[range]) { if (datum[range] < -RED[range]) {
return LIMITS.rl; return LIMITS.rl;
} }
if (datum[range] > YELLOW[range]) { if (datum[range] > YELLOW[range]) {
return LIMITS.yh; return LIMITS.yh;
} }
if (datum[range] < -YELLOW[range]) { if (datum[range] < -YELLOW[range]) {
return LIMITS.yl; return LIMITS.yl;
} }

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -48,7 +48,7 @@ define([
var interval = setInterval(function () { var interval = setInterval(function () {
var now = Date.now(); var now = Date.now();
var datum = pointForTimestamp(now, duration, domainObject.name); var datum = pointForTimestamp(now, duration, domainObject.name);
datum.value = String(datum.value); datum.value += "";
callback(datum); callback(datum);
}, duration); }, duration);
@ -57,6 +57,7 @@ define([
}; };
}; };
StateGeneratorProvider.prototype.supportsRequest = function (domainObject, options) { StateGeneratorProvider.prototype.supportsRequest = function (domainObject, options) {
return domainObject.type === 'example.state-generator'; return domainObject.type === 'example.state-generator';
}; };
@ -68,13 +69,11 @@ define([
if (options.strategy === 'latest' || options.size === 1) { if (options.strategy === 'latest' || options.size === 1) {
start = end; start = end;
} }
var data = []; var data = [];
while (start <= end && data.length < 5000) { while (start <= end && data.length < 5000) {
data.push(pointForTimestamp(start, duration, domainObject.name)); data.push(pointForTimestamp(start, duration, domainObject.name));
start += duration; start += duration;
} }
return Promise.resolve(data); return Promise.resolve(data);
}; };

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -72,16 +72,13 @@ define([
}); });
var messageId; var messageId;
let self = this;
function callback(message) { function callback(message) {
if (message.error) { if (message.error) {
deferred.reject(message.error); deferred.reject(message.error);
} else { } else {
deferred.resolve(message.data); deferred.resolve(message.data);
} }
delete this.callbacks[messageId];
delete self.callbacks[messageId];
} }
messageId = this.dispatch('request', request, callback.bind(this)); messageId = this.dispatch('request', request, callback.bind(this));
@ -104,5 +101,8 @@ define([
}.bind(this); }.bind(this);
}; };
return WorkerInterface; return WorkerInterface;
}); });

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -20,6 +20,8 @@
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global self*/
(function () { (function () {
var FIFTEEN_MINUTES = 15 * 60 * 1000; var FIFTEEN_MINUTES = 15 * 60 * 1000;
@ -62,14 +64,13 @@
data: { data: {
name: data.name, name: data.name,
utc: nextStep, utc: nextStep,
yesterday: nextStep - 60 * 60 * 24 * 1000, yesterday: nextStep - 60*60*24*1000,
sin: sin(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness), sin: sin(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness),
cos: cos(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness) cos: cos(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness)
} }
}); });
nextStep += step; nextStep += step;
} }
return nextStep; return nextStep;
} }
@ -86,7 +87,6 @@
if (request.end === undefined) { if (request.end === undefined) {
request.end = Date.now(); request.end = Date.now();
} }
if (request.start === undefined) { if (request.start === undefined) {
request.start = request.end - FIFTEEN_MINUTES; request.start = request.end - FIFTEEN_MINUTES;
} }
@ -108,13 +108,13 @@
for (; nextStep < end && data.length < 5000; nextStep += step) { for (; nextStep < end && data.length < 5000; nextStep += step) {
data.push({ data.push({
name: request.name,
utc: nextStep, utc: nextStep,
yesterday: nextStep - 60 * 60 * 24 * 1000, yesterday: nextStep - 60*60*24*1000,
sin: sin(nextStep, period, amplitude, offset, phase, randomness), sin: sin(nextStep, period, amplitude, offset, phase, randomness),
cos: cos(nextStep, period, amplitude, offset, phase, randomness) cos: cos(nextStep, period, amplitude, offset, phase, randomness)
}); });
} }
self.postMessage({ self.postMessage({
id: message.id, id: message.id,
data: data data: data
@ -122,13 +122,13 @@
} }
function cos(timestamp, period, amplitude, offset, phase, randomness) { function cos(timestamp, period, amplitude, offset, phase, randomness) {
return amplitude return amplitude *
* Math.cos(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset; Math.cos(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
} }
function sin(timestamp, period, amplitude, offset, phase, randomness) { function sin(timestamp, period, amplitude, offset, phase, randomness) {
return amplitude return amplitude *
* Math.sin(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset; Math.sin(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
} }
function sendError(error, message) { function sendError(error, message) {

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([ define([
"./GeneratorProvider", "./GeneratorProvider",
@ -55,7 +56,7 @@ define([
initialize: function (object) { initialize: function (object) {
object.telemetry = { object.telemetry = {
duration: 5 duration: 5
}; }
} }
}); });

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([ define([
"./src/ExampleIdentityService" "./src/ExampleIdentityService"
@ -28,7 +29,7 @@ define([
"use strict"; "use strict";
return { return {
name: "example/identity", name:"example/identity",
definition: { definition: {
"extensions": { "extensions": {
"components": [ "components": [

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,35 +19,32 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define( define(
function () { function () {
"use strict"; "use strict";
var DEFAULT_IDENTITY = { var DEFAULT_IDENTITY = { key: "user", name: "Example User" },
key: "user",
name: "Example User"
},
DIALOG_STRUCTURE = { DIALOG_STRUCTURE = {
name: "Identify Yourself", name: "Identify Yourself",
sections: [{ sections: [{ rows: [
rows: [ {
{ name: "User ID",
name: "User ID", control: "textfield",
control: "textfield", key: "key",
key: "key", required: true
required: true },
}, {
{ name: "Human name",
name: "Human name", control: "textfield",
control: "textfield", key: "name",
key: "name", required: true
required: true }
} ]}]
]
}]
}; };
/** /**
* Example implementation of an identity service. This prompts the * Example implementation of an identity service. This prompts the
* user to enter a name and user ID; in a more realistic * user to enter a name and user ID; in a more realistic
@ -80,14 +77,14 @@ define(
*/ */
ExampleIdentityProvider.prototype.returnUser = function (user) { ExampleIdentityProvider.prototype.returnUser = function (user) {
return this.user = user; return this.user = user;
}; }
/** /**
* @private * @private
*/ */
ExampleIdentityProvider.prototype.returnUndefined = function () { ExampleIdentityProvider.prototype.returnUndefined = function () {
return undefined; return undefined;
}; }
return ExampleIdentityProvider; return ExampleIdentityProvider;
} }

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -27,7 +27,7 @@ define([
) { ) {
function ImageryPlugin() { function ImageryPlugin() {
const IMAGE_SAMPLES = [ var IMAGE_SAMPLES = [
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18731.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18731.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18732.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18732.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18733.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18733.jpg",
@ -47,14 +47,13 @@ define([
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg", "https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg" "https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
]; ];
const IMAGE_DELAY = 20000;
function pointForTimestamp(timestamp, name) { function pointForTimestamp(timestamp, name) {
return { return {
name: name, name: name,
utc: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY, utc: Math.floor(timestamp / 5000) * 5000,
local: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY, local: Math.floor(timestamp / 5000) * 5000,
url: IMAGE_SAMPLES[Math.floor(timestamp / IMAGE_DELAY) % IMAGE_SAMPLES.length] url: IMAGE_SAMPLES[Math.floor(timestamp / 5000) % IMAGE_SAMPLES.length]
}; };
} }
@ -65,7 +64,7 @@ define([
subscribe: function (domainObject, callback) { subscribe: function (domainObject, callback) {
var interval = setInterval(function () { var interval = setInterval(function () {
callback(pointForTimestamp(Date.now(), domainObject.name)); callback(pointForTimestamp(Date.now(), domainObject.name));
}, IMAGE_DELAY); }, 5000);
return function () { return function () {
clearInterval(interval); clearInterval(interval);
@ -82,32 +81,32 @@ define([
var start = options.start; var start = options.start;
var end = Math.min(options.end, Date.now()); var end = Math.min(options.end, Date.now());
var data = []; var data = [];
while (start <= end && data.length < IMAGE_DELAY) { while (start <= end && data.length < 5000) {
data.push(pointForTimestamp(start, domainObject.name)); data.push(pointForTimestamp(start, domainObject.name));
start += IMAGE_DELAY; start += 5000;
} }
return Promise.resolve(data); return Promise.resolve(data);
} }
}; };
var ladProvider = { var ladProvider = {
supportsRequest: function (domainObject, options) { supportsRequest: function (domainObject, options) {
return domainObject.type === 'example.imagery' return domainObject.type === 'example.imagery' &&
&& options.strategy === 'latest'; options.strategy === 'latest';
}, },
request: function (domainObject, options) { request: function (domainObject, options) {
return Promise.resolve([pointForTimestamp(Date.now(), domainObject.name)]); return Promise.resolve([pointForTimestamp(Date.now(), domainObject.name)]);
} }
}; };
return function install(openmct) { return function install(openmct) {
openmct.types.addType('example.imagery', { openmct.types.addType('example.imagery', {
key: 'example.imagery', key: 'example.imagery',
name: 'Example Imagery', name: 'Example Imagery',
cssClass: 'icon-image', cssClass: 'icon-image',
description: 'For development use. Creates example imagery ' description: 'For development use. Creates example imagery ' +
+ 'data that mimics a live imagery stream.', 'data that mimics a live imagery stream.',
creatable: true, creatable: true,
initialize: function (object) { initialize: function (object) {
object.telemetry = { object.telemetry = {
@ -141,7 +140,7 @@ define([
} }
} }
] ]
}; }
} }
}); });

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,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.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([], function () { define([], function () {
"use strict"; "use strict";
return { return {
name: "example/mobile", name:"example/mobile",
definition: { definition: {
"name": "Mobile", "name": "Mobile",
"description": "Allows elements with pertinence to mobile usage and development", "description": "Allows elements with pertinence to mobile usage and development",

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([ define([
"./src/RemsTelemetryServerAdapter", "./src/RemsTelemetryServerAdapter",
@ -30,15 +31,14 @@ define([
RemsTelemetryProvider RemsTelemetryProvider
) { ) {
"use strict"; "use strict";
return { return {
name: "example/msl", name:"example/msl",
definition: { definition: {
"name": "Mars Science Laboratory Data Adapter", "name" : "Mars Science Laboratory Data Adapter",
"extensions": { "extensions" : {
"types": [ "types": [
{ {
"name": "Mars Science Laboratory", "name":"Mars Science Laboratory",
"key": "msl.curiosity", "key": "msl.curiosity",
"cssClass": "icon-object" "cssClass": "icon-object"
}, },
@ -89,7 +89,7 @@ define([
], ],
"services": [ "services": [
{ {
"key": "rems.adapter", "key":"rems.adapter",
"implementation": RemsTelemetryServerAdapter, "implementation": RemsTelemetryServerAdapter,
"depends": ["$http", "$log", "REMS_WS_URL"] "depends": ["$http", "$log", "REMS_WS_URL"]
} }

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define( define(
[], [],
@ -37,7 +38,7 @@ define(
"identifier": "msl", "identifier": "msl",
"instruments": [ "instruments": [
{ {
"name": "rems", "name":"rems",
"identifier": "rems", "identifier": "rems",
"measurements": [ "measurements": [
{ {

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define( define(
function () { function () {
@ -80,7 +81,6 @@ define(
(dictionary.instruments || []).forEach(function (instrument) { (dictionary.instruments || []).forEach(function (instrument) {
addInstrument(instrument, "msl:curiosity"); addInstrument(instrument, "msl:curiosity");
}); });
return models; return models;
} }
@ -90,7 +90,6 @@ define(
} }
}; };
} }
return RemsTelemetryModelProvider; return RemsTelemetryModelProvider;
} }
); );

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define */
define ( define (
['./RemsTelemetrySeries'], ['./RemsTelemetrySeries'],
function (RemsTelemetrySeries) { function (RemsTelemetrySeries) {
@ -73,7 +74,6 @@ define (
RemsTelemetryProvider.prototype.subscribe = function (callback, requests) { RemsTelemetryProvider.prototype.subscribe = function (callback, requests) {
return function () {}; return function () {};
}; };
RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) { RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) {
return function () {}; return function () {};
}; };

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define */
define( define(
function () { function () {
"use strict"; "use strict";
@ -56,7 +57,6 @@ define(
RemsTelemetrySeries.prototype.getPointCount = function () { RemsTelemetrySeries.prototype.getPointCount = function () {
return this.data.length; return this.data.length;
}; };
/** /**
* The domain value at the given index. The Rems telemetry data is * The domain value at the given index. The Rems telemetry data is
* time ordered, so the domain value is the time stamp of each data * time ordered, so the domain value is the time stamp of each data

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
/*jslint es5: true */ /*jslint es5: true */
define( define(
@ -94,32 +95,28 @@ define(
}); });
} }
}); });
return data; return data;
} }
function fallbackToLocal() { function fallbackToLocal() {
self.$log.warn("Loading REMS data failed, probably due to" self.$log.warn("Loading REMS data failed, probably due to" +
+ " cross origin policy. Falling back to local data"); " cross origin policy. Falling back to local data");
return self.$http.get(self.localDataURI); return self.$http.get(self.localDataURI);
} }
//Filter results to match request parameters //Filter results to match request parameters
function filterResults(results) { function filterResults(results) {
return results.filter(function (result) { return results.filter(function (result) {
return result.date >= (request.start || Number.MIN_VALUE) return result.date >= (request.start || Number.MIN_VALUE) &&
&& result.date <= (request.end || Number.MAX_VALUE); result.date <= (request.end || Number.MAX_VALUE);
}); });
} }
function packageAndResolve(results) { function packageAndResolve(results) {
return { return {id: id, values: results};
id: id,
values: results
};
} }
return (this.promise = this.promise || this.$http.get(this.REMS_WS_URL)) return (this.promise = this.promise || this.$http.get(this.REMS_WS_URL))
.catch(fallbackToLocal) .catch(fallbackToLocal)
.then(processResponse) .then(processResponse)

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([ define([
"./src/DialogLaunchController", "./src/DialogLaunchController",
@ -38,7 +39,7 @@ define([
"use strict"; "use strict";
return { return {
name: "example/notifications", name:"example/notifications",
definition: { definition: {
"extensions": { "extensions": {
"templates": [ "templates": [

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define( define(
[], [],
@ -90,6 +91,7 @@ define(
} }
}; };
/* /*
Demonstrates launching an error dialog Demonstrates launching an error dialog
*/ */
@ -130,9 +132,9 @@ define(
var dialog, var dialog,
model = { model = {
title: "Info Dialog Example", title: "Info Dialog Example",
actionText: "This is an example of a blocking info" actionText: "This is an example of a blocking info" +
+ " dialog. This dialog can be used to draw the user's" " dialog. This dialog can be used to draw the user's" +
+ " attention to an event.", " attention to an event.",
severity: "info", severity: "info",
primaryOption: { primaryOption: {
label: "OK", label: "OK",
@ -151,7 +153,6 @@ define(
}; };
} }
return DialogLaunchController; return DialogLaunchController;
} }
); );

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,window*/
define( define(
[], [],
@ -41,11 +42,9 @@ define(
DialogLaunchIndicator.prototype.getGlyphClass = function () { DialogLaunchIndicator.prototype.getGlyphClass = function () {
return 'ok'; return 'ok';
}; };
DialogLaunchIndicator.prototype.getText = function () { DialogLaunchIndicator.prototype.getText = function () {
return "Launch test dialog"; return "Launch test dialog";
}; };
DialogLaunchIndicator.prototype.getDescription = function () { DialogLaunchIndicator.prototype.getDescription = function () {
return "Launch test dialog"; return "Launch test dialog";
}; };

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define( define(
[], [],
@ -47,8 +48,7 @@ define(
"Eros turpis, pulvinar turpis eros eu", "Eros turpis, pulvinar turpis eros eu",
"Lundium nascetur a, lectus montes ac, parturient in natoque, duis risus risus pulvinar pid rhoncus, habitasse auctor natoque!" "Lundium nascetur a, lectus montes ac, parturient in natoque, duis risus risus pulvinar pid rhoncus, habitasse auctor natoque!"
]; ];
return actionTexts[Math.floor(Math.random()*3)];
return actionTexts[Math.floor(Math.random() * 3)];
} }
/** /**
@ -61,7 +61,6 @@ define(
severity: "error" severity: "error"
}); });
}; };
/** /**
* Launch a new notification with a severity of 'Alert'. * Launch a new notification with a severity of 'Alert'.
*/ */
@ -74,6 +73,7 @@ define(
}); });
}; };
/** /**
* Launch a new notification with a progress bar that is updated * Launch a new notification with a progress bar that is updated
* periodically, tracking an ongoing process. * periodically, tracking an ongoing process.
@ -93,10 +93,10 @@ define(
* @param notification * @param notification
*/ */
function incrementProgress() { function incrementProgress() {
progress = Math.min(100, Math.floor(progress + Math.random() * 30)); progress = Math.min(100, Math.floor(progress + Math.random() * 30))
let progressText = ["Estimated time" let progressText = ["Estimated time" +
+ " remaining:" " remaining:" +
+ " about ", 60 - Math.floor((progress / 100) * 60), " seconds"].join(" "); " about ", 60 - Math.floor((progress / 100) * 60), " seconds"].join(" ");
notification.progress(progress, progressText); notification.progress(progress, progressText);
if (progress < 100) { if (progress < 100) {
@ -120,7 +120,6 @@ define(
}; };
} }
return NotificationLaunchController; return NotificationLaunchController;
} }
); );

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,window*/
define( define(
[], [],
@ -41,11 +42,9 @@ define(
NotificationLaunchIndicator.prototype.getGlyphClass = function () { NotificationLaunchIndicator.prototype.getGlyphClass = function () {
return 'ok'; return 'ok';
}; };
NotificationLaunchIndicator.prototype.getText = function () { NotificationLaunchIndicator.prototype.getText = function () {
return "Launch notification"; return "Launch notification";
}; };
NotificationLaunchIndicator.prototype.getDescription = function () { NotificationLaunchIndicator.prototype.getDescription = function () {
return "Launch notification"; return "Launch notification";
}; };

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([ define([
"./src/BrowserPersistenceProvider" "./src/BrowserPersistenceProvider"
@ -28,7 +29,7 @@ define([
"use strict"; "use strict";
return { return {
name: "example/persistence", name:"example/persistence",
definition: { definition: {
"extensions": { "extensions": {
"components": [ "components": [

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
/** /**
* Stubbed implementation of a persistence provider, * Stubbed implementation of a persistence provider,
@ -29,6 +30,8 @@ define(
function () { function () {
'use strict'; 'use strict';
function BrowserPersistenceProvider($q, SPACE) { function BrowserPersistenceProvider($q, SPACE) {
var spaces = SPACE ? [SPACE] : [], var spaces = SPACE ? [SPACE] : [],
caches = {}, caches = {},
@ -48,7 +51,6 @@ define(
}, },
listObjects: function (space) { listObjects: function (space) {
var cache = caches[space]; var cache = caches[space];
return promises.as( return promises.as(
cache ? Object.keys(cache) : null cache ? Object.keys(cache) : null
); );
@ -66,7 +68,6 @@ define(
}, },
readObject: function (space, key) { readObject: function (space, key) {
var cache = caches[space]; var cache = caches[space];
return promises.as( return promises.as(
cache ? cache[key] : null cache ? cache[key] : null
); );

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([ define([
"./src/ExamplePolicy" "./src/ExamplePolicy"
@ -28,7 +29,7 @@ define([
"use strict"; "use strict";
return { return {
name: "example/policy", name:"example/policy",
definition: { definition: {
"name": "Example Policy", "name": "Example Policy",
"description": "Provides an example of using policies to prohibit actions.", "description": "Provides an example of using policies to prohibit actions.",

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define( define(
[], [],
@ -36,7 +37,6 @@ define(
model = (domainObject && domainObject.getModel()) || {}, model = (domainObject && domainObject.getModel()) || {},
name = model.name || "", name = model.name || "",
metadata = action.getMetadata() || {}; metadata = action.getMetadata() || {};
return metadata.key !== 'remove' || name.indexOf('foo') < 0; return metadata.key !== 'remove' || name.indexOf('foo') < 0;
} }
}; };

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([ define([
"./src/WatchIndicator", "./src/WatchIndicator",
@ -30,7 +31,7 @@ define([
"use strict"; "use strict";
return { return {
name: "example/profiling", name:"example/profiling",
definition: { definition: {
"extensions": { "extensions": {
"indicators": [ "indicators": [

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define( define(
[], [],

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define( define(
[], [],

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define([ define([
"./src/ScratchPersistenceProvider" "./src/ScratchPersistenceProvider"
@ -28,7 +29,7 @@ define([
"use strict"; "use strict";
return { return {
name: "example/scratchpad", name:"example/scratchpad",
definition: { definition: {
"extensions": { "extensions": {
"roots": [ "roots": [

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -20,6 +20,8 @@
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,window*/
define( define(
[], [],
function () { function () {
@ -52,14 +54,13 @@ define(
if (space === 'scratch') { if (space === 'scratch') {
this.table[key] = JSON.stringify(value); this.table[key] = JSON.stringify(value);
} }
return this.$q.when(space === 'scratch'); return this.$q.when(space === 'scratch');
}; };
ScratchPersistenceProvider.prototype.readObject = function (space, key) { ScratchPersistenceProvider.prototype.readObject = function (space, key) {
return this.$q.when( return this.$q.when(
(space === 'scratch' && this.table[key]) (space === 'scratch' && this.table[key]) ?
? JSON.parse(this.table[key]) : undefined JSON.parse(this.table[key]) : undefined
); );
}; };
@ -67,7 +68,6 @@ define(
if (space === 'scratch') { if (space === 'scratch') {
delete this.table[key]; delete this.table[key];
} }
return this.$q.when(space === 'scratch'); return this.$q.when(space === 'scratch');
}; };

View File

@ -7,9 +7,9 @@ export default {
data() { data() {
return { return {
msg: 'Hello world!' msg: 'Hello world!'
}; }
} }
}; }
</script> </script>
<style> <style>

View File

@ -17,7 +17,6 @@ function SimpleVuePlugin() {
}, },
view: function (domainObject) { view: function (domainObject) {
var vm; var vm;
return { return {
show: function (container) { show: function (container) {
vm = new Vue(HelloWorld); vm = new Vue(HelloWorld);
@ -30,7 +29,7 @@ function SimpleVuePlugin() {
} }
}); });
}; }
} }
export default SimpleVuePlugin; export default SimpleVuePlugin

View File

@ -22,111 +22,31 @@ define([
menusTemplate menusTemplate
) { ) {
return { return {
name: "example/styleguide", name:"example/styleguide",
definition: { definition: {
"name": "Open MCT Style Guide", "name": "Open MCT Style Guide",
"description": "Examples and documentation illustrating UI styles in use in Open MCT.", "description": "Examples and documentation illustrating UI styles in use in Open MCT.",
"extensions": "extensions":
{ {
"types": [ "types": [
{ { "key": "styleguide.intro", "name": "Introduction", "cssClass": "icon-page", "description": "Introduction and overview to the style guide" },
"key": "styleguide.intro", { "key": "styleguide.standards", "name": "Standards", "cssClass": "icon-page", "description": "" },
"name": "Introduction", { "key": "styleguide.colors", "name": "Colors", "cssClass": "icon-page", "description": "" },
"cssClass": "icon-page", { "key": "styleguide.status", "name": "status", "cssClass": "icon-page", "description": "Limits, telemetry paused, etc." },
"description": "Introduction and overview to the style guide" { "key": "styleguide.glyphs", "name": "Glyphs", "cssClass": "icon-page", "description": "Glyphs overview" },
}, { "key": "styleguide.controls", "name": "Controls", "cssClass": "icon-page", "description": "Buttons, selects, HTML controls" },
{ { "key": "styleguide.input", "name": "Text Inputs", "cssClass": "icon-page", "description": "Various text inputs" },
"key": "styleguide.standards", { "key": "styleguide.menus", "name": "Menus", "cssClass": "icon-page", "description": "Context menus, dropdowns" }
"name": "Standards",
"cssClass": "icon-page",
"description": ""
},
{
"key": "styleguide.colors",
"name": "Colors",
"cssClass": "icon-page",
"description": ""
},
{
"key": "styleguide.status",
"name": "status",
"cssClass": "icon-page",
"description": "Limits, telemetry paused, etc."
},
{
"key": "styleguide.glyphs",
"name": "Glyphs",
"cssClass": "icon-page",
"description": "Glyphs overview"
},
{
"key": "styleguide.controls",
"name": "Controls",
"cssClass": "icon-page",
"description": "Buttons, selects, HTML controls"
},
{
"key": "styleguide.input",
"name": "Text Inputs",
"cssClass": "icon-page",
"description": "Various text inputs"
},
{
"key": "styleguide.menus",
"name": "Menus",
"cssClass": "icon-page",
"description": "Context menus, dropdowns"
}
], ],
"views": [ "views": [
{ { "key": "styleguide.intro", "type": "styleguide.intro", "template": introTemplate, "editable": false },
"key": "styleguide.intro", { "key": "styleguide.standards", "type": "styleguide.standards", "template": standardsTemplate, "editable": false },
"type": "styleguide.intro", { "key": "styleguide.colors", "type": "styleguide.colors", "template": colorsTemplate, "editable": false },
"template": introTemplate, { "key": "styleguide.status", "type": "styleguide.status", "template": statusTemplate, "editable": false },
"editable": false { "key": "styleguide.glyphs", "type": "styleguide.glyphs", "template": glyphsTemplate, "editable": false },
}, { "key": "styleguide.controls", "type": "styleguide.controls", "template": controlsTemplate, "editable": false },
{ { "key": "styleguide.input", "type": "styleguide.input", "template": inputTemplate, "editable": false },
"key": "styleguide.standards", { "key": "styleguide.menus", "type": "styleguide.menus", "template": menusTemplate, "editable": false }
"type": "styleguide.standards",
"template": standardsTemplate,
"editable": false
},
{
"key": "styleguide.colors",
"type": "styleguide.colors",
"template": colorsTemplate,
"editable": false
},
{
"key": "styleguide.status",
"type": "styleguide.status",
"template": statusTemplate,
"editable": false
},
{
"key": "styleguide.glyphs",
"type": "styleguide.glyphs",
"template": glyphsTemplate,
"editable": false
},
{
"key": "styleguide.controls",
"type": "styleguide.controls",
"template": controlsTemplate,
"editable": false
},
{
"key": "styleguide.input",
"type": "styleguide.input",
"template": inputTemplate,
"editable": false
},
{
"key": "styleguide.menus",
"type": "styleguide.menus",
"template": menusTemplate,
"editable": false
}
], ],
"roots": [ "roots": [
{ {
@ -136,9 +56,9 @@ define([
"models": [ "models": [
{ {
"id": "styleguide:home", "id": "styleguide:home",
"priority": "preferred", "priority" : "preferred",
"model": { "model": {
"type": "noneditable.folder", "type": "folder",
"name": "Style Guide Home", "name": "Style Guide Home",
"location": "ROOT", "location": "ROOT",
"composition": [ "composition": [
@ -153,9 +73,9 @@ define([
}, },
{ {
"id": "styleguide:ui-elements", "id": "styleguide:ui-elements",
"priority": "preferred", "priority" : "preferred",
"model": { "model": {
"type": "noneditable.folder", "type": "folder",
"name": "UI Elements", "name": "UI Elements",
"location": "styleguide:home", "location": "styleguide:home",
"composition": [ "composition": [

View File

@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/
define( define(
[], [],
@ -29,46 +30,14 @@ define(
var pages = {}; var pages = {};
// Add pages // Add pages
pages.intro = { pages.intro = { name: "Introduction", type: "styleguide.intro", location: "styleguide:home" };
name: "Introduction", pages.standards = { name: "Standards", type: "styleguide.standards", location: "styleguide:home" };
type: "styleguide.intro", pages.colors = { name: "Colors", type: "styleguide.colors", location: "styleguide:home" };
location: "styleguide:home" pages.glyphs = { name: "Glyphs", type: "styleguide.glyphs", location: "styleguide:home" };
}; pages.status = { name: "Status Indication", type: "styleguide.status", location: "styleguide:home" };
pages.standards = { pages.controls = { name: "Controls", type: "styleguide.controls", location: "styleguide:ui-elements" };
name: "Standards", pages.input = { name: "Text Inputs", type: "styleguide.input", location: "styleguide:ui-elements" };
type: "styleguide.standards", pages.menus = { name: "Menus", type: "styleguide.menus", location: "styleguide:ui-elements" };
location: "styleguide:home"
};
pages.colors = {
name: "Colors",
type: "styleguide.colors",
location: "styleguide:home"
};
pages.glyphs = {
name: "Glyphs",
type: "styleguide.glyphs",
location: "styleguide:home"
};
pages.status = {
name: "Status Indication",
type: "styleguide.status",
location: "styleguide:home"
};
pages.controls = {
name: "Controls",
type: "styleguide.controls",
location: "styleguide:ui-elements"
};
pages.input = {
name: "Text Inputs",
type: "styleguide.input",
location: "styleguide:ui-elements"
};
pages.menus = {
name: "Menus",
type: "styleguide.menus",
location: "styleguide:ui-elements"
};
return { return {
getModels: function () { getModels: function () {
@ -77,6 +46,6 @@ define(
}; };
} }
return ExampleStyleGuideModelProvider; return ExampleStyleGuideModelProvider
} }
); );

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2020, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.
@ -30,50 +30,12 @@
<link rel="icon" type="image/png" href="dist/favicons/favicon-96x96.png" sizes="96x96" type="image/x-icon"> <link rel="icon" type="image/png" href="dist/favicons/favicon-96x96.png" sizes="96x96" type="image/x-icon">
<link rel="icon" type="image/png" href="dist/favicons/favicon-32x32.png" sizes="32x32" type="image/x-icon"> <link rel="icon" type="image/png" href="dist/favicons/favicon-32x32.png" sizes="32x32" type="image/x-icon">
<link rel="icon" type="image/png" href="dist/favicons/favicon-16x16.png" sizes="16x16" type="image/x-icon"> <link rel="icon" type="image/png" href="dist/favicons/favicon-16x16.png" sizes="16x16" type="image/x-icon">
<style type="text/css">
@keyframes splash-spinner {
0% {
transform: translate(-50%, -50%) rotate(0deg); }
100% {
transform: translate(-50%, -50%) rotate(360deg); } }
#splash-screen {
background-color: black;
position: absolute;
top: 0; right: 0; bottom: 0; left: 0;
z-index: 10000;
}
#splash-screen:before {
animation-name: splash-spinner;
animation-duration: 0.5s;
animation-iteration-count: infinite;
animation-timing-function: linear;
border-radius: 50%;
border-color: rgba(255,255,255,0.25);
border-top-color: white;
border-style: solid;
border-width: 10px;
content: '';
display: block;
opacity: 0.25;
position: absolute;
left: 50%; top: 50%;
height: 100px; width: 100px;
}
</style>
</head> </head>
<body> <body>
</body> </body>
<script> <script>
const THIRTY_SECONDS = 30 * 1000; const THIRTY_SECONDS = 30 * 1000;
const ONE_MINUTE = THIRTY_SECONDS * 2; const THIRTY_MINUTES = THIRTY_SECONDS * 60;
const FIVE_MINUTES = ONE_MINUTE * 5;
const FIFTEEN_MINUTES = FIVE_MINUTES * 3;
const THIRTY_MINUTES = FIFTEEN_MINUTES * 2;
const ONE_HOUR = THIRTY_MINUTES * 2;
const TWO_HOURS = ONE_HOUR * 2;
const ONE_DAY = ONE_HOUR * 24;
[ [
'example/eventGenerator' 'example/eventGenerator'
@ -86,9 +48,6 @@
openmct.install(openmct.plugins.MyItems()); openmct.install(openmct.plugins.MyItems());
openmct.install(openmct.plugins.Generator()); openmct.install(openmct.plugins.Generator());
openmct.install(openmct.plugins.ExampleImagery()); openmct.install(openmct.plugins.ExampleImagery());
openmct.install(openmct.plugins.PlanLayout());
openmct.install(openmct.plugins.Timeline());
openmct.install(openmct.plugins.PlotVue());
openmct.install(openmct.plugins.UTCTimeSystem()); openmct.install(openmct.plugins.UTCTimeSystem());
openmct.install(openmct.plugins.AutoflowView({ openmct.install(openmct.plugins.AutoflowView({
type: "telemetry.panel" type: "telemetry.panel"
@ -113,30 +72,30 @@
{ {
label: 'Last Day', label: 'Last Day',
bounds: { bounds: {
start: () => Date.now() - ONE_DAY, start: () => Date.now() - 1000 * 60 * 60 * 24,
end: () => Date.now() end: () => Date.now()
} }
}, },
{ {
label: 'Last 2 hours', label: 'Last 2 hours',
bounds: { bounds: {
start: () => Date.now() - TWO_HOURS, start: () => Date.now() - 1000 * 60 * 60 * 2,
end: () => Date.now() end: () => Date.now()
} }
}, },
{ {
label: 'Last hour', label: 'Last hour',
bounds: { bounds: {
start: () => Date.now() - ONE_HOUR, start: () => Date.now() - 1000 * 60 * 60,
end: () => Date.now() end: () => Date.now()
} }
} }
], ],
// maximum recent bounds to retain in conductor history // maximum recent bounds to retain in conductor history
records: 10 records: 10,
// maximum duration between start and end bounds // maximum duration between start and end bounds
// for utc-based time systems this is in milliseconds // for utc-based time systems this is in milliseconds
// limit: ONE_DAY limit: 1000 * 60 * 60 * 24
}, },
{ {
name: "Realtime", name: "Realtime",
@ -145,44 +104,7 @@
clockOffsets: { clockOffsets: {
start: - THIRTY_MINUTES, start: - THIRTY_MINUTES,
end: THIRTY_SECONDS end: THIRTY_SECONDS
}, }
presets: [
{
label: '1 Hour',
bounds: {
start: - ONE_HOUR,
end: THIRTY_SECONDS
}
},
{
label: '30 Minutes',
bounds: {
start: - THIRTY_MINUTES,
end: THIRTY_SECONDS
}
},
{
label: '15 Minutes',
bounds: {
start: - FIFTEEN_MINUTES,
end: THIRTY_SECONDS
}
},
{
label: '5 Minutes',
bounds: {
start: - FIVE_MINUTES,
end: THIRTY_SECONDS
}
},
{
label: '1 Minute',
bounds: {
start: - ONE_MINUTE,
end: THIRTY_SECONDS
}
}
]
} }
] ]
})); }));

View File

@ -1,3 +0,0 @@
const testsContext = require.context('.', true, /\/(src|platform)\/.*Spec.js$/);
testsContext.keys().forEach(testsContext);

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -52,16 +52,12 @@ module.exports = (config) => {
basePath: '', basePath: '',
frameworks: ['jasmine'], frameworks: ['jasmine'],
files: [ files: [
'indexTest.js' 'platform/**/*Spec.js',
'src/**/*Spec.js'
], ],
port: 9876, port: 9876,
reporters: reporters, reporters: reporters,
browsers: browsers, browsers: browsers,
client: {
jasmine: {
random: false
}
},
customLaunchers: { customLaunchers: {
ChromeDebugging: { ChromeDebugging: {
base: 'Chrome', base: 'Chrome',
@ -86,20 +82,20 @@ module.exports = (config) => {
reports: ['html', 'lcovonly', 'text-summary'], reports: ['html', 'lcovonly', 'text-summary'],
thresholds: { thresholds: {
global: { global: {
lines: 66 lines: 62
} }
} }
}, },
preprocessors: { preprocessors: {
'indexTest.js': ['webpack', 'sourcemap'] 'platform/**/*Spec.js': ['webpack', 'sourcemap'],
'src/**/*Spec.js': ['webpack', 'sourcemap']
}, },
webpack: webpackConfig, webpack: webpackConfig,
webpackMiddleware: { webpackMiddleware: {
stats: 'errors-only', stats: 'errors-only',
logLevel: 'warn' logLevel: 'warn'
}, },
concurrency: 1,
singleRun: true, singleRun: true,
browserNoActivityTimeout: 400000 browserNoActivityTimeout: 400000
}); });
}; }

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2017, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -32,6 +32,6 @@ if (document.currentScript) {
const MCT = require('./src/MCT'); const MCT = require('./src/MCT');
const openmct = new MCT(); var openmct = new MCT();
module.exports = openmct; module.exports = openmct;

View File

@ -1,12 +1,12 @@
{ {
"name": "openmct", "name": "openmct",
"version": "1.6.3-SNAPSHOT", "version": "1.0.0-snapshot",
"description": "The Open MCT core platform", "description": "The Open MCT core platform",
"dependencies": {}, "dependencies": {},
"devDependencies": { "devDependencies": {
"angular": ">=1.8.0", "angular": ">=1.8.0",
"angular-route": "1.4.14", "angular-route": "1.4.14",
"babel-eslint": "10.0.3", "babel-eslint": "8.2.6",
"comma-separated-values": "^3.6.4", "comma-separated-values": "^3.6.4",
"concurrently": "^3.6.1", "concurrently": "^3.6.1",
"copy-webpack-plugin": "^4.5.2", "copy-webpack-plugin": "^4.5.2",
@ -22,8 +22,8 @@
"d3-selection": "1.3.x", "d3-selection": "1.3.x",
"d3-time": "1.0.x", "d3-time": "1.0.x",
"d3-time-format": "2.1.x", "d3-time-format": "2.1.x",
"eslint": "7.0.0", "eslint": "5.2.0",
"eslint-plugin-vue": "^7.5.0", "eslint-plugin-vue": "^6.0.0",
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0", "eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
"eventemitter3": "^1.2.0", "eventemitter3": "^1.2.0",
"exports-loader": "^0.7.0", "exports-loader": "^0.7.0",
@ -39,27 +39,27 @@
"istanbul-instrumenter-loader": "^3.0.1", "istanbul-instrumenter-loader": "^3.0.1",
"jasmine-core": "^3.1.0", "jasmine-core": "^3.1.0",
"jsdoc": "^3.3.2", "jsdoc": "^3.3.2",
"karma": "5.1.1", "karma": "^2.0.3",
"karma-chrome-launcher": "3.1.0", "karma-chrome-launcher": "^2.2.0",
"karma-firefox-launcher": "1.3.0", "karma-firefox-launcher": "^1.3.0",
"karma-cli": "2.0.0", "karma-cli": "^1.0.1",
"karma-coverage": "2.0.3", "karma-coverage": "^1.1.2",
"karma-coverage-istanbul-reporter": "3.0.3", "karma-coverage-istanbul-reporter": "^2.1.1",
"karma-html-reporter": "0.2.7", "karma-html-reporter": "^0.2.7",
"karma-jasmine": "3.3.1", "karma-jasmine": "^1.1.2",
"karma-sourcemap-loader": "0.3.7", "karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "4.0.2", "karma-webpack": "^3.0.0",
"location-bar": "^3.0.1", "location-bar": "^3.0.1",
"lodash": "^4.17.12", "lodash": "^4.17.12",
"markdown-toc": "^0.11.7", "markdown-toc": "^0.11.7",
"marked": "^0.3.5", "marked": "^0.3.5",
"mini-css-extract-plugin": "^0.4.1", "mini-css-extract-plugin": "^0.4.1",
"minimist": "^1.2.5", "minimist": "^1.1.1",
"moment": "2.25.3", "moment": "2.25.3",
"moment-duration-format": "^2.2.2", "moment-duration-format": "^2.2.2",
"moment-timezone": "0.5.28", "moment-timezone": "0.5.28",
"node-bourbon": "^4.2.3", "node-bourbon": "^4.2.3",
"node-sass": "^4.14.1", "node-sass": "^4.9.2",
"painterro": "^1.0.35", "painterro": "^1.0.35",
"printj": "^1.2.1", "printj": "^1.2.1",
"raw-loader": "^0.5.1", "raw-loader": "^0.5.1",

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -47,7 +47,7 @@ define([
) { ) {
return { return {
name: "platform/commonUI/about", name:"platform/commonUI/about",
definition: { definition: {
"name": "About Open MCT", "name": "About Open MCT",
"extensions": { "extensions": {

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.
@ -24,7 +24,7 @@
<div class="s-text l-content"> <div class="s-text l-content">
<h1 class="l-title s-title">Open MCT</h1> <h1 class="l-title s-title">Open MCT</h1>
<div class="l-description s-description"> <div class="l-description s-description">
<p>Open MCT, Copyright &copy; 2014-2021, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.</p> <p>Open MCT, Copyright &copy; 2014-2018, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.</p>
<p>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 <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>.</p> <p>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 <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>.</p>
<p>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.</p> <p>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.</p>
<p>Open MCT includes source code licensed under additional open source licenses. See the Open Source Licenses file included with this distribution or <a ng-click="about.openLicenses()">click here for licensing information</a>.</p> <p>Open MCT includes source code licensed under additional open source licenses. See the Open Source Licenses file included with this distribution or <a ng-click="about.openLicenses()">click here for licensing information</a>.</p>

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -20,6 +20,7 @@
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/** /**
* Implements Open MCT's About dialog. * Implements Open MCT's About dialog.
* @namespace platform/commonUI/about * @namespace platform/commonUI/about

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -25,20 +25,14 @@ define(
function (AboutController) { function (AboutController) {
describe("The About controller", function () { describe("The About controller", function () {
let testVersions; var testVersions,
let mockWindow; mockWindow,
let controller; controller;
beforeEach(function () { beforeEach(function () {
testVersions = [ testVersions = [
{ { name: "Some name", value: "1.2.3" },
name: "Some name", { name: "Some other name", value: "3.2.1" }
value: "1.2.3"
},
{
name: "Some other name",
value: "3.2.1"
}
]; ];
mockWindow = jasmine.createSpyObj("$window", ["open"]); mockWindow = jasmine.createSpyObj("$window", ["open"]);
controller = new AboutController(testVersions, mockWindow); controller = new AboutController(testVersions, mockWindow);
@ -56,6 +50,8 @@ define(
controller.openLicenses(); controller.openLicenses();
expect(mockWindow.open).toHaveBeenCalledWith("#/licenses"); expect(mockWindow.open).toHaveBeenCalledWith("#/licenses");
}); });
}); });
} }

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -49,7 +49,7 @@ define([
) { ) {
return { return {
name: "platform/commonUI/browse", name:"platform/commonUI/browse",
definition: { definition: {
"extensions": { "extensions": {
"routes": [ "routes": [
@ -143,8 +143,8 @@ define([
"$window" "$window"
], ],
"group": "windowing", "group": "windowing",
"priority": 10, "cssClass": "icon-new-window",
"cssClass": "icon-new-window" "priority": "preferred"
} }
], ],
"runs": [ "runs": [

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.
@ -58,7 +58,7 @@
<div class='holder holder-object-and-inspector abs' id='content-area' <div class='holder holder-object-and-inspector abs' id='content-area'
ng-controller="InspectorPaneController as modelPaneInspect" ng-controller="InspectorPaneController as modelPaneInspect"
ng-class="modelPaneInspect.visible() ? 'pane-inspect-showing' : 'pane-inspect-hidden'" ng-class="modelPaneInspect.visible() ? 'pane-inspect-showing' : 'pane-inspect-hidden'"
hide-parameter="hideInspector"> hide-parameter="hideInspector">
<mct-split-pane class='l-object-and-inspector contents abs' anchor='right' alias="rightSide"> <mct-split-pane class='l-object-and-inspector contents abs' anchor='right' alias="rightSide">

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.
@ -28,4 +28,4 @@
key="'menu-arrow'" key="'menu-arrow'"
mct-object='domainObject' mct-object='domainObject'
class="flex-elem context-available-w"></mct-representation> class="flex-elem context-available-w"></mct-representation>
</span> </span>

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.
@ -32,4 +32,4 @@
key="'menu-arrow'" key="'menu-arrow'"
mct-object='domainObject' mct-object='domainObject'
class="flex-elem context-available-w"></mct-representation> class="flex-elem context-available-w"></mct-representation>
</span> </span>

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -46,7 +46,6 @@ define(
NavigateAction.prototype.perform = function () { NavigateAction.prototype.perform = function () {
if (this.navigationService.shouldNavigate()) { if (this.navigationService.shouldNavigate()) {
this.navigationService.setNavigation(this.domainObject, true); this.navigationService.setNavigation(this.domainObject, true);
return Promise.resolve({}); return Promise.resolve({});
} }

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -69,10 +69,8 @@ define(
NavigationService.prototype.setNavigation = function (domainObject, force) { NavigationService.prototype.setNavigation = function (domainObject, force) {
if (force) { if (force) {
this.doNavigation(domainObject); this.doNavigation(domainObject);
return true; return true;
} }
if (this.navigated === domainObject) { if (this.navigated === domainObject) {
return true; return true;
} }
@ -83,7 +81,6 @@ define(
} }
this.doNavigation(domainObject); this.doNavigation(domainObject);
return true; return true;
}; };
@ -123,7 +120,6 @@ define(
*/ */
NavigationService.prototype.shouldNavigate = function () { NavigationService.prototype.shouldNavigate = function () {
var doNotNavigate = this.shouldWarnBeforeNavigate(); var doNotNavigate = this.shouldWarnBeforeNavigate();
return !doNotNavigate || this.$window.confirm(doNotNavigate); return !doNotNavigate || this.$window.confirm(doNotNavigate);
}; };
@ -139,7 +135,6 @@ define(
*/ */
NavigationService.prototype.checkBeforeNavigation = function (checkFn) { NavigationService.prototype.checkBeforeNavigation = function (checkFn) {
this.checks.push(checkFn); this.checks.push(checkFn);
return function removeCheck() { return function removeCheck() {
this.checks = this.checks.filter(function (fn) { this.checks = this.checks.filter(function (fn) {
return checkFn !== fn; return checkFn !== fn;
@ -177,7 +172,6 @@ define(
if (reasons.length) { if (reasons.length) {
return reasons.join('\n'); return reasons.join('\n');
} }
return false; return false;
}; };
@ -192,7 +186,6 @@ define(
if (shouldWarnBeforeNavigate) { if (shouldWarnBeforeNavigate) {
return shouldWarnBeforeNavigate; return shouldWarnBeforeNavigate;
} }
if (this.oldUnload) { if (this.oldUnload) {
return this.oldUnload.apply(undefined, [].slice.apply(arguments)); return this.oldUnload.apply(undefined, [].slice.apply(arguments));
} }

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -40,7 +40,6 @@ define([], function () {
function getParent(domainObject) { function getParent(domainObject) {
var context = domainObject.getCapability('context'); var context = domainObject.getCapability('context');
return context.getParent(); return context.getParent();
} }

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -53,7 +53,6 @@ define([
it("sets navigation if it is allowed", function () { it("sets navigation if it is allowed", function () {
mockNavigationService.shouldNavigate.and.returnValue(true); mockNavigationService.shouldNavigate.and.returnValue(true);
return action.perform() return action.perform()
.then(function () { .then(function () {
expect(mockNavigationService.setNavigation) expect(mockNavigationService.setNavigation)
@ -64,7 +63,6 @@ define([
it("does not set navigation if it is not allowed", function () { it("does not set navigation if it is not allowed", function () {
mockNavigationService.shouldNavigate.and.returnValue(false); mockNavigationService.shouldNavigate.and.returnValue(false);
var onSuccess = jasmine.createSpy('onSuccess'); var onSuccess = jasmine.createSpy('onSuccess');
return action.perform() return action.perform()
.then(onSuccess, function () { .then(onSuccess, function () {
expect(onSuccess).not.toHaveBeenCalled(); expect(onSuccess).not.toHaveBeenCalled();

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -79,6 +79,7 @@ define(
navigationService.addListener(callback); navigationService.addListener(callback);
navigationService.removeListener(callback); navigationService.removeListener(callback);
navigationService.setNavigation(testObject); navigationService.setNavigation(testObject);
expect(callback).not.toHaveBeenCalled(); expect(callback).not.toHaveBeenCalled();
}); });

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -70,7 +70,6 @@ define([
jasmine.createSpy('throttled-' + mockThrottledFns.length); jasmine.createSpy('throttled-' + mockThrottledFns.length);
mockThrottledFn.and.callFake(fn); mockThrottledFn.and.callFake(fn);
mockThrottledFns.push(mockThrottledFn); mockThrottledFns.push(mockThrottledFn);
return mockThrottledFn; return mockThrottledFn;
}); });
mockTopic.and.returnValue(mockMutationTopic); mockTopic.and.returnValue(mockMutationTopic);
@ -82,7 +81,7 @@ define([
}[c]; }[c];
}); });
mockDomainObject.hasCapability.and.callFake(function (c) { mockDomainObject.hasCapability.and.callFake(function (c) {
return Boolean(mockDomainObject.getCapability(c)); return !!mockDomainObject.getCapability(c);
}); });
mockParentObject.getCapability.and.callFake(function (c) { mockParentObject.getCapability.and.callFake(function (c) {
return { return {
@ -103,6 +102,7 @@ define([
); );
}); });
it("listens for mutation with a throttled function", function () { it("listens for mutation with a throttled function", function () {
expect(mockMutationTopic.listen) expect(mockMutationTopic.listen)
.toHaveBeenCalledWith(jasmine.any(Function)); .toHaveBeenCalledWith(jasmine.any(Function));
@ -129,8 +129,8 @@ define([
}); });
[false, true].forEach(function (isEditRoot) { [false, true].forEach(function (isEditRoot) {
var caseName = isEditRoot var caseName = isEditRoot ?
? "that are being edited" : "that are not being edited"; "that are being edited" : "that are not being edited";
function itNavigatesAsExpected() { function itNavigatesAsExpected() {
if (isOrphan && !isEditRoot) { if (isOrphan && !isEditRoot) {

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -45,7 +45,7 @@ define([
) { ) {
return { return {
name: "platform/commonUI/dialog", name:"platform/commonUI/dialog",
definition: { definition: {
"extensions": { "extensions": {
"services": [ "services": [

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
<!-- <!--
Open MCT, Copyright (c) 2014-2021, United States Government Open MCT, Copyright (c) 2014-2018, United States Government
as represented by the Administrator of the National Aeronautics and Space as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved. Administration. All rights reserved.

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *

View File

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government * Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space * as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved. * Administration. All rights reserved.
* *
@ -28,6 +28,7 @@ define(
// the a specific template that can be included via mct-include // the a specific template that can be included via mct-include
var TEMPLATE = '<mct-include ng-model="overlay" key="key" ng-class="typeClass"></mct-include>'; var TEMPLATE = '<mct-include ng-model="overlay" key="key" ng-class="typeClass"></mct-include>';
/** /**
* The OverlayService is responsible for pre-pending templates to * The OverlayService is responsible for pre-pending templates to
* the body of the document, which is useful for displaying templates * the body of the document, which is useful for displaying templates
@ -52,7 +53,6 @@ define(
this.findBody = function () { this.findBody = function () {
return $document.find('body'); return $document.find('body');
}; };
this.newScope = function () { this.newScope = function () {
return $rootScope.$new(); return $rootScope.$new();
}; };

Some files were not shown because too many files have changed in this diff Show More