mirror of
https://github.com/nasa/openmct.git
synced 2025-06-01 23:20:50 +00:00
Remove the priority for imagerytimestripviewprovider and reduce the priority for eventtimelineviewprovider to HIGH.
Also add a condition to the eventtimelineview to reject objects that have imagery (this is to promote the imagerytimestripview to handle those objets)
This commit is contained in:
parent
9e68514b27
commit
1ced12d22f
@ -34,7 +34,10 @@ export default function EventTimestripViewProvider(openmct, extendedLinesBus) {
|
|||||||
const hasDomain = metadata.valuesForHints(['domain']).length > 0;
|
const hasDomain = metadata.valuesForHints(['domain']).length > 0;
|
||||||
const hasNoRange = !metadata.valuesForHints(['range'])?.length;
|
const hasNoRange = !metadata.valuesForHints(['range'])?.length;
|
||||||
|
|
||||||
return hasDomain && hasNoRange;
|
// for the moment, let's also exclude telemetry with images
|
||||||
|
const hasNoImages = !metadata.valuesForHints(['image']).length;
|
||||||
|
|
||||||
|
return hasDomain && hasNoRange && hasNoImages;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -42,7 +45,8 @@ export default function EventTimestripViewProvider(openmct, extendedLinesBus) {
|
|||||||
name: 'Event Timeline View',
|
name: 'Event Timeline View',
|
||||||
cssClass: 'icon-event',
|
cssClass: 'icon-event',
|
||||||
priority: function () {
|
priority: function () {
|
||||||
return 6000; // big number!
|
// We want this to be higher priority than the TelemetryTableView
|
||||||
|
return openmct.priority.HIGH;
|
||||||
},
|
},
|
||||||
canView: function (domainObject, objectPath) {
|
canView: function (domainObject, objectPath) {
|
||||||
const isChildOfTimeStrip = objectPath.some((object) => object.type === 'time-strip');
|
const isChildOfTimeStrip = objectPath.some((object) => object.type === 'time-strip');
|
||||||
|
@ -39,9 +39,6 @@ export default function ImageryTimestripViewProvider(openmct) {
|
|||||||
key: type,
|
key: type,
|
||||||
name: 'Imagery Timestrip View',
|
name: 'Imagery Timestrip View',
|
||||||
cssClass: 'icon-image',
|
cssClass: 'icon-image',
|
||||||
priority: function () {
|
|
||||||
return 7000; // big number!
|
|
||||||
},
|
|
||||||
canView: function (domainObject, objectPath) {
|
canView: function (domainObject, objectPath) {
|
||||||
let isChildOfTimeStrip = objectPath.find((object) => object.type === 'time-strip');
|
let isChildOfTimeStrip = objectPath.find((object) => object.type === 'time-strip');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user