From 8eba3a81f3b0f406faead4725011b5688467ea9a Mon Sep 17 00:00:00 2001 From: Michael Rogers Date: Mon, 6 Dec 2021 13:56:17 -0600 Subject: [PATCH] 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 --- src/plugins/LADTable/LADTableViewProvider.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/LADTable/LADTableViewProvider.js b/src/plugins/LADTable/LADTableViewProvider.js index dfccce7e76..a1255695e6 100644 --- a/src/plugins/LADTable/LADTableViewProvider.js +++ b/src/plugins/LADTable/LADTableViewProvider.js @@ -31,7 +31,11 @@ export default class LADTableViewProvider { } 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) { @@ -43,6 +47,6 @@ export default class LADTableViewProvider { } priority(domainObject) { - return 1; + return this.openmct.priority.HIGH; } }