This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 655736bc7 feat: add weekly and distribution view to work logs
dashboard (#7294)
655736bc7 is described below
commit 655736bc7f8e11f81a658cc19169cb39cbedbfe1
Author: Louis.z <[email protected]>
AuthorDate: Mon Apr 8 14:18:11 2024 +0800
feat: add weekly and distribution view to work logs dashboard (#7294)
Co-authored-by: Startrekzky <[email protected]>
---
grafana/dashboards/WorkLogs.json | 453 +++++++++++++++++++++++++++++++++++----
1 file changed, 410 insertions(+), 43 deletions(-)
diff --git a/grafana/dashboards/WorkLogs.json b/grafana/dashboards/WorkLogs.json
index ef7695733..e941befb0 100644
--- a/grafana/dashboards/WorkLogs.json
+++ b/grafana/dashboards/WorkLogs.json
@@ -18,7 +18,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
- "id": 24,
+ "id": 33,
"links": [],
"liveNow": false,
"panels": [
@@ -44,7 +44,7 @@
"content": "- Use Cases: This dashboard shows the work logs of a team
or a developer\n- Data Sources Required to show all data: \n - One of the Git
tools, e.g. [GitHub](https://devlake.apache.org/docs/Configuration/GitHub),
[GitLab](https://devlake.apache.org/docs/Configuration/GitLab),
[Bitbucket](https://devlake.apache.org/docs/Configuration/BitBucket) or [Azure
DevOps](https://devlake.apache.org/docs/Configuration/AzureDevOps)\n - One of
the issue tracking tools, e.g. [Jir [...]
"mode": "markdown"
},
- "pluginVersion": "9.5.15",
+ "pluginVersion": "10.2.6",
"targets": [
{
"datasource": {
@@ -103,11 +103,11 @@
"index": 1
},
"Open a PR": {
- "color": "light-green",
+ "color": "super-light-green",
"index": 3
},
"PR gets merged": {
- "color": "semi-dark-green",
+ "color": "green",
"index": 4
},
"Review PR": {
@@ -210,7 +210,7 @@
"showHeader": true,
"sortBy": []
},
- "pluginVersion": "9.5.15",
+ "pluginVersion": "10.2.6",
"targets": [
{
"datasource": "mysql",
@@ -238,16 +238,379 @@
}
}
],
- "title": "Work Logs",
+ "title": "Activities by date",
"type": "table"
},
+ {
+ "datasource": "mysql",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "custom": {
+ "align": "auto",
+ "cellOptions": {
+ "type": "auto"
+ },
+ "inspect": false
+ },
+ "mappings": [],
+ "noValue": "-",
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byType",
+ "options": "number"
+ },
+ "properties": [
+ {
+ "id": "thresholds",
+ "value": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "#ffffff",
+ "value": null
+ },
+ {
+ "color": "super-light-green",
+ "value": 1
+ },
+ {
+ "color": "green",
+ "value": 5
+ },
+ {
+ "color": "dark-green",
+ "value": 20
+ }
+ ]
+ }
+ },
+ {
+ "id": "custom.cellOptions",
+ "value": {
+ "mode": "gradient",
+ "type": "color-background"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byType",
+ "options": "number"
+ },
+ "properties": [
+ {
+ "id": "custom.width",
+ "value": 70
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "week_name"
+ },
+ "properties": [
+ {
+ "id": "custom.width",
+ "value": 208
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 11,
+ "w": 12,
+ "x": 0,
+ "y": 21
+ },
+ "id": 23,
+ "options": {
+ "cellHeight": "sm",
+ "footer": {
+ "countRows": false,
+ "fields": "",
+ "reducer": [
+ "sum"
+ ],
+ "show": false
+ },
+ "showHeader": true,
+ "sortBy": []
+ },
+ "pluginVersion": "10.2.6",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "rawQuery": true,
+ "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_activities as (\n SELECT \n *,\n ROW_NUMBER() OVER
(PARTITION BY `Date` ORDER BY `Time` desc) AS _row_number\n FROM (\n SELECT
DATE(created_date) as Date, created_date as Time, 'Create an issue' as
Activity, concat('#', issue_key, ' ', title) a [...]
+ "refId": "A",
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
+ }
+ ],
+ "title": "Activity count in last 10 weeks",
+ "type": "table"
+ },
+ {
+ "datasource": "mysql",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisBorderShow": false,
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "fillOpacity": 80,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineWidth": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "purple",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "value"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "mode": "thresholds"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Create an issue"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "light-blue",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Issue resolved"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "semi-dark-blue",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Finish a commit"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "light-purple",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Open a PR"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "super-light-green",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "PR gets merged"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "green",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Comment on PR"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "super-light-orange",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Review PR"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "orange",
+ "mode": "fixed"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 11,
+ "w": 12,
+ "x": 12,
+ "y": 21
+ },
+ "id": 22,
+ "options": {
+ "barRadius": 0,
+ "barWidth": 0.5,
+ "fullHighlight": false,
+ "groupWidth": 0.7,
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "orientation": "auto",
+ "showValue": "auto",
+ "stacking": "normal",
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ },
+ "xTickLabelRotation": 0,
+ "xTickLabelSpacing": 0
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "rawQuery": true,
+ "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_activities as (\n SELECT \n *,\n ROW_NUMBER() OVER
(PARTITION BY `Date` ORDER BY `Time` desc) AS _row_number\n FROM (\n SELECT
DATE(created_date) as Date, created_date as Time, 'Create an issue' as
Activity, concat('#', issue_key, ' ', title) a [...]
+ "refId": "A",
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
+ }
+ ],
+ "title": "Activity distribution in last 7 days",
+ "type": "barchart"
+ },
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
- "y": 21
+ "y": 32
},
"id": 10,
"panels": [],
@@ -322,7 +685,7 @@
"h": 8,
"w": 4,
"x": 0,
- "y": 22
+ "y": 33
},
"id": 4,
"options": {
@@ -401,7 +764,7 @@
"h": 8,
"w": 5,
"x": 4,
- "y": 22
+ "y": 33
},
"id": 5,
"options": {
@@ -414,9 +777,10 @@
"fields": "",
"values": true
},
- "textMode": "auto"
+ "textMode": "auto",
+ "wideLayout": true
},
- "pluginVersion": "9.5.15",
+ "pluginVersion": "10.2.6",
"targets": [
{
"datasource": "mysql",
@@ -472,7 +836,7 @@
"h": 8,
"w": 5,
"x": 9,
- "y": 22
+ "y": 33
},
"id": 6,
"options": {
@@ -485,9 +849,10 @@
"fields": "",
"values": true
},
- "textMode": "auto"
+ "textMode": "auto",
+ "wideLayout": true
},
- "pluginVersion": "9.5.15",
+ "pluginVersion": "10.2.6",
"targets": [
{
"datasource": "mysql",
@@ -543,7 +908,7 @@
"h": 8,
"w": 10,
"x": 14,
- "y": 22
+ "y": 33
},
"id": 20,
"options": {
@@ -556,9 +921,10 @@
"fields": "/.*/",
"values": true
},
- "textMode": "auto"
+ "textMode": "auto",
+ "wideLayout": true
},
- "pluginVersion": "9.5.15",
+ "pluginVersion": "10.2.6",
"targets": [
{
"datasource": "mysql",
@@ -614,7 +980,7 @@
"h": 8,
"w": 9,
"x": 0,
- "y": 30
+ "y": 41
},
"id": 8,
"options": {
@@ -627,9 +993,10 @@
"fields": "/.*/",
"values": true
},
- "textMode": "auto"
+ "textMode": "auto",
+ "wideLayout": true
},
- "pluginVersion": "9.5.15",
+ "pluginVersion": "10.2.6",
"targets": [
{
"datasource": "mysql",
@@ -669,6 +1036,7 @@
"mode": "palette-classic"
},
"custom": {
+ "axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
@@ -710,7 +1078,7 @@
"h": 8,
"w": 15,
"x": 9,
- "y": 30
+ "y": 41
},
"id": 18,
"links": [
@@ -804,7 +1172,7 @@
"h": 1,
"w": 24,
"x": 0,
- "y": 38
+ "y": 49
},
"id": 11,
"panels": [],
@@ -823,8 +1191,7 @@
"mode": "absolute",
"steps": [
{
- "color": "green",
- "value": null
+ "color": "green"
}
]
},
@@ -836,7 +1203,7 @@
"h": 8,
"w": 5,
"x": 0,
- "y": 39
+ "y": 50
},
"id": 12,
"options": {
@@ -849,9 +1216,10 @@
"fields": "",
"values": true
},
- "textMode": "auto"
+ "textMode": "auto",
+ "wideLayout": true
},
- "pluginVersion": "9.5.15",
+ "pluginVersion": "10.2.6",
"targets": [
{
"datasource": "mysql",
@@ -894,8 +1262,7 @@
"mode": "absolute",
"steps": [
{
- "color": "green",
- "value": null
+ "color": "green"
}
]
},
@@ -907,7 +1274,7 @@
"h": 8,
"w": 5,
"x": 5,
- "y": 39
+ "y": 50
},
"id": 13,
"options": {
@@ -920,9 +1287,10 @@
"fields": "",
"values": true
},
- "textMode": "auto"
+ "textMode": "auto",
+ "wideLayout": true
},
- "pluginVersion": "9.5.15",
+ "pluginVersion": "10.2.6",
"targets": [
{
"datasource": "mysql",
@@ -966,8 +1334,7 @@
"mode": "absolute",
"steps": [
{
- "color": "green",
- "value": null
+ "color": "green"
}
]
},
@@ -979,7 +1346,7 @@
"h": 8,
"w": 5,
"x": 10,
- "y": 39
+ "y": 50
},
"id": 17,
"options": {
@@ -992,9 +1359,10 @@
"fields": "",
"values": true
},
- "textMode": "auto"
+ "textMode": "auto",
+ "wideLayout": true
},
- "pluginVersion": "9.5.15",
+ "pluginVersion": "10.2.6",
"targets": [
{
"datasource": "mysql",
@@ -1027,8 +1395,7 @@
}
],
"refresh": "",
- "schemaVersion": 38,
- "style": "dark",
+ "schemaVersion": 39,
"tags": [
"Developer",
"Highlights"
@@ -1037,9 +1404,9 @@
"list": [
{
"current": {
- "selected": true,
- "text": "blue",
- "value": "2"
+ "selected": false,
+ "text": "red",
+ "value": "1"
},
"datasource": "mysql",
"definition": "select concat(name, '--', id) from teams",
@@ -1091,6 +1458,6 @@
"timezone": "",
"title": "Work Logs",
"uid": "d449042e-22f0-4357-b8b7-22083f47618d",
- "version": 5,
+ "version": 18,
"weekStart": ""
}
\ No newline at end of file