diff --git a/src/plugins/inspectorViews/elements/ElementItem.vue b/src/plugins/inspectorViews/elements/ElementItem.vue index f668f6b8b2..e2770b1646 100644 --- a/src/plugins/inspectorViews/elements/ElementItem.vue +++ b/src/plugins/inspectorViews/elements/ElementItem.vue @@ -45,6 +45,7 @@ :object-path="[elementObject, domainObject]" @context-click-active="setContextClickState" /> + diff --git a/src/plugins/inspectorViews/elements/ElementsPool.vue b/src/plugins/inspectorViews/elements/ElementsPool.vue index 06ee6de757..b465c9cbf0 100644 --- a/src/plugins/inspectorViews/elements/ElementsPool.vue +++ b/src/plugins/inspectorViews/elements/ElementsPool.vue @@ -42,7 +42,11 @@ :allow-drop="allowDrop" @dragstart-custom="moveFrom(index)" @drop-custom="moveTo(index)" - /> + > + +
  • No contained elements
    diff --git a/src/plugins/inspectorViews/elements/ElementsViewProvider.js b/src/plugins/inspectorViews/elements/ElementsViewProvider.js index ce9748861a..dc66f3a3b1 100644 --- a/src/plugins/inspectorViews/elements/ElementsViewProvider.js +++ b/src/plugins/inspectorViews/elements/ElementsViewProvider.js @@ -29,6 +29,7 @@ export default function ElementsViewProvider(openmct) { key: 'elementsView', name: 'Elements', canView: function (selection) { + // TODO - only use this view provider if another custom provider has not been applied const hasValidSelection = selection?.length; const isOverlayPlot = selection?.[0]?.[0]?.context?.item?.type === 'telemetry.plot.overlay'; diff --git a/src/plugins/timeline/TimelineElementsContent.vue b/src/plugins/timeline/TimelineElementsContent.vue new file mode 100644 index 0000000000..4c38750e1b --- /dev/null +++ b/src/plugins/timeline/TimelineElementsContent.vue @@ -0,0 +1,82 @@ + + diff --git a/src/plugins/timeline/TimelineElementsPool.vue b/src/plugins/timeline/TimelineElementsPool.vue new file mode 100644 index 0000000000..43c9e3df2a --- /dev/null +++ b/src/plugins/timeline/TimelineElementsPool.vue @@ -0,0 +1,21 @@ + + diff --git a/src/plugins/timeline/TimelineElementsViewProvider.js b/src/plugins/timeline/TimelineElementsViewProvider.js new file mode 100644 index 0000000000..73b5023915 --- /dev/null +++ b/src/plugins/timeline/TimelineElementsViewProvider.js @@ -0,0 +1,76 @@ +/***************************************************************************** + * Open MCT, Copyright (c) 2014-2024, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * 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 + * http://www.apache.org/licenses/LICENSE-2.0. + * + * 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. + * + * Open MCT includes source code licensed under additional open source + * licenses. See the Open Source Licenses file (LICENSES.md) included with + * this source code distribution or the Licensing information page available + * at runtime from the About dialog for additional information. + *****************************************************************************/ + +import mount from 'utils/mount'; + +import TimelineElementsPool from './TimelineElementsPool.vue'; + +export default function TimelineElementsViewProvider(openmct) { + return { + key: 'timelineElementsView', + name: 'Elements', + canView: function (selection) { + return selection?.[0]?.[0]?.context?.item?.type === 'time-strip'; + }, + view: function (selection) { + let _destroy = null; + + const domainObject = selection?.[0]?.[0]?.context?.item; + + return { + show: function (element) { + const { destroy } = mount( + { + el: element, + components: { + TimelineElementsPool + }, + provide: { + openmct, + domainObject + }, + template: `` + }, + { + app: openmct.app, + element + } + ); + _destroy = destroy; + }, + showTab: function (isEditing) { + const hasComposition = Boolean(domainObject && openmct.composition.get(domainObject)); + + return hasComposition && isEditing; + }, + priority: function () { + return openmct.priority.HIGH - 1; + }, + destroy: function () { + if (_destroy) { + _destroy(); + } + } + }; + } + }; +} diff --git a/src/plugins/timeline/TimelineObjectView.vue b/src/plugins/timeline/TimelineObjectView.vue index 7d3db098d5..e1afbc3035 100644 --- a/src/plugins/timeline/TimelineObjectView.vue +++ b/src/plugins/timeline/TimelineObjectView.vue @@ -32,7 +32,8 @@ :hide-button="!item.isEventTelemetry" :button-click-on="enableExtendEventLines" :button-click-off="disableExtendEventLines" - :style="[{ 'flex-basis': sizeString }]" + :class="sizeClass" + :style="sizeStyle" >