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
Copy file name to clipboardExpand all lines: grafana/dashboards/AzureDevOps.json
+74-20Lines changed: 74 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@
18
18
"editable": true,
19
19
"fiscalYearStartMonth": 0,
20
20
"graphTooltip": 0,
21
-
"id": 46,
21
+
"id": 7,
22
22
"links": [],
23
23
"liveNow": false,
24
24
"panels": [
@@ -43,7 +43,7 @@
43
43
"content": "- Use Cases: This dashboard shows the basic Git and Code Review metrics from Azure DevOps.\n- Data Source Required: Azure DevOps",
44
44
"mode": "markdown"
45
45
},
46
-
"pluginVersion": "9.5.2",
46
+
"pluginVersion": "9.5.15",
47
47
"targets": [
48
48
{
49
49
"datasource": {
@@ -130,16 +130,17 @@
130
130
"text": {},
131
131
"textMode": "auto"
132
132
},
133
-
"pluginVersion": "9.5.2",
133
+
"pluginVersion": "9.5.15",
134
134
"targets": [
135
135
{
136
136
"datasource": "mysql",
137
+
"editorMode": "code",
137
138
"format": "table",
138
139
"group": [],
139
140
"hide": false,
140
141
"metricColumn": "none",
141
142
"rawQuery": true,
142
-
"rawSql": "select\n\tcount(*) as pull_request_count\nfrom \n\tpull_requests pr\nwhere\n $__timeFilter(created_date)\n\tand base_repo_id in ($repo_id)\n\t\n\n",
143
+
"rawSql": "select\n\tcount(distinct pr.id) as pull_request_count\nfrom \n\tpull_requests pr\nwhere\n $__timeFilter(created_date)\n\tand base_repo_id in ($repo_id)\n\t\n\n",
143
144
"refId": "A",
144
145
"select": [
145
146
[
@@ -151,6 +152,23 @@
151
152
}
152
153
]
153
154
],
155
+
"sql": {
156
+
"columns": [
157
+
{
158
+
"parameters": [],
159
+
"type": "function"
160
+
}
161
+
],
162
+
"groupBy": [
163
+
{
164
+
"property": {
165
+
"type": "string"
166
+
},
167
+
"type": "groupBy"
168
+
}
169
+
],
170
+
"limit": 50
171
+
},
154
172
"table": "ae_projects",
155
173
"timeColumn": "ae_create_time",
156
174
"timeColumnType": "timestamp",
@@ -253,7 +271,7 @@
253
271
"hide": false,
254
272
"metricColumn": "none",
255
273
"rawQuery": true,
256
-
"rawSql": "with _prs as(\n SELECT\n DATE_ADD(date(created_date), INTERVAL -DAY(date(created_date))+1 DAY) as time,\n count(*) as pr_count\n FROM pull_requests\n WHERE\n base_repo_id in ($repo_id)\n and $__timeFilter(created_date)\n and created_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\n group by 1\n)\n\nSELECT \n date_format(time,'%M %Y') as month,\n pr_count as \"Pull Request Count\"\nFROM _prs\nORDER BY time\n",
274
+
"rawSql": "with _prs as(\n SELECT\n DATE_ADD(date(created_date), INTERVAL -DAY(date(created_date))+1 DAY) as time,\n count(distinct id) as pr_count\n FROM pull_requests\n WHERE\n base_repo_id in ($repo_id)\n and $__timeFilter(created_date)\n and created_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\n group by 1\n)\n\nSELECT \n date_format(time,'%M %Y') as month,\n pr_count as \"Pull Request Count\"\nFROM _prs\nORDER BY time\n",
257
275
"refId": "A",
258
276
"select": [
259
277
[
@@ -379,12 +397,13 @@
379
397
"targets": [
380
398
{
381
399
"datasource": "mysql",
400
+
"editorMode": "code",
382
401
"format": "table",
383
402
"group": [],
384
403
"hide": false,
385
404
"metricColumn": "none",
386
405
"rawQuery": true,
387
-
"rawSql": "-- The PR/MR statuses are standardized to DevLake's statuses 'OPEN', 'MERGED' and 'CLOSED'. You can check out the original status from the field `original_status`\nselect\n author_name,\n\tcount(*) as merged_pull_request_count\nfrom \n\tpull_requests pr\nwhere\n $__timeFilter(created_date)\n\tand base_repo_id in ($repo_id)\n\tand pr.status = 'MERGED'\ngroup by 1\norder by 2 desc\nlimit 20\n",
406
+
"rawSql": "-- The PR/MR statuses are standardized to DevLake's statuses 'OPEN', 'MERGED' and 'CLOSED'. You can check out the original status from the field `original_status`\nselect\n author_name,\n\tcount(distinct pr.id) as merged_pull_request_count\nfrom \n\tpull_requests pr\nwhere\n $__timeFilter(created_date)\n\tand base_repo_id in ($repo_id)\n\tand pr.status = 'MERGED'\ngroup by 1\norder by 2 desc\nlimit 20\n",
388
407
"refId": "A",
389
408
"select": [
390
409
[
@@ -396,6 +415,23 @@
396
415
}
397
416
]
398
417
],
418
+
"sql": {
419
+
"columns": [
420
+
{
421
+
"parameters": [],
422
+
"type": "function"
423
+
}
424
+
],
425
+
"groupBy": [
426
+
{
427
+
"property": {
428
+
"type": "string"
429
+
},
430
+
"type": "groupBy"
431
+
}
432
+
],
433
+
"limit": 50
434
+
},
399
435
"table": "ae_projects",
400
436
"timeColumn": "ae_create_time",
401
437
"timeColumnType": "timestamp",
@@ -483,7 +519,7 @@
483
519
"text": {},
484
520
"textMode": "auto"
485
521
},
486
-
"pluginVersion": "9.5.2",
522
+
"pluginVersion": "9.5.15",
487
523
"targets": [
488
524
{
489
525
"datasource": "mysql",
@@ -674,16 +710,17 @@
674
710
"text": {},
675
711
"textMode": "auto"
676
712
},
677
-
"pluginVersion": "9.5.2",
713
+
"pluginVersion": "9.5.15",
678
714
"targets": [
679
715
{
680
716
"datasource": "mysql",
717
+
"editorMode": "code",
681
718
"format": "table",
682
719
"group": [],
683
720
"hide": false,
684
721
"metricColumn": "none",
685
722
"rawQuery": true,
686
-
"rawSql": "-- The PR/MR statuses are standardized to DevLake's statuses 'OPEN', 'MERGED' and 'CLOSED'. You can check out the original status from the field `original_status`\nselect\n\tcount(*) as merged_pull_request_count\nfrom \n\tpull_requests pr\nwhere\n $__timeFilter(created_date)\n\tand base_repo_id in ($repo_id)\n\tand pr.status = 'CLOSED'",
723
+
"rawSql": "-- The PR/MR statuses are standardized to DevLake's statuses 'OPEN', 'MERGED' and 'CLOSED'. You can check out the original status from the field `original_status`\nselect\n\tcount(distinct pr.id) as merged_pull_request_count\nfrom \n\tpull_requests pr\nwhere\n $__timeFilter(created_date)\n\tand base_repo_id in ($repo_id)\n\tand pr.status = 'CLOSED'",
687
724
"refId": "A",
688
725
"select": [
689
726
[
@@ -695,6 +732,23 @@
695
732
}
696
733
]
697
734
],
735
+
"sql": {
736
+
"columns": [
737
+
{
738
+
"parameters": [],
739
+
"type": "function"
740
+
}
741
+
],
742
+
"groupBy": [
743
+
{
744
+
"property": {
745
+
"type": "string"
746
+
},
747
+
"type": "groupBy"
748
+
}
749
+
],
750
+
"limit": 50
751
+
},
698
752
"table": "ae_projects",
699
753
"timeColumn": "ae_create_time",
700
754
"timeColumnType": "timestamp",
@@ -869,7 +923,7 @@
869
923
"text": {},
870
924
"textMode": "auto"
871
925
},
872
-
"pluginVersion": "9.5.2",
926
+
"pluginVersion": "9.5.15",
873
927
"targets": [
874
928
{
875
929
"datasource": "mysql",
@@ -1039,7 +1093,7 @@
1039
1093
"content": "<br/>\n\nThis dashboard is created based on this [data schema](https://devlake.apache.org/docs/DataModels/DevLakeDomainLayerSchema). Want to add more metrics? Please follow the [guide](https://devlake.apache.org/docs/Configuration/Dashboards/GrafanaUserGuide).",
1040
1094
"mode": "markdown"
1041
1095
},
1042
-
"pluginVersion": "9.5.2",
1096
+
"pluginVersion": "9.5.15",
1043
1097
"targets": [
1044
1098
{
1045
1099
"datasource": {
@@ -1105,7 +1159,7 @@
1105
1159
"text": {},
1106
1160
"textMode": "auto"
1107
1161
},
1108
-
"pluginVersion": "9.5.2",
1162
+
"pluginVersion": "9.5.15",
1109
1163
"targets": [
1110
1164
{
1111
1165
"datasource": "mysql",
@@ -1114,7 +1168,7 @@
1114
1168
"group": [],
1115
1169
"metricColumn": "none",
1116
1170
"rawQuery": true,
1117
-
"rawSql": "SELECT\n count(*)\nFROM \n cicd_pipelines\nWHERE\n $__timeFilter(finished_date)\n and result = 'SUCCESS'\n and id like \"%azure%\"\n and cicd_scope_id in ($repo_id)\n -- the following condition will remove the month with incomplete data\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)",
1171
+
"rawSql": "SELECT\n count(distinct id)\nFROM \n cicd_pipelines\nWHERE\n $__timeFilter(finished_date)\n and result = 'SUCCESS'\n and id like \"%azure%\"\n and cicd_scope_id in ($repo_id)\n -- the following condition will remove the month with incomplete data\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)",
1118
1172
"refId": "A",
1119
1173
"select": [
1120
1174
[
@@ -1201,7 +1255,7 @@
1201
1255
"text": {},
1202
1256
"textMode": "auto"
1203
1257
},
1204
-
"pluginVersion": "9.5.2",
1258
+
"pluginVersion": "9.5.15",
1205
1259
"targets": [
1206
1260
{
1207
1261
"datasource": "mysql",
@@ -1210,7 +1264,7 @@
1210
1264
"group": [],
1211
1265
"metricColumn": "none",
1212
1266
"rawQuery": true,
1213
-
"rawSql": "SELECT\n 1.0 * count(case when result = 'SUCCESS' then 1 else null end)/count(*)\nFROM cicd_pipelines\nWHERE\n $__timeFilter(finished_date)\n and id like \"%azure%\"\n and cicd_scope_id in ($repo_id)\n -- the following condition will remove the month with incomplete data\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)",
1267
+
"rawSql": "SELECT\n 1.0 * count(case when result = 'SUCCESS' then id else null end)/count(distinct id)\nFROM cicd_pipelines\nWHERE\n $__timeFilter(finished_date)\n and id like \"%azure%\"\n and cicd_scope_id in ($repo_id)\n -- the following condition will remove the month with incomplete data\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)",
1214
1268
"refId": "A",
1215
1269
"select": [
1216
1270
[
@@ -1391,7 +1445,7 @@
1391
1445
"group": [],
1392
1446
"metricColumn": "none",
1393
1447
"rawQuery": true,
1394
-
"rawSql": "SELECT\n result,\n count(*) as build_count\nFROM cicd_pipelines\nWHERE\n $__timeFilter(finished_date)\n and id like \"%azure%\"\n and cicd_scope_id in ($repo_id)\n -- the following condition will remove the month with incomplete data\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\nGROUP BY 1\nORDER BY 2 desc",
1448
+
"rawSql": "SELECT\n result,\n count(distinct id) as build_count\nFROM cicd_pipelines\nWHERE\n $__timeFilter(finished_date)\n and id like \"%azure%\"\n and cicd_scope_id in ($repo_id)\n -- the following condition will remove the month with incomplete data\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\nGROUP BY 1\nORDER BY 2 desc",
1395
1449
"refId": "A",
1396
1450
"select": [
1397
1451
[
@@ -1476,7 +1530,7 @@
1476
1530
"text": {},
1477
1531
"textMode": "auto"
1478
1532
},
1479
-
"pluginVersion": "9.5.2",
1533
+
"pluginVersion": "9.5.15",
1480
1534
"targets": [
1481
1535
{
1482
1536
"datasource": "mysql",
@@ -1616,7 +1670,7 @@
1616
1670
"hide": false,
1617
1671
"metricColumn": "none",
1618
1672
"rawQuery": true,
1619
-
"rawSql": "WITH _builds as(\n SELECT\n DATE_ADD(date(finished_date), INTERVAL -DAYOFMONTH(date(finished_date))+1 DAY) as time,\n count(*) as build_count\n FROM cicd_pipelines\n WHERE\n $__timeFilter(finished_date)\n and result = 'SUCCESS'\n and id like \"%azure%\"\n and cicd_scope_id in ($repo_id)\n -- the following condition will remove the month with incomplete data\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\n GROUP BY 1\n)\n\nSELECT \n date_format(time,'%M %Y') as month,\n build_count as \"Pipeline runs Count\"\nFROM _builds\nORDER BY time\n",
1673
+
"rawSql": "WITH _builds as(\n SELECT\n DATE_ADD(date(finished_date), INTERVAL -DAYOFMONTH(date(finished_date))+1 DAY) as time,\n count(distinct id) as build_count\n FROM cicd_pipelines\n WHERE\n $__timeFilter(finished_date)\n and result = 'SUCCESS'\n and id like \"%azure%\"\n and cicd_scope_id in ($repo_id)\n -- the following condition will remove the month with incomplete data\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\n GROUP BY 1\n)\n\nSELECT \n date_format(time,'%M %Y') as month,\n build_count as \"Pipeline runs Count\"\nFROM _builds\nORDER BY time\n",
1620
1674
"refId": "A",
1621
1675
"select": [
1622
1676
[
@@ -1766,7 +1820,7 @@
1766
1820
"group": [],
1767
1821
"metricColumn": "none",
1768
1822
"rawQuery": true,
1769
-
"rawSql": "WITH _build_success_rate as(\r\n SELECT\r\n DATE_ADD(date(finished_date), INTERVAL -DAYOFMONTH(date(finished_date))+1 DAY) as time,\r\n result\r\n FROM\r\n cicd_pipelines\r\n WHERE\r\n $__timeFilter(finished_date)\r\n and id like \"%azure%\"\r\n and cicd_scope_id in ($repo_id)\r\n -- the following condition will remove the month with incomplete data\r\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\r\n)\r\n\r\nSELECT \r\n date_format(time,'%M %Y') as month,\r\n 1.0 * sum(case when result = 'SUCCESS' then 1 else 0 end)/ count(*) as \"Pipeline runs Success Rate\"\r\nFROM _build_success_rate\r\nGROUP BY time\r\nORDER BY time",
1823
+
"rawSql": "WITH _build_success_rate as(\r\n SELECT\r\n DATE_ADD(date(finished_date), INTERVAL -DAYOFMONTH(date(finished_date))+1 DAY) as time,\r\n result,\r\n id\r\nFROM\r\n cicd_pipelines\r\n WHERE\r\n $__timeFilter(finished_date)\r\n and id like \"%azure%\"\r\n and cicd_scope_id in ($repo_id)\r\n -- the following condition will remove the month with incomplete data\r\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\r\n GROUP BY \r\n time, result, id\r\n)\r\n\r\nSELECT \r\n date_format(time,'%M %Y') as month,\r\n 1.0 * sum(case when result = 'SUCCESS' then 1 else 0 end)/ count(*) as \"Pipeline runs Success Rate\"\r\nFROM _build_success_rate\r\nGROUP BY time\r\nORDER BY time",
0 commit comments