Skip to content

Commit f5a7f45

Browse files
authored
Move panel dimentions to panels in logs lib, making it overridable. (#1440)
1 parent e338662 commit f5a7f45

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

logs-lib/logs/dashboards.libsonnet

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,12 @@ function(
1616
g.util.grid.wrapPanels(
1717
(
1818
if showLogsVolume then
19-
[panels.logsVolume
20-
+ g.panel.timeSeries.gridPos.withH(6)
21-
+ g.panel.timeSeries.gridPos.withW(24)]
19+
[panels.logsVolume]
2220
else []
2321
)
2422
+
2523
[
26-
panels.logs
27-
+ g.panel.logs.gridPos.withH(18)
28-
+ g.panel.logs.gridPos.withW(24),
24+
panels.logs,
2925
]
3026
)
3127
),

logs-lib/logs/panels.libsonnet

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ function(
3939
},
4040
}
4141
)
42+
// default dimensions
43+
+ g.panel.timeSeries.gridPos.withH(6)
44+
+ g.panel.timeSeries.gridPos.withW(24)
4245
+ timeSeries.standardOptions.withOverridesMixin(
4346
[
4447
{
@@ -77,7 +80,10 @@ function(
7780
+ logsPanel.options.withEnableLogDetails(true)
7881
+ logsPanel.options.withShowTime(true)
7982
+ logsPanel.options.withWrapLogMessage(true)
80-
+ logsPanel.options.withPrettifyLogMessage(true),
83+
+ logsPanel.options.withPrettifyLogMessage(true)
84+
// default dimensions
85+
+ g.panel.logs.gridPos.withH(18)
86+
+ g.panel.logs.gridPos.withW(24),
8187

8288
logsVolume: self.logsVolumeInit(logsVolumeTarget),
8389
logs: self.logsInit(logsTarget),

0 commit comments

Comments
 (0)