组件展示架构
|
*状态:*正在积极开发中。 *可用性:*在 StackPacks 2.0 功能标志后面。请参阅 自定义集成概述 以了解如何启用该功能。 本文件描述了当前的设计意图以及高层次的配置界面。 注意:尚未实现任何行为和功能。 由于该功能正在积极开发中;随着模型的发展,行为、架构和功能可能会发生变化。 |
ComponentPresentation
ComponentPresentation 定义了在给定模式和上下文中如何在 UI 中展示匹配的组件。
_type: ComponentPresentation
identifier: urn:...:component-presentation:<presentation-name>
mode: ["observability" | "security" | "all"]
binding:
_type: ComponentPresentationQueryBinding
query: string # Primitive STQL query used to match components
rank:
specificity: number # Higher values indicate more specific definitions
presentation:
icon: string # Optional icon (base64-encoded)
name: # Optional naming configuration
plural: string
singular: string
title: string
mainMenu: # Optional main menu entry
group: string # Name of an existing MainMenuGroup
rank: number # Optional override within the group
overview: # Optional overview page configuration
columns:
- _type: string # ViewTypeTableCol*
highlight: # Optional highlight page configuration
summary:
...
fields:
- _type: string # ComponentTypeField
fieldId: string
label:
title: string
helpBubbleText: string # Optional
valueExtractor:
_type: string
display:
_type: string
about:
_type: ComponentTypeAbout
fields:
- string
filter: # Optional overview filters
- _type: FilterField
name: string
tagField: string
标识符
标识符应遵循 SUSE® Observability 标识符(即 urn:…)格式。有关更多信息,请参阅 标识符 文档。
绑定
绑定决定了 ComponentPresentation 适用于哪些组件。
绑定会根据组件数据进行评估,必须简单高效,因为它们在 UI 评估期间使用。
当前支持的 binding 类型:
-
ComponentPresentationQueryBinding:一个STQL查询(有关更多信息,请参阅STQL)

