Compare commits

..

6 Commits

Author SHA1 Message Date
Khalid Adil
7a0041b663 Add static root plugin files 2022-01-28 11:43:15 -06:00
Shefali Joshi
44f5372c31 fix typo when using fallback template (#4784) 2022-01-26 13:34:22 -08:00
Shefali Joshi
2f292fbd07 Follow domain object changes for Independent time conductor (#4783)
* Track if domain object changes when independent time conductor is in use.
2022-01-26 13:04:47 -08:00
Andrew Henry
205dc67809 Observe changes to sub-objects in flexible layouts. (#4780)
* Get child of flex layout as mutable if possible

* Fix bug when no default notebook defined
2022-01-25 23:22:42 -08:00
Scott Bell
169c23dbcc update copyright (#4775) 2022-01-25 12:27:27 -08:00
Shefali Joshi
457cd42987 Update version number (#4759) 2022-01-20 18:57:05 -08:00
13 changed files with 61 additions and 82 deletions

View File

@@ -2,7 +2,7 @@ version: 2.1
executors:
pw-focal-development:
docker:
- image: mcr.microsoft.com/playwright:v1.18.1-focal
- image: mcr.microsoft.com/playwright:v1.18.0-focal
environment:
NODE_ENV: development # Needed to ensure 'dist' folder created and devDependencies installed
parameters:

View File

@@ -1,5 +1,5 @@
<!--- 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. Note: this does not work on PRs which target release branches -->
Closes: <!--- Insert Issue Number(s) this PR addresses. Start by typing # will open a dropdown of recent issues. -->
### Describe your changes:
<!--- Describe your changes and add any comments about your approach either here or inline if code comments aren't added -->

View File

@@ -10,7 +10,6 @@ updates:
- "type:maintenance"
- "dependencies"
- "pr:e2e"
- "pr:daveit"
allow:
- dependency-name: "*eslint*"
- dependency-name: "*karma*"
@@ -26,4 +25,4 @@ updates:
labels:
- "type:maintenance"
- "dependencies"
- "pr:daveit"
- "prcop:disable"

View File

@@ -15,8 +15,8 @@ jobs:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: "nasa",
repo: "openmct",
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Started e2e Run. Follow along: https://github.com/nasa/openmct/actions/runs/' + context.runId
})
- uses: actions/checkout@v2
@@ -37,8 +37,8 @@ jobs:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: "nasa",
repo: "openmct",
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Success ✅ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
})
- name: Test failure
@@ -48,7 +48,7 @@ jobs:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: "nasa",
repo: "openmct",
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Failure ❌ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
})

View File

@@ -15,5 +15,5 @@
}
}
],
"disableWord": "pr:daveit"
"disableWord": "prcop:disable"
}

View File

@@ -195,6 +195,7 @@
));
openmct.install(openmct.plugins.Clock({ enableClockIndicator: true }));
openmct.install(openmct.plugins.Timer());
openmct.install(openmct.plugins.StaticRootPlugin('root', './dist/static-root.json'));
openmct.start();
</script>
</html>

View File

