| { |
| "annotations": { |
| "list": [ |
| { |
| "builtIn": 1, |
| "datasource": "-- Grafana --", |
| "enable": true, |
| "hide": true, |
| "iconColor": "rgba(0, 211, 255, 1)", |
| "name": "Annotations & Alerts", |
| "type": "dashboard" |
| } |
| ] |
| }, |
| "editable": true, |
| "gnetId": null, |
| "graphTooltip": 0, |
| "id": 27, |
| "iteration": 1682063086384, |
| "links": [], |
| "panels": [ |
| { |
| "datasource": null, |
| "gridPos": { |
| "h": 3, |
| "w": 23, |
| "x": 0, |
| "y": 0 |
| }, |
| "id": 48, |
| "options": { |
| "content": "- Use Cases: This dashboard can be used to track community growth by OSS maintainers.\n- Data Source Required: GitHub users' organizations are used to filter issues/PRs created by certain users. [Publicize users' org](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/publicizing-or-hiding-organization-membership) so that Apache DevLake can collect users' org.", |
| "mode": "markdown" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "queryType": "randomWalk", |
| "refId": "A" |
| } |
| ], |
| "title": "Dashboard Introduction", |
| "type": "text" |
| }, |
| { |
| "collapsed": false, |
| "datasource": null, |
| "gridPos": { |
| "h": 1, |
| "w": 24, |
| "x": 0, |
| "y": 3 |
| }, |
| "id": 42, |
| "panels": [], |
| "title": "Community Issues", |
| "type": "row" |
| }, |
| { |
| "datasource": "mysql", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 8, |
| "x": 0, |
| "y": 4 |
| }, |
| "id": 6, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "select\n count(*)\nfrom\n lake.issues as i\n join lake.board_issues bi on i.id = bi.issue_id\n join boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and date(i.created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($repo_id)", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "script_version" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_migration_history", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "New Issue Count [Previous Week]", |
| "type": "stat" |
| }, |
| { |
| "datasource": "mysql", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 6, |
| "x": 8, |
| "y": 4 |
| }, |
| "id": 22, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "select\n count(*)\nfrom\n lake.issues as i\n join lake.board_issues bi on i.id = bi.issue_id\n join boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and date(i.created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($repo_id)\n and i.creator_id not in (select distinct id from accounts where organization in ($org))", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "script_version" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_migration_history", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "New Issue Created by Community [Previous Week]", |
| "type": "stat" |
| }, |
| { |
| "datasource": "mysql", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| }, |
| "unit": "percentunit" |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 6, |
| "x": 14, |
| "y": 4 |
| }, |
| "id": 23, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "select\n sum(case when i.creator_id not in (select distinct id from accounts where organization in ($org)\n ) then 1 else 0 end)/count(*) as community_issue_ratio\nfrom\n lake.issues as i\n join lake.board_issues bi on i.id = bi.issue_id\n join boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and date(i.created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($repo_id)", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "script_version" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_migration_history", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Ratio of New Issue Created by the Community [Previous Week]", |
| "type": "stat" |
| }, |
| { |
| "datasource": "mysql", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "custom": { |
| "align": "auto", |
| "displayMode": "auto" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 4, |
| "x": 20, |
| "y": 4 |
| }, |
| "id": 45, |
| "options": { |
| "showHeader": true |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "select\n distinct i.creator_name\nfrom\n lake.issues as i\n join lake.board_issues bi on i.id = bi.issue_id\n join boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and date(i.created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($repo_id)\n and i.creator_name not in (select distinct creator_name from issues where created_date < curdate() - INTERVAL WEEKDAY(curdate())+7 DAY and creator_name is not null)", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "script_version" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_migration_history", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "1st Time Issue Reporter [Previous Week]", |
| "type": "table" |
| }, |
| { |
| "datasource": "mysql", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "red", |
| "value": null |
| }, |
| { |
| "color": "yellow", |
| "value": 0.5 |
| }, |
| { |
| "color": "green", |
| "value": 0.8 |
| } |
| ] |
| }, |
| "unit": "percentunit" |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 8, |
| "x": 0, |
| "y": 12 |
| }, |
| "id": 24, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "with issue_comment_list as(\n select\n i.id as issue_id,\n i.url,\n i.title,\n ic.id as comment_id,\n ic.created_date as comment_date,\n ic.body,\n case when ic.id is not null then rank() over (partition by i.id order by ic.created_date asc) else null end as comment_rank\n from\n issues i\n join board_issues bi on i.id = bi.issue_id\n join boards b on bi.board_id = b.id\n left join issue_comments ic on i.id = ic.issue_id\n where\n i.type in ($issue_type)\n and date(i.created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($repo_id)\n and i.creator_id not in (select distinct id from accounts where organization in ($org))\n)\n\nselect\n 1 - count(distinct case when comment_id is null then issue_id else null end)/count(distinct issue_id) as response_rate\nfrom issue_comment_list", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "script_version" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_migration_history", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Community Issues' Response Rate [Previous Week]", |
| "type": "stat" |
| }, |
| { |
| "datasource": "mysql", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "custom": { |
| "align": "auto", |
| "displayMode": "auto" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [ |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "title" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 449 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "url" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 415 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "issue_id" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 117 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "status" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 100 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "issue_number" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 125 |
| } |
| ] |
| } |
| ] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 16, |
| "x": 8, |
| "y": 12 |
| }, |
| "id": 25, |
| "options": { |
| "showHeader": true, |
| "sortBy": [] |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "with issue_comment_list as(\n select\n i.id as issue_id,\n i.url,\n i.title,\n i.creator_name,\n i.created_date as issue_created_date,\n i.status,\n ic.id as comment_id,\n ic.created_date as comment_date,\n ic.body,\n case when ic.id is not null then rank() over (partition by i.id order by ic.created_date asc) else null end as comment_rank\n from\n issues i\n join board_issues bi on i.id = bi.issue_id\n join boards b on bi.board_id = b.id\n left join issue_comments ic on i.id = ic.issue_id\n where\n i.type in ($issue_type)\n and date(i.created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($repo_id)\n and i.creator_id not in (select distinct id from accounts where organization in ($org))\n)\n\nselect \n SUBSTRING_INDEX(url, '/', -1) as issue_number,\n title,\n creator_name,\n issue_created_date,\n status,\n (TIMESTAMPDIFF(MINUTE,issue_created_date,NOW()))/1440 as 'queue_time_in_days',\n url\nfrom issue_comment_list\nwhere comment_id is null", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "script_version" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_migration_history", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "List of New Community Issues with no Comments [Previous Week]", |
| "type": "table" |
| }, |
| { |
| "datasource": "mysql", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "#EAB839", |
| "value": 1 |
| }, |
| { |
| "color": "red", |
| "value": 2 |
| } |
| ] |
| }, |
| "unit": "d" |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 8, |
| "x": 0, |
| "y": 20 |
| }, |
| "id": 26, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "with issue_comment_list as(\n select\n i.id as issue_id,\n i.url,\n i.title,\n i.created_date as issue_created_date,\n ic.id as comment_id,\n ic.created_date as comment_date,\n ic.body,\n case when ic.id is not null then rank() over (partition by i.id order by ic.created_date asc) else null end as comment_rank\n from\n issues i\n join board_issues bi on i.id = bi.issue_id\n join boards b on bi.board_id = b.id\n left join issue_comments ic on i.id = ic.issue_id\n where\n i.type in ($issue_type)\n and date(i.created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($repo_id)\n and i.creator_id not in (select distinct id from accounts where organization in ($org))\n)\n\nselect\n avg((TIMESTAMPDIFF(MINUTE, issue_created_date,comment_date))/1440)\nfrom issue_comment_list\nwhere comment_rank = 1", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "script_version" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_migration_history", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "New Community Issues' Average Response Time in Days [Previous Week]", |
| "type": "stat" |
| }, |
| { |
| "datasource": "mysql", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "custom": { |
| "align": "auto", |
| "displayMode": "auto" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "#EAB839", |
| "value": 0.2 |
| }, |
| { |
| "color": "red", |
| "value": 0.5 |
| } |
| ] |
| }, |
| "unit": "none" |
| }, |
| "overrides": [ |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "body" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 364 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "url" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": null |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "issue_id" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 73 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "comment_id" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 106 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "comment_rank" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 28 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "response_time_in_days" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 184 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "issue_nunber" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 127 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "issue_number" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 122 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "title" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 451 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "creator_name" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 146 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "issue_created_date" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 162 |
| } |
| ] |
| }, |
| { |
| "matcher": { |
| "id": "byName", |
| "options": "comment_date" |
| }, |
| "properties": [ |
| { |
| "id": "custom.width", |
| "value": 160 |
| } |
| ] |
| } |
| ] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 16, |
| "x": 8, |
| "y": 20 |
| }, |
| "id": 28, |
| "options": { |
| "showHeader": true, |
| "sortBy": [] |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "with issue_comment_list as(\n select\n SUBSTRING_INDEX(i.url, '/', -1) as issue_number,\n i.url,\n i.title,\n i.creator_name,\n i.created_date as issue_created_date,\n ic.id as comment_id,\n ic.created_date as comment_date,\n ic.body,\n case when ic.id is not null then rank() over (partition by i.id order by ic.created_date asc) else null end as comment_rank\n from\n issues i\n join board_issues bi on i.id = bi.issue_id\n join boards b on bi.board_id = b.id\n left join issue_comments ic on i.id = ic.issue_id\n where\n i.type in ($issue_type)\n and date(i.created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($repo_id)\n and i.creator_id not in (select distinct id from accounts where organization in ($org))\n)\n\nselect\n issue_number,\n title,\n -- body,\n creator_name,\n issue_created_date,\n comment_date,\n (TIMESTAMPDIFF(MINUTE, issue_created_date,comment_date))/60 as response_time_in_hours,\n url\nfrom issue_comment_list\nwhere comment_rank = 1", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "script_version" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_migration_history", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "List of New Community Issues' 1st Comment [Previous Week]", |
| "type": "table" |
| }, |
| { |
| "collapsed": false, |
| "datasource": null, |
| "gridPos": { |
| "h": 1, |
| "w": 24, |
| "x": 0, |
| "y": 28 |
| }, |
| "id": 44, |
| "panels": [], |
| "title": "Community PRs", |
| "type": "row" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 8, |
| "x": 0, |
| "y": 29 |
| }, |
| "id": 31, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "hide": false, |
| "metricColumn": "none", |
| "rawQuery": true, |
| "rawSql": "select\n\tcount(*) as pull_request_count\nfrom \n\tpull_requests pr\nwhere\n date(created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n\tand base_repo_id in ($repo_id)\n\t\n\n", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Number of New Pull Requests [Previous Week]", |
| "type": "stat" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 6, |
| "x": 8, |
| "y": 29 |
| }, |
| "id": 34, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "hide": false, |
| "metricColumn": "none", |
| "rawQuery": true, |
| "rawSql": "select\n\tcount(*) as pull_request_count\nfrom \n\tpull_requests pr\nwhere\n date(created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n\tand base_repo_id in ($repo_id)\n\tand author_id not in (select distinct id from accounts where organization in ($org))", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Number of New Pull Requests Created by the Community [Previous Week]", |
| "type": "stat" |
| }, |
| { |
| "datasource": "mysql", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| }, |
| "unit": "percentunit" |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 6, |
| "x": 14, |
| "y": 29 |
| }, |
| "id": 35, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "metricColumn": "none", |
| "queryType": "randomWalk", |
| "rawQuery": true, |
| "rawSql": "select\n sum(case when author_id not in (select distinct id from accounts where organization in ($org))\n then 1 else 0 end)/count(*) as community_pr_ratio\nfrom\n pull_requests pr\nwhere\n date(created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n\tand base_repo_id in ($repo_id)", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "script_version" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "_devlake_migration_history", |
| "timeColumn": "created_at", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Ratio of New PR Created by the Community [Previous Week]", |
| "type": "stat" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "custom": { |
| "align": "auto", |
| "displayMode": "auto" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 4, |
| "x": 20, |
| "y": 29 |
| }, |
| "id": 46, |
| "options": { |
| "showHeader": true |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "hide": false, |
| "metricColumn": "none", |
| "rawQuery": true, |
| "rawSql": "select\n distinct author_name\nfrom \n\tpull_requests pr\nwhere\n date(created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n\tand base_repo_id in ($repo_id)\n\tand author_name not in (select distinct author_name from pull_requests where created_date < curdate() - INTERVAL WEEKDAY(curdate())+7 DAY and author_name is not null)", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "First time Contributor [Previous Week]", |
| "type": "table" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| } |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 8, |
| "x": 0, |
| "y": 37 |
| }, |
| "id": 36, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "hide": false, |
| "metricColumn": "none", |
| "rawQuery": true, |
| "rawSql": "select\n\tcount(*) as merged_pull_request_count\nfrom \n\tpull_requests pr\nwhere\n date(created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n\tand base_repo_id in ($repo_id)\n\tand merged_date is not null\n\tand author_id not in (select distinct id from accounts where organization in ($org))", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Number of Merged Pull Requests Created by the Community [Previous Week]", |
| "type": "stat" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "red", |
| "value": null |
| }, |
| { |
| "color": "#EAB839", |
| "value": 0.5 |
| }, |
| { |
| "color": "green", |
| "value": 0.8 |
| } |
| ] |
| }, |
| "unit": "percentunit" |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 8, |
| "x": 8, |
| "y": 37 |
| }, |
| "id": 37, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "hide": false, |
| "metricColumn": "none", |
| "rawQuery": true, |
| "rawSql": "select\n\tsum(case when merged_date is not null then 1 else 0 end)/ count(*) as merged_pull_request_ratio\nfrom \n\tpull_requests pr\nwhere\n date(created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n\tand base_repo_id in ($repo_id)\n\tand author_id not in (select distinct id from accounts where organization in ($org))", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Ratio of Merged Pull Requests Created by the Community [Previous Week]", |
| "type": "stat" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 3 |
| } |
| ] |
| }, |
| "unit": "d" |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 8, |
| "w": 8, |
| "x": 16, |
| "y": 37 |
| }, |
| "id": 39, |
| "options": { |
| "colorMode": "value", |
| "graphMode": "area", |
| "justifyMode": "auto", |
| "orientation": "auto", |
| "reduceOptions": { |
| "calcs": [ |
| "lastNotNull" |
| ], |
| "fields": "", |
| "values": false |
| }, |
| "text": {}, |
| "textMode": "auto" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "hide": false, |
| "metricColumn": "none", |
| "rawQuery": true, |
| "rawSql": "select\n\tavg(TIMESTAMPDIFF(Minute,created_date,merged_date)/1440)\nfrom \n\tpull_requests\nwhere \n date(created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n\tand base_repo_id in ($repo_id)\n\tand merged_date is not null\n\tand author_id not in (select distinct id from accounts where organization in ($org))", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Average Time to Merge of Community Pull Requests in Days [Previous Week]", |
| "type": "stat" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "palette-classic" |
| }, |
| "custom": { |
| "axisLabel": "Merged PR Count", |
| "axisPlacement": "auto", |
| "axisSoftMin": 0, |
| "fillOpacity": 54, |
| "gradientMode": "none", |
| "hideFrom": { |
| "legend": false, |
| "tooltip": false, |
| "viz": false |
| }, |
| "lineWidth": 1 |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "absolute", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| }, |
| "unit": "none" |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 9, |
| "w": 12, |
| "x": 0, |
| "y": 45 |
| }, |
| "id": 33, |
| "options": { |
| "barWidth": 0.5, |
| "groupWidth": 0.7, |
| "legend": { |
| "calcs": [], |
| "displayMode": "list", |
| "placement": "bottom" |
| }, |
| "orientation": "auto", |
| "showValue": "auto", |
| "text": { |
| "valueSize": 12 |
| }, |
| "tooltip": { |
| "mode": "multi" |
| } |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "hide": false, |
| "metricColumn": "none", |
| "rawQuery": true, |
| "rawSql": "select\n author_name,\n\tcount(*) as pull_request_count\nfrom \n\tpull_requests pr\nwhere\n date(created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n\tand base_repo_id in ($repo_id)\n\tand author_id not in (select distinct id from accounts where organization in ($org))\ngroup by 1\norder by 2 desc\nlimit 20\n", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Top Community Contributors By Number of PRs Created [Previous Week]", |
| "type": "barchart" |
| }, |
| { |
| "datasource": "mysql", |
| "description": "", |
| "fieldConfig": { |
| "defaults": { |
| "color": { |
| "mode": "thresholds" |
| }, |
| "mappings": [], |
| "thresholds": { |
| "mode": "percentage", |
| "steps": [ |
| { |
| "color": "green", |
| "value": null |
| }, |
| { |
| "color": "red", |
| "value": 80 |
| } |
| ] |
| }, |
| "unit": "none" |
| }, |
| "overrides": [] |
| }, |
| "gridPos": { |
| "h": 9, |
| "w": 12, |
| "x": 12, |
| "y": 45 |
| }, |
| "id": 40, |
| "options": { |
| "displayMode": "gradient", |
| "orientation": "horizontal", |
| "reduceOptions": { |
| "calcs": [ |
| "first" |
| ], |
| "fields": "", |
| "values": true |
| }, |
| "showUnfilled": true, |
| "text": { |
| "valueSize": 1 |
| } |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "format": "table", |
| "group": [], |
| "hide": false, |
| "metricColumn": "none", |
| "rawQuery": true, |
| "rawSql": "select\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 author_id not in (select distinct id from accounts where organization in ($org))\ngroup by 1\norder by 2 desc\nlimit 20\n", |
| "refId": "A", |
| "select": [ |
| [ |
| { |
| "params": [ |
| "id" |
| ], |
| "type": "column" |
| } |
| ] |
| ], |
| "table": "ae_projects", |
| "timeColumn": "ae_create_time", |
| "timeColumnType": "timestamp", |
| "where": [ |
| { |
| "name": "$__timeFilter", |
| "params": [], |
| "type": "macro" |
| } |
| ] |
| } |
| ], |
| "title": "Top Community Contributors By PRs Created [All History]", |
| "type": "bargauge" |
| }, |
| { |
| "datasource": null, |
| "gridPos": { |
| "h": 2, |
| "w": 24, |
| "x": 0, |
| "y": 54 |
| }, |
| "id": 50, |
| "options": { |
| "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).", |
| "mode": "markdown" |
| }, |
| "pluginVersion": "8.0.6", |
| "targets": [ |
| { |
| "queryType": "randomWalk", |
| "refId": "A" |
| } |
| ], |
| "type": "text" |
| } |
| ], |
| "refresh": "", |
| "schemaVersion": 30, |
| "style": "dark", |
| "tags": [], |
| "templating": { |
| "list": [ |
| { |
| "allValue": null, |
| "current": { |
| "selected": true, |
| "text": [ |
| "All" |
| ], |
| "value": [ |
| "$__all" |
| ] |
| }, |
| "datasource": "mysql", |
| "definition": "select concat(name, '-', id) as text from repos", |
| "description": null, |
| "error": null, |
| "hide": 0, |
| "includeAll": true, |
| "label": "Repo", |
| "multi": true, |
| "name": "repo_id", |
| "options": [], |
| "query": "select concat(name, '-', id) as text from repos", |
| "refresh": 1, |
| "regex": "/^(?<text>.*)-(?<value>.*)$/", |
| "skipUrlSync": false, |
| "sort": 0, |
| "type": "query" |
| }, |
| { |
| "allValue": null, |
| "current": { |
| "selected": false, |
| "text": "All", |
| "value": "$__all" |
| }, |
| "datasource": "mysql", |
| "definition": "select distinct type from issues", |
| "description": null, |
| "error": null, |
| "hide": 0, |
| "includeAll": true, |
| "label": "Issue Type", |
| "multi": false, |
| "name": "issue_type", |
| "options": [], |
| "query": "select distinct type from issues", |
| "refresh": 1, |
| "regex": "", |
| "skipUrlSync": false, |
| "sort": 0, |
| "type": "query" |
| }, |
| { |
| "allValue": null, |
| "current": { |
| "selected": true, |
| "text": [ |
| "All" |
| ], |
| "value": [ |
| "$__all" |
| ] |
| }, |
| "datasource": "mysql", |
| "definition": "select distinct organization from accounts where organization != ''", |
| "description": "", |
| "error": null, |
| "hide": 0, |
| "includeAll": true, |
| "label": "Community Definition - Issues and PRs NOT from Organization(s)", |
| "multi": true, |
| "name": "org", |
| "options": [], |
| "query": "select distinct organization from accounts where organization != ''", |
| "refresh": 1, |
| "regex": "", |
| "skipUrlSync": false, |
| "sort": 0, |
| "type": "query" |
| } |
| ] |
| }, |
| "time": { |
| "from": "now-6M", |
| "to": "now" |
| }, |
| "timepicker": {}, |
| "timezone": "", |
| "title": "Weekly Community Retro", |
| "uid": "VTr6Y_q7z", |
| "version": 3 |
| } |