mirror of
https://github.com/nasa/openmct.git
synced 2025-06-06 01:11:41 +00:00
2.0.1 release merged into master (#4971)
* Correctly use creatable attribute and persistability when working with domainObjects (#4898) (#4936) * making move action location check persistability * adding persistence check instead of creatability for styles * added check for link action to make sure parent is persistable * debug * adding parent to link action and move action form location controls so they can be used in the form * adding parent persistability check for duplicate * updating multilple actions appliesTo methods to check for persistability * updated the tree to not require an initial selection if being used in a form * remove noneditable folder plugin * added persistence check for the parent, in the create wizard * minor name change * removing noneditabl folder from default plugins as well * checking the correct parent for persistability in create wizard * importing file-saver correctly * updated tests for import as json * changes addressing PR review: using consts, removing comments, removing unneccessary code Co-authored-by: Scott Bell <scott@traclabs.com> Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov> Co-authored-by: Scott Bell <scott@traclabs.com> * Fix display layout items getting cut off on the bottom (like plots) (#4903) * Fix display layout items getting cut off on the bottom (like plots) Also fix Vue warnings * Add partial e2e test for this bug fix. WIP. * Address review comments Co-authored-by: John Hill <john.c.hill@nasa.gov> * Link action fix (#4945) * handling edge case for linking a root item * added location to viper plans (couch search folder) set to ROOT, added a check to remove action for alias (so you can remove linked nonpersistable items) * added check for no parent in remove action (which means it is a root item) * updating test * Update time conductor inputs realtime (#4877) * Update time conductor inputs realtime * Update moveObjects.e2e.spec.js * Update importAsJson.e2e.spec.js * Update default.spec.js Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov> Co-authored-by: Scott Bell <scott@traclabs.com> Co-authored-by: John Hill <john.c.hill@nasa.gov>
This commit is contained in:
parent
0f9e727675
commit
594f9d3e9a
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "openmct",
|
"name": "openmct",
|
||||||
"version": "2.0.1-SNAPSHOT",
|
"version": "2.0.1",
|
||||||
"description": "The Open MCT core platform",
|
"description": "The Open MCT core platform",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/eslint-parser": "7.16.3",
|
"@babel/eslint-parser": "7.16.3",
|
||||||
|
@ -15,7 +15,8 @@ export default function (folderName, couchPlugin, searchFilter) {
|
|||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
identifier,
|
identifier,
|
||||||
type: 'folder',
|
type: 'folder',
|
||||||
name: folderName || "CouchDB Documents"
|
name: folderName || "CouchDB Documents",
|
||||||
|
location: 'ROOT'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,8 @@ describe('the plugin', function () {
|
|||||||
expect(object).toEqual({
|
expect(object).toEqual({
|
||||||
identifier,
|
identifier,
|
||||||
type: 'folder',
|
type: 'folder',
|
||||||
name: "CouchDB Documents"
|
name: 'CouchDB Documents',
|
||||||
|
location: 'ROOT'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -166,7 +166,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
gridSize() {
|
gridSize() {
|
||||||
return this.domainObject.configuration.layoutGrid;
|
return this.domainObject.configuration.layoutGrid.map(Number);
|
||||||
},
|
},
|
||||||
layoutItems() {
|
layoutItems() {
|
||||||
return this.domainObject.configuration.items;
|
return this.domainObject.configuration.items;
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
<template v-for="(container, index) in containers">
|
<template v-for="(container, index) in containers">
|
||||||
<drop-hint
|
<drop-hint
|
||||||
v-if="index === 0 && containers.length > 1"
|
v-if="index === 0 && containers.length > 1"
|
||||||
:key="index"
|
:key="`hint-top-${container.id}`"
|
||||||
class="c-fl-frame__drop-hint"
|
class="c-fl-frame__drop-hint"
|
||||||
:index="-1"
|
:index="-1"
|
||||||
:allow-drop="allowContainerDrop"
|
:allow-drop="allowContainerDrop"
|
||||||
@ -51,7 +51,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<container-component
|
<container-component
|
||||||
:key="container.id"
|
:key="`component-${container.id}`"
|
||||||
class="c-fl__container"
|
class="c-fl__container"
|
||||||
:index="index"
|
:index="index"
|
||||||
:container="container"
|
:container="container"
|
||||||
@ -66,7 +66,7 @@
|
|||||||
|
|
||||||
<resize-handle
|
<resize-handle
|
||||||
v-if="index !== (containers.length - 1)"
|
v-if="index !== (containers.length - 1)"
|
||||||
:key="index"
|
:key="`handle-${container.id}`"
|
||||||
:index="index"
|
:index="index"
|
||||||
:orientation="rowsLayout ? 'vertical' : 'horizontal'"
|
:orientation="rowsLayout ? 'vertical' : 'horizontal'"
|
||||||
:is-editing="isEditing"
|
:is-editing="isEditing"
|
||||||
@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
<drop-hint
|
<drop-hint
|
||||||
v-if="containers.length > 1"
|
v-if="containers.length > 1"
|
||||||
:key="index"
|
:key="`hint-bottom-${container.id}`"
|
||||||
class="c-fl-frame__drop-hint"
|
class="c-fl-frame__drop-hint"
|
||||||
:index="index"
|
:index="index"
|
||||||
:allow-drop="allowContainerDrop"
|
:allow-drop="allowContainerDrop"
|
||||||
|
@ -90,6 +90,17 @@ export default class LinkAction {
|
|||||||
|
|
||||||
validate(currentParent) {
|
validate(currentParent) {
|
||||||
return (data) => {
|
return (data) => {
|
||||||
|
|
||||||
|
// default current parent to ROOT, if it's undefined, then it's a root level item
|
||||||
|
if (currentParent === undefined) {
|
||||||
|
currentParent = {
|
||||||
|
identifier: {
|
||||||
|
key: 'ROOT',
|
||||||
|
namespace: ''
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const parentCandidate = data.value[0];
|
const parentCandidate = data.value[0];
|
||||||
const currentParentKeystring = this.openmct.objects.makeKeyString(currentParent.identifier);
|
const currentParentKeystring = this.openmct.objects.makeKeyString(currentParent.identifier);
|
||||||
const parentCandidateKeystring = this.openmct.objects.makeKeyString(parentCandidate.identifier);
|
const parentCandidateKeystring = this.openmct.objects.makeKeyString(parentCandidate.identifier);
|
||||||
|
@ -92,23 +92,33 @@ export default class RemoveAction {
|
|||||||
this.openmct.editor.save();
|
this.openmct.editor.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
const parentKeyString = this.openmct.objects.makeKeyString(parent.identifier);
|
if (!this.isAlias(child, parent)) {
|
||||||
const isAlias = parentKeyString !== child.location;
|
|
||||||
|
|
||||||
if (!isAlias) {
|
|
||||||
this.openmct.objects.mutate(child, 'location', null);
|
this.openmct.objects.mutate(child, 'location', null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
appliesTo(objectPath) {
|
isAlias(child, parent) {
|
||||||
let parent = objectPath[1];
|
if (parent === undefined) {
|
||||||
let parentType = parent && this.openmct.types.get(parent.type);
|
// then it's a root item, not an alias
|
||||||
let child = objectPath[0];
|
return false;
|
||||||
let locked = child.locked ? child.locked : parent && parent.locked;
|
}
|
||||||
let isEditing = this.openmct.editor.isEditing();
|
|
||||||
let isPersistable = this.openmct.objects.isPersistable(child.identifier);
|
|
||||||
|
|
||||||
if (locked || !isPersistable) {
|
const parentKeyString = this.openmct.objects.makeKeyString(parent.identifier);
|
||||||
|
const childLocation = child.location;
|
||||||
|
|
||||||
|
return childLocation !== parentKeyString;
|
||||||
|
}
|
||||||
|
|
||||||
|
appliesTo(objectPath) {
|
||||||
|
const parent = objectPath[1];
|
||||||
|
const parentType = parent && this.openmct.types.get(parent.type);
|
||||||
|
const child = objectPath[0];
|
||||||
|
const locked = child.locked ? child.locked : parent && parent.locked;
|
||||||
|
const isEditing = this.openmct.editor.isEditing();
|
||||||
|
const isPersistable = this.openmct.objects.isPersistable(child.identifier);
|
||||||
|
const isAlias = this.isAlias(child, parent);
|
||||||
|
|
||||||
|
if (locked || (!isPersistable && !isAlias)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,10 +32,12 @@
|
|||||||
<div class="c-conductor__time-bounds">
|
<div class="c-conductor__time-bounds">
|
||||||
<conductor-inputs-fixed
|
<conductor-inputs-fixed
|
||||||
v-if="isFixed"
|
v-if="isFixed"
|
||||||
|
:input-bounds="viewBounds"
|
||||||
@updated="saveFixedOffsets"
|
@updated="saveFixedOffsets"
|
||||||
/>
|
/>
|
||||||
<conductor-inputs-realtime
|
<conductor-inputs-realtime
|
||||||
v-else
|
v-else
|
||||||
|
:input-bounds="viewBounds"
|
||||||
@updated="saveClockOffsets"
|
@updated="saveClockOffsets"
|
||||||
/>
|
/>
|
||||||
<ConductorModeIcon class="c-conductor__mode-icon" />
|
<ConductorModeIcon class="c-conductor__mode-icon" />
|
||||||
|
@ -72,6 +72,12 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
inputBounds: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -99,6 +105,12 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
keyString() {
|
keyString() {
|
||||||
this.setTimeContext();
|
this.setTimeContext();
|
||||||
|
},
|
||||||
|
inputBounds: {
|
||||||
|
handler(newBounds) {
|
||||||
|
this.handleNewBounds(newBounds);
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
ref="startOffset"
|
ref="startOffset"
|
||||||
class="c-button c-conductor__delta-button"
|
class="c-button c-conductor__delta-button"
|
||||||
title="Set the time offset after now"
|
title="Set the time offset after now"
|
||||||
@click.prevent="showTimePopupStart"
|
@click.prevent.stop="showTimePopupStart"
|
||||||
>
|
>
|
||||||
{{ offsets.start }}
|
{{ offsets.start }}
|
||||||
</button>
|
</button>
|
||||||
@ -61,7 +61,7 @@
|
|||||||
ref="endOffset"
|
ref="endOffset"
|
||||||
class="c-button c-conductor__delta-button"
|
class="c-button c-conductor__delta-button"
|
||||||
title="Set the time offset preceding now"
|
title="Set the time offset preceding now"
|
||||||
@click.prevent="showTimePopupEnd"
|
@click.prevent.stop="showTimePopupEnd"
|
||||||
>
|
>
|
||||||
{{ offsets.end }}
|
{{ offsets.end }}
|
||||||
</button>
|
</button>
|
||||||
@ -87,6 +87,12 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
inputBounds: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -119,6 +125,12 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
keyString() {
|
keyString() {
|
||||||
this.setTimeContext();
|
this.setTimeContext();
|
||||||
|
},
|
||||||
|
inputBounds: {
|
||||||
|
handler(newBounds) {
|
||||||
|
this.handleNewBounds(newBounds);
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -122,6 +122,9 @@
|
|||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
height: 0; // Chrome 73 overflow bug fix
|
height: 0; // Chrome 73 overflow bug fix
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
//To accommodate independent time conductor controls
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
.u-fills-container {
|
.u-fills-container {
|
||||||
// Expand component types that fill a container
|
// Expand component types that fill a container
|
||||||
|
Loading…
x
Reference in New Issue
Block a user