Remove references to ExtendedLinesBus

This commit is contained in:
Shefali 2025-03-18 11:39:41 -07:00
parent 39ce53f561
commit 25ca7d4321
9 changed files with 10 additions and 78 deletions

View File

@ -235,7 +235,7 @@
openmct.install(openmct.plugins.Timelist());
openmct.install(openmct.plugins.BarChart());
openmct.install(openmct.plugins.ScatterPlot());
openmct.install(openmct.plugins.EventTimestripPlugin(timeLinePlugin.extendedLinesBus));
openmct.install(openmct.plugins.EventTimestripPlugin(timeLinePlugin));
document.addEventListener('DOMContentLoaded', function () {
openmct.start();
});

View File

@ -23,7 +23,7 @@ import mount from 'utils/mount';
import EventTimelineView from './components/EventTimelineView.vue';
export default function EventTimestripViewProvider(openmct, extendedLinesBus) {
export default function EventTimestripViewProvider(openmct) {
const type = 'event.time-line.view';
function hasEventTelemetry(domainObject) {
@ -72,8 +72,7 @@ export default function EventTimestripViewProvider(openmct, extendedLinesBus) {
provide: {
openmct: openmct,
domainObject: domainObject,
objectPath: objectPath,
extendedLinesBus
objectPath: objectPath
},
template: '<event-timeline-view ref="root"></event-timeline-view>'
},

View File

@ -63,7 +63,7 @@ const AXES_PADDING = 20;
export default {
components: { SwimLane },
mixins: [eventData, tooltipHelpers],
inject: ['openmct', 'domainObject', 'objectPath', 'extendedLinesBus'],
inject: ['openmct', 'domainObject', 'objectPath'],
setup() {
const domainObject = inject('domainObject');
const objectPath = inject('objectPath');

View File

@ -23,9 +23,9 @@
import EventInspectorViewProvider from './EventInspectorViewProvider.js';
import EventTimelineViewProvider from './EventTimelineViewProvider.js';
export default function plugin(extendedLinesBus) {
export default function plugin() {
return function install(openmct) {
openmct.objectViews.addProvider(new EventTimelineViewProvider(openmct, extendedLinesBus));
openmct.objectViews.addProvider(new EventTimelineViewProvider(openmct));
openmct.inspectorViews.addProvider(new EventInspectorViewProvider(openmct));
};
}

View File

@ -1,55 +0,0 @@
/*****************************************************************************
* 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.
*****************************************************************************/
export default class ExtendedLinesBus extends EventTarget {
updateExtendedLines(keyString, lines) {
this.dispatchEvent(
new CustomEvent('update-extended-lines', {
detail: { keyString, lines }
})
);
}
disableExtendEventLines(keyString) {
this.dispatchEvent(
new CustomEvent('disable-extended-lines', {
detail: keyString
})
);
}
enableExtendEventLines(keyString) {
this.dispatchEvent(
new CustomEvent('enable-extended-lines', {
detail: keyString
})
);
}
updateHoverExtendEventLine(keyString, id) {
this.dispatchEvent(
new CustomEvent('update-extended-hover', {
detail: { keyString, id }
})
);
}
}

View File

@ -67,10 +67,6 @@ export default {
item: {
type: Object,
required: true
},
extendedLinesBus: {
type: Object,
required: true
}
},
setup() {

View File

@ -83,7 +83,7 @@ export default {
SwimLane,
ExtendedLinesOverlay
},
inject: ['openmct', 'domainObject', 'path', 'composition', 'extendedLinesBus'],
inject: ['openmct', 'domainObject', 'path', 'composition'],
setup() {
const domainObject = inject('domainObject');
const path = inject('path');

View File

@ -24,7 +24,7 @@ import mount from 'utils/mount';
import TimelineViewLayout from './TimelineViewLayout.vue';
export default function TimelineViewProvider(openmct, extendedLinesBus) {
export default function TimelineViewProvider(openmct) {
return {
key: 'time-strip.view',
name: 'TimeStrip',
@ -52,8 +52,7 @@ export default function TimelineViewProvider(openmct, extendedLinesBus) {
openmct,
domainObject,
path: objectPath,
composition: openmct.composition.get(domainObject),
extendedLinesBus
composition: openmct.composition.get(domainObject)
},
template: '<timeline-view-layout></timeline-view-layout>'
},

View File

@ -20,15 +20,10 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
import ExtendedLinesBus from './ExtendedLinesBus.js';
import TimelineCompositionPolicy from './TimelineCompositionPolicy.js';
import timelineInterceptor from './timelineInterceptor.js';
import TimelineViewProvider from './TimelineViewProvider.js';
const extendedLinesBus = new ExtendedLinesBus();
export { extendedLinesBus };
export default function () {
function install(openmct) {
openmct.types.addType('time-strip', {
@ -48,10 +43,8 @@ export default function () {
timelineInterceptor(openmct);
openmct.composition.addPolicy(new TimelineCompositionPolicy(openmct).allow);
openmct.objectViews.addProvider(new TimelineViewProvider(openmct, extendedLinesBus));
openmct.objectViews.addProvider(new TimelineViewProvider(openmct));
}
install.extendedLinesBus = extendedLinesBus;
return install;
}