You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `layout` block is used to define the structure of the dashboard by grouping the panels into sections.
126
+
The layout block can contain one or more section blocks, and each section block can contain one or more panel blocks.
127
+
128
+
You have the option to include `title` and `collapsed` attributes. If either of these attributes is included,
129
+
the section will be collapsible, appearing as a row that can be expanded or collapsed based on the user's preference.
130
+
131
+
______
132
+
133
+
The panels are placed starting from the top-left corner of the section and are positioned in a way that preserves their order.
134
+
In other words, the first panel specified in the configuration will be placed in the top-left corner of the section, followed by the second panel, and so on.
135
+
136
+
It's important to note that the placement of panels cannot be manually specified, and it is determined by the order in which the panels are defined in the configuration.
137
+
138
+
______
139
+
140
+
You can use the `row` block instead of the `panel` block to explicitly mark rows when defining a layout.
141
+
By using `row`, you have greater control over the placement of the panels within the section.
142
+
143
+
For example, you can place each panel on a new line/row:
**Note:** the section block cannot have both `panel` and `row` blocks at the same time. You must use either one or the other.
173
+
______
174
+
175
+
In the example above, the layout block contains two **collapsible** section blocks, one titled "JVM" and the other "HTTP".
176
+
The "JVM" section has a single panel block with dimensions `8x10`, and the data source specified as `data.gdashboard_timeseries.jvm_memory.json`.
177
+
The "HTTP" section has two panel blocks, both with dimensions `8x10` and data sources `data.gdashboard_timeseries.http_requests.json` and `data.gdashboard_timeseries.http_status.json`, respectively.
178
+
76
179
<!-- schema generated by tfplugindocs -->
77
180
## Schema
78
181
@@ -103,25 +206,53 @@ data "gdashboard_dashboard" "jvm_dashboard" {
103
206
104
207
Optional:
105
208
106
-
-`row` (Block List) The row within the dashboard. (see [below for nested schema](#nestedblock--layout--row))
209
+
-`section` (Block List) The row within the dashboard. (see [below for nested schema](#nestedblock--layout--section))
210
+
211
+
<aid="nestedblock--layout--section"></a>
212
+
### Nested Schema for `layout.section`
213
+
214
+
Optional:
215
+
216
+
-`collapsed` (Boolean) Whether the row is collapsed or not.
217
+
-`panel` (Block List) The definition of the panel within the row. (see [below for nested schema](#nestedblock--layout--section--panel))
218
+
-`row` (Block List) The new row to align the nested panels. (see [below for nested schema](#nestedblock--layout--section--row))
219
+
-`title` (String) The title of the row. If the title is defined the row is treated as collapsible.
220
+
221
+
<aid="nestedblock--layout--section--panel"></a>
222
+
### Nested Schema for `layout.section.panel`
223
+
224
+
Required:
225
+
226
+
-`size` (Attributes) The size of the panel. (see [below for nested schema](#nestedatt--layout--section--panel--size))
### Nested Schema for `layout.section.row.panel.size`
125
256
126
257
Required:
127
258
@@ -132,6 +263,7 @@ Required:
132
263
133
264
134
265
266
+
135
267
<aid="nestedblock--time"></a>
136
268
### Nested Schema for `time`
137
269
@@ -186,7 +318,7 @@ Required:
186
318
187
319
Optional:
188
320
189
-
-`datasource` (Block List) The datasource to use. (see [below for nested schema](#nestedblock--variables--adhoc--datasource))
321
+
-`datasource` (Block, Optional) The datasource to use. (see [below for nested schema](#nestedblock--variables--adhoc--datasource))
190
322
-`description` (String) The description of the variable.
191
323
-`filter` (Block List) The predefined filters. (see [below for nested schema](#nestedblock--variables--adhoc--filter))
192
324
-`hide` (String) Which variable information to hide from the dashboard. The choices are: `label`, `variable`.
@@ -282,7 +414,7 @@ Optional:
282
414
-`include_all` (Block List) An option to include all variables. If `custom_value` is blank, then the Grafana concatenates (adds together) all the values in the query. (see [below for nested schema](#nestedblock--variables--datasource--include_all))
283
415
-`label` (String) The optional display name.
284
416
-`multi` (Boolean) Whether to allow selecting multiple values at the same time or not.
285
-
-`source` (Block List) The datasource selector. (see [below for nested schema](#nestedblock--variables--datasource--source))
417
+
-`source` (Block, Optional) The datasource selector. (see [below for nested schema](#nestedblock--variables--datasource--source))
0 commit comments