Skip to content

Commit 08be054

Browse files
authored
Full page image: Fix wait condition for dashboard with rows (#542)
* Full page image: Fix dashboard with rows wait condition * Update all-panels.json * update test image * update test res * use dark theme * support old versions
1 parent 6c41728 commit 08be054

File tree

3 files changed

+42
-20
lines changed

3 files changed

+42
-20
lines changed

scripts/drone/provisioning/dashboards/all-panels.json

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@
2121
"id": 3,
2222
"links": [],
2323
"panels": [
24+
{
25+
"gridPos": {
26+
"h": 1,
27+
"w": 24,
28+
"x": 0,
29+
"y": 0
30+
},
31+
"id": 13,
32+
"title": "Main row",
33+
"type": "row"
34+
},
2435
{
2536
"datasource": {
2637
"type": "grafana-testdata-datasource",
@@ -30,7 +41,7 @@
3041
"h": 9,
3142
"w": 6,
3243
"x": 0,
33-
"y": 0
44+
"y": 1
3445
},
3546
"id": 12,
3647
"options": {
@@ -42,7 +53,7 @@
4253
"content": "# Test dashboard\n\nThis dashboard is aiming to test most panels with the grafana-image-renderer.",
4354
"mode": "markdown"
4455
},
45-
"pluginVersion": "10.4.3",
56+
"pluginVersion": "11.2.0-pre",
4657
"title": "Text panel",
4758
"type": "text"
4859
},
@@ -86,7 +97,7 @@
8697
"h": 9,
8798
"w": 10,
8899
"x": 6,
89-
"y": 0
100+
"y": 1
90101
},
91102
"id": 10,
92103
"options": {
@@ -136,7 +147,11 @@
136147
"tooltip": false,
137148
"viz": false
138149
},
139-
"lineWidth": 1
150+
"lineWidth": 1,
151+
"stacking": {
152+
"group": "A",
153+
"mode": "none"
154+
}
140155
},
141156
"mappings": [],
142157
"thresholds": {
@@ -159,7 +174,7 @@
159174
"h": 9,
160175
"w": 8,
161176
"x": 16,
162-
"y": 0
177+
"y": 1
163178
},
164179
"id": 11,
165180
"options": {
@@ -168,6 +183,10 @@
168183
"displayMode": "list",
169184
"placement": "bottom",
170185
"showLegend": true
186+
},
187+
"tooltip": {
188+
"mode": "single",
189+
"sort": "none"
171190
}
172191
},
173192
"targets": [
@@ -208,7 +227,7 @@
208227
"h": 8,
209228
"w": 12,
210229
"x": 0,
211-
"y": 9
230+
"y": 10
212231
},
213232
"id": 9,
214233
"options": {
@@ -245,7 +264,7 @@
245264
"reverse": false
246265
}
247266
},
248-
"pluginVersion": "10.4.3",
267+
"pluginVersion": "11.2.0-pre",
249268
"targets": [
250269
{
251270
"datasource": {
@@ -302,7 +321,7 @@
302321
"h": 8,
303322
"w": 12,
304323
"x": 12,
305-
"y": 9
324+
"y": 10
306325
},
307326
"id": 8,
308327
"options": {
@@ -365,7 +384,7 @@
365384
"h": 8,
366385
"w": 12,
367386
"x": 0,
368-
"y": 17
387+
"y": 18
369388
},
370389
"id": 4,
371390
"options": {
@@ -383,7 +402,7 @@
383402
"showThresholdMarkers": true,
384403
"sizing": "auto"
385404
},
386-
"pluginVersion": "10.4.3",
405+
"pluginVersion": "11.2.0-pre",
387406
"targets": [
388407
{
389408
"datasource": {
@@ -423,7 +442,7 @@
423442
"h": 8,
424443
"w": 12,
425444
"x": 12,
426-
"y": 17
445+
"y": 18
427446
},
428447
"id": 5,
429448
"options": {
@@ -490,7 +509,7 @@
490509
"h": 8,
491510
"w": 12,
492511
"x": 0,
493-
"y": 25
512+
"y": 26
494513
},
495514
"id": 7,
496515
"options": {
@@ -511,7 +530,7 @@
511530
"sizing": "auto",
512531
"valueMode": "color"
513532
},
514-
"pluginVersion": "10.4.3",
533+
"pluginVersion": "11.2.0-pre",
515534
"targets": [
516535
{
517536
"datasource": {
@@ -578,7 +597,7 @@
578597
"h": 8,
579598
"w": 12,
580599
"x": 12,
581-
"y": 25
600+
"y": 26
582601
},
583602
"id": 2,
584603
"options": {
@@ -647,14 +666,15 @@
647666
"h": 8,
648667
"w": 12,
649668
"x": 0,
650-
"y": 33
669+
"y": 34
651670
},
652671
"id": 3,
653672
"options": {
654673
"colorMode": "value",
655674
"graphMode": "area",
656675
"justifyMode": "auto",
657676
"orientation": "auto",
677+
"percentChangeColorMode": "standard",
658678
"reduceOptions": {
659679
"calcs": [
660680
"lastNotNull"
@@ -666,7 +686,7 @@
666686
"textMode": "auto",
667687
"wideLayout": true
668688
},
669-
"pluginVersion": "10.4.3",
689+
"pluginVersion": "11.2.0-pre",
670690
"targets": [
671691
{
672692
"datasource": {
@@ -719,7 +739,7 @@
719739
"h": 8,
720740
"w": 12,
721741
"x": 12,
722-
"y": 33
742+
"y": 34
723743
},
724744
"id": 6,
725745
"options": {
@@ -734,7 +754,7 @@
734754
},
735755
"showHeader": true
736756
},
737-
"pluginVersion": "10.4.3",
757+
"pluginVersion": "11.2.0-pre",
738758
"targets": [
739759
{
740760
"datasource": {
@@ -766,6 +786,7 @@
766786
"axisLabel": "",
767787
"axisPlacement": "auto",
768788
"barAlignment": 0,
789+
"barWidthFactor": 0.6,
769790
"drawStyle": "line",
770791
"fillOpacity": 0,
771792
"gradientMode": "none",
@@ -812,7 +833,7 @@
812833
"h": 9,
813834
"w": 24,
814835
"x": 0,
815-
"y": 41
836+
"y": 42
816837
},
817838
"id": 1,
818839
"options": {

src/browser/browser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,8 @@ async function waitForQueriesAndVisualizations(page: puppeteer.Page, options: Im
600600
}
601601
});
602602

603-
const totalPanelsRendered = panelsRenderedCount + document.querySelectorAll('.dashboard-row').length;
603+
const rowCount = document.querySelectorAll('.dashboard-row').length || document.querySelectorAll("[data-testid='dashboard-row-container']").length
604+
const totalPanelsRendered = panelsRenderedCount + rowCount;
604605
return totalPanelsRendered >= panelCount;
605606
}
606607

1.69 KB
Loading

0 commit comments

Comments
 (0)