mirror of
https://github.com/nasa/openmct.git
synced 2025-06-25 10:44:21 +00:00
Compare commits
222 Commits
plotly-imp
...
openmct-st
Author | SHA1 | Date | |
---|---|---|---|
46ea383b51 | |||
7df7d57bc2 | |||
5f03dc45ee | |||
14ac758760 | |||
eb709a60cb | |||
eba1a48a44 | |||
4a0654dbcb | |||
9b6d339d69 | |||
f90afb9277 | |||
018dfb1e28 | |||
5646a252f7 | |||
c72a02aaa3 | |||
0e6ce7f58b | |||
8cd6a4c6a3 | |||
02fc162197 | |||
84d21a3695 | |||
1a6369c2b9 | |||
463c44679d | |||
c1f3ea4e61 | |||
bf3fd66942 | |||
8414ded1ec | |||
142b767470 | |||
184b716b53 | |||
646c871c76 | |||
e53399495b | |||
d27f73579b | |||
ba401b3341 | |||
5ef02ec4a2 | |||
d788031019 | |||
1ae8199e89 | |||
2deb4e8474 | |||
7f10681424 | |||
c756adad6f | |||
f3d593bc1e | |||
b637307de6 | |||
b6e0208e71 | |||
631876cab3 | |||
a192d46c2b | |||
6923f17645 | |||
d870874649 | |||
711a7a2eb5 | |||
87a45de05b | |||
ab76451360 | |||
c105a08cfe | |||
b87375a809 | |||
9fed056d22 | |||
251bf21933 | |||
a180bf7c02 | |||
ed8a54f0f9 | |||
a91179091f | |||
5f7e34ce6c | |||
ff3c2da0f9 | |||
db33f0538a | |||
28d5821120 | |||
f5ee457274 | |||
9d2770e4d2 | |||
257a8e2e2d | |||
8b25009816 | |||
074fe4481a | |||
fbd928b842 | |||
110947db09 | |||
baa8078d23 | |||
ee60013f45 | |||
ef91e92fbc | |||
d201cac4ac | |||
dcb3ccfec7 | |||
505796d9f0 | |||
56120ba1bb | |||
225b235059 | |||
de614ff606 | |||
7879752f47 | |||
08b2940eb6 | |||
78522cd4f1 | |||
ca232d45cc | |||
df495c841a | |||
67749dd2bb | |||
56c203d9ca | |||
54ce86eff3 | |||
9713ca74c7 | |||
81ed9169f1 | |||
e60462c221 | |||
09c4e610af | |||
4a576321e3 | |||
24c5dc03de | |||
d8291ddc17 | |||
1b75d828d8 | |||
966e583978 | |||
e52f60fdf0 | |||
b4c44c6d49 | |||
0f6215da9d | |||
7d0b323dab | |||
14114781fc | |||
97694fa29c | |||
92a37ef36b | |||
9f6bfa2351 | |||
b842cbc83d | |||
0da5409092 | |||
888afd88b8 | |||
35692ae4b9 | |||
fd731ca430 | |||
263b1cd3d5 | |||
978fc8b5a3 | |||
698ccc5a35 | |||
e5aa5b5a5f | |||
b942988ef8 | |||
1eec20f2ea | |||
18b2a270c9 | |||
767a2048eb | |||
6f2d8e6ce3 | |||
e65cf1661c | |||
0eae48646c | |||
91d1681698 | |||
efd97de743 | |||
c4cd725c9a | |||
23e5efbb19 | |||
4e995c10da | |||
b5cf157c40 | |||
ac082e9f58 | |||
9f7799b44f | |||
0ba8a275d2 | |||
cdf9c50b8a | |||
7c4e9cef87 | |||
d8d32cc3ac | |||
a800848fe1 | |||
ffb3b302c7 | |||
278f48f65c | |||
4801dc4f32 | |||
6881d98ba6 | |||
9e8f845fbe | |||
48d077cd2e | |||
b4d1cdaae8 | |||
030dd93c91 | |||
03bf6fc0a3 | |||
ef0a2ed5d2 | |||
a40aa84752 | |||
d3b69dda82 | |||
d3126ebf5c | |||
4479cbc7a2 | |||
f8ff44dac0 | |||
8f4280d15b | |||
6daa27ff31 | |||
43f6c3f85d | |||
1a7c76cf3e | |||
f9d3af2724 | |||
ac6ed5dd01 | |||
6e0c1cc674 | |||
33c37ebf19 | |||
c33c29b6f3 | |||
cee9cd7bd1 | |||
37debefadc | |||
c42df20281 | |||
b4149bd2b3 | |||
f436ac9ba0 | |||
8493b481dd | |||
891fe0a36b | |||
4b6de59b03 | |||
6a5b902365 | |||
270f07ebd5 | |||
52500f6097 | |||
2fa8a8d61d | |||
69a6cd20af | |||
28eb268af1 | |||
045bb443cb | |||
c6ca912f2b | |||
78c7484d54 | |||
4d560086dd | |||
ef965ebdfd | |||
0b4a843617 | |||
7e7141a5a0 | |||
b3fd6c9b85 | |||
deb0511b43 | |||
e32f465f7a | |||
abc458cef4 | |||
2198a4780b | |||
b76d4b76cb | |||
9ebb013f22 | |||
5a4cba0226 | |||
f03bfdebb4 | |||
7c1550ced7 | |||
a09da30768 | |||
66bb938fc4 | |||
0d478d5dfc | |||
2a9b431c50 | |||
756e7e5372 | |||
573a63d359 | |||
3f2ad2be0c | |||
fd3be63805 | |||
ad8ed419de | |||
8b4f07c2e0 | |||
e667b22b3c | |||
9198effafe | |||
7d51d9c1eb | |||
de6eceb98b | |||
72f7ec1481 | |||
13ff0c368d | |||
9124f4f566 | |||
5e21f98309 | |||
26069dac79 | |||
b7d2402434 | |||
d9baa94970 | |||
afeb89a51a | |||
07992f0b2a | |||
a5c4508578 | |||
a4fab3ce8a | |||
97d80f57cc | |||
68eb5e6286 | |||
d2b9a7754f | |||
70125afa9d | |||
551364ad8c | |||
7f7518bb9d | |||
8c8a14af7b | |||
3735a85c69 | |||
79c4dc9272 | |||
d7c266d70f | |||
e1d0c22071 | |||
7dee6344b0 | |||
731ab89561 | |||
6bd0246db6 | |||
99aa5c7b7b | |||
28723b59b7 | |||
9fa7de0b77 | |||
54bfc84ada |
@ -11,12 +11,12 @@ jobs:
|
||||
name: Update npm
|
||||
command: 'sudo npm install -g npm@latest'
|
||||
- restore_cache:
|
||||
key: dependency-cache-13-{{ checksum "package.json" }}
|
||||
key: dependency-cache-{{ checksum "package.json" }}
|
||||
- run:
|
||||
name: Installing dependencies (npm install)
|
||||
command: npm install
|
||||
- save_cache:
|
||||
key: dependency-cache-13-{{ checksum "package.json" }}
|
||||
key: dependency-cache-{{ checksum "package.json" }}
|
||||
paths:
|
||||
- node_modules
|
||||
- run:
|
||||
|
103
.eslintrc.js
103
.eslintrc.js
@ -120,6 +120,91 @@ module.exports = {
|
||||
"no-useless-computed-key": "error",
|
||||
// https://eslint.org/docs/rules/rest-spread-spacing
|
||||
"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": [
|
||||
"error",
|
||||
@ -151,28 +236,24 @@ module.exports = {
|
||||
}
|
||||
}],
|
||||
"vue/multiline-html-element-content-newline": "off",
|
||||
"vue/singleline-html-element-content-newline": "off"
|
||||
"vue/singleline-html-element-content-newline": "off",
|
||||
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*Spec.js"],
|
||||
"files": LEGACY_FILES,
|
||||
"rules": {
|
||||
"no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
"vars": "all",
|
||||
"args": "none",
|
||||
"varsIgnorePattern": "controller",
|
||||
|
||||
"varsIgnorePattern": "controller"
|
||||
}
|
||||
]
|
||||
}
|
||||
}, {
|
||||
"files": LEGACY_FILES,
|
||||
"rules": {
|
||||
// https://eslint.org/docs/rules/no-nested-ternary
|
||||
],
|
||||
"no-nested-ternary": "off",
|
||||
"no-var": "off"
|
||||
"no-var": "off",
|
||||
"one-var": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
#*****************************************************************************
|
||||
#* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
#* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
#* as represented by the Administrator of the National Aeronautics and Space
|
||||
#* Administration. All rights reserved.
|
||||
#*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -92,47 +92,59 @@ should update (or delegate the task of updating) Open MCT version
|
||||
numbers by the following process:
|
||||
|
||||
1. Update version number in `package.json`
|
||||
1. Remove `-SNAPSHOT` suffix.
|
||||
2. Verify that resulting version number meets semantic versioning
|
||||
requirements relative to previous stable version. Increment if
|
||||
necessary.
|
||||
3. If version is considered unstable (which may be the case during
|
||||
1. Create a new branch off the `master` branch.
|
||||
2. Remove `-SNAPSHOT` suffix from the version in `package.json`.
|
||||
3. Verify that resulting version number meets semantic versioning
|
||||
requirements relative to previous stable version. Increment the
|
||||
version number if necessary.
|
||||
4. If version is considered unstable (which may be the case during
|
||||
the first three sprints of a release), apply a new suffix per
|
||||
[Version Numbering](#version-numbering) guidance above.
|
||||
2. Tag the release.
|
||||
1. Commit changes to `package.json` on the `master` branch.
|
||||
1. Commit changes to `package.json` on the new branch created in
|
||||
the previous step.
|
||||
The commit message should reference the sprint being closed,
|
||||
preferably by a URL reference to the associated Milestone in
|
||||
GitHub.
|
||||
2. Verify that build still completes, that application passes
|
||||
smoke-testing, and that only differences from tested versions
|
||||
are the changes to version number above.
|
||||
3. Push the `master` branch.
|
||||
3. Push the new branch.
|
||||
4. Tag this commit with the version number, prepending the letter "v".
|
||||
(e.g. `git tag v0.9.3-alpha`)
|
||||
5. Push the tag to GitHub. (e.g. `git push origin v0.9.3-alpha`).
|
||||
3. Upload a release archive.
|
||||
1. Run `npm pack` to generate the archive.
|
||||
2. Use the [GitHub release interface](https://github.com/nasa/openmct/releases)
|
||||
1. Use the [GitHub release interface](https://github.com/nasa/openmct/releases)
|
||||
to draft a new release.
|
||||
3. Choose the existing tag for the new version (created and pushed above.)
|
||||
2. 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
|
||||
for examples.
|
||||
4. Attach the release archive.
|
||||
5. Designate the release as a "pre-release" as appropriate (for instance,
|
||||
for examples. (e.g. `Open MCT v0.9.3-alpha`)
|
||||
3. Designate the release as a "pre-release" as appropriate (for instance,
|
||||
when the version number has been suffixed as unstable, or when
|
||||
the version number is below 1.0.0.)
|
||||
4. Restore snapshot status in `package.json`
|
||||
1. Remove any suffix from the version number, or increment the
|
||||
_patch_ version if there is no suffix.
|
||||
2. Append a `-SNAPSHOT` suffix.
|
||||
3. Commit changes to `package.json` on the `master` branch.
|
||||
4. Add release notes including any breaking changes, enhancements,
|
||||
bug fixes with solutions in brief.
|
||||
5. Publish the release.
|
||||
4. Publish the release to npm
|
||||
1. Login to npm
|
||||
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,
|
||||
preferably by a URL reference to the associated Milestone in
|
||||
GitHub.
|
||||
4. Verify that build still completes, that application passes
|
||||
5. Verify that build still completes, that application passes
|
||||
smoke-testing.
|
||||
5. Push the `master` branch.
|
||||
6. Create a PR to be merged into the `master` branch.
|
||||
|
||||
Projects dependent on Open MCT being co-developed by the Open MCT
|
||||
team should follow a similar process, except that they should
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
"./src/EventTelemetryProvider"
|
||||
@ -29,7 +28,7 @@ define([
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
name:"example/eventGenerator",
|
||||
name: "example/eventGenerator",
|
||||
definition: {
|
||||
"name": "Event Message Generator",
|
||||
"description": "For development use. Creates sample event message data that mimics a live data stream.",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define */
|
||||
|
||||
/**
|
||||
* Module defining EventTelemetry.
|
||||
@ -44,13 +43,14 @@ define(
|
||||
};
|
||||
|
||||
generatorData.getDomainValue = function (i, domain) {
|
||||
return i * interval +
|
||||
(domain !== 'delta' ? firstObservedTime : 0);
|
||||
return i * interval
|
||||
+ (domain !== 'delta' ? firstObservedTime : 0);
|
||||
};
|
||||
|
||||
generatorData.getRangeValue = function (i, range) {
|
||||
var domainDelta = this.getDomainValue(i) - firstObservedTime,
|
||||
ind = i % messages.length;
|
||||
|
||||
return messages[ind] + " - [" + domainDelta.toString() + "]";
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define,Promise*/
|
||||
|
||||
/**
|
||||
* Module defining EventTelemetryProvider. Created by chacskaylo on 06/18/2015.
|
||||
@ -57,6 +56,7 @@ define(
|
||||
results.forEach(function (result) {
|
||||
packaged[result.key] = result.telemetry;
|
||||
});
|
||||
|
||||
// Format as expected (sources -> keys -> telemetry)
|
||||
return { eventGenerator: packaged };
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([], function () {
|
||||
'use strict';
|
||||
@ -76,13 +75,14 @@ define([], function () {
|
||||
copyRangesToRow(row, i);
|
||||
rows.push(row);
|
||||
}
|
||||
|
||||
exportService.exportCSV(rows, { headers: headers });
|
||||
});
|
||||
};
|
||||
|
||||
ExportTelemetryAsCSVAction.appliesTo = function (context) {
|
||||
return context.domainObject &&
|
||||
context.domainObject.hasCapability("telemetry");
|
||||
return context.domainObject
|
||||
&& context.domainObject.hasCapability("telemetry");
|
||||
};
|
||||
|
||||
return ExportTelemetryAsCSVAction;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
'./ExportTelemetryAsCSVAction'
|
||||
@ -27,7 +26,7 @@ define([
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
name:"example/export",
|
||||
name: "example/export",
|
||||
definition: {
|
||||
"name": "Example of using CSV Export",
|
||||
"extensions": {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
"./src/ExampleFormController"
|
||||
@ -29,7 +28,7 @@ define([
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
name:"example/forms",
|
||||
name: "example/forms",
|
||||
definition: {
|
||||
"name": "Declarative Forms example",
|
||||
"sources": "src",
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define,window*/
|
||||
|
||||
define(
|
||||
[],
|
||||
@ -80,7 +79,7 @@ define(
|
||||
control: "button",
|
||||
csslass: "icon-save",
|
||||
click: function () {
|
||||
window.alert("Save");
|
||||
console.log("Save");
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -88,7 +87,7 @@ define(
|
||||
csslass: "icon-x",
|
||||
description: "Button B",
|
||||
click: function () {
|
||||
window.alert("Cancel");
|
||||
console.log("Cancel");
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -97,7 +96,7 @@ define(
|
||||
description: "Button C",
|
||||
disabled: true,
|
||||
click: function () {
|
||||
window.alert("Delete");
|
||||
console.log("Delete");
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -152,10 +151,22 @@ define(
|
||||
name: "Choose something",
|
||||
control: "select",
|
||||
options: [
|
||||
{ name: "Hats", value: "hats" },
|
||||
{ name: "Bats", value: "bats" },
|
||||
{ name: "Cats", value: "cats" },
|
||||
{ name: "Mats", value: "mats" }
|
||||
{
|
||||
name: "Hats",
|
||||
value: "hats"
|
||||
},
|
||||
{
|
||||
name: "Bats",
|
||||
value: "bats"
|
||||
},
|
||||
{
|
||||
name: "Cats",
|
||||
value: "cats"
|
||||
},
|
||||
{
|
||||
name: "Mats",
|
||||
value: "mats"
|
||||
}
|
||||
],
|
||||
key: "aChoice"
|
||||
},
|
||||
@ -164,10 +175,22 @@ define(
|
||||
control: "select",
|
||||
required: true,
|
||||
options: [
|
||||
{ name: "Hats", value: "hats" },
|
||||
{ name: "Bats", value: "bats" },
|
||||
{ name: "Cats", value: "cats" },
|
||||
{ name: "Mats", value: "mats" }
|
||||
{
|
||||
name: "Hats",
|
||||
value: "hats"
|
||||
},
|
||||
{
|
||||
name: "Bats",
|
||||
value: "bats"
|
||||
},
|
||||
{
|
||||
name: "Cats",
|
||||
value: "cats"
|
||||
},
|
||||
{
|
||||
name: "Mats",
|
||||
value: "mats"
|
||||
}
|
||||
],
|
||||
key: "aRequiredChoice"
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ define([
|
||||
{
|
||||
key: "sin",
|
||||
name: "Sine",
|
||||
unit: "Hz",
|
||||
formatString: '%0.2f',
|
||||
hints: {
|
||||
range: 1
|
||||
@ -49,6 +50,7 @@ define([
|
||||
{
|
||||
key: "cos",
|
||||
name: "Cosine",
|
||||
unit: "deg",
|
||||
formatString: '%0.2f',
|
||||
hints: {
|
||||
range: 2
|
||||
@ -108,14 +110,14 @@ define([
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function GeneratorMetadataProvider() {
|
||||
|
||||
}
|
||||
|
||||
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
|
||||
return METADATA_BY_TYPE.hasOwnProperty(domainObject.type);
|
||||
return Object.prototype.hasOwnProperty.call(METADATA_BY_TYPE, domainObject.type);
|
||||
};
|
||||
|
||||
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -62,18 +62,22 @@ define([
|
||||
var workerRequest = {};
|
||||
|
||||
props.forEach(function (prop) {
|
||||
if (domainObject.telemetry && domainObject.telemetry.hasOwnProperty(prop)) {
|
||||
if (domainObject.telemetry && Object.prototype.hasOwnProperty.call(domainObject.telemetry, prop)) {
|
||||
workerRequest[prop] = domainObject.telemetry[prop];
|
||||
}
|
||||
if (request && request.hasOwnProperty(prop)) {
|
||||
|
||||
if (request && Object.prototype.hasOwnProperty.call(request, prop)) {
|
||||
workerRequest[prop] = request[prop];
|
||||
}
|
||||
if (!workerRequest.hasOwnProperty(prop)) {
|
||||
|
||||
if (!Object.prototype.hasOwnProperty.call(workerRequest, prop)) {
|
||||
workerRequest[prop] = REQUEST_DEFAULTS[prop];
|
||||
}
|
||||
|
||||
workerRequest[prop] = Number(workerRequest[prop]);
|
||||
});
|
||||
workerRequest.name = domainObject.name;
|
||||
|
||||
return workerRequest;
|
||||
};
|
||||
|
||||
@ -81,11 +85,13 @@ define([
|
||||
var workerRequest = this.makeWorkerRequest(domainObject, request);
|
||||
workerRequest.start = request.start;
|
||||
workerRequest.end = request.end;
|
||||
|
||||
return this.workerInterface.request(workerRequest);
|
||||
};
|
||||
|
||||
GeneratorProvider.prototype.subscribe = function (domainObject, callback) {
|
||||
var workerRequest = this.makeWorkerRequest(domainObject, {});
|
||||
|
||||
return this.workerInterface.subscribe(workerRequest, callback);
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
|
||||
@ -78,12 +77,15 @@ define([
|
||||
if (datum[range] > RED[range]) {
|
||||
return LIMITS.rh;
|
||||
}
|
||||
|
||||
if (datum[range] < -RED[range]) {
|
||||
return LIMITS.rl;
|
||||
}
|
||||
|
||||
if (datum[range] > YELLOW[range]) {
|
||||
return LIMITS.yh;
|
||||
}
|
||||
|
||||
if (datum[range] < -YELLOW[range]) {
|
||||
return LIMITS.yl;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -48,7 +48,7 @@ define([
|
||||
var interval = setInterval(function () {
|
||||
var now = Date.now();
|
||||
var datum = pointForTimestamp(now, duration, domainObject.name);
|
||||
datum.value += "";
|
||||
datum.value = String(datum.value);
|
||||
callback(datum);
|
||||
}, duration);
|
||||
|
||||
@ -57,7 +57,6 @@ define([
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
StateGeneratorProvider.prototype.supportsRequest = function (domainObject, options) {
|
||||
return domainObject.type === 'example.state-generator';
|
||||
};
|
||||
@ -69,11 +68,13 @@ define([
|
||||
if (options.strategy === 'latest' || options.size === 1) {
|
||||
start = end;
|
||||
}
|
||||
|
||||
var data = [];
|
||||
while (start <= end && data.length < 5000) {
|
||||
data.push(pointForTimestamp(start, duration, domainObject.name));
|
||||
start += duration;
|
||||
}
|
||||
|
||||
return Promise.resolve(data);
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -72,13 +72,16 @@ define([
|
||||
});
|
||||
var messageId;
|
||||
|
||||
let self = this;
|
||||
function callback(message) {
|
||||
if (message.error) {
|
||||
deferred.reject(message.error);
|
||||
} else {
|
||||
deferred.resolve(message.data);
|
||||
}
|
||||
delete this.callbacks[messageId];
|
||||
|
||||
delete self.callbacks[messageId];
|
||||
|
||||
}
|
||||
|
||||
messageId = this.dispatch('request', request, callback.bind(this));
|
||||
@ -101,8 +104,5 @@ define([
|
||||
}.bind(this);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
return WorkerInterface;
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -20,8 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global self*/
|
||||
|
||||
(function () {
|
||||
|
||||
var FIFTEEN_MINUTES = 15 * 60 * 1000;
|
||||
@ -64,13 +62,14 @@
|
||||
data: {
|
||||
name: data.name,
|
||||
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),
|
||||
cos: cos(nextStep, data.period, data.amplitude, data.offset, data.phase, data.randomness)
|
||||
}
|
||||
});
|
||||
nextStep += step;
|
||||
}
|
||||
|
||||
return nextStep;
|
||||
}
|
||||
|
||||
@ -87,6 +86,7 @@
|
||||
if (request.end === undefined) {
|
||||
request.end = Date.now();
|
||||
}
|
||||
|
||||
if (request.start === undefined) {
|
||||
request.start = request.end - FIFTEEN_MINUTES;
|
||||
}
|
||||
@ -110,11 +110,12 @@
|
||||
data.push({
|
||||
name: request.name,
|
||||
utc: nextStep,
|
||||
yesterday: nextStep - 60*60*24*1000,
|
||||
yesterday: nextStep - 60 * 60 * 24 * 1000,
|
||||
sin: sin(nextStep, period, amplitude, offset, phase, randomness),
|
||||
cos: cos(nextStep, period, amplitude, offset, phase, randomness)
|
||||
});
|
||||
}
|
||||
|
||||
self.postMessage({
|
||||
id: message.id,
|
||||
data: data
|
||||
@ -122,13 +123,13 @@
|
||||
}
|
||||
|
||||
function cos(timestamp, period, amplitude, offset, phase, randomness) {
|
||||
return amplitude *
|
||||
Math.cos(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
|
||||
return amplitude
|
||||
* Math.cos(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
|
||||
}
|
||||
|
||||
function sin(timestamp, period, amplitude, offset, phase, randomness) {
|
||||
return amplitude *
|
||||
Math.sin(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
|
||||
return amplitude
|
||||
* Math.sin(phase + (timestamp / period / 1000 * Math.PI * 2)) + (amplitude * Math.random() * randomness) + offset;
|
||||
}
|
||||
|
||||
function sendError(error, message) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
"./GeneratorProvider",
|
||||
@ -56,7 +55,7 @@ define([
|
||||
initialize: function (object) {
|
||||
object.telemetry = {
|
||||
duration: 5
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
"./src/ExampleIdentityService"
|
||||
@ -29,7 +28,7 @@ define([
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
name:"example/identity",
|
||||
name: "example/identity",
|
||||
definition: {
|
||||
"extensions": {
|
||||
"components": [
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,32 +19,35 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
var DEFAULT_IDENTITY = { key: "user", name: "Example User" },
|
||||
var DEFAULT_IDENTITY = {
|
||||
key: "user",
|
||||
name: "Example User"
|
||||
},
|
||||
DIALOG_STRUCTURE = {
|
||||
name: "Identify Yourself",
|
||||
sections: [{ rows: [
|
||||
{
|
||||
name: "User ID",
|
||||
control: "textfield",
|
||||
key: "key",
|
||||
required: true
|
||||
},
|
||||
{
|
||||
name: "Human name",
|
||||
control: "textfield",
|
||||
key: "name",
|
||||
required: true
|
||||
}
|
||||
]}]
|
||||
sections: [{
|
||||
rows: [
|
||||
{
|
||||
name: "User ID",
|
||||
control: "textfield",
|
||||
key: "key",
|
||||
required: true
|
||||
},
|
||||
{
|
||||
name: "Human name",
|
||||
control: "textfield",
|
||||
key: "name",
|
||||
required: true
|
||||
}
|
||||
]
|
||||
}]
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Example implementation of an identity service. This prompts the
|
||||
* user to enter a name and user ID; in a more realistic
|
||||
@ -77,14 +80,14 @@ define(
|
||||
*/
|
||||
ExampleIdentityProvider.prototype.returnUser = function (user) {
|
||||
return this.user = user;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
ExampleIdentityProvider.prototype.returnUndefined = function () {
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
|
||||
return ExampleIdentityProvider;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -27,7 +27,7 @@ define([
|
||||
) {
|
||||
function ImageryPlugin() {
|
||||
|
||||
var IMAGE_SAMPLES = [
|
||||
const IMAGE_SAMPLES = [
|
||||
"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-18733.jpg",
|
||||
@ -47,13 +47,14 @@ define([
|
||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg",
|
||||
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
|
||||
];
|
||||
const IMAGE_DELAY = 20000;
|
||||
|
||||
function pointForTimestamp(timestamp, name) {
|
||||
return {
|
||||
name: name,
|
||||
utc: Math.floor(timestamp / 5000) * 5000,
|
||||
local: Math.floor(timestamp / 5000) * 5000,
|
||||
url: IMAGE_SAMPLES[Math.floor(timestamp / 5000) % IMAGE_SAMPLES.length]
|
||||
utc: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
|
||||
local: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
|
||||
url: IMAGE_SAMPLES[Math.floor(timestamp / IMAGE_DELAY) % IMAGE_SAMPLES.length]
|
||||
};
|
||||
}
|
||||
|
||||
@ -64,7 +65,7 @@ define([
|
||||
subscribe: function (domainObject, callback) {
|
||||
var interval = setInterval(function () {
|
||||
callback(pointForTimestamp(Date.now(), domainObject.name));
|
||||
}, 5000);
|
||||
}, IMAGE_DELAY);
|
||||
|
||||
return function () {
|
||||
clearInterval(interval);
|
||||
@ -81,32 +82,32 @@ define([
|
||||
var start = options.start;
|
||||
var end = Math.min(options.end, Date.now());
|
||||
var data = [];
|
||||
while (start <= end && data.length < 5000) {
|
||||
while (start <= end && data.length < IMAGE_DELAY) {
|
||||
data.push(pointForTimestamp(start, domainObject.name));
|
||||
start += 5000;
|
||||
start += IMAGE_DELAY;
|
||||
}
|
||||
|
||||
return Promise.resolve(data);
|
||||
}
|
||||
};
|
||||
|
||||
var ladProvider = {
|
||||
supportsRequest: function (domainObject, options) {
|
||||
return domainObject.type === 'example.imagery' &&
|
||||
options.strategy === 'latest';
|
||||
return domainObject.type === 'example.imagery'
|
||||
&& options.strategy === 'latest';
|
||||
},
|
||||
request: function (domainObject, options) {
|
||||
return Promise.resolve([pointForTimestamp(Date.now(), domainObject.name)]);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return function install(openmct) {
|
||||
openmct.types.addType('example.imagery', {
|
||||
key: 'example.imagery',
|
||||
name: 'Example Imagery',
|
||||
cssClass: 'icon-image',
|
||||
description: 'For development use. Creates example imagery ' +
|
||||
'data that mimics a live imagery stream.',
|
||||
description: 'For development use. Creates example imagery '
|
||||
+ 'data that mimics a live imagery stream.',
|
||||
creatable: true,
|
||||
initialize: function (object) {
|
||||
object.telemetry = {
|
||||
@ -140,7 +141,7 @@ define([
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,13 +19,12 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([], function () {
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
name:"example/mobile",
|
||||
name: "example/mobile",
|
||||
definition: {
|
||||
"name": "Mobile",
|
||||
"description": "Allows elements with pertinence to mobile usage and development",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
"./src/RemsTelemetryServerAdapter",
|
||||
@ -31,14 +30,15 @@ define([
|
||||
RemsTelemetryProvider
|
||||
) {
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
name:"example/msl",
|
||||
name: "example/msl",
|
||||
definition: {
|
||||
"name" : "Mars Science Laboratory Data Adapter",
|
||||
"extensions" : {
|
||||
"name": "Mars Science Laboratory Data Adapter",
|
||||
"extensions": {
|
||||
"types": [
|
||||
{
|
||||
"name":"Mars Science Laboratory",
|
||||
"name": "Mars Science Laboratory",
|
||||
"key": "msl.curiosity",
|
||||
"cssClass": "icon-object"
|
||||
},
|
||||
@ -89,7 +89,7 @@ define([
|
||||
],
|
||||
"services": [
|
||||
{
|
||||
"key":"rems.adapter",
|
||||
"key": "rems.adapter",
|
||||
"implementation": RemsTelemetryServerAdapter,
|
||||
"depends": ["$http", "$log", "REMS_WS_URL"]
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[],
|
||||
@ -38,7 +37,7 @@ define(
|
||||
"identifier": "msl",
|
||||
"instruments": [
|
||||
{
|
||||
"name":"rems",
|
||||
"name": "rems",
|
||||
"identifier": "rems",
|
||||
"measurements": [
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
function () {
|
||||
@ -81,6 +80,7 @@ define(
|
||||
(dictionary.instruments || []).forEach(function (instrument) {
|
||||
addInstrument(instrument, "msl:curiosity");
|
||||
});
|
||||
|
||||
return models;
|
||||
}
|
||||
|
||||
@ -90,6 +90,7 @@ define(
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return RemsTelemetryModelProvider;
|
||||
}
|
||||
);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define */
|
||||
define (
|
||||
['./RemsTelemetrySeries'],
|
||||
function (RemsTelemetrySeries) {
|
||||
@ -74,6 +73,7 @@ define (
|
||||
RemsTelemetryProvider.prototype.subscribe = function (callback, requests) {
|
||||
return function () {};
|
||||
};
|
||||
|
||||
RemsTelemetryProvider.prototype.unsubscribe = function (callback, requests) {
|
||||
return function () {};
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define */
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
@ -57,6 +56,7 @@ define(
|
||||
RemsTelemetrySeries.prototype.getPointCount = function () {
|
||||
return this.data.length;
|
||||
};
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
/*jslint es5: true */
|
||||
|
||||
define(
|
||||
@ -95,28 +94,32 @@ define(
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function fallbackToLocal() {
|
||||
self.$log.warn("Loading REMS data failed, probably due to" +
|
||||
" cross origin policy. Falling back to local data");
|
||||
self.$log.warn("Loading REMS data failed, probably due to"
|
||||
+ " cross origin policy. Falling back to local data");
|
||||
|
||||
return self.$http.get(self.localDataURI);
|
||||
}
|
||||
|
||||
//Filter results to match request parameters
|
||||
function filterResults(results) {
|
||||
return results.filter(function (result) {
|
||||
return result.date >= (request.start || Number.MIN_VALUE) &&
|
||||
result.date <= (request.end || Number.MAX_VALUE);
|
||||
return result.date >= (request.start || Number.MIN_VALUE)
|
||||
&& result.date <= (request.end || Number.MAX_VALUE);
|
||||
});
|
||||
}
|
||||
|
||||
function packageAndResolve(results) {
|
||||
return {id: id, values: results};
|
||||
return {
|
||||
id: id,
|
||||
values: results
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
return (this.promise = this.promise || this.$http.get(this.REMS_WS_URL))
|
||||
.catch(fallbackToLocal)
|
||||
.then(processResponse)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
"./src/DialogLaunchController",
|
||||
@ -39,7 +38,7 @@ define([
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
name:"example/notifications",
|
||||
name: "example/notifications",
|
||||
definition: {
|
||||
"extensions": {
|
||||
"templates": [
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[],
|
||||
@ -91,7 +90,6 @@ define(
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Demonstrates launching an error dialog
|
||||
*/
|
||||
@ -132,9 +130,9 @@ define(
|
||||
var dialog,
|
||||
model = {
|
||||
title: "Info Dialog Example",
|
||||
actionText: "This is an example of a blocking info" +
|
||||
" dialog. This dialog can be used to draw the user's" +
|
||||
" attention to an event.",
|
||||
actionText: "This is an example of a blocking info"
|
||||
+ " dialog. This dialog can be used to draw the user's"
|
||||
+ " attention to an event.",
|
||||
severity: "info",
|
||||
primaryOption: {
|
||||
label: "OK",
|
||||
@ -153,6 +151,7 @@ define(
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
return DialogLaunchController;
|
||||
}
|
||||
);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define,window*/
|
||||
|
||||
define(
|
||||
[],
|
||||
@ -42,9 +41,11 @@ define(
|
||||
DialogLaunchIndicator.prototype.getGlyphClass = function () {
|
||||
return 'ok';
|
||||
};
|
||||
|
||||
DialogLaunchIndicator.prototype.getText = function () {
|
||||
return "Launch test dialog";
|
||||
};
|
||||
|
||||
DialogLaunchIndicator.prototype.getDescription = function () {
|
||||
return "Launch test dialog";
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[],
|
||||
@ -48,7 +47,8 @@ define(
|
||||
"Eros turpis, pulvinar turpis eros eu",
|
||||
"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,6 +61,7 @@ define(
|
||||
severity: "error"
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Launch a new notification with a severity of 'Alert'.
|
||||
*/
|
||||
@ -73,7 +74,6 @@ define(
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Launch a new notification with a progress bar that is updated
|
||||
* periodically, tracking an ongoing process.
|
||||
@ -93,10 +93,10 @@ define(
|
||||
* @param notification
|
||||
*/
|
||||
function incrementProgress() {
|
||||
progress = Math.min(100, Math.floor(progress + Math.random() * 30))
|
||||
let progressText = ["Estimated time" +
|
||||
" remaining:" +
|
||||
" about ", 60 - Math.floor((progress / 100) * 60), " seconds"].join(" ");
|
||||
progress = Math.min(100, Math.floor(progress + Math.random() * 30));
|
||||
let progressText = ["Estimated time"
|
||||
+ " remaining:"
|
||||
+ " about ", 60 - Math.floor((progress / 100) * 60), " seconds"].join(" ");
|
||||
notification.progress(progress, progressText);
|
||||
|
||||
if (progress < 100) {
|
||||
@ -120,6 +120,7 @@ define(
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
return NotificationLaunchController;
|
||||
}
|
||||
);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define,window*/
|
||||
|
||||
define(
|
||||
[],
|
||||
@ -42,9 +41,11 @@ define(
|
||||
NotificationLaunchIndicator.prototype.getGlyphClass = function () {
|
||||
return 'ok';
|
||||
};
|
||||
|
||||
NotificationLaunchIndicator.prototype.getText = function () {
|
||||
return "Launch notification";
|
||||
};
|
||||
|
||||
NotificationLaunchIndicator.prototype.getDescription = function () {
|
||||
return "Launch notification";
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
"./src/BrowserPersistenceProvider"
|
||||
@ -29,7 +28,7 @@ define([
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
name:"example/persistence",
|
||||
name: "example/persistence",
|
||||
definition: {
|
||||
"extensions": {
|
||||
"components": [
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
/**
|
||||
* Stubbed implementation of a persistence provider,
|
||||
@ -30,8 +29,6 @@ define(
|
||||
function () {
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
function BrowserPersistenceProvider($q, SPACE) {
|
||||
var spaces = SPACE ? [SPACE] : [],
|
||||
caches = {},
|
||||
@ -51,6 +48,7 @@ define(
|
||||
},
|
||||
listObjects: function (space) {
|
||||
var cache = caches[space];
|
||||
|
||||
return promises.as(
|
||||
cache ? Object.keys(cache) : null
|
||||
);
|
||||
@ -68,6 +66,7 @@ define(
|
||||
},
|
||||
readObject: function (space, key) {
|
||||
var cache = caches[space];
|
||||
|
||||
return promises.as(
|
||||
cache ? cache[key] : null
|
||||
);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
"./src/ExamplePolicy"
|
||||
@ -29,7 +28,7 @@ define([
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
name:"example/policy",
|
||||
name: "example/policy",
|
||||
definition: {
|
||||
"name": "Example Policy",
|
||||
"description": "Provides an example of using policies to prohibit actions.",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[],
|
||||
@ -37,6 +36,7 @@ define(
|
||||
model = (domainObject && domainObject.getModel()) || {},
|
||||
name = model.name || "",
|
||||
metadata = action.getMetadata() || {};
|
||||
|
||||
return metadata.key !== 'remove' || name.indexOf('foo') < 0;
|
||||
}
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
"./src/WatchIndicator",
|
||||
@ -31,7 +30,7 @@ define([
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
name:"example/profiling",
|
||||
name: "example/profiling",
|
||||
definition: {
|
||||
"extensions": {
|
||||
"indicators": [
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[],
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[],
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
"./src/ScratchPersistenceProvider"
|
||||
@ -29,7 +28,7 @@ define([
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
name:"example/scratchpad",
|
||||
name: "example/scratchpad",
|
||||
definition: {
|
||||
"extensions": {
|
||||
"roots": [
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -20,8 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,window*/
|
||||
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
@ -54,13 +52,14 @@ define(
|
||||
if (space === 'scratch') {
|
||||
this.table[key] = JSON.stringify(value);
|
||||
}
|
||||
|
||||
return this.$q.when(space === 'scratch');
|
||||
};
|
||||
|
||||
ScratchPersistenceProvider.prototype.readObject = function (space, key) {
|
||||
return this.$q.when(
|
||||
(space === 'scratch' && this.table[key]) ?
|
||||
JSON.parse(this.table[key]) : undefined
|
||||
(space === 'scratch' && this.table[key])
|
||||
? JSON.parse(this.table[key]) : undefined
|
||||
);
|
||||
};
|
||||
|
||||
@ -68,6 +67,7 @@ define(
|
||||
if (space === 'scratch') {
|
||||
delete this.table[key];
|
||||
}
|
||||
|
||||
return this.$q.when(space === 'scratch');
|
||||
};
|
||||
|
||||
|
@ -7,9 +7,9 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
msg: 'Hello world!'
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
@ -17,6 +17,7 @@ function SimpleVuePlugin() {
|
||||
},
|
||||
view: function (domainObject) {
|
||||
var vm;
|
||||
|
||||
return {
|
||||
show: function (container) {
|
||||
vm = new Vue(HelloWorld);
|
||||
@ -29,7 +30,7 @@ function SimpleVuePlugin() {
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default SimpleVuePlugin
|
||||
export default SimpleVuePlugin;
|
||||
|
@ -22,31 +22,111 @@ define([
|
||||
menusTemplate
|
||||
) {
|
||||
return {
|
||||
name:"example/styleguide",
|
||||
name: "example/styleguide",
|
||||
definition: {
|
||||
"name": "Open MCT Style Guide",
|
||||
"description": "Examples and documentation illustrating UI styles in use in Open MCT.",
|
||||
"extensions":
|
||||
{
|
||||
"types": [
|
||||
{ "key": "styleguide.intro", "name": "Introduction", "cssClass": "icon-page", "description": "Introduction and overview to the style guide" },
|
||||
{ "key": "styleguide.standards", "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" }
|
||||
{
|
||||
"key": "styleguide.intro",
|
||||
"name": "Introduction",
|
||||
"cssClass": "icon-page",
|
||||
"description": "Introduction and overview to the style guide"
|
||||
},
|
||||
{
|
||||
"key": "styleguide.standards",
|
||||
"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": [
|
||||
{ "key": "styleguide.intro", "type": "styleguide.intro", "template": introTemplate, "editable": false },
|
||||
{ "key": "styleguide.standards", "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 }
|
||||
{
|
||||
"key": "styleguide.intro",
|
||||
"type": "styleguide.intro",
|
||||
"template": introTemplate,
|
||||
"editable": false
|
||||
},
|
||||
{
|
||||
"key": "styleguide.standards",
|
||||
"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": [
|
||||
{
|
||||
@ -56,7 +136,7 @@ define([
|
||||
"models": [
|
||||
{
|
||||
"id": "styleguide:home",
|
||||
"priority" : "preferred",
|
||||
"priority": "preferred",
|
||||
"model": {
|
||||
"type": "folder",
|
||||
"name": "Style Guide Home",
|
||||
@ -73,7 +153,7 @@ define([
|
||||
},
|
||||
{
|
||||
"id": "styleguide:ui-elements",
|
||||
"priority" : "preferred",
|
||||
"priority": "preferred",
|
||||
"model": {
|
||||
"type": "folder",
|
||||
"name": "UI Elements",
|
||||
|
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[],
|
||||
@ -30,14 +29,46 @@ define(
|
||||
var pages = {};
|
||||
|
||||
// Add pages
|
||||
pages.intro = { name: "Introduction", type: "styleguide.intro", location: "styleguide:home" };
|
||||
pages.standards = { name: "Standards", type: "styleguide.standards", 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" };
|
||||
pages.intro = {
|
||||
name: "Introduction",
|
||||
type: "styleguide.intro",
|
||||
location: "styleguide:home"
|
||||
};
|
||||
pages.standards = {
|
||||
name: "Standards",
|
||||
type: "styleguide.standards",
|
||||
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 {
|
||||
getModels: function () {
|
||||
@ -46,6 +77,6 @@ define(
|
||||
};
|
||||
}
|
||||
|
||||
return ExampleStyleGuideModelProvider
|
||||
return ExampleStyleGuideModelProvider;
|
||||
}
|
||||
);
|
||||
|
56
index.html
56
index.html
@ -35,7 +35,13 @@
|
||||
</body>
|
||||
<script>
|
||||
const THIRTY_SECONDS = 30 * 1000;
|
||||
const THIRTY_MINUTES = THIRTY_SECONDS * 60;
|
||||
const ONE_MINUTE = THIRTY_SECONDS * 2;
|
||||
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'
|
||||
@ -48,6 +54,7 @@
|
||||
openmct.install(openmct.plugins.MyItems());
|
||||
openmct.install(openmct.plugins.Generator());
|
||||
openmct.install(openmct.plugins.ExampleImagery());
|
||||
openmct.install(openmct.plugins.Timeline());
|
||||
openmct.install(openmct.plugins.UTCTimeSystem());
|
||||
openmct.install(openmct.plugins.AutoflowView({
|
||||
type: "telemetry.panel"
|
||||
@ -72,21 +79,21 @@
|
||||
{
|
||||
label: 'Last Day',
|
||||
bounds: {
|
||||
start: () => Date.now() - 1000 * 60 * 60 * 24,
|
||||
start: () => Date.now() - ONE_DAY,
|
||||
end: () => Date.now()
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Last 2 hours',
|
||||
bounds: {
|
||||
start: () => Date.now() - 1000 * 60 * 60 * 2,
|
||||
start: () => Date.now() - TWO_HOURS,
|
||||
end: () => Date.now()
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Last hour',
|
||||
bounds: {
|
||||
start: () => Date.now() - 1000 * 60 * 60,
|
||||
start: () => Date.now() - ONE_HOUR,
|
||||
end: () => Date.now()
|
||||
}
|
||||
}
|
||||
@ -95,7 +102,7 @@
|
||||
records: 10,
|
||||
// maximum duration between start and end bounds
|
||||
// for utc-based time systems this is in milliseconds
|
||||
limit: 1000 * 60 * 60 * 24
|
||||
limit: ONE_DAY
|
||||
},
|
||||
{
|
||||
name: "Realtime",
|
||||
@ -104,7 +111,44 @@
|
||||
clockOffsets: {
|
||||
start: - THIRTY_MINUTES,
|
||||
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
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}));
|
||||
|
3
indexTest.js
Normal file
3
indexTest.js
Normal file
@ -0,0 +1,3 @@
|
||||
const testsContext = require.context('.', true, /\/(src|platform)\/.*Spec.js$/);
|
||||
|
||||
testsContext.keys().forEach(testsContext);
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -52,12 +52,16 @@ module.exports = (config) => {
|
||||
basePath: '',
|
||||
frameworks: ['jasmine'],
|
||||
files: [
|
||||
'platform/**/*Spec.js',
|
||||
'src/**/*Spec.js'
|
||||
'indexTest.js'
|
||||
],
|
||||
port: 9876,
|
||||
reporters: reporters,
|
||||
browsers: browsers,
|
||||
client: {
|
||||
jasmine: {
|
||||
random: false
|
||||
}
|
||||
},
|
||||
customLaunchers: {
|
||||
ChromeDebugging: {
|
||||
base: 'Chrome',
|
||||
@ -82,20 +86,20 @@ module.exports = (config) => {
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
thresholds: {
|
||||
global: {
|
||||
lines: 62
|
||||
lines: 65
|
||||
}
|
||||
}
|
||||
},
|
||||
preprocessors: {
|
||||
'platform/**/*Spec.js': ['webpack', 'sourcemap'],
|
||||
'src/**/*Spec.js': ['webpack', 'sourcemap']
|
||||
'indexTest.js': ['webpack', 'sourcemap']
|
||||
},
|
||||
webpack: webpackConfig,
|
||||
webpackMiddleware: {
|
||||
stats: 'errors-only',
|
||||
logLevel: 'warn'
|
||||
},
|
||||
concurrency: 1,
|
||||
singleRun: true,
|
||||
browserNoActivityTimeout: 90000
|
||||
browserNoActivityTimeout: 400000
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2017, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -32,6 +32,6 @@ if (document.currentScript) {
|
||||
|
||||
const MCT = require('./src/MCT');
|
||||
|
||||
var openmct = new MCT();
|
||||
const openmct = new MCT();
|
||||
|
||||
module.exports = openmct;
|
||||
|
30
package.json
30
package.json
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "openmct",
|
||||
"version": "1.0.0-snapshot",
|
||||
"version": "1.3.3-SNAPSHOT",
|
||||
"description": "The Open MCT core platform",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"angular": ">=1.8.0",
|
||||
"angular-route": "1.4.14",
|
||||
"babel-eslint": "8.2.6",
|
||||
"babel-eslint": "10.0.3",
|
||||
"comma-separated-values": "^3.6.4",
|
||||
"concurrently": "^3.6.1",
|
||||
"copy-webpack-plugin": "^4.5.2",
|
||||
@ -22,7 +22,7 @@
|
||||
"d3-selection": "1.3.x",
|
||||
"d3-time": "1.0.x",
|
||||
"d3-time-format": "2.1.x",
|
||||
"eslint": "5.2.0",
|
||||
"eslint": "7.0.0",
|
||||
"eslint-plugin-vue": "^6.0.0",
|
||||
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
|
||||
"eventemitter3": "^1.2.0",
|
||||
@ -39,27 +39,27 @@
|
||||
"istanbul-instrumenter-loader": "^3.0.1",
|
||||
"jasmine-core": "^3.1.0",
|
||||
"jsdoc": "^3.3.2",
|
||||
"karma": "^2.0.3",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-firefox-launcher": "^1.3.0",
|
||||
"karma-cli": "^1.0.1",
|
||||
"karma-coverage": "^1.1.2",
|
||||
"karma-coverage-istanbul-reporter": "^2.1.1",
|
||||
"karma-html-reporter": "^0.2.7",
|
||||
"karma-jasmine": "^1.1.2",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"karma-webpack": "^3.0.0",
|
||||
"karma": "5.1.1",
|
||||
"karma-chrome-launcher": "3.1.0",
|
||||
"karma-firefox-launcher": "1.3.0",
|
||||
"karma-cli": "2.0.0",
|
||||
"karma-coverage": "2.0.3",
|
||||
"karma-coverage-istanbul-reporter": "3.0.3",
|
||||
"karma-html-reporter": "0.2.7",
|
||||
"karma-jasmine": "3.3.1",
|
||||
"karma-sourcemap-loader": "0.3.7",
|
||||
"karma-webpack": "4.0.2",
|
||||
"location-bar": "^3.0.1",
|
||||
"lodash": "^4.17.12",
|
||||
"markdown-toc": "^0.11.7",
|
||||
"marked": "^0.3.5",
|
||||
"mini-css-extract-plugin": "^0.4.1",
|
||||
"minimist": "^1.1.1",
|
||||
"minimist": "^1.2.5",
|
||||
"moment": "2.25.3",
|
||||
"moment-duration-format": "^2.2.2",
|
||||
"moment-timezone": "0.5.28",
|
||||
"node-bourbon": "^4.2.3",
|
||||
"node-sass": "^4.9.2",
|
||||
"node-sass": "^4.14.1",
|
||||
"painterro": "^1.0.35",
|
||||
"printj": "^1.2.1",
|
||||
"raw-loader": "^0.5.1",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -47,7 +47,7 @@ define([
|
||||
) {
|
||||
|
||||
return {
|
||||
name:"platform/commonUI/about",
|
||||
name: "platform/commonUI/about",
|
||||
definition: {
|
||||
"name": "About Open MCT",
|
||||
"extensions": {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<div class="s-text l-content">
|
||||
<h1 class="l-title s-title">Open MCT</h1>
|
||||
<div class="l-description s-description">
|
||||
<p>Open MCT, Copyright © 2014-2018, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.</p>
|
||||
<p>Open MCT, Copyright © 2014-2020, 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>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>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* Implements Open MCT's About dialog.
|
||||
* @namespace platform/commonUI/about
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -25,14 +25,20 @@ define(
|
||||
function (AboutController) {
|
||||
|
||||
describe("The About controller", function () {
|
||||
var testVersions,
|
||||
mockWindow,
|
||||
controller;
|
||||
let testVersions;
|
||||
let mockWindow;
|
||||
let controller;
|
||||
|
||||
beforeEach(function () {
|
||||
testVersions = [
|
||||
{ name: "Some name", value: "1.2.3" },
|
||||
{ name: "Some other name", value: "3.2.1" }
|
||||
{
|
||||
name: "Some name",
|
||||
value: "1.2.3"
|
||||
},
|
||||
{
|
||||
name: "Some other name",
|
||||
value: "3.2.1"
|
||||
}
|
||||
];
|
||||
mockWindow = jasmine.createSpyObj("$window", ["open"]);
|
||||
controller = new AboutController(testVersions, mockWindow);
|
||||
@ -50,8 +56,6 @@ define(
|
||||
controller.openLicenses();
|
||||
expect(mockWindow.open).toHaveBeenCalledWith("#/licenses");
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -49,7 +49,7 @@ define([
|
||||
) {
|
||||
|
||||
return {
|
||||
name:"platform/commonUI/browse",
|
||||
name: "platform/commonUI/browse",
|
||||
definition: {
|
||||
"extensions": {
|
||||
"routes": [
|
||||
@ -143,8 +143,8 @@ define([
|
||||
"$window"
|
||||
],
|
||||
"group": "windowing",
|
||||
"cssClass": "icon-new-window",
|
||||
"priority": "preferred"
|
||||
"priority": 10,
|
||||
"cssClass": "icon-new-window"
|
||||
}
|
||||
],
|
||||
"runs": [
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -46,6 +46,7 @@ define(
|
||||
NavigateAction.prototype.perform = function () {
|
||||
if (this.navigationService.shouldNavigate()) {
|
||||
this.navigationService.setNavigation(this.domainObject, true);
|
||||
|
||||
return Promise.resolve({});
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -69,8 +69,10 @@ define(
|
||||
NavigationService.prototype.setNavigation = function (domainObject, force) {
|
||||
if (force) {
|
||||
this.doNavigation(domainObject);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this.navigated === domainObject) {
|
||||
return true;
|
||||
}
|
||||
@ -81,6 +83,7 @@ define(
|
||||
}
|
||||
|
||||
this.doNavigation(domainObject);
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
@ -120,6 +123,7 @@ define(
|
||||
*/
|
||||
NavigationService.prototype.shouldNavigate = function () {
|
||||
var doNotNavigate = this.shouldWarnBeforeNavigate();
|
||||
|
||||
return !doNotNavigate || this.$window.confirm(doNotNavigate);
|
||||
};
|
||||
|
||||
@ -135,6 +139,7 @@ define(
|
||||
*/
|
||||
NavigationService.prototype.checkBeforeNavigation = function (checkFn) {
|
||||
this.checks.push(checkFn);
|
||||
|
||||
return function removeCheck() {
|
||||
this.checks = this.checks.filter(function (fn) {
|
||||
return checkFn !== fn;
|
||||
@ -172,6 +177,7 @@ define(
|
||||
if (reasons.length) {
|
||||
return reasons.join('\n');
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
@ -186,6 +192,7 @@ define(
|
||||
if (shouldWarnBeforeNavigate) {
|
||||
return shouldWarnBeforeNavigate;
|
||||
}
|
||||
|
||||
if (this.oldUnload) {
|
||||
return this.oldUnload.apply(undefined, [].slice.apply(arguments));
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -40,6 +40,7 @@ define([], function () {
|
||||
|
||||
function getParent(domainObject) {
|
||||
var context = domainObject.getCapability('context');
|
||||
|
||||
return context.getParent();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -53,6 +53,7 @@ define([
|
||||
|
||||
it("sets navigation if it is allowed", function () {
|
||||
mockNavigationService.shouldNavigate.and.returnValue(true);
|
||||
|
||||
return action.perform()
|
||||
.then(function () {
|
||||
expect(mockNavigationService.setNavigation)
|
||||
@ -63,6 +64,7 @@ define([
|
||||
it("does not set navigation if it is not allowed", function () {
|
||||
mockNavigationService.shouldNavigate.and.returnValue(false);
|
||||
var onSuccess = jasmine.createSpy('onSuccess');
|
||||
|
||||
return action.perform()
|
||||
.then(onSuccess, function () {
|
||||
expect(onSuccess).not.toHaveBeenCalled();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -79,7 +79,6 @@ define(
|
||||
navigationService.addListener(callback);
|
||||
navigationService.removeListener(callback);
|
||||
|
||||
|
||||
navigationService.setNavigation(testObject);
|
||||
expect(callback).not.toHaveBeenCalled();
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -70,6 +70,7 @@ define([
|
||||
jasmine.createSpy('throttled-' + mockThrottledFns.length);
|
||||
mockThrottledFn.and.callFake(fn);
|
||||
mockThrottledFns.push(mockThrottledFn);
|
||||
|
||||
return mockThrottledFn;
|
||||
});
|
||||
mockTopic.and.returnValue(mockMutationTopic);
|
||||
@ -81,7 +82,7 @@ define([
|
||||
}[c];
|
||||
});
|
||||
mockDomainObject.hasCapability.and.callFake(function (c) {
|
||||
return !!mockDomainObject.getCapability(c);
|
||||
return Boolean(mockDomainObject.getCapability(c));
|
||||
});
|
||||
mockParentObject.getCapability.and.callFake(function (c) {
|
||||
return {
|
||||
@ -102,7 +103,6 @@ define([
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
it("listens for mutation with a throttled function", function () {
|
||||
expect(mockMutationTopic.listen)
|
||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
||||
@ -129,8 +129,8 @@ define([
|
||||
});
|
||||
|
||||
[false, true].forEach(function (isEditRoot) {
|
||||
var caseName = isEditRoot ?
|
||||
"that are being edited" : "that are not being edited";
|
||||
var caseName = isEditRoot
|
||||
? "that are being edited" : "that are not being edited";
|
||||
|
||||
function itNavigatesAsExpected() {
|
||||
if (isOrphan && !isEditRoot) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -45,7 +45,7 @@ define([
|
||||
) {
|
||||
|
||||
return {
|
||||
name:"platform/commonUI/dialog",
|
||||
name: "platform/commonUI/dialog",
|
||||
definition: {
|
||||
"extensions": {
|
||||
"services": [
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
@ -31,13 +31,13 @@
|
||||
</mct-form>
|
||||
</div>
|
||||
<div class="c-overlay__button-bar">
|
||||
<a class='c-button c-button--major'
|
||||
<button class='c-button c-button--major'
|
||||
ng-class="{ disabled: !createForm.$valid }"
|
||||
ng-click="ngModel.confirm()">
|
||||
OK
|
||||
</a>
|
||||
<a class='c-button '
|
||||
</button>
|
||||
<button class='c-button '
|
||||
ng-click="ngModel.cancel()">
|
||||
Cancel
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
@ -31,13 +31,13 @@
|
||||
</mct-include>
|
||||
</div>
|
||||
<div class="c-overlay__button-bar">
|
||||
<a ng-repeat="option in ngModel.dialog.options"
|
||||
<button ng-repeat="option in ngModel.dialog.options"
|
||||
href=''
|
||||
class="s-button lg"
|
||||
title="{{option.description}}"
|
||||
ng-click="ngModel.confirm(option.key)"
|
||||
ng-class="{ major: $first, subtle: !$first }">
|
||||
{{option.name}}
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
</mct-container>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<div class="c-overlay__outer">
|
||||
<button ng-click="ngModel.cancel()"
|
||||
ng-if="ngModel.cancel"
|
||||
class="c-click-icon c-overlay__close-button icon-x-in-circle"></button>
|
||||
class="c-click-icon c-overlay__close-button icon-x"></button>
|
||||
<div class="c-overlay__contents" ng-transclude></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -28,7 +28,6 @@ define(
|
||||
// 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>';
|
||||
|
||||
|
||||
/**
|
||||
* The OverlayService is responsible for pre-pending templates to
|
||||
* the body of the document, which is useful for displaying templates
|
||||
@ -53,6 +52,7 @@ define(
|
||||
this.findBody = function () {
|
||||
return $document.find('body');
|
||||
};
|
||||
|
||||
this.newScope = function () {
|
||||
return $rootScope.$new();
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -129,8 +129,8 @@ define(
|
||||
);
|
||||
});
|
||||
|
||||
it("invokes the overlay service with the correct parameters when" +
|
||||
" a blocking dialog is requested", function () {
|
||||
it("invokes the overlay service with the correct parameters when"
|
||||
+ " a blocking dialog is requested", function () {
|
||||
var dialogModel = {};
|
||||
expect(dialogService.showBlockingMessage(dialogModel)).not.toBe(false);
|
||||
expect(mockOverlayService.createOverlay).toHaveBeenCalledWith(
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -48,7 +48,7 @@ define(
|
||||
mockScope = jasmine.createSpyObj("scope", ["$destroy"]);
|
||||
mockTimeout = function (callback) {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
mockDocument.find.and.returnValue(mockBody);
|
||||
mockCompile.and.returnValue(mockTemplate);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
* Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
@ -139,7 +139,9 @@ define([
|
||||
],
|
||||
"description": "Edit",
|
||||
"category": "view-control",
|
||||
"cssClass": "major icon-pencil"
|
||||
"cssClass": "major icon-pencil",
|
||||
"group": "action",
|
||||
"priority": 10
|
||||
},
|
||||
{
|
||||
"key": "properties",
|
||||
@ -150,6 +152,8 @@ define([
|
||||
"implementation": PropertiesAction,
|
||||
"cssClass": "major icon-pencil",
|
||||
"name": "Edit Properties...",
|
||||
"group": "action",
|
||||
"priority": 10,
|
||||
"description": "Edit properties of this object.",
|
||||
"depends": [
|
||||
"dialogService"
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Open MCT, Copyright (c) 2014-2018, United States Government
|
||||
Open MCT, Copyright (c) 2014-2020, United States Government
|
||||
as represented by the Administrator of the National Aeronautics and Space
|
||||
Administration. All rights reserved.
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user