Presentation Projections
|
See it in the scaffold: the presentation files in the stackvista/stackpack-templates scaffold use several projection types — Health, ComponentLink and Text in |
Projections
Projections extract relevant information from a component and define how that should be presented to the user. Generally a CEL expression is used for data extraction, or a PromQL query string is interpolated.
Not every projection can be used in every context; the available projections and where they can be used is:
| Projection | Overview | Highlight |
|---|---|---|
TextProjection |
||
HealthProjection |
||
DurationProjection |
||
RatioProjection |
||
NumericProjection |
||
MetricProjection |
||
ComponentLinkProjection |
||
ContainerImageProjection |
||
MapProjection |
_type: 'TextProjection'
value: cel:string # Cel string for the text to display
asTag: boolean # Optional - should the text be rendered as a tag
_type: 'HealthProjection'
value: cel:string # Cel string that represents a valid HealthState
_type: 'DurationProjection'
startTime: cel:string # Cel string in ISO8601 format for start time
endTime: cel:string # Optional - Cel string in ISO8601 format for end time
_type: 'RatioProjection'
numerator: cel:number # Cel number for the numerator
denominator: cel:number # Cel number for the denominator
status: cel:string # Optional - expression that evaluates to a valid HealthState
_type: 'NumericProjection'
value: cel:number # Cel number for the value
decimalPlaces: integer # Optional - number of decimal places to display
unit: string # Optional - unit of the number
_type: 'MetricProjection'
query: string # Parametrized PromQL query
showChart: boolean # Optional - should a chart be shown on an overview
decimalPlaces: integer # Optional - number of decimal places to display
unit: string # Optional - unit of the metric
_type: 'ComponentLinkProjection'
name: cel:string # Cel string for the name of the link
identifier: cel:string # Cel string that creates a valid identifier xref:/configure/topology/identifiers.adoc[identifiers]
_type: 'ContainerImageProjection'
imageId: cel:string # Cel expression for the image
imageName: cel:string # Cel expression for a name for the image
_type: 'MapProjection'
value: cel:map<string,string> # Cel map<string,string> with key value pairs
asTags: boolean # Optional (default: true): should the entries be rendered as tags