mirror of
https://github.com/nasa/openmct.git
synced 2025-07-04 05:53:23 +00:00
Compare commits
16 Commits
static-roo
...
test-image
Author | SHA1 | Date | |
---|---|---|---|
388e73157e | |||
e434b294b9 | |||
48b66e0af2 | |||
54ef9a830e | |||
cd38545267 | |||
8aed21d670 | |||
b27f24cc30 | |||
a7df8bf168 | |||
ff269ac390 | |||
cdee5e8102 | |||
159457a52d | |||
d637420da1 | |||
eb4da293c6 | |||
738fac64b8 | |||
7703ec0a61 | |||
52466999b8 |
@ -2,7 +2,7 @@ version: 2.1
|
|||||||
executors:
|
executors:
|
||||||
pw-focal-development:
|
pw-focal-development:
|
||||||
docker:
|
docker:
|
||||||
- image: mcr.microsoft.com/playwright:v1.18.0-focal
|
- image: mcr.microsoft.com/playwright:v1.18.1-focal
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: development # Needed to ensure 'dist' folder created and devDependencies installed
|
NODE_ENV: development # Needed to ensure 'dist' folder created and devDependencies installed
|
||||||
parameters:
|
parameters:
|
||||||
|
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,5 +1,5 @@
|
|||||||
<!--- Note: Please open the PR in draft form until you are ready for active review. -->
|
<!--- Note: Please open the PR in draft form until you are ready for active review. -->
|
||||||
Closes: <!--- Insert Issue Number(s) this PR addresses. Start by typing # will open a dropdown of recent issues. -->
|
Closes <!--- Insert Issue Number(s) this PR addresses. Start by typing # will open a dropdown of recent issues. Note: this does not work on PRs which target release branches -->
|
||||||
|
|
||||||
### Describe your changes:
|
### Describe your changes:
|
||||||
<!--- Describe your changes and add any comments about your approach either here or inline if code comments aren't added -->
|
<!--- Describe your changes and add any comments about your approach either here or inline if code comments aren't added -->
|
||||||
|
3
.github/dependabot.yml
vendored
3
.github/dependabot.yml
vendored
@ -10,6 +10,7 @@ updates:
|
|||||||
- "type:maintenance"
|
- "type:maintenance"
|
||||||
- "dependencies"
|
- "dependencies"
|
||||||
- "pr:e2e"
|
- "pr:e2e"
|
||||||
|
- "pr:daveit"
|
||||||
allow:
|
allow:
|
||||||
- dependency-name: "*eslint*"
|
- dependency-name: "*eslint*"
|
||||||
- dependency-name: "*karma*"
|
- dependency-name: "*karma*"
|
||||||
@ -25,4 +26,4 @@ updates:
|
|||||||
labels:
|
labels:
|
||||||
- "type:maintenance"
|
- "type:maintenance"
|
||||||
- "dependencies"
|
- "dependencies"
|
||||||
- "prcop:disable"
|
- "pr:daveit"
|
||||||
|
12
.github/workflows/e2e-pr.yml
vendored
12
.github/workflows/e2e-pr.yml
vendored
@ -15,8 +15,8 @@ jobs:
|
|||||||
script: |
|
script: |
|
||||||
github.rest.issues.createComment({
|
github.rest.issues.createComment({
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
owner: context.repo.owner,
|
owner: "nasa",
|
||||||
repo: context.repo.repo,
|
repo: "openmct",
|
||||||
body: 'Started e2e Run. Follow along: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
body: 'Started e2e Run. Follow along: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
||||||
})
|
})
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -37,8 +37,8 @@ jobs:
|
|||||||
script: |
|
script: |
|
||||||
github.rest.issues.createComment({
|
github.rest.issues.createComment({
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
owner: context.repo.owner,
|
owner: "nasa",
|
||||||
repo: context.repo.repo,
|
repo: "openmct",
|
||||||
body: 'Success ✅ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
body: 'Success ✅ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
||||||
})
|
})
|
||||||
- name: Test failure
|
- name: Test failure
|
||||||
@ -48,7 +48,7 @@ jobs:
|
|||||||
script: |
|
script: |
|
||||||
github.rest.issues.createComment({
|
github.rest.issues.createComment({
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
owner: context.repo.owner,
|
owner: "nasa",
|
||||||
repo: context.repo.repo,
|
repo: "openmct",
|
||||||
body: 'Failure ❌ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
body: 'Failure ❌ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
|
||||||
})
|
})
|
||||||
|
2
.github/workflows/prcop-config.json
vendored
2
.github/workflows/prcop-config.json
vendored
@ -15,5 +15,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"disableWord": "prcop:disable"
|
"disableWord": "pr:daveit"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2022, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2022, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2022, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2022, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
18
package.json
18
package.json
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "openmct",
|
"name": "openmct",
|
||||||
"version": "1.8.4-SNAPSHOT",
|
"version": "1.8.5-SNAPSHOT",
|
||||||
"description": "The Open MCT core platform",
|
"description": "The Open MCT core platform",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@braintree/sanitize-url": "^5.0.2",
|
"@braintree/sanitize-url": "^5.0.2",
|
||||||
"@percy/cli": "^1.0.0-beta.73",
|
"@percy/cli": "^1.0.0-beta.73",
|
||||||
"@percy/playwright": "^1.0.1",
|
"@percy/playwright": "^1.0.1",
|
||||||
"@playwright/test": "^1.18.0",
|
"@playwright/test": "^1.18.1",
|
||||||
"allure-playwright": "^2.0.0-beta.14",
|
"allure-playwright": "^2.0.0-beta.14",
|
||||||
"angular": ">=1.8.0",
|
"angular": ">=1.8.0",
|
||||||
"angular-route": "1.4.14",
|
"angular-route": "1.4.14",
|
||||||
@ -20,7 +20,7 @@
|
|||||||
"d3-scale": "1.0.x",
|
"d3-scale": "1.0.x",
|
||||||
"d3-selection": "1.3.x",
|
"d3-selection": "1.3.x",
|
||||||
"eslint": "7.0.0",
|
"eslint": "7.0.0",
|
||||||
"eslint-plugin-playwright": "0.7.1",
|
"eslint-plugin-playwright": "0.8.0",
|
||||||
"eslint-plugin-vue": "^7.5.0",
|
"eslint-plugin-vue": "^7.5.0",
|
||||||
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
|
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
|
||||||
"eventemitter3": "^1.2.0",
|
"eventemitter3": "^1.2.0",
|
||||||
@ -36,7 +36,7 @@
|
|||||||
"istanbul-instrumenter-loader": "^3.0.1",
|
"istanbul-instrumenter-loader": "^3.0.1",
|
||||||
"jasmine-core": "^4.0.0",
|
"jasmine-core": "^4.0.0",
|
||||||
"jsdoc": "^3.3.2",
|
"jsdoc": "^3.3.2",
|
||||||
"karma": "6.3.11",
|
"karma": "6.3.13",
|
||||||
"karma-chrome-launcher": "3.1.0",
|
"karma-chrome-launcher": "3.1.0",
|
||||||
"karma-cli": "2.0.0",
|
"karma-cli": "2.0.0",
|
||||||
"karma-coverage": "2.1.0",
|
"karma-coverage": "2.1.0",
|
||||||
@ -58,7 +58,7 @@
|
|||||||
"moment-timezone": "0.5.28",
|
"moment-timezone": "0.5.28",
|
||||||
"node-bourbon": "^4.2.3",
|
"node-bourbon": "^4.2.3",
|
||||||
"painterro": "^1.2.56",
|
"painterro": "^1.2.56",
|
||||||
"playwright": "^1.18.0",
|
"playwright": "^1.18.1",
|
||||||
"plotly.js-basic-dist": "^2.5.0",
|
"plotly.js-basic-dist": "^2.5.0",
|
||||||
"plotly.js-gl2d-dist": "^2.5.0",
|
"plotly.js-gl2d-dist": "^2.5.0",
|
||||||
"printj": "^1.2.1",
|
"printj": "^1.2.1",
|
||||||
@ -73,7 +73,7 @@
|
|||||||
"uuid": "^3.3.3",
|
"uuid": "^3.3.3",
|
||||||
"v8-compile-cache": "^1.1.0",
|
"v8-compile-cache": "^1.1.0",
|
||||||
"vue": "2.5.6",
|
"vue": "2.5.6",
|
||||||
"vue-eslint-parser": "8.0.1",
|
"vue-eslint-parser": "8.2.0",
|
||||||
"vue-loader": "15.9.8",
|
"vue-loader": "15.9.8",
|
||||||
"vue-template-compiler": "2.5.6",
|
"vue-template-compiler": "2.5.6",
|
||||||
"webpack": "^5.65.0",
|
"webpack": "^5.65.0",
|
||||||
@ -84,8 +84,8 @@
|
|||||||
"zepto": "^1.2.0"
|
"zepto": "^1.2.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rm -rf ./dist /node_modules; rm package-lock.json",
|
"clean": "rm -rf ./dist ./node_modules; rm package-lock.json",
|
||||||
"clean-test-lint": "npm run clean; npm install ; npm run test; npm run lint",
|
"clean-test-lint": "npm run clean; npm install; npm run test; npm run lint",
|
||||||
"start": "node app.js",
|
"start": "node app.js",
|
||||||
"lint": "eslint platform example src --ext .js,.vue openmct.js",
|
"lint": "eslint platform example src --ext .js,.vue openmct.js",
|
||||||
"lint:fix": "eslint platform example src --ext .js,.vue openmct.js --fix",
|
"lint:fix": "eslint platform example src --ext .js,.vue openmct.js --fix",
|
||||||
@ -114,7 +114,7 @@
|
|||||||
"url": "https://github.com/nasa/openmct.git"
|
"url": "https://github.com/nasa/openmct.git"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.0.1 <15.0.0"
|
"node": ">=12.20.1 <15.0.0"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
@ -65,6 +65,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
hideOptions: true,
|
hideOptions: true,
|
||||||
|
showFilteredOptions: false,
|
||||||
optionIndex: 0,
|
optionIndex: 0,
|
||||||
field: this.model.value
|
field: this.model.value
|
||||||
};
|
};
|
||||||
@ -72,16 +73,24 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
filteredOptions() {
|
filteredOptions() {
|
||||||
const options = this.optionNames || [];
|
const options = this.optionNames || [];
|
||||||
|
if (this.showFilteredOptions) {
|
||||||
|
return options
|
||||||
|
.filter(option => {
|
||||||
|
return option.toLowerCase().indexOf(this.field.toLowerCase()) >= 0;
|
||||||
|
}).map((option, index) => {
|
||||||
|
return {
|
||||||
|
optionId: index,
|
||||||
|
name: option
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return options
|
return options.map((option, index) => {
|
||||||
.filter(option => {
|
return {
|
||||||
return option.toLowerCase().indexOf(this.field.toLowerCase()) >= 0;
|
optionId: index,
|
||||||
}).map((option, index) => {
|
name: option
|
||||||
return {
|
};
|
||||||
optionId: index,
|
});
|
||||||
name: option
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -131,11 +140,12 @@ export default {
|
|||||||
this.hideOptions = true;
|
this.hideOptions = true;
|
||||||
this.field = string;
|
this.field = string;
|
||||||
},
|
},
|
||||||
showOptions(string) {
|
showOptions() {
|
||||||
this.hideOptions = false;
|
this.hideOptions = false;
|
||||||
this.optionIndex = 0;
|
this.optionIndex = 0;
|
||||||
},
|
},
|
||||||
keyDown($event) {
|
keyDown($event) {
|
||||||
|
this.showFilteredOptions = true;
|
||||||
if (this.filteredOptions) {
|
if (this.filteredOptions) {
|
||||||
let keyCode = $event.keyCode;
|
let keyCode = $event.keyCode;
|
||||||
switch (keyCode) {
|
switch (keyCode) {
|
||||||
@ -155,11 +165,14 @@ export default {
|
|||||||
},
|
},
|
||||||
inputClicked() {
|
inputClicked() {
|
||||||
this.autocompleteInputElement.select();
|
this.autocompleteInputElement.select();
|
||||||
this.showOptions(this.autocompleteInputElement.value);
|
this.showOptions();
|
||||||
},
|
},
|
||||||
arrowClicked() {
|
arrowClicked() {
|
||||||
|
// if the user clicked the arrow, we want
|
||||||
|
// to show them all the options
|
||||||
|
this.showFilteredOptions = false;
|
||||||
this.autocompleteInputElement.select();
|
this.autocompleteInputElement.select();
|
||||||
this.showOptions('');
|
this.showOptions();
|
||||||
},
|
},
|
||||||
optionMouseover(optionId) {
|
optionMouseover(optionId) {
|
||||||
this.optionIndex = optionId;
|
this.optionIndex = optionId;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2022, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2022, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2022, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2022, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -209,18 +209,7 @@ export default {
|
|||||||
},
|
},
|
||||||
layoutItems: {
|
layoutItems: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
let wMax = this.$el.clientWidth / this.gridSize[0];
|
this.updateGrid();
|
||||||
let hMax = this.$el.clientHeight / this.gridSize[1];
|
|
||||||
value.forEach(item => {
|
|
||||||
if (item.x + item.width > wMax) {
|
|
||||||
wMax = item.x + item.width + 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.y + item.height > hMax) {
|
|
||||||
hMax = item.y + item.height + 2;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.gridDimensions = [wMax * this.gridSize[0], hMax * this.gridSize[1]];
|
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
@ -233,6 +222,8 @@ export default {
|
|||||||
this.composition.on('remove', this.removeChild);
|
this.composition.on('remove', this.removeChild);
|
||||||
this.composition.load();
|
this.composition.load();
|
||||||
this.gridDimensions = [this.$el.offsetWidth, this.$el.scrollHeight];
|
this.gridDimensions = [this.$el.offsetWidth, this.$el.scrollHeight];
|
||||||
|
|
||||||
|
this.watchDisplayResize();
|
||||||
},
|
},
|
||||||
destroyed: function () {
|
destroyed: function () {
|
||||||
this.openmct.selection.off('change', this.setSelection);
|
this.openmct.selection.off('change', this.setSelection);
|
||||||
@ -240,6 +231,25 @@ export default {
|
|||||||
this.composition.off('remove', this.removeChild);
|
this.composition.off('remove', this.removeChild);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
updateGrid() {
|
||||||
|
let wMax = this.$el.clientWidth / this.gridSize[0];
|
||||||
|
let hMax = this.$el.clientHeight / this.gridSize[1];
|
||||||
|
this.layoutItems.forEach(item => {
|
||||||
|
if (item.x + item.width > wMax) {
|
||||||
|
wMax = item.x + item.width + 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.y + item.height > hMax) {
|
||||||
|
hMax = item.y + item.height + 2;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.gridDimensions = [wMax * this.gridSize[0], hMax * this.gridSize[1]];
|
||||||
|
},
|
||||||
|
watchDisplayResize() {
|
||||||
|
const resizeObserver = new ResizeObserver(() => this.updateGrid());
|
||||||
|
|
||||||
|
resizeObserver.observe(this.$el);
|
||||||
|
},
|
||||||
addElement(itemType, element) {
|
addElement(itemType, element) {
|
||||||
this.addItem(itemType + '-view', element);
|
this.addItem(itemType + '-view', element);
|
||||||
},
|
},
|
||||||
@ -404,8 +414,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
containsObject(identifier) {
|
containsObject(identifier) {
|
||||||
return _.get(this.domainObject, 'composition')
|
if ('composition' in this.domainObject) {
|
||||||
.some(childId => this.openmct.objects.areIdsEqual(childId, identifier));
|
return this.domainObject.composition
|
||||||
|
.some(childId => this.openmct.objects.areIdsEqual(childId, identifier));
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
handleDragOver($event) {
|
handleDragOver($event) {
|
||||||
if (this.domainObject.locked) {
|
if (this.domainObject.locked) {
|
||||||
@ -494,7 +508,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
removeFromComposition(keyString) {
|
removeFromComposition(keyString) {
|
||||||
let composition = _.get(this.domainObject, 'composition');
|
let composition = this.domainObject.composition ? this.domainObject.composition : [];
|
||||||
composition = composition.filter(identifier => {
|
composition = composition.filter(identifier => {
|
||||||
return this.openmct.objects.makeKeyString(identifier) !== keyString;
|
return this.openmct.objects.makeKeyString(identifier) !== keyString;
|
||||||
});
|
});
|
||||||
|
@ -97,7 +97,14 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.frame.domainObjectIdentifier) {
|
if (this.frame.domainObjectIdentifier) {
|
||||||
this.openmct.objects.get(this.frame.domainObjectIdentifier).then((object) => {
|
let domainObjectPromise;
|
||||||
|
if (this.openmct.objects.supportsMutation(this.frame.domainObjectIdentifier)) {
|
||||||
|
domainObjectPromise = this.openmct.objects.getMutable(this.frame.domainObjectIdentifier);
|
||||||
|
} else {
|
||||||
|
domainObjectPromise = this.openmct.objects.get(this.frame.domainObjectIdentifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
domainObjectPromise.then((object) => {
|
||||||
this.setDomainObject(object);
|
this.setDomainObject(object);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -105,6 +112,10 @@ export default {
|
|||||||
this.dragGhost = document.getElementById('js-fl-drag-ghost');
|
this.dragGhost = document.getElementById('js-fl-drag-ghost');
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
if (this.domainObject.isMutable) {
|
||||||
|
this.openmct.objects.destroyMutable(this.domainObject);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.unsubscribeSelection) {
|
if (this.unsubscribeSelection) {
|
||||||
this.unsubscribeSelection();
|
this.unsubscribeSelection();
|
||||||
}
|
}
|
||||||
|
@ -702,12 +702,15 @@ export default {
|
|||||||
focusedIndex = matchIndex > -1 ? matchIndex : this.imageHistory.length - 1;
|
focusedIndex = matchIndex > -1 ? matchIndex : this.imageHistory.length - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(this.isPaused || thumbnailClick)
|
const isLastImageFocused = focusedIndex === this.imageHistory.length - 1;
|
||||||
|| focusedIndex === this.imageHistory.length - 1) {
|
if (!(this.isPaused || thumbnailClick) && isLastImageFocused) {
|
||||||
delete this.previousFocusedImage;
|
delete this.previousFocusedImage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('old index', this.focusedImageIndex);
|
||||||
|
console.log('new index', focusedIndex);
|
||||||
|
|
||||||
this.focusedImageIndex = focusedIndex;
|
this.focusedImageIndex = focusedIndex;
|
||||||
|
|
||||||
//TODO: do we even need this anymore?
|
//TODO: do we even need this anymore?
|
||||||
@ -715,6 +718,9 @@ export default {
|
|||||||
this.nextImageIndex = focusedIndex;
|
this.nextImageIndex = focusedIndex;
|
||||||
//this could happen if bounds changes
|
//this could happen if bounds changes
|
||||||
if (this.focusedImageIndex > this.imageHistory.length - 1) {
|
if (this.focusedImageIndex > this.imageHistory.length - 1) {
|
||||||
|
console.log('why this?');
|
||||||
|
console.log('old index', this.focusedImageIndex);
|
||||||
|
console.log('new index', focusedIndex);
|
||||||
this.focusedImageIndex = focusedIndex;
|
this.focusedImageIndex = focusedIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -632,7 +632,8 @@ export default {
|
|||||||
updateDefaultNotebook(updatedNotebookStorageObject) {
|
updateDefaultNotebook(updatedNotebookStorageObject) {
|
||||||
if (!this.isDefaultNotebook()) {
|
if (!this.isDefaultNotebook()) {
|
||||||
const persistedNotebookStorageObject = getDefaultNotebook();
|
const persistedNotebookStorageObject = getDefaultNotebook();
|
||||||
if (persistedNotebookStorageObject.identifier !== undefined) {
|
if (persistedNotebookStorageObject
|
||||||
|
&& persistedNotebookStorageObject.identifier !== undefined) {
|
||||||
this.removeDefaultClass(persistedNotebookStorageObject.identifier);
|
this.removeDefaultClass(persistedNotebookStorageObject.identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2022, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -278,7 +278,7 @@ export default {
|
|||||||
// Have to throw away the old canvas elements and replace with new
|
// Have to throw away the old canvas elements and replace with new
|
||||||
// canvas elements in order to get new drawing contexts.
|
// canvas elements in order to get new drawing contexts.
|
||||||
const div = document.createElement('div');
|
const div = document.createElement('div');
|
||||||
div.innerHTML = this.TEMPLATE;
|
div.innerHTML = this.canvasTemplate + this.canvasTemplate;
|
||||||
const mainCanvas = div.querySelectorAll("canvas")[1];
|
const mainCanvas = div.querySelectorAll("canvas")[1];
|
||||||
const overlayCanvas = div.querySelectorAll("canvas")[0];
|
const overlayCanvas = div.querySelectorAll("canvas")[0];
|
||||||
this.canvas.parentNode.replaceChild(mainCanvas, this.canvas);
|
this.canvas.parentNode.replaceChild(mainCanvas, this.canvas);
|
||||||
|
@ -95,6 +95,11 @@ export default {
|
|||||||
isUTCBased: timeSystem.isUTCBased
|
isUTCBased: timeSystem.isUTCBased
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
keyString() {
|
||||||
|
this.setTimeContext();
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.handleNewBounds = _.throttle(this.handleNewBounds, 300);
|
this.handleNewBounds = _.throttle(this.handleNewBounds, 300);
|
||||||
this.setTimeSystem(JSON.parse(JSON.stringify(this.openmct.time.timeSystem())));
|
this.setTimeSystem(JSON.parse(JSON.stringify(this.openmct.time.timeSystem())));
|
||||||
|
@ -115,6 +115,11 @@ export default {
|
|||||||
isUTCBased: timeSystem.isUTCBased
|
isUTCBased: timeSystem.isUTCBased
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
keyString() {
|
||||||
|
this.setTimeContext();
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.handleNewBounds = _.throttle(this.handleNewBounds, 300);
|
this.handleNewBounds = _.throttle(this.handleNewBounds, 300);
|
||||||
this.setTimeSystem(JSON.parse(JSON.stringify(this.openmct.time.timeSystem())));
|
this.setTimeSystem(JSON.parse(JSON.stringify(this.openmct.time.timeSystem())));
|
||||||
|
@ -105,42 +105,49 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
domainObject: {
|
domainObject: {
|
||||||
handler(domainObject) {
|
handler(domainObject) {
|
||||||
this.independentTCEnabled = domainObject.configuration.useIndependentTime === true;
|
const key = this.openmct.objects.makeKeyString(domainObject.identifier);
|
||||||
|
if (key !== this.keyString) {
|
||||||
if (!domainObject.configuration.timeOptions || !this.independentTCEnabled) {
|
//domain object has changed
|
||||||
this.destroyIndependentTime();
|
this.destroyIndependentTime();
|
||||||
|
|
||||||
return;
|
this.independentTCEnabled = domainObject.configuration.useIndependentTime === true;
|
||||||
}
|
this.timeOptions = domainObject.configuration.timeOptions || {
|
||||||
|
clockOffsets: this.openmct.time.clockOffsets(),
|
||||||
|
fixedOffsets: this.openmct.time.bounds()
|
||||||
|
};
|
||||||
|
|
||||||
if (this.timeOptions.start !== domainObject.configuration.timeOptions.start
|
this.initialize();
|
||||||
|| this.timeOptions.end !== domainObject.configuration.timeOptions.end) {
|
|
||||||
this.timeOptions = domainObject.configuration.timeOptions;
|
|
||||||
this.destroyIndependentTime();
|
|
||||||
this.registerIndependentTimeOffsets();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.setTimeContext();
|
this.initialize();
|
||||||
|
|
||||||
if (this.timeOptions.mode) {
|
|
||||||
this.mode = this.timeOptions.mode;
|
|
||||||
} else {
|
|
||||||
this.timeOptions.mode = this.mode = this.timeContext.clock() === undefined ? { key: 'fixed' } : { key: Object.create(this.timeContext.clock()).key};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.independentTCEnabled) {
|
|
||||||
this.registerIndependentTimeOffsets();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.stopFollowingTimeContext();
|
this.stopFollowingTimeContext();
|
||||||
this.destroyIndependentTime();
|
this.destroyIndependentTime();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initialize() {
|
||||||
|
this.keyString = this.openmct.objects.makeKeyString(this.domainObject.identifier);
|
||||||
|
this.setTimeContext();
|
||||||
|
|
||||||
|
if (this.timeOptions.mode) {
|
||||||
|
this.mode = this.timeOptions.mode;
|
||||||
|
} else {
|
||||||
|
if (this.timeContext.clock() === undefined) {
|
||||||
|
this.timeOptions.mode = this.mode = { key: 'fixed' };
|
||||||
|
} else {
|
||||||
|
this.timeOptions.mode = this.mode = { key: Object.create(this.timeContext.clock()).key};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.independentTCEnabled) {
|
||||||
|
this.registerIndependentTimeOffsets();
|
||||||
|
}
|
||||||
|
},
|
||||||
toggleIndependentTC() {
|
toggleIndependentTC() {
|
||||||
this.independentTCEnabled = !this.independentTCEnabled;
|
this.independentTCEnabled = !this.independentTCEnabled;
|
||||||
if (this.independentTCEnabled) {
|
if (this.independentTCEnabled) {
|
||||||
@ -213,10 +220,9 @@ export default {
|
|||||||
offsets = this.timeOptions.clockOffsets;
|
offsets = this.timeOptions.clockOffsets;
|
||||||
}
|
}
|
||||||
|
|
||||||
const key = this.openmct.objects.makeKeyString(this.domainObject.identifier);
|
const timeContext = this.openmct.time.getIndependentContext(this.keyString);
|
||||||
const timeContext = this.openmct.time.getIndependentContext(key);
|
|
||||||
if (!timeContext.hasOwnContext()) {
|
if (!timeContext.hasOwnContext()) {
|
||||||
this.unregisterIndependentTime = this.openmct.time.addIndependentContext(key, offsets, this.isFixed ? undefined : this.mode.key);
|
this.unregisterIndependentTime = this.openmct.time.addIndependentContext(this.keyString, offsets, this.isFixed ? undefined : this.mode.key);
|
||||||
} else {
|
} else {
|
||||||
if (this.isFixed) {
|
if (this.isFixed) {
|
||||||
timeContext.stopClock();
|
timeContext.stopClock();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Open MCT, Copyright (c) 2014-2021, United States Government
|
Open MCT, Copyright (c) 2014-2022, United States Government
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
as represented by the Administrator of the National Aeronautics and Space
|
||||||
Administration. All rights reserved.
|
Administration. All rights reserved.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2022, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2021, United States Government
|
* Open MCT, Copyright (c) 2014-2022, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
* Administration. All rights reserved.
|
* Administration. All rights reserved.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user