Panel Groups builder

The Panel Groups builder helps creating panel groups easily.

Usage

package myDaC

import (
    panelGroupsBuilder "github.com/perses/perses/cue/dac-utils/panelgroups"
)

panelGroupsBuilder & {} // input parameter expected

Parameters

ParameterTypeDescription
#input[…panelGroupBuilder]Each array element provides the information to build a panel group.

panelGroupBuilder parameters

ParameterTypeDefaultDescription
#panels[…Panel]An array of panels to be included in the panel group.
#titlestringThe title of the panel group.
#cols>0 & <=24The number of columns in the grid layout.
#heightnumber6The height for all panels in the grid

Example

package myDaC

import (
    panelGroupsBuilder "github.com/perses/perses/cue/dac-utils/panelgroups"
)

#memoryPanel: {} // v1.#Panel object
#cpuPanel: {} // v1.#Panel object

panelGroupsBuilder & {
	#input: [
		{
			#title: "Resource usage"
			#cols:  3
			#panels: [
				#memoryPanel,
				#cpuPanel,
			]
		},
		{
			#title:  "Resource usage bis"
			#cols:   1
			#height: 4
			#panels: [
				#cpuPanel,
				#memoryPanel,
			]
		},
	]
}

To build panels please refer to the Prometheus Panel builder