mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 07:38:15 +00:00
Add canView logic for telemetry and composition (#4426)
* Add canView logic for telemtry and compositon * AUse PriorityAPI to set high priority for LADTable views * Changed high to constant case Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
This commit is contained in:
@ -31,7 +31,11 @@ export default class LADTableViewProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
canView(domainObject) {
|
canView(domainObject) {
|
||||||
return domainObject.type === 'LadTable';
|
const supportsComposition = this.openmct.composition.get(domainObject) !== undefined;
|
||||||
|
const providesTelemetry = this.openmct.telemetry.isTelemetryObject(domainObject);
|
||||||
|
|
||||||
|
return domainObject.type === 'LadTable'
|
||||||
|
|| (providesTelemetry && supportsComposition);
|
||||||
}
|
}
|
||||||
|
|
||||||
canEdit(domainObject) {
|
canEdit(domainObject) {
|
||||||
@ -43,6 +47,6 @@ export default class LADTableViewProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
priority(domainObject) {
|
priority(domainObject) {
|
||||||
return 1;
|
return this.openmct.priority.HIGH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user