Skip to content

Commit e195107

Browse files
fix: revert worklogs code (#7984) (#7985)
Co-authored-by: abeizn <zikuan.an@merico.dev>
1 parent 4cd603e commit e195107

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

grafana/dashboards/WorkLogs.json

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"editable": true,
1919
"fiscalYearStartMonth": 0,
2020
"graphTooltip": 0,
21-
"id": 47,
21+
"id": 39,
2222
"links": [],
2323
"liveNow": false,
2424
"panels": [
@@ -705,7 +705,6 @@
705705
"values": true
706706
},
707707
"tooltip": {
708-
"maxHeight": 600,
709708
"mode": "single",
710709
"sort": "none"
711710
}
@@ -753,8 +752,7 @@
753752
"mode": "absolute",
754753
"steps": [
755754
{
756-
"color": "green",
757-
"value": null
755+
"color": "green"
758756
}
759757
]
760758
}
@@ -825,8 +823,7 @@
825823
"mode": "absolute",
826824
"steps": [
827825
{
828-
"color": "green",
829-
"value": null
826+
"color": "green"
830827
}
831828
]
832829
},
@@ -862,7 +859,7 @@
862859
"editorMode": "code",
863860
"format": "table",
864861
"rawQuery": true,
865-
"rawSql": "with _accounts as (\n select ua.account_id, ua.user_id, u.name, u.email\n from accounts a \n join user_accounts ua on a.id = ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in ($users)\n),\n\n\n_commits as (\n SELECT distinct DATE_FORMAT(authored_date, '%d/%m/%Y') as Date, authored_date as Time, 'Finish a commit' as Activity, concat(message, ' #', sha) as Details, a.name as Name, c.additions, c.deletions\n FROM commits c\n join _accounts a on c.author_id = a.email\n where $__timeFilter(authored_date)\n)\n\nSELECT sum(additions + deletions) FROM _commits\n",
862+
"rawSql": "with _accounts as (\n select ua.account_id, ua.user_id, u.name\n from accounts a \n join user_accounts ua on a.id = ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in ($users)\n),\n\n\n_commits as (\n SELECT distinct DATE_FORMAT(authored_date, '%d/%m/%Y') as Date, authored_date as Time, 'Finish a commit' as Activity, concat(message, ' #', sha) as Details, a.name as Name, c.additions, c.deletions\n FROM commits c\n join _accounts a on c.author_id = a.account_id\n where $__timeFilter(authored_date)\n)\n\nSELECT sum(additions + deletions) FROM _commits\n",
866863
"refId": "A",
867864
"sql": {
868865
"columns": [
@@ -898,8 +895,7 @@
898895
"mode": "absolute",
899896
"steps": [
900897
{
901-
"color": "green",
902-
"value": null
898+
"color": "green"
903899
}
904900
]
905901
},
@@ -971,8 +967,7 @@
971967
"mode": "absolute",
972968
"steps": [
973969
{
974-
"color": "green",
975-
"value": null
970+
"color": "green"
976971
}
977972
]
978973
},
@@ -1067,8 +1062,7 @@
10671062
"mode": "absolute",
10681063
"steps": [
10691064
{
1070-
"color": "green",
1071-
"value": null
1065+
"color": "green"
10721066
},
10731067
{
10741068
"color": "red",
@@ -1111,7 +1105,6 @@
11111105
"valueSize": 12
11121106
},
11131107
"tooltip": {
1114-
"maxHeight": 600,
11151108
"mode": "single",
11161109
"sort": "none"
11171110
},
@@ -1197,8 +1190,7 @@
11971190
"mode": "absolute",
11981191
"steps": [
11991192
{
1200-
"color": "green",
1201-
"value": null
1193+
"color": "green"
12021194
}
12031195
]
12041196
},
@@ -1234,7 +1226,7 @@
12341226
"editorMode": "code",
12351227
"format": "table",
12361228
"rawQuery": true,
1237-
"rawSql": "with _accounts as (\n select ua.account_id, ua.user_id, u.name, u.email\n from accounts a \n join user_accounts ua on a.id = ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in ($users)\n),\n\n\n_commits as (\n SELECT distinct DATE_FORMAT(authored_date, '%d/%m/%Y') as Date, authored_date as Time, 'Finish a commit' as Activity, concat(message, ' #', sha) as Details, a.name as Name, c.additions, c.deletions, c.sha\n FROM commits c\n join _accounts a on c.author_id = a.email\n where $__timeFilter(authored_date)\n),\n\n_pr_commits_data as(\n SELECT\n pr.id as pr_id,\n pr.merge_commit_sha,\n sum(c.additions)+sum(c.deletions) as loc\n FROM \n pull_requests pr\n left join _commits c on pr.merge_commit_sha = c.sha\n WHERE\n $__timeFilter(pr.created_date)\n and pr.status = 'MERGED'\n group by 1,2\n)\n\nSELECT \n avg(loc) as 'PR Merged Size'\nFROM _pr_commits_data\n",
1229+
"rawSql": "with _accounts as (\n select ua.account_id, ua.user_id, u.name\n from accounts a \n join user_accounts ua on a.id = ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in ($users)\n),\n\n\n_commits as (\n SELECT distinct DATE_FORMAT(authored_date, '%d/%m/%Y') as Date, authored_date as Time, 'Finish a commit' as Activity, concat(message, ' #', sha) as Details, a.name as Name, c.additions, c.deletions, c.sha\n FROM commits c\n join _accounts a on c.author_id = a.account_id\n where $__timeFilter(authored_date)\n),\n\n_pr_commits_data as(\n SELECT\n pr.id as pr_id,\n pr.merge_commit_sha,\n sum(c.additions)+sum(c.deletions) as loc\n FROM \n pull_requests pr\n left join _commits c on pr.merge_commit_sha = c.sha\n WHERE\n $__timeFilter(pr.created_date)\n and pr.status = 'MERGED'\n group by 1,2\n)\n\nSELECT \n avg(loc) as 'PR Merged Size'\nFROM _pr_commits_data\n",
12381230
"refId": "A",
12391231
"sql": {
12401232
"columns": [
@@ -1270,8 +1262,7 @@
12701262
"mode": "absolute",
12711263
"steps": [
12721264
{
1273-
"color": "green",
1274-
"value": null
1265+
"color": "green"
12751266
}
12761267
]
12771268
},
@@ -1344,8 +1335,7 @@
13441335
"mode": "absolute",
13451336
"steps": [
13461337
{
1347-
"color": "green",
1348-
"value": null
1338+
"color": "green"
13491339
}
13501340
]
13511341
},
@@ -1467,10 +1457,11 @@
14671457
"from": "now-6M",
14681458
"to": "now"
14691459
},
1460+
"timeRangeUpdatedDuringEditOrView": false,
14701461
"timepicker": {},
14711462
"timezone": "utc",
14721463
"title": "Work Logs",
14731464
"uid": "d449042e-22f0-4357-b8b7-22083f47618d",
1474-
"version": 1,
1465+
"version": 3,
14751466
"weekStart": ""
14761467
}

0 commit comments

Comments
 (0)