mirror of
https://github.com/nasa/openmct.git
synced 2025-03-23 04:25:27 +00:00
added getTypes to types api, modifying which tabs are shown, working on annoatation tab
This commit is contained in:
parent
5be103ea72
commit
e1969585f9
@ -89,6 +89,17 @@ export default class TypeRegistry {
|
|||||||
get(typeKey) {
|
get(typeKey) {
|
||||||
return this.types[typeKey] || UNKNOWN_TYPE;
|
return this.types[typeKey] || UNKNOWN_TYPE;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* List all registered types.
|
||||||
|
* @returns {Type[]} all registered types
|
||||||
|
*/
|
||||||
|
getTypes() {
|
||||||
|
return Object.values(this.types);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Import legacy types.
|
||||||
|
* @param {TypeDefinition[]} types the types to import
|
||||||
|
*/
|
||||||
importLegacyTypes(types) {
|
importLegacyTypes(types) {
|
||||||
types
|
types
|
||||||
.filter((t) => this.get(t.key) === UNKNOWN_TYPE)
|
.filter((t) => this.get(t.key) === UNKNOWN_TYPE)
|
||||||
|
@ -91,6 +91,15 @@ export default function StylesInspectorViewProvider(openmct) {
|
|||||||
);
|
);
|
||||||
_destroy = destroy;
|
_destroy = destroy;
|
||||||
},
|
},
|
||||||
|
showTab: function () {
|
||||||
|
const objectSelection = selection?.[0];
|
||||||
|
const objectContext = objectSelection?.[0]?.context;
|
||||||
|
const layoutItem = objectContext?.layoutItem;
|
||||||
|
const domainObject = objectContext?.item;
|
||||||
|
const hasStyles = domainObject?.configuration?.objectStyles;
|
||||||
|
|
||||||
|
return layoutItem || hasStyles;
|
||||||
|
},
|
||||||
priority: function () {
|
priority: function () {
|
||||||
return openmct.priority.DEFAULT;
|
return openmct.priority.DEFAULT;
|
||||||
},
|
},
|
||||||
|
@ -28,6 +28,7 @@ export default class NotebookType {
|
|||||||
this.description = description;
|
this.description = description;
|
||||||
this.cssClass = icon;
|
this.cssClass = icon;
|
||||||
this.creatable = true;
|
this.creatable = true;
|
||||||
|
this.annotatable = true;
|
||||||
this.form = [
|
this.form = [
|
||||||
{
|
{
|
||||||
key: 'defaultSort',
|
key: 'defaultSort',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user