diff --git a/grafana/dashboards/EngineeringOverview.json b/grafana/dashboards/EngineeringOverview.json index 3ebdfe55be1..768231de4a5 100644 --- a/grafana/dashboards/EngineeringOverview.json +++ b/grafana/dashboards/EngineeringOverview.json @@ -18,7 +18,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 16, + "id": 24, "links": [], "liveNow": false, "panels": [ @@ -34,7 +34,6 @@ "y": 0 }, "id": 32, - "links": [], "options": { "code": { "language": "plaintext", @@ -44,7 +43,7 @@ "content": "- Use Cases: This dashboard is to overview the Git and project management metrics.\n- Data Source Required: Jira + GitHub, or Jira + GitLab.", "mode": "markdown" }, - "pluginVersion": "9.5.15", + "pluginVersion": "11.0.0", "targets": [ { "datasource": { @@ -93,7 +92,6 @@ "y": 3 }, "id": 8, - "links": [], "options": { "colorMode": "value", "graphMode": "area", @@ -106,10 +104,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.5.15", + "pluginVersion": "11.0.0", "targets": [ { "datasource": "mysql", @@ -119,7 +119,7 @@ "metricColumn": "none", "queryType": "randomWalk", "rawQuery": true, - "rawSql": "select\n count(distinct i.id)\nfrom\n issues i\n\tjoin board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\n\tjoin project_mapping pm on b.id = pm.row_id\nwhere\n pm.project_name in (${project}) and\n i.priority in (${priority}) and\n i.type = 'BUG' and\n date(i.created_date) between STR_TO_DATE('$month','%Y-%m-%d') and STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH - INTERVAL 1 DAY;", + "rawSql": "select\n count(distinct i.id)\nfrom\n issues i\n\tjoin board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\n\tjoin project_mapping pm on b.id = pm.row_id\nwhere\n pm.project_name in (${project}) and\n i.priority in (${priority}) and\n i.type = 'BUG' and\n date(i.created_date) between STR_TO_DATE('$month','%Y-%m-%d') and STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH;", "refId": "A", "select": [ [ @@ -160,7 +160,7 @@ ] } ], - "title": "Critical Defects Identified", + "title": "Critical Defects Identified [in $month]", "type": "stat" }, { @@ -171,6 +171,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -215,14 +216,15 @@ "y": 3 }, "id": 22, - "links": [], "options": { "barRadius": 0, "barWidth": 0.46, "fullHighlight": false, "groupWidth": 0.7, "legend": { - "calcs": [], + "calcs": [ + "mean" + ], "displayMode": "list", "placement": "bottom", "showLegend": true @@ -234,6 +236,7 @@ "valueSize": 12 }, "tooltip": { + "maxHeight": 600, "mode": "single", "sort": "none" }, @@ -318,7 +321,7 @@ "overrides": [] }, "gridPos": { - "h": 6, + "h": 8, "w": 6, "x": 0, "y": 11 @@ -343,18 +346,21 @@ "fields": "/^value$/", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.5.15", + "pluginVersion": "11.0.0", "targets": [ { "datasource": "mysql", + "editorMode": "code", "format": "table", "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "select \r\n avg(lead_time_minutes/1440) as value\r\nfrom issues i\r\n\tjoin board_issues bi on i.id = bi.issue_id\r\n\tjoin boards b on bi.board_id = b.id\r\n\tjoin project_mapping pm on b.id = pm.row_id\r\nwhere \r\n pm.project_name in (${project}) and\r\n i.type in (${type})\r\n and i.status = 'DONE'\r\n and $__timeFilter(i.resolution_date)", + "rawSql": "select \r\n avg(lead_time_minutes/1440) as value\r\nfrom issues i\r\n\tjoin board_issues bi on i.id = bi.issue_id\r\n\tjoin boards b on bi.board_id = b.id\r\n\tjoin project_mapping pm on b.id = pm.row_id\r\nwhere \r\n pm.project_name in (${project}) and\r\n i.type in (${type})\r\n and i.status = 'DONE'\r\n and i.resolution_date between STR_TO_DATE('$month','%Y-%m-%d') and STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH;", "refId": "A", "select": [ [ @@ -366,6 +372,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "ca_analysis", "timeColumn": "create_time", "timeColumnType": "timestamp", @@ -378,7 +401,7 @@ ] } ], - "title": "Mean Issue Lead Time in Days [Issues Resolved in Select Time Range]", + "title": "Mean Issue Lead Time in Days [Issues Resolved in $month]", "type": "stat" }, { @@ -390,6 +413,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "Lead Time(days)", @@ -429,7 +453,7 @@ "overrides": [] }, "gridPos": { - "h": 6, + "h": 8, "w": 18, "x": 6, "y": 11 @@ -449,7 +473,9 @@ "fullHighlight": false, "groupWidth": 0.7, "legend": { - "calcs": [], + "calcs": [ + "mean" + ], "displayMode": "list", "placement": "bottom", "showLegend": true @@ -461,6 +487,7 @@ "valueSize": 12 }, "tooltip": { + "maxHeight": 600, "mode": "single", "sort": "none" }, @@ -534,10 +561,9 @@ "h": 8, "w": 6, "x": 0, - "y": 17 + "y": 19 }, "id": 14, - "links": [], "options": { "colorMode": "value", "graphMode": "area", @@ -550,19 +576,22 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.5.15", + "pluginVersion": "11.0.0", "targets": [ { "datasource": "mysql", + "editorMode": "code", "format": "table", "group": [], "metricColumn": "none", "queryType": "randomWalk", "rawQuery": true, - "rawSql": "select\n count(distinct author_name)\nfrom\n commits c\n join repo_commits rc on c.sha = rc.commit_sha\n join project_mapping pm on rc.repo_id = pm.row_id\nwhere\n date(authored_date) between\n STR_TO_DATE('$month','%Y-%m-%d') and\n STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH - INTERVAL 1 DAY and\n pm.project_name in (${project});", + "rawSql": "select\n count(distinct author_name)\nfrom\n commits c\n join repo_commits rc on c.sha = rc.commit_sha\n join project_mapping pm on rc.repo_id = pm.row_id and pm.table = 'repos' \nwhere\n date(authored_date) between STR_TO_DATE('$month','%Y-%m-%d') and STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH\n and pm.project_name in (${project})", "refId": "A", "select": [ [ @@ -574,6 +603,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "_devlake_blueprints", "timeColumn": "created_at", "timeColumnType": "timestamp", @@ -586,7 +632,7 @@ ] } ], - "title": "Number of Developers", + "title": "Number of Developers [in $month]", "type": "stat" }, { @@ -597,6 +643,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -638,17 +685,18 @@ "h": 8, "w": 18, "x": 6, - "y": 17 + "y": 19 }, "id": 24, - "links": [], "options": { "barRadius": 0, "barWidth": 0.5, "fullHighlight": false, "groupWidth": 0.7, "legend": { - "calcs": [], + "calcs": [ + "mean" + ], "displayMode": "list", "placement": "bottom", "showLegend": true @@ -660,6 +708,7 @@ "valueSize": 12 }, "tooltip": { + "maxHeight": 600, "mode": "single", "sort": "none" }, @@ -670,12 +719,13 @@ "targets": [ { "datasource": "mysql", + "editorMode": "code", "format": "table", "group": [], "metricColumn": "none", "queryType": "randomWalk", "rawQuery": true, - "rawSql": "with _developers as(\n select\n DATE_ADD(date(c.authored_date), INTERVAL -DAY(date(c.authored_date))+1 DAY) as time,\n count(distinct author_name) as developer_count\n from\n commits c\n join repo_commits rc on c.sha = rc.commit_sha\n join project_mapping pm on rc.repo_id = pm.row_id\n where\n $__timeFilter(c.authored_date)\n and c.authored_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\n and pm.project_name in (${project})\n group by time\n)\n\nselect\n date_format(time,'%M %Y') as month,\n developer_count\nfrom _developers\norder by time asc", + "rawSql": "with _developers as(\n select\n DATE_ADD(date(c.authored_date), INTERVAL -DAY(date(c.authored_date))+1 DAY) as time,\n count(distinct author_name) as developer_count\n from\n commits c\n join repo_commits rc on c.sha = rc.commit_sha\n join project_mapping pm on rc.repo_id = pm.row_id and pm.table = 'repos' \n where\n $__timeFilter(c.authored_date)\n and c.authored_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)\n and pm.project_name in (${project})\n group by time\n)\n\nselect\n date_format(time,'%M %Y') as month,\n developer_count\nfrom _developers\norder by time asc", "refId": "A", "select": [ [ @@ -687,6 +737,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "_devlake_blueprints", "timeColumn": "created_at", "timeColumnType": "timestamp", @@ -736,7 +803,7 @@ "h": 8, "w": 6, "x": 0, - "y": 25 + "y": 27 }, "id": 6, "links": [ @@ -758,10 +825,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.5.15", + "pluginVersion": "11.0.0", "targets": [ { "datasource": "mysql", @@ -771,7 +840,7 @@ "metricColumn": "none", "queryType": "randomWalk", "rawQuery": true, - "rawSql": "with _num_issues_with_sprint_updated as (\n select\n NULLIF(COUNT(DISTINCT i.id), 0) AS num_issues_with_sprint_updated\n from\n issues i\n join board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id = b.id\n\t join project_mapping pm on b.id = pm.row_id\n join issue_changelogs c on i.id = c.issue_id\n where\n pm.project_name in (${project}) and\n c.field_name = 'Sprint' and\n c.original_from_value != '' and\n c.original_to_value != '' and\n date(i.created_date) between\n STR_TO_DATE('$month','%Y-%m-%d') and\n STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH - INTERVAL 1 DAY\n),\n\n_total_num_issues as (\n select\n NULLIF(COUNT(distinct i.id), 0) as total_num_issues\n from\n issues i\n join board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id = b.id\n\t join project_mapping pm on b.id = pm.row_id\n where\n pm.project_name in (${project}) and\n date(i.created_date) between\n STR_TO_DATE('$month','%Y-%m-%d') and\n STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH - INTERVAL 1 DAY\n)\n\nselect\n now() as time,\n 100 - 100 * (select 1.0 * num_issues_with_sprint_updated from _num_issues_with_sprint_updated) / (select total_num_issues from _total_num_issues) as ratio;", + "rawSql": "with _num_issues_with_sprint_updated as (\n select\n NULLIF(COUNT(DISTINCT i.id), 0) AS num_issues_with_sprint_updated\n from\n issues i\n join board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id = b.id\n\t join project_mapping pm on b.id = pm.row_id\n join issue_changelogs c on i.id = c.issue_id\n where\n pm.project_name in (${project}) and\n c.field_name = 'Sprint' and\n c.original_from_value != '' and\n c.original_to_value != '' and\n date(i.created_date) between\n STR_TO_DATE('$month','%Y-%m-%d') and\n STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH\n),\n\n_total_num_issues as (\n select\n NULLIF(COUNT(distinct i.id), 0) as total_num_issues\n from\n issues i\n join board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id = b.id\n\t join project_mapping pm on b.id = pm.row_id\n where\n pm.project_name in (${project}) and\n date(i.created_date) between\n STR_TO_DATE('$month','%Y-%m-%d') and\n STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH\n)\n\nselect\n now() as time,\n 100 - 100 * (select 1.0 * num_issues_with_sprint_updated from _num_issues_with_sprint_updated) / (select total_num_issues from _total_num_issues) as ratio;", "refId": "A", "select": [ [ @@ -812,7 +881,7 @@ ] } ], - "title": "On-time Delivery", + "title": "On-time Delivery [in $month]", "type": "stat" }, { @@ -824,6 +893,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -837,6 +907,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 10, @@ -875,7 +946,7 @@ "h": 8, "w": 18, "x": 6, - "y": 25 + "y": 27 }, "id": 25, "links": [ @@ -887,12 +958,15 @@ ], "options": { "legend": { - "calcs": [], + "calcs": [ + "mean" + ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { + "maxHeight": 600, "mode": "single", "sort": "none" } @@ -980,7 +1054,7 @@ "h": 8, "w": 6, "x": 0, - "y": 33 + "y": 35 }, "id": 4, "links": [ @@ -1002,10 +1076,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.5.15", + "pluginVersion": "11.0.0", "targets": [ { "datasource": "mysql", @@ -1015,7 +1091,7 @@ "metricColumn": "none", "queryType": "randomWalk", "rawQuery": true, - "rawSql": "select\n count(distinct pr.id)\nfrom\n pull_requests pr\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \nwhere\n pr.merged_date is not null \n and date(pr.merged_date) between\n STR_TO_DATE('$month','%Y-%m-%d')\n and STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH - INTERVAL 1 DAY \n and pm.project_name in (${project});", + "rawSql": "select\n count(distinct pr.id)\nfrom\n pull_requests pr\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \nwhere\n pr.merged_date is not null \n and date(pr.merged_date) between\n STR_TO_DATE('$month','%Y-%m-%d')\n and STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH\n and pm.project_name in (${project});", "refId": "A", "select": [ [ @@ -1056,7 +1132,7 @@ ] } ], - "title": "PRs merged", + "title": "PRs merged [in $month]", "type": "stat" }, { @@ -1068,6 +1144,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -1109,7 +1186,7 @@ "h": 8, "w": 18, "x": 6, - "y": 33 + "y": 35 }, "id": 26, "links": [ @@ -1125,7 +1202,9 @@ "fullHighlight": false, "groupWidth": 0.7, "legend": { - "calcs": [], + "calcs": [ + "mean" + ], "displayMode": "list", "placement": "bottom", "showLegend": true @@ -1137,6 +1216,7 @@ "valueSize": 12 }, "tooltip": { + "maxHeight": 600, "mode": "single", "sort": "none" }, @@ -1230,7 +1310,7 @@ "h": 8, "w": 6, "x": 0, - "y": 41 + "y": 43 }, "id": 16, "links": [ @@ -1252,10 +1332,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.5.15", + "pluginVersion": "11.0.0", "targets": [ { "datasource": "mysql", @@ -1265,7 +1347,7 @@ "metricColumn": "none", "queryType": "randomWalk", "rawQuery": true, - "rawSql": "select \n 100*count(distinct case when pr.id in (select pull_request_id from pull_request_issues) then pr.id else null end)/count(distinct pr.id) as unlinked_pr_rate\nfrom pull_requests pr\njoin project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \nwhere pm.project_name in (${project})", + "rawSql": "select \n 100*count(distinct case when pr.id in (select pull_request_id from pull_request_issues) then pr.id else null end)/count(distinct pr.id) as unlinked_pr_rate\nfrom pull_requests pr\njoin project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \nwhere \n pm.project_name in (${project})\n and date(pr.created_date) between STR_TO_DATE('$month','%Y-%m-%d') and STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH", "refId": "A", "select": [ [ @@ -1306,7 +1388,7 @@ ] } ], - "title": "Unlinked PRs %", + "title": "Unlinked PRs % [in $month]", "type": "stat" }, { @@ -1317,6 +1399,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -1330,6 +1413,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 10, @@ -1368,7 +1452,7 @@ "h": 8, "w": 18, "x": 6, - "y": 41 + "y": 43 }, "id": 28, "links": [ @@ -1380,12 +1464,15 @@ ], "options": { "legend": { - "calcs": [], + "calcs": [ + "mean" + ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { + "maxHeight": 600, "mode": "single", "sort": "none" } @@ -1473,10 +1560,9 @@ "h": 8, "w": 6, "x": 0, - "y": 49 + "y": 51 }, "id": 12, - "links": [], "options": { "colorMode": "value", "graphMode": "area", @@ -1489,10 +1575,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.5.15", + "pluginVersion": "11.0.0", "targets": [ { "datasource": "mysql", @@ -1502,7 +1590,7 @@ "metricColumn": "none", "queryType": "randomWalk", "rawQuery": true, - "rawSql": "with _commits_groupby_name_and_date as (\n select\n author_name,\n date(authored_date) as _day,\n count(distinct c.sha)\n from\n commits c\n join repo_commits rc on c.sha = rc.commit_sha\n join project_mapping pm on rc.repo_id = pm.row_id\n where\n pm.project_name in (${project}) and\n WEEKDAY(authored_date) between 0 and 4 and\n date(authored_date) between\n STR_TO_DATE('$month','%Y-%m-%d') and\n STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH - INTERVAL 1 DAY\n group by\n author_name, date(authored_date)\n)\n\nselect 100 * count(*) / (count(distinct author_name) * count(distinct _day))\nfrom _commits_groupby_name_and_date;", + "rawSql": "with _commits_groupby_name_and_date as (\n select\n author_name,\n date(authored_date) as _day,\n count(distinct c.sha)\n from\n commits c\n join repo_commits rc on c.sha = rc.commit_sha\n join project_mapping pm on rc.repo_id = pm.row_id\n where\n pm.project_name in (${project}) and\n WEEKDAY(authored_date) between 0 and 4 and\n date(authored_date) between\n STR_TO_DATE('$month','%Y-%m-%d') and\n STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH\n group by\n author_name, date(authored_date)\n)\n\nselect 100 * count(*) / (count(distinct author_name) * count(distinct _day))\nfrom _commits_groupby_name_and_date;", "refId": "A", "select": [ [ @@ -1543,7 +1631,7 @@ ] } ], - "title": "Coding Days %", + "title": "Coding Days % [in $month]", "type": "stat" }, { @@ -1554,6 +1642,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -1567,6 +1656,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 10, @@ -1605,18 +1695,20 @@ "h": 8, "w": 18, "x": 6, - "y": 49 + "y": 51 }, "id": 29, - "links": [], "options": { "legend": { - "calcs": [], + "calcs": [ + "mean" + ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { + "maxHeight": 600, "mode": "single", "sort": "none" } @@ -1706,7 +1798,7 @@ "h": 8, "w": 6, "x": 0, - "y": 57 + "y": 59 }, "id": 2, "links": [ @@ -1728,19 +1820,22 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.5.15", + "pluginVersion": "11.0.0", "targets": [ { "datasource": "mysql", + "editorMode": "code", "format": "table", "group": [], "metricColumn": "none", "queryType": "randomWalk", "rawQuery": true, - "rawSql": "select\n AVG(TIMESTAMPDIFF(MINUTE, pr.created_date, pr.merged_date) / 1440)\nfrom\n pull_requests pr\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \nwhere\n pm.project_name in (${project}) and\n pr.merged_date is not null\n and date(pr.created_date) between\n STR_TO_DATE('$month','%Y-%m-%d') \n and STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH - INTERVAL 1 DAY", + "rawSql": "select\n AVG(TIMESTAMPDIFF(MINUTE, pr.created_date, pr.merged_date) / 1440)\nfrom\n pull_requests pr\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \nwhere\n pm.project_name in (${project}) and\n pr.merged_date is not null\n and date(pr.created_date) between\n STR_TO_DATE('$month','%Y-%m-%d') \n and STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH", "refId": "A", "select": [ [ @@ -1752,6 +1847,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "_raw_github_api_repositories", "timeColumn": "created_at", "timeColumnType": "timestamp", @@ -1764,7 +1876,7 @@ ] } ], - "title": "Mean Time to Merge (From PR creation to merge)", + "title": "Mean Time to Merge [in $month]", "type": "stat" }, { @@ -1776,6 +1888,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -1789,6 +1902,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 10, @@ -1828,7 +1942,7 @@ "h": 8, "w": 18, "x": 6, - "y": 57 + "y": 59 }, "id": 30, "links": [ @@ -1840,12 +1954,15 @@ ], "options": { "legend": { - "calcs": [], + "calcs": [ + "mean" + ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { + "maxHeight": 600, "mode": "single", "sort": "none" } @@ -1912,41 +2029,13 @@ "mode": "palette-classic" }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMin": 0, - "fillOpacity": 68, - "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false - }, - "lineWidth": 1, - "scaleDistribution": { - "type": "linear" - }, - "thresholdsStyle": { - "mode": "off" } }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "d" + "mappings": [] }, "overrides": [] }, @@ -1954,43 +2043,47 @@ "h": 8, "w": 12, "x": 0, - "y": 65 + "y": 67 }, - "id": 20, - "links": [], + "id": 21, "options": { - "barRadius": 0, - "barWidth": 0.27, - "fullHighlight": false, - "groupWidth": 0.7, + "displayLabels": [ + "name", + "percent" + ], "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value", + "percent" + ] }, - "orientation": "auto", - "showValue": "auto", - "stacking": "none", - "text": { - "valueSize": 12 + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, "tooltip": { + "maxHeight": 600, "mode": "single", "sort": "none" - }, - "xTickLabelRotation": 0, - "xTickLabelSpacing": 0 + } }, "targets": [ { "datasource": "mysql", + "editorMode": "code", "format": "table", "group": [], "metricColumn": "none", "queryType": "randomWalk", "rawQuery": true, - "rawSql": "select\n i.priority as 'Priority',\n AVG(TIMESTAMPDIFF(MINUTE, i.created_date, NOW()) / 1440) as 'Average Age'\nfrom\n issues i\n join board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\n\tjoin project_mapping pm on b.id = pm.row_id\nwhere\n pm.project_name in (${project}) and\n i.status = 'TODO'\n and i.type = 'BUG'\n and i.priority in (${priority})\ngroup by\n i.priority", + "rawSql": "select\n count(distinct case when i.type = 'BUG' then i.id else null end) as 'Bug',\n count(distinct case when i.type != 'BUG' and epic_key != '' then i.id else null end) as 'Strategic',\n count(distinct case when i.type != 'BUG' and epic_key = '' then i.id else null end) as 'Non-Strategic'\nfrom\n issues i\n join board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\n\tjoin project_mapping pm on b.id = pm.row_id\nwhere\n pm.project_name in (${project}) and\n i.resolution_date is not null and\n date(resolution_date) between\n STR_TO_DATE('$month','%Y-%m-%d') and\n STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH", "refId": "A", "select": [ [ @@ -2002,6 +2095,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "_devlake_blueprints", "timeColumn": "created_at", "timeColumnType": "timestamp", @@ -2014,8 +2124,8 @@ ] } ], - "title": "Average Age of Critical Outstanding Defects by Priority", - "type": "barchart" + "title": "Work Done % [in $month]", + "type": "piechart" }, { "datasource": "mysql", @@ -2025,13 +2135,42 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 68, + "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "off" } }, - "mappings": [] + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "d" }, "overrides": [] }, @@ -2039,47 +2178,45 @@ "h": 8, "w": 12, "x": 12, - "y": 65 + "y": 67 }, - "id": 21, - "links": [], + "id": 20, "options": { - "displayLabels": [ - "name", - "percent" - ], + "barRadius": 0, + "barWidth": 0.27, + "fullHighlight": false, + "groupWidth": 0.7, "legend": { - "displayMode": "table", - "placement": "right", - "showLegend": true, - "values": [ - "value", - "percent" - ] - }, - "pieType": "pie", - "reduceOptions": { "calcs": [ - "lastNotNull" + "mean" ], - "fields": "", - "values": false + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "orientation": "auto", + "showValue": "auto", + "stacking": "none", + "text": { + "valueSize": 12 }, "tooltip": { + "maxHeight": 600, "mode": "single", "sort": "none" - } + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 }, "targets": [ { "datasource": "mysql", - "editorMode": "code", "format": "table", "group": [], "metricColumn": "none", "queryType": "randomWalk", "rawQuery": true, - "rawSql": "select\n count(distinct case when i.type = 'BUG' then i.id else null end) as 'Bug',\n count(distinct case when i.type != 'BUG' and epic_key != '' then i.id else null end) as 'Strategic',\n count(distinct case when i.type != 'BUG' and epic_key = '' then i.id else null end) as 'Non-Strategic'\nfrom\n issues i\n join board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\n\tjoin project_mapping pm on b.id = pm.row_id\nwhere\n pm.project_name in (${project}) and\n i.resolution_date is not null and\n date(resolution_date) between\n STR_TO_DATE('$month','%Y-%m-%d') and\n STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH - INTERVAL 1 DAY", + "rawSql": "select\n i.priority as 'Priority',\n AVG(TIMESTAMPDIFF(MINUTE, i.created_date, NOW()) / 1440) as 'Average Age'\nfrom\n issues i\n join board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\n\tjoin project_mapping pm on b.id = pm.row_id\nwhere\n pm.project_name in (${project}) and\n i.status = 'TODO'\n and i.type = 'BUG'\n and i.priority in (${priority})\ngroup by\n i.priority", "refId": "A", "select": [ [ @@ -2091,23 +2228,6 @@ } ] ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, "table": "_devlake_blueprints", "timeColumn": "created_at", "timeColumnType": "timestamp", @@ -2120,8 +2240,8 @@ ] } ], - "title": "Work Done % [Selected Month]", - "type": "piechart" + "title": "Average Age of Critical Outstanding Defects by Priority", + "type": "barchart" }, { "datasource": { @@ -2132,7 +2252,7 @@ "h": 2, "w": 24, "x": 0, - "y": 73 + "y": 75 }, "id": 34, "options": { @@ -2144,7 +2264,7 @@ "content": "
\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).", "mode": "markdown" }, - "pluginVersion": "9.5.15", + "pluginVersion": "11.0.0", "targets": [ { "datasource": { @@ -2159,8 +2279,7 @@ } ], "refresh": "", - "schemaVersion": 38, - "style": "dark", + "schemaVersion": 39, "tags": [ "Engineering Leads Dashboard" ], @@ -2187,6 +2306,27 @@ "sort": 0, "type": "query" }, + { + "current": { + "selected": true, + "text": "", + "value": "" + }, + "datasource": "mysql", + "definition": "select\n distinct(concat(date_format(DATE_ADD(date(created_date), INTERVAL -DAY(date(created_date))+1 DAY), '%Y-%m') , ':', date_format(DATE_ADD(date(created_date), INTERVAL -DAY(date(created_date))+1 DAY), '%Y-%m-%d'))) as month\nfrom\n issues i\norder by month desc", + "hide": 0, + "includeAll": false, + "label": "Selected Month", + "multi": false, + "name": "month", + "options": [], + "query": "select\n distinct(concat(date_format(DATE_ADD(date(created_date), INTERVAL -DAY(date(created_date))+1 DAY), '%Y-%m') , ':', date_format(DATE_ADD(date(created_date), INTERVAL -DAY(date(created_date))+1 DAY), '%Y-%m-%d'))) as month\nfrom\n issues i\norder by month desc", + "refresh": 1, + "regex": "/^(?.*):(?.*)$/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, { "current": { "selected": true, @@ -2233,27 +2373,6 @@ "skipUrlSync": false, "sort": 0, "type": "query" - }, - { - "current": { - "selected": false, - "text": "2024-01", - "value": "2024-01-01" - }, - "datasource": "mysql", - "definition": "select\n distinct(concat(date_format(DATE_ADD(date(created_date), INTERVAL -DAY(date(created_date))+1 DAY), '%Y-%m') , ':', date_format(DATE_ADD(date(created_date), INTERVAL -DAY(date(created_date))+1 DAY), '%Y-%m-%d'))) as month\nfrom\n issues i\norder by month desc", - "hide": 0, - "includeAll": false, - "label": "Selected Month", - "multi": false, - "name": "month", - "options": [], - "query": "select\n distinct(concat(date_format(DATE_ADD(date(created_date), INTERVAL -DAY(date(created_date))+1 DAY), '%Y-%m') , ':', date_format(DATE_ADD(date(created_date), INTERVAL -DAY(date(created_date))+1 DAY), '%Y-%m-%d'))) as month\nfrom\n issues i\norder by month desc", - "refresh": 1, - "regex": "/^(?.*):(?.*)$/", - "skipUrlSync": false, - "sort": 0, - "type": "query" } ] }, @@ -2261,10 +2380,11 @@ "from": "now-6M", "to": "now" }, + "timeRangeUpdatedDuringEditOrView": false, "timepicker": {}, "timezone": "", "title": "Engineering Overview", "uid": "ZF6abXX7z", - "version": 2, + "version": 15, "weekStart": "" } \ No newline at end of file