Skip to content

Commit 5cd96a1

Browse files
authored
fix: update change lead time details dashboard (#8179)
1 parent c7db64e commit 5cd96a1

File tree

1 file changed

+44
-29
lines changed

1 file changed

+44
-29
lines changed

grafana/dashboards/DORADetails-LeadTimeforChanges.json

Lines changed: 44 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"editable": true,
1919
"fiscalYearStartMonth": 0,
2020
"graphTooltip": 0,
21-
"id": 36,
2221
"links": [
2322
{
2423
"asDropdown": false,
@@ -47,17 +46,16 @@
4746
"y": 0
4847
},
4948
"id": 63,
50-
"links": [],
5149
"options": {
5250
"code": {
5351
"language": "plaintext",
5452
"showLineNumbers": false,
5553
"showMiniMap": false
5654
},
57-
"content": "This dashboard shows the details about [Lead Time for Changes](https://devlake.apache.org/docs/Metrics/LeadTimeForChanges) in DORA.",
55+
"content": "- This dashboard shows the details about [Lead Time for Changes](https://devlake.apache.org/docs/Metrics/LeadTimeForChanges) in DORA.\n- It displays the statistics for pull requests **deployed** within the selected time range.",
5856
"mode": "markdown"
5957
},
60-
"pluginVersion": "9.5.15",
58+
"pluginVersion": "11.2.0",
6159
"targets": [
6260
{
6361
"datasource": {
@@ -112,16 +110,19 @@
112110
"graphMode": "area",
113111
"justifyMode": "auto",
114112
"orientation": "auto",
113+
"percentChangeColorMode": "standard",
115114
"reduceOptions": {
116115
"calcs": [
117116
"lastNotNull"
118117
],
119118
"fields": "",
120119
"values": false
121120
},
122-
"textMode": "auto"
121+
"showPercentChange": false,
122+
"textMode": "auto",
123+
"wideLayout": true
123124
},
124-
"pluginVersion": "9.5.15",
125+
"pluginVersion": "11.2.0",
125126
"targets": [
126127
{
127128
"datasource": "mysql",
@@ -131,7 +132,7 @@
131132
"hide": false,
132133
"metricColumn": "none",
133134
"rawQuery": true,
134-
"rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no cycle_time to make sure cycle_time equals the sum of the four metrics below\n\t\tcoalesce(prm.pr_cycle_time/60,0) as cycle_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(pr.created_date)\n and pm.project_name in (${project})\n GROUP BY 1,2,3\n)\n\nSELECT \n avg(cycle_time) as 'PR Cycle Time(h)'\nFROM _prs",
135+
"rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no cycle_time to make sure cycle_time equals the sum of the four metrics below\n\t\tcoalesce(prm.pr_cycle_time/60,0) as cycle_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(prm.pr_deployed_date)\n -- and pr.created_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\n and pm.project_name in (${project})\n GROUP BY 1,2,3\n)\n\nSELECT \n avg(cycle_time) as 'PR Cycle Time(h)'\nFROM _prs",
135136
"refId": "A",
136137
"select": [
137138
[
@@ -217,16 +218,19 @@
217218
"graphMode": "area",
218219
"justifyMode": "auto",
219220
"orientation": "auto",
221+
"percentChangeColorMode": "standard",
220222
"reduceOptions": {
221223
"calcs": [
222224
"lastNotNull"
223225
],
224226
"fields": "",
225227
"values": false
226228
},
227-
"textMode": "auto"
229+
"showPercentChange": false,
230+
"textMode": "auto",
231+
"wideLayout": true
228232
},
229-
"pluginVersion": "9.5.15",
233+
"pluginVersion": "11.2.0",
230234
"targets": [
231235
{
232236
"datasource": "mysql",
@@ -236,7 +240,7 @@
236240
"hide": false,
237241
"metricColumn": "none",
238242
"rawQuery": true,
239-
"rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no coding_time to make sure cycle_time equals the sum of the four sub-metrics\n\t\tcoalesce(prm.pr_coding_time/60,0) as coding_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(pr.created_date)\n and pm.project_name in (${project})\n GROUP BY 1,2,3\n)\n\nSELECT \n avg(coding_time) as 'Coding Time(h)'\nFROM _prs\n",
243+
"rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no coding_time to make sure cycle_time equals the sum of the four sub-metrics\n\t\tcoalesce(prm.pr_coding_time/60,0) as coding_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(prm.pr_deployed_date)\n -- and pr.created_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\n and pm.project_name in (${project})\n GROUP BY 1,2,3\n)\n\nSELECT \n avg(coding_time) as 'Coding Time(h)'\nFROM _prs\n",
240244
"refId": "A",
241245
"select": [
242246
[
@@ -353,16 +357,19 @@
353357
"graphMode": "area",
354358
"justifyMode": "auto",
355359
"orientation": "auto",
360+
"percentChangeColorMode": "standard",
356361
"reduceOptions": {
357362
"calcs": [
358363
"lastNotNull"
359364
],
360365
"fields": "",
361366
"values": false
362367
},
363-
"textMode": "auto"
368+
"showPercentChange": false,
369+
"textMode": "auto",
370+
"wideLayout": true
364371
},
365-
"pluginVersion": "9.5.15",
372+
"pluginVersion": "11.2.0",
366373
"targets": [
367374
{
368375
"datasource": "mysql",
@@ -372,7 +379,7 @@
372379
"hide": false,
373380
"metricColumn": "none",
374381
"rawQuery": true,
375-
"rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no pickup_time to make sure cycle_time equals the sum of the four sub-metrics\n\t\tcoalesce(prm.pr_pickup_time/60,0) as pickup_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(pr.created_date)\n and pm.project_name in (${project})\n GROUP BY 1,2,3\n)\n\nSELECT \n avg(pickup_time) as 'Pickup Time(h)'\nFROM _prs\n",
382+
"rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no pickup_time to make sure cycle_time equals the sum of the four sub-metrics\n\t\tcoalesce(prm.pr_pickup_time/60,0) as pickup_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(prm.pr_deployed_date)\n -- and pr.created_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\n and pm.project_name in (${project})\n GROUP BY 1,2,3\n)\n\nSELECT \n avg(pickup_time) as 'Pickup Time(h)'\nFROM _prs\n",
376383
"refId": "A",
377384
"select": [
378385
[
@@ -489,16 +496,19 @@
489496
"graphMode": "area",
490497
"justifyMode": "auto",
491498
"orientation": "auto",
499+
"percentChangeColorMode": "standard",
492500
"reduceOptions": {
493501
"calcs": [
494502
"lastNotNull"
495503
],
496504
"fields": "",
497505
"values": false
498506
},
499-
"textMode": "auto"
507+
"showPercentChange": false,
508+
"textMode": "auto",
509+
"wideLayout": true
500510
},
501-
"pluginVersion": "9.5.15",
511+
"pluginVersion": "11.2.0",
502512
"targets": [
503513
{
504514
"datasource": "mysql",
@@ -508,7 +518,7 @@
508518
"hide": false,
509519
"metricColumn": "none",
510520
"rawQuery": true,
511-
"rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no review_time to make sure cycle_time equals the sum of the four sub-metrics\n\t\tcoalesce(prm.pr_review_time/60,0) as review_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(pr.created_date)\n and pm.project_name in (${project})\n GROUP BY 1,2,3\n)\n\nSELECT \n avg(review_time) as 'Review Time(h)'\nFROM _prs",
521+
"rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no review_time to make sure cycle_time equals the sum of the four sub-metrics\n\t\tcoalesce(prm.pr_review_time/60,0) as review_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(prm.pr_deployed_date)\n -- and pr.created_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\n and pm.project_name in (${project})\n GROUP BY 1,2,3\n)\n\nSELECT \n avg(review_time) as 'Review Time(h)'\nFROM _prs",
512522
"refId": "A",
513523
"select": [
514524
[
@@ -625,16 +635,19 @@
625635
"graphMode": "area",
626636
"justifyMode": "auto",
627637
"orientation": "auto",
638+
"percentChangeColorMode": "standard",
628639
"reduceOptions": {
629640
"calcs": [
630641
"lastNotNull"
631642
],
632643
"fields": "",
633644
"values": false
634645
},
635-
"textMode": "auto"
646+
"showPercentChange": false,
647+
"textMode": "auto",
648+
"wideLayout": true
636649
},
637-
"pluginVersion": "9.5.15",
650+
"pluginVersion": "11.2.0",
638651
"targets": [
639652
{
640653
"datasource": "mysql",
@@ -644,7 +657,7 @@
644657
"hide": false,
645658
"metricColumn": "none",
646659
"rawQuery": true,
647-
"rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no deploy_time to make sure cycle_time equals the sum of the four sub-metrics\n\t\tcoalesce(prm.pr_deploy_time/60,0) as deploy_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(pr.created_date)\n and pm.project_name in (${project})\n GROUP BY 1,2,3\n)\n\nSELECT \n avg(deploy_time) as 'PR Deploy Time(h)'\nFROM _prs",
660+
"rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no deploy_time to make sure cycle_time equals the sum of the four sub-metrics\n\t\tcoalesce(prm.pr_deploy_time/60,0) as deploy_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(prm.pr_deployed_date)\n -- and pr.created_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\n and pm.project_name in (${project})\n GROUP BY 1,2,3\n)\n\nSELECT \n avg(deploy_time) as 'PR Deploy Time(h)'\nFROM _prs",
648661
"refId": "A",
649662
"select": [
650663
[
@@ -796,7 +809,6 @@
796809
"y": 9
797810
},
798811
"id": 70,
799-
"links": [],
800812
"options": {
801813
"cellHeight": "sm",
802814
"footer": {
@@ -811,7 +823,7 @@
811823
"showHeader": true,
812824
"sortBy": []
813825
},
814-
"pluginVersion": "9.5.15",
826+
"pluginVersion": "11.2.0",
815827
"targets": [
816828
{
817829
"datasource": "mysql",
@@ -867,8 +879,7 @@
867879
}
868880
],
869881
"refresh": "",
870-
"schemaVersion": 38,
871-
"style": "dark",
882+
"schemaVersion": 39,
872883
"tags": [
873884
"DORA"
874885
],
@@ -877,11 +888,15 @@
877888
{
878889
"current": {
879890
"selected": false,
880-
"text": "All",
881-
"value": "$__all"
891+
"text": [
892+
"All"
893+
],
894+
"value": [
895+
"$__all"
896+
]
882897
},
883898
"datasource": "mysql",
884-
"definition": "select distinct name from projects",
899+
"definition": "select distinct name from projects",
885900
"hide": 0,
886901
"includeAll": true,
887902
"label": "Project",
@@ -902,7 +917,7 @@
902917
"value": "2023"
903918
},
904919
"datasource": "mysql",
905-
"definition": "select dora_report from dora_benchmarks",
920+
"definition": "select dora_report from dora_benchmarks",
906921
"hide": 0,
907922
"includeAll": false,
908923
"label": "DORA Report",
@@ -923,7 +938,7 @@
923938
"value": "Failed Deployment Recovery Time"
924939
},
925940
"datasource": "mysql",
926-
"definition": "SELECT \n CASE \n WHEN dora_report = '2023' THEN \"Failed Deployment Recovery Time\"\n WHEN dora_report = '2021' THEN \"Median Time to Restore Service\"\n ELSE NULL \n END AS title_value\nFROM dora_benchmarks\nWHERE dora_report = '${dora_report:raw}'",
941+
"definition": "SELECT \n CASE \n WHEN dora_report = '2023' THEN \"Failed Deployment Recovery Time\"\n WHEN dora_report = '2021' THEN \"Median Time to Restore Service\"\n ELSE NULL \n END AS title_value\nFROM dora_benchmarks\nWHERE dora_report = '${dora_report:raw}'",
927942
"hide": 2,
928943
"includeAll": false,
929944
"label": "TitleValue",
@@ -947,6 +962,6 @@
947962
"timezone": "utc",
948963
"title": "DORA Details - Lead Time for Changes",
949964
"uid": "Lead-time-for-changes",
950-
"version": 6,
965+
"version": 7,
951966
"weekStart": ""
952967
}

0 commit comments

Comments
 (0)