Optionally provide list of object types to show as views rather than telemetry in Display Layouts (#2339)
* Optionally provide list of object types to show as views rather than alpha numerics to display layouts * Only make table view available for objects that have telemetry to show
This commit is contained in:
committed by
Deep Tailor
parent
57efef3160
commit
bc5e300ba9
@@ -32,12 +32,20 @@ define([
|
||||
Vue
|
||||
) {
|
||||
function TelemetryTableViewProvider(openmct) {
|
||||
function hasTelemetry(domainObject) {
|
||||
if (!domainObject.hasOwnProperty('telemetry')) {
|
||||
return false;
|
||||
}
|
||||
let metadata = openmct.telemetry.getMetadata(domainObject);
|
||||
return metadata.values().length > 0;
|
||||
}
|
||||
return {
|
||||
key: 'table',
|
||||
name: 'Telemetry Table',
|
||||
cssClass: 'icon-tabular-realtime',
|
||||
canView(domainObject) {
|
||||
return domainObject.type === 'table' || domainObject.hasOwnProperty('telemetry');
|
||||
return domainObject.type === 'table' ||
|
||||
hasTelemetry(domainObject)
|
||||
},
|
||||
canEdit(domainObject) {
|
||||
return domainObject.type === 'table';
|
||||
|
||||
Reference in New Issue
Block a user