@@ -1,12 +1,12 @@
{
"name": "openmct",
"version": "1.8.5-SNAPSHOT",
"version": "1.8.4",
"description": "The Open MCT core platform",
"devDependencies": {
"@braintree/sanitize-url": "^5.0.2",
"@percy/cli": "^1.0.0-beta.73",
"@percy/playwright": "^1.0.1",
"@playwright/test": "^1.18.1",
"@playwright/test": "^1.18.0",
"allure-playwright": "^2.0.0-beta.14",
"angular": ">=1.8.0",
"angular-route": "1.4.14",
@@ -20,7 +20,7 @@
"d3-scale": "1.0.x",
"d3-selection": "1.3.x",
"eslint": "7.0.0",
"eslint-plugin-playwright": "0.8.0",
"eslint-plugin-playwright": "0.7.1",
"eslint-plugin-vue": "^7.5.0",
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
"eventemitter3": "^1.2.0",
@@ -36,7 +36,7 @@
"istanbul-instrumenter-loader": "^3.0.1",
"jasmine-core": "^4.0.0",
"jsdoc": "^3.3.2",
"karma": "6.3.13",
"karma": "6.3.11",
"karma-chrome-launcher": "3.1.0",
"karma-cli": "2.0.0",
"karma-coverage": "2.1.0",
@@ -58,7 +58,7 @@
"moment-timezone": "0.5.28",
"node-bourbon": "^4.2.3",
"painterro": "^1.2.56",
"playwright": "^1.18.1",
"playwright": "^1.18.0",
"plotly.js-basic-dist": "^2.5.0",
"plotly.js-gl2d-dist": "^2.5.0",
"printj": "^1.2.1",
@@ -73,7 +73,7 @@
"uuid": "^3.3.3",
"v8-compile-cache": "^1.1.0",
"vue": "2.5.6",
"vue-eslint-parser": "8.2.0",
"vue-eslint-parser": "8.0.1",
"vue-loader": "15.9.8",
"vue-template-compiler": "2.5.6",
"webpack": "^5.65.0",
@@ -84,8 +84,8 @@
"zepto": "^1.2.0"
},
"scripts": {
"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": "rm -rf ./dist /node_modules; rm package-lock.json",
"clean-test-lint": "npm run clean; npm install ; npm run test; npm run lint",
"start": "node app.js",
"lint": "eslint platform example src --ext .js,.vue openmct.js",
"lint:fix": "eslint platform example src --ext .js,.vue openmct.js --fix",
@@ -114,7 +114,7 @@
"url": "https://github.com/nasa/openmct.git"
},
"engines": {
"node": ">=12.20.1 <15.0.0"
"node": ">=12.0.1 <15.0.0"
},
"author": "",
"license": "Apache-2.0",

View File

@@ -65,7 +65,6 @@ export default {
data() {
return {
hideOptions: true,
showFilteredOptions: false,
optionIndex: 0,
field: this.model.value
};
@@ -73,24 +72,16 @@ export default {
computed: {
filteredOptions() {
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.map((option, index) => {
return {
optionId: index,
name: option
};
});
return options
.filter(option => {
return option.toLowerCase().indexOf(this.field.toLowerCase()) >= 0;
}).map((option, index) => {
return {
optionId: index,
name: option
};
});
}
},
watch: {
@@ -140,12 +131,11 @@ export default {
this.hideOptions = true;
this.field = string;
},
showOptions() {
showOptions(string) {
this.hideOptions = false;
this.optionIndex = 0;
},
keyDown($event) {
this.showFilteredOptions = true;
if (this.filteredOptions) {
let keyCode = $event.keyCode;
switch (keyCode) {
@@ -165,14 +155,11 @@ export default {
},
inputClicked() {
this.autocompleteInputElement.select();
this.showOptions();
this.showOptions(this.autocompleteInputElement.value);
},
arrowClicked() {
// if the user clicked the arrow, we want
// to show them all the options
this.showFilteredOptions = false;
this.autocompleteInputElement.select();
this.showOptions();
this.showOptions('');
},
optionMouseover(optionId) {
this.optionIndex = optionId;

View File

@@ -209,7 +209,18 @@ export default {
},
layoutItems: {
handler(value) {
this.updateGrid();
let wMax = this.$el.clientWidth / this.gridSize[0];
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
}
@@ -222,8 +233,6 @@ export default {
this.composition.on('remove', this.removeChild);
this.composition.load();
this.gridDimensions = [this.$el.offsetWidth, this.$el.scrollHeight];
this.watchDisplayResize();
},
destroyed: function () {
this.openmct.selection.off('change', this.setSelection);
@@ -231,25 +240,6 @@ export default {
this.composition.off('remove', this.removeChild);
},
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) {
this.addItem(itemType + '-view', element);
},
@@ -414,12 +404,8 @@ export default {
}
},
containsObject(identifier) {
if ('composition' in this.domainObject) {
return this.domainObject.composition
.some(childId => this.openmct.objects.areIdsEqual(childId, identifier));
}
return false;
return _.get(this.domainObject, 'composition')
.some(childId => this.openmct.objects.areIdsEqual(childId, identifier));
},
handleDragOver($event) {
if (this.domainObject.locked) {
@@ -508,7 +494,7 @@ export default {
}
},
removeFromComposition(keyString) {
let composition = this.domainObject.composition ? this.domainObject.composition : [];
let composition = _.get(this.domainObject, 'composition');
composition = composition.filter(identifier => {
return this.openmct.objects.makeKeyString(identifier) !== keyString;
});

View File

@@ -702,15 +702,12 @@ export default {
focusedIndex = matchIndex > -1 ? matchIndex : this.imageHistory.length - 1;
}
const isLastImageFocused = focusedIndex === this.imageHistory.length - 1;
if (!(this.isPaused || thumbnailClick) && isLastImageFocused) {
if (!(this.isPaused || thumbnailClick)
|| focusedIndex === this.imageHistory.length - 1) {
delete this.previousFocusedImage;
}
}
console.log('old index', this.focusedImageIndex);
console.log('new index', focusedIndex);
this.focusedImageIndex = focusedIndex;
//TODO: do we even need this anymore?
@@ -718,9 +715,6 @@ export default {
this.nextImageIndex = focusedIndex;
//this could happen if bounds changes
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;
}

View File

@@ -32,6 +32,8 @@ define([
}
});
console.log(JSON.parse(objectString));
return JSON.parse(objectString);
}

1
static-root.json Normal file
View File

@@ -0,0 +1 @@
{"openmct":{"c1b7f449-459e-4f37-ac00-07b91936d079":{"identifier":{"key":"c1b7f449-459e-4f37-ac00-07b91936d079","namespace":""},"name":"A Folder","type":"folder","composition":[{"key":"3e1b49d7-4b95-47a6-9744-93d18c1f7d86","namespace":""},{"key":"da052eaf-1631-48e4-944f-c4688276181b","namespace":""}],"modified":1641506166404,"location":"mine","persisted":1641506166404},"3e1b49d7-4b95-47a6-9744-93d18c1f7d86":{"identifier":{"key":"3e1b49d7-4b95-47a6-9744-93d18c1f7d86","namespace":""},"name":"Test Clock","type":"clock","configuration":{"baseFormat":"YYYY/MM/DD hh:mm:ss","use24":"clock12","timezone":"UTC"},"modified":1641506137466,"location":"c1b7f449-459e-4f37-ac00-07b91936d079","persisted":1641506137466},"da052eaf-1631-48e4-944f-c4688276181b":{"identifier":{"key":"da052eaf-1631-48e4-944f-c4688276181b","namespace":""},"name":"B Hyperlink","type":"hyperlink","displayFormat":"link","linkTarget":"_self","url":"www.google.com","displayText":"Google","modified":1641506166402,"location":"c1b7f449-459e-4f37-ac00-07b91936d079","persisted":1641506166402}},"rootId":"c1b7f449-459e-4f37-ac00-07b91936d079"}

View File

@@ -1,5 +1,6 @@
const { merge } = require('webpack-merge');
const common = require('./webpack.common');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const path = require('path');
const webpack = require('webpack');
@@ -14,6 +15,14 @@ module.exports = merge(common, {
plugins: [
new webpack.DefinePlugin({
__OPENMCT_ROOT_RELATIVE__: '"dist/"'
}),
new CopyWebpackPlugin({
patterns: [
{
from: './static-root.json',
to: '.'
}
]
})
],
devtool: 'eval-source-map'