mirror of
https://github.com/nasa/openmct.git
synced 2025-05-31 22:50:49 +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",
|
||||
"version": "2.0.1-SNAPSHOT",
|
||||
"version": "2.0.1",
|
||||
"description": "The Open MCT core platform",
|
||||
"devDependencies": {
|
||||
"@babel/eslint-parser": "7.16.3",
|
||||
|
@ -15,7 +15,8 @@ export default function (folderName, couchPlugin, searchFilter) {
|
||||
return Promise.resolve({
|
||||
identifier,
|
||||
type: 'folder',
|
||||
name: folderName || "CouchDB Documents"
|
||||
name: folderName || "CouchDB Documents",
|
||||
location: 'ROOT'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,8 @@ describe('the plugin', function () {
|
||||
expect(object).toEqual({
|
||||
identifier,
|
||||
type: 'folder',
|
||||
name: "CouchDB Documents"
|
||||
name: 'CouchDB Documents',
|
||||
location: 'ROOT'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -166,7 +166,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
gridSize() {
|
||||
return this.domainObject.configuration.layoutGrid;
|
||||
return this.domainObject.configuration.layoutGrid.map(Number);
|
||||
},
|
||||
layoutItems() {
|
||||
return this.domainObject.configuration.items;
|
||||
|
@ -43,7 +43,7 @@
|
||||
<template v-for="(container, index) in containers">
|
||||
<drop-hint
|
||||
v-if="index === 0 && containers.length > 1"
|
||||
:key="index"
|
||||
:key="`hint-top-${container.id}`"
|
||||
class="c-fl-frame__drop-hint"
|
||||
:index="-1"
|
||||
:allow-drop="allowContainerDrop"
|
||||
@ -51,7 +51,7 @@
|
||||
/>
|
||||
|
||||
<container-component
|
||||
:key="container.id"
|
||||
:key="`component-${container.id}`"
|
||||
class="c-fl__container"
|
||||
:index="index"
|
||||
:container="container"
|
||||
@ -66,7 +66,7 @@
|
||||
|
||||
<resize-handle
|
||||
v-if="index !== (containers.length - 1)"
|
||||
:key="index"
|
||||
:key="`handle-${container.id}`"
|
||||
:index="index"
|
||||
:orientation="rowsLayout ? 'vertical' : 'horizontal'"
|
||||
:is-editing="isEditing"
|
||||
@ -77,7 +77,7 @@
|
||||
|
||||
<drop-hint
|
||||
v-if="containers.length > 1"
|
||||
:key="index"
|
||||
:key="`hint-bottom-${container.id}`"
|
||||
class="c-fl-frame__drop-hint"
|
||||
:index="index"
|
||||
:allow-drop="allowContainerDrop"
|
||||
|
@ -90,6 +90,17 @@ export default class LinkAction {
|
||||
|
||||
validate(currentParent) {
|
||||
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 currentParentKeystring = this.openmct.objects.makeKeyString(currentParent.identifier);
|
||||
const parentCandidateKeystring = this.openmct.objects.makeKeyString(parentCandidate.identifier);
|
||||
|
@ -92,23 +92,33 @@ export default class RemoveAction {
|
||||
this.openmct.editor.save();
|
||||
}
|
||||
|
||||
const parentKeyString = this.openmct.objects.makeKeyString(parent.identifier);
|
||||
const isAlias = parentKeyString !== child.location;
|
||||
|
||||
if (!isAlias) {
|
||||
if (!this.isAlias(child, parent)) {
|
||||
this.openmct.objects.mutate(child, 'location', null);
|
||||
}
|
||||
}
|
||||
|
||||
appliesTo(objectPath) {
|
||||
let parent = objectPath[1];
|
||||
let parentType = parent && this.openmct.types.get(parent.type);
|
||||
let child = objectPath[0];
|
||||
let locked = child.locked ? child.locked : parent && parent.locked;
|
||||
let isEditing = this.openmct.editor.isEditing();
|
||||
let isPersistable = this.openmct.objects.isPersistable(child.identifier);
|
||||
isAlias(child, parent) {
|
||||
if (parent === undefined) {
|
||||
// then it's a root item, not an alias
|
||||
return false;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -32,10 +32,12 @@
|
||||
<div class="c-conductor__time-bounds">
|
||||
<conductor-inputs-fixed
|
||||
v-if="isFixed"
|
||||
:input-bounds="viewBounds"
|
||||
@updated="saveFixedOffsets"
|
||||
/>
|
||||
<conductor-inputs-realtime
|
||||
v-else
|
||||
:input-bounds="viewBounds"
|
||||
@updated="saveClockOffsets"
|
||||
/>
|
||||
<ConductorModeIcon class="c-conductor__mode-icon" />
|
||||
|
@ -72,6 +72,12 @@ export default {
|
||||
default() {
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
inputBounds: {
|
||||
type: Object,
|
||||
default() {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -99,6 +105,12 @@ export default {
|
||||
watch: {
|
||||
keyString() {
|
||||
this.setTimeContext();
|
||||
},
|
||||
inputBounds: {
|
||||
handler(newBounds) {
|
||||
this.handleNewBounds(newBounds);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -22,7 +22,7 @@
|
||||
ref="startOffset"
|
||||
class="c-button c-conductor__delta-button"
|
||||
title="Set the time offset after now"
|
||||
@click.prevent="showTimePopupStart"
|
||||
@click.prevent.stop="showTimePopupStart"
|
||||
>
|
||||
{{ offsets.start }}
|
||||
</button>
|
||||
@ -61,7 +61,7 @@
|
||||
ref="endOffset"
|
||||
class="c-button c-conductor__delta-button"
|
||||
title="Set the time offset preceding now"
|
||||
@click.prevent="showTimePopupEnd"
|
||||
@click.prevent.stop="showTimePopupEnd"
|
||||
>
|
||||
{{ offsets.end }}
|
||||
</button>
|
||||
@ -87,6 +87,12 @@ export default {
|
||||
default() {
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
inputBounds: {
|
||||
type: Object,
|
||||
default() {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -119,6 +125,12 @@ export default {
|
||||
watch: {
|
||||
keyString() {
|
||||
this.setTimeContext();
|
||||
},
|
||||
inputBounds: {
|
||||
handler(newBounds) {
|
||||
this.handleNewBounds(newBounds);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -122,6 +122,9 @@
|
||||
flex: 1 1 auto;
|
||||
height: 0; // Chrome 73 overflow bug fix
|
||||
overflow: auto;
|
||||
//To accommodate independent time conductor controls
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.u-fills-container {
|
||||
// Expand component types that fill a container
|
||||
|
Loading…
x
Reference in New Issue
Block a user