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#

ParameterTypeMandatory/OptionalDefaultDescription
#panels[...Panel]MandatoryAn array of panels to be included in the panel group.
#titlestringMandatoryThe title of the panel group.
#cols>0 & <=24MandatoryThe number of columns in the grid layout.
#heightnumberOptional6The 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,
			]
		},
	]
}