This is an automated email from the ASF dual-hosted git repository.
zky 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 66646568a fix: dashboard by team calendar_months and format (#5455)
66646568a is described below
commit 66646568ac2b63db3d294d69f95b6b0c35e84ffd
Author: abeizn <[email protected]>
AuthorDate: Tue Jun 13 18:05:06 2023 +0800
fix: dashboard by team calendar_months and format (#5455)
* fix: dashboard by team calendar_months and format
* fix: dashboard by team calendar_months and format
* fix: add pm.table
---
grafana/dashboards/DORAByTeam.json | 574 ++++++++++++++++++++++---------------
1 file changed, 337 insertions(+), 237 deletions(-)
diff --git a/grafana/dashboards/DORAByTeam.json
b/grafana/dashboards/DORAByTeam.json
index 611cdebcb..fafbcace5 100644
--- a/grafana/dashboards/DORAByTeam.json
+++ b/grafana/dashboards/DORAByTeam.json
@@ -3,7 +3,10 @@
"list": [
{
"builtIn": 1,
- "datasource": "-- Grafana --",
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
@@ -21,12 +24,15 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
- "id": 44,
- "iteration": 1683291538967,
+ "id": 8,
"links": [],
"liveNow": false,
"panels": [
{
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
"gridPos": {
"h": 6,
"w": 24,
@@ -35,15 +41,32 @@
},
"id": 16,
"options": {
- "content": "- See [how to
config](https://devlake.apache.org/docs/DORA) this dashboard\n- Data Sources
Required: \n - `Deployments` from Jenkins, GitLab CI, GitHub Action, webhook,
etc. \n - `Pull Requests` from GitHub PRs, GitLab MRs, BitBucket PRs, Azure
DevOps PRs, etc.\n - `Incidents` from Jira issues, GitHub issues, TAPD issues,
PagerDuty Incidents, etc. \n- Transformation Required: Define `deployments` and
`incidents` in [data transformations](https://devlake.apache.org/docs [...]
+ "code": {
+ "language": "plaintext",
+ "showLineNumbers": false,
+ "showMiniMap": false
+ },
+ "content": "- See [how to
config](https://devlake.apache.org/docs/DORA) this dashboard\n- Data Sources
Required: \n - `Deployments` from Jenkins, GitLab CI, GitHub Action, webhook,
etc. \n - `Pull Requests` from GitHub PRs, GitLab MRs, BitBucket PRs, Azure
DevOps PRs, etc.\n - `Incidents` from Jira issues, GitHub issues, TAPD issues,
PagerDuty Incidents, etc. \n- Transformation Required: Define `deployments` and
`incidents` in [data transformations](https://devlake.apache.org/ [...]
"mode": "markdown"
},
- "pluginVersion": "8.4.7",
+ "pluginVersion": "9.5.1",
+ "targets": [
+ {
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "refId": "A"
+ }
+ ],
"title": "Dashboard Introduction",
"type": "text"
},
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
"description": "",
"fieldConfig": {
"defaults": {
@@ -53,8 +76,11 @@
},
"custom": {
"align": "auto",
- "displayMode": "auto",
- "filterable": false
+ "cellOptions": {
+ "type": "auto"
+ },
+ "filterable": false,
+ "inspect": false
},
"mappings": [],
"noValue": "-",
@@ -76,8 +102,10 @@
},
"properties": [
{
- "id": "custom.displayMode",
- "value": "color-text"
+ "id": "custom.cellOptions",
+ "value": {
+ "type": "color-text"
+ }
},
{
"id": "color",
@@ -95,8 +123,10 @@
},
"properties": [
{
- "id": "custom.displayMode",
- "value": "color-text"
+ "id": "custom.cellOptions",
+ "value": {
+ "type": "color-text"
+ }
},
{
"id": "color",
@@ -114,8 +144,10 @@
},
"properties": [
{
- "id": "custom.displayMode",
- "value": "color-text"
+ "id": "custom.cellOptions",
+ "value": {
+ "type": "color-text"
+ }
},
{
"id": "color",
@@ -133,8 +165,10 @@
},
"properties": [
{
- "id": "custom.displayMode",
- "value": "color-text"
+ "id": "custom.cellOptions",
+ "value": {
+ "type": "color-text"
+ }
},
{
"id": "color",
@@ -151,11 +185,13 @@
"h": 6,
"w": 24,
"x": 0,
- "y": 2
+ "y": 6
},
"id": 8,
"options": {
+ "cellHeight": "sm",
"footer": {
+ "countRows": false,
"fields": "",
"reducer": [
"sum"
@@ -165,44 +201,46 @@
"showHeader": true,
"sortBy": []
},
- "pluginVersion": "8.4.7",
+ "pluginVersion": "9.5.1",
"targets": [
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
+ "editorMode": "code",
"format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
+ "hide": false,
"rawQuery": true,
- "rawSql": "-- Metric 1: Deployment Frequency\nwith
last_few_calendar_months as(\n-- construct the last few calendar months within
the selected time period in the top-right corner\n\tSELECT
CAST((SYSDATE()-INTERVAL (H+T+U) DAY) AS date) day\n\tFROM ( SELECT 0
H\n\t\t\tUNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n\t\t)
H CROSS JOIN ( SELECT 0 T\n\t\t\tUNION ALL SELECT 10 UNION ALL SELECT 20
UNION ALL SELECT 30\n\t\t\tUNION ALL SELECT 40 UNION ALL SELECT 50 [...]
+ "rawSql": "-- Metric 1: Deployment Frequency\nwith
last_few_calendar_months as(\n-- construct the last few calendar months within
the selected time period in the top-right corner\n\tSELECT
CAST((SYSDATE()-INTERVAL (H+T+U) DAY) AS date) day\n\tFROM ( SELECT 0
H\n\t\t\tUNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n\t\t)
H CROSS JOIN ( SELECT 0 T\n\t\t\tUNION ALL SELECT 10 UNION ALL SELECT 20
UNION ALL SELECT 30\n\t\t\tUNION ALL SELECT 40 UNION ALL SELECT 50 [...]
"refId": "A",
- "select": [
- [
+ "sql": {
+ "columns": [
{
- "params": [
- "id"
- ],
- "type": "column"
+ "parameters": [],
+ "type": "function"
}
- ]
- ],
- "table": "_devlake_blueprints",
- "timeColumn": "created_at",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
}
],
"title": "Overall DORA Metrics",
"type": "table"
},
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
"fieldConfig": {
"defaults": {
"color": {
@@ -247,7 +285,7 @@
"h": 5,
"w": 6,
"x": 0,
- "y": 8
+ "y": 12
},
"id": 11,
"options": {
@@ -265,16 +303,20 @@
"text": {},
"textMode": "auto"
},
- "pluginVersion": "8.4.7",
+ "pluginVersion": "9.5.1",
"targets": [
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
+ "editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
- "rawSql": "-- Metric 1: Deployment Frequency\nwith
last_few_calendar_months as(\n-- construct the last few calendar months within
the selected time period in the top-right corner\n\tSELECT
CAST((SYSDATE()-INTERVAL (H+T+U) DAY) AS date) day\n\tFROM ( SELECT 0
H\n\t\t\tUNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n\t\t)
H CROSS JOIN ( SELECT 0 T\n\t\t\tUNION ALL SELECT 10 UNION ALL SELECT 20
UNION ALL SELECT 30\n\t\t\tUNION ALL SELECT 40 UNION ALL SELECT 50 [...]
+ "rawSql": "-- Metric 1: Deployment Frequency\nwith
last_few_calendar_months as(\n-- construct the last few calendar months within
the selected time period in the top-right corner\n\tSELECT
CAST((SYSDATE()-INTERVAL (H+T+U) DAY) AS date) day\n\tFROM ( SELECT 0
H\n\t\t\tUNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n\t\t)
H CROSS JOIN ( SELECT 0 T\n\t\t\tUNION ALL SELECT 10 UNION ALL SELECT 20
UNION ALL SELECT 30\n\t\t\tUNION ALL SELECT 40 UNION ALL SELECT 50 [...]
"refId": "A",
"select": [
[
@@ -286,6 +328,23 @@
}
]
],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
"table": "_devlake_tasks",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
@@ -302,7 +361,10 @@
"type": "stat"
},
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
"fieldConfig": {
"defaults": {
"color": {
@@ -347,7 +409,7 @@
"h": 5,
"w": 6,
"x": 6,
- "y": 8
+ "y": 12
},
"id": 12,
"options": {
@@ -365,44 +427,46 @@
"text": {},
"textMode": "auto"
},
- "pluginVersion": "8.4.7",
+ "pluginVersion": "9.5.1",
"targets": [
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
+ "editorMode": "code",
"format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
+ "hide": false,
"rawQuery": true,
- "rawSql": "-- Metric 2: median lead time for changes\nwith _pr_stats
as (\n-- get the cycle time of PRs deployed by the deployments finished in the
selected period\n\tSELECT\n\t\tdistinct
pr.id,\n\t\tppm.pr_cycle_time\n\tFROM\n\t\tpull_requests pr\n\t\tjoin
user_accounts ua on pr.author_id = ua.account_id\n \tjoin users u on
ua.user_id = u.id\n \tjoin team_users tu on u.id = tu.user_id\n \tjoin
teams t on tu.team_id = t.id\n\t\tjoin project_pr_metrics ppm on ppm.id = p
[...]
+ "rawSql": "-- Metric 2: median lead time for changes\nwith _pr_stats
as (\n-- get the cycle time of PRs deployed by the deployments finished in the
selected period\n\tSELECT\n\t\tdistinct
pr.id,\n\t\tppm.pr_cycle_time\n\tFROM\n\t\tpull_requests pr\n\t\tjoin
user_accounts ua on pr.author_id = ua.account_id\n \tjoin users u on
ua.user_id = u.id\n \tjoin team_users tu on u.id = tu.user_id\n \tjoin
teams t on tu.team_id = t.id\n\t\tjoin project_pr_metrics ppm on ppm.id = p
[...]
"refId": "A",
- "select": [
- [
+ "sql": {
+ "columns": [
{
- "params": [
- "id"
- ],
- "type": "column"
+ "parameters": [],
+ "type": "function"
}
- ]
- ],
- "table": "_devlake_tasks",
- "timeColumn": "created_at",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
}
],
"title": "Median Lead Time for Changes",
"type": "stat"
},
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
"fieldConfig": {
"defaults": {
"color": {
@@ -451,7 +515,7 @@
"h": 5,
"w": 6,
"x": 12,
- "y": 8
+ "y": 12
},
"id": 13,
"options": {
@@ -469,44 +533,46 @@
"text": {},
"textMode": "auto"
},
- "pluginVersion": "8.4.7",
+ "pluginVersion": "9.5.1",
"targets": [
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
+ "editorMode": "code",
"format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
+ "hide": false,
"rawQuery": true,
- "rawSql": "-- Metric 3: Median time to restore service \nwith
_incidents as (\n-- get the incidents created within the selected time period
in the top-right corner\n\tSELECT\n\t distinct
i.id,\n\t\tcast(lead_time_minutes as signed) as
lead_time_minutes\n\tFROM\n\t\tissues i\n\t 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\t join user_accounts ua on i.assignee_id =
ua.account_id\n j [...]
+ "rawSql": "-- Metric 3: Median time to restore service \nwith
_incidents as (\n-- get the incidents created within the selected time period
in the top-right corner\n\tSELECT\n\t distinct
i.id,\n\t\tcast(lead_time_minutes as signed) as
lead_time_minutes\n\tFROM\n\t\tissues i\n\t 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 and pm.`table` = 'boards'\n\t join user_accounts ua on
i.assignee_i [...]
"refId": "A",
- "select": [
- [
+ "sql": {
+ "columns": [
{
- "params": [
- "id"
- ],
- "type": "column"
+ "parameters": [],
+ "type": "function"
}
- ]
- ],
- "table": "_devlake_tasks",
- "timeColumn": "created_at",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
}
],
"title": "Median Time to Restore Service",
"type": "stat"
},
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
"fieldConfig": {
"defaults": {
"color": {
@@ -551,7 +617,7 @@
"h": 5,
"w": 6,
"x": 18,
- "y": 8
+ "y": 12
},
"id": 14,
"options": {
@@ -569,50 +635,54 @@
"text": {},
"textMode": "auto"
},
- "pluginVersion": "8.4.7",
+ "pluginVersion": "9.5.1",
"targets": [
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
+ "editorMode": "code",
"format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
+ "hide": false,
"rawQuery": true,
- "rawSql": "-- Metric 4: change failure rate\nwith _deployments as
(\n-- When deploying multiple commits in one pipeline, GitLab and BitBucket may
generate more than one deployment. However, DevLake consider these deployments
as ONE production deployment and use the last one's finished_date as the
finished date.\n\tSELECT\n\t\tcdc.cicd_deployment_id as
deployment_id,\n\t\tmax(cdc.finished_date) as deployment_finished_date\n\tFROM
\n\t\tcicd_deployment_commits cdc\n\t JOIN com [...]
+ "rawSql": "-- Metric 4: change failure rate\nwith _deployments as
(\n-- When deploying multiple commits in one pipeline, GitLab and BitBucket may
generate more than one deployment. However, DevLake consider these deployments
as ONE production deployment and use the last one's finished_date as the
finished date.\n\tSELECT\n\t\tcdc.cicd_deployment_id as
deployment_id,\n\t\tmax(cdc.finished_date) as deployment_finished_date\n\tFROM
\n\t\tcicd_deployment_commits cdc\n\t JOIN com [...]
"refId": "A",
- "select": [
- [
+ "sql": {
+ "columns": [
{
- "params": [
- "id"
- ],
- "type": "column"
+ "parameters": [],
+ "type": "function"
}
- ]
- ],
- "table": "_devlake_tasks",
- "timeColumn": "created_at",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
}
],
"title": "Change Failure Rate",
"type": "stat"
},
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
@@ -626,6 +696,9 @@
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
}
},
"mappings": [],
@@ -649,17 +722,19 @@
"h": 8,
"w": 12,
"x": 0,
- "y": 13
+ "y": 17
},
"id": 2,
"options": {
"barRadius": 0,
"barWidth": 0.6,
+ "fullHighlight": false,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom"
+ "placement": "bottom",
+ "showLegend": true
},
"orientation": "auto",
"showValue": "auto",
@@ -674,41 +749,43 @@
},
"targets": [
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
+ "editorMode": "code",
"format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
+ "hide": false,
"rawQuery": true,
- "rawSql": "-- Metric 1: Number of deployments per month\nwith
_deployments as(\n-- When deploying multiple commits in one pipeline, GitLab
and BitBucket may generate more than one deployment. However, DevLake consider
these deployments as ONE production deployment and use the last one's
finished_date as the finished date.\n\tSELECT
\n\t\tdate_format(deployment_finished_date,'%y/%m') as
month,\n\t\tcount(cicd_deployment_id) as deployment_count\n\tFROM
(\n\t\tSELECT\n\t\t\tcdc.ci [...]
+ "rawSql": "-- Metric 1: Number of deployments per month\nwith
_deployments as(\n-- When deploying multiple commits in one pipeline, GitLab
and BitBucket may generate more than one deployment. However, DevLake consider
these deployments as ONE production deployment and use the last one's
finished_date as the finished date.\n\tSELECT
\n\t\tdate_format(deployment_finished_date,'%y/%m') as
month,\n\t\tcount(cicd_deployment_id) as deployment_count\n\tFROM
(\n\t\tSELECT\n\t\t\tcdc.ci [...]
"refId": "A",
- "select": [
- [
+ "sql": {
+ "columns": [
{
- "params": [
- "id"
- ],
- "type": "column"
+ "parameters": [],
+ "type": "function"
}
- ]
- ],
- "table": "_devlake_blueprints",
- "timeColumn": "created_at",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
}
],
"title": "Monthly deployments",
"type": "barchart"
},
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
"description": "",
"fieldConfig": {
"defaults": {
@@ -716,6 +793,8 @@
"mode": "palette-classic"
},
"custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
"axisLabel": "Hours",
"axisPlacement": "auto",
"axisSoftMin": 0,
@@ -729,6 +808,9 @@
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
}
},
"mappings": [],
@@ -748,17 +830,19 @@
"h": 8,
"w": 12,
"x": 12,
- "y": 13
+ "y": 17
},
"id": 6,
"options": {
"barRadius": 0,
"barWidth": 0.7,
+ "fullHighlight": false,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom"
+ "placement": "bottom",
+ "showLegend": true
},
"orientation": "auto",
"showValue": "auto",
@@ -774,41 +858,43 @@
"pluginVersion": "8.0.6",
"targets": [
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
+ "editorMode": "code",
"format": "table",
- "group": [],
"hide": false,
- "metricColumn": "none",
"rawQuery": true,
- "rawSql": "-- Metric 2: median change lead time per month\nwith
_pr_stats as (\n-- get the cycle time of PRs deployed by the deployments
finished each month\n\tSELECT\n\t\tdistinct
pr.id,\n\t\tdate_format(cdc.finished_date,'%y/%m') as
month,\n\t\tppm.pr_cycle_time\n\tFROM\n\t\tpull_requests pr\n\t\tjoin
user_accounts ua on pr.author_id = ua.account_id\n \tjoin users u on
ua.user_id = u.id\n \tjoin team_users tu on u.id = tu.user_id\n \tjoin
teams t on tu.team_id = t.id [...]
+ "rawSql": "-- Metric 2: median change lead time per month\nwith
_pr_stats as (\n-- get the cycle time of PRs deployed by the deployments
finished each month\n\tSELECT\n\t\tdistinct
pr.id,\n\t\tdate_format(cdc.finished_date,'%y/%m') as
month,\n\t\tppm.pr_cycle_time\n\tFROM\n\t\tpull_requests pr\n\t\tjoin
user_accounts ua on pr.author_id = ua.account_id\n \tjoin users u on
ua.user_id = u.id\n \tjoin team_users tu on u.id = tu.user_id\n \tjoin
teams t on tu.team_id = t.id [...]
"refId": "A",
- "select": [
- [
+ "sql": {
+ "columns": [
{
- "params": [
- "id"
- ],
- "type": "column"
+ "parameters": [],
+ "type": "function"
}
- ]
- ],
- "table": "ae_projects",
- "timeColumn": "ae_create_time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
}
],
"title": "Median Lead Time for Changes",
"type": "barchart"
},
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
"description": "",
"fieldConfig": {
"defaults": {
@@ -816,6 +902,8 @@
"mode": "palette-classic"
},
"custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
"axisLabel": "Hours",
"axisPlacement": "auto",
"axisSoftMin": 0,
@@ -829,6 +917,9 @@
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
}
},
"mappings": [],
@@ -869,17 +960,19 @@
"h": 8,
"w": 12,
"x": 0,
- "y": 21
+ "y": 25
},
"id": 9,
"options": {
"barRadius": 0,
"barWidth": 0.6,
+ "fullHighlight": false,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom"
+ "placement": "bottom",
+ "showLegend": true
},
"orientation": "auto",
"showValue": "auto",
@@ -895,41 +988,43 @@
"pluginVersion": "8.0.6",
"targets": [
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
+ "editorMode": "code",
"format": "table",
- "group": [],
"hide": false,
- "metricColumn": "none",
"rawQuery": true,
- "rawSql": "-- Metric 3: median time to restore service - MTTR\nwith
_incidents as (\n-- get the number of incidents created each
month\n\tSELECT\n\t distinct i.id,\n\t\tdate_format(i.created_date,'%y/%m') as
month,\n\t\tcast(lead_time_minutes as signed) as
lead_time_minutes\n\tFROM\n\t\tissues i\n\t 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\t join user_accounts ua on i.assignee_id = [...]
+ "rawSql": "-- Metric 3: median time to restore service - MTTR\nwith
_incidents as (\n-- get the number of incidents created each
month\n\tSELECT\n\t distinct i.id,\n\t\tdate_format(i.created_date,'%y/%m') as
month,\n\t\tcast(lead_time_minutes as signed) as
lead_time_minutes\n\tFROM\n\t\tissues i\n\t 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 and pm.`table` = 'boards'\n\t join user_accou [...]
"refId": "A",
- "select": [
- [
+ "sql": {
+ "columns": [
{
- "params": [
- "id"
- ],
- "type": "column"
+ "parameters": [],
+ "type": "function"
}
- ]
- ],
- "table": "ae_projects",
- "timeColumn": "ae_create_time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
}
],
"title": "Median Time to Restore Service",
"type": "barchart"
},
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
"description": "",
"fieldConfig": {
"defaults": {
@@ -937,6 +1032,8 @@
"mode": "palette-classic"
},
"custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
@@ -950,6 +1047,9 @@
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
}
},
"mappings": [],
@@ -988,17 +1088,19 @@
"h": 8,
"w": 12,
"x": 12,
- "y": 21
+ "y": 25
},
"id": 5,
"options": {
"barRadius": 0,
"barWidth": 0.6,
+ "fullHighlight": false,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom"
+ "placement": "bottom",
+ "showLegend": true
},
"orientation": "auto",
"showValue": "auto",
@@ -1014,34 +1116,33 @@
"pluginVersion": "8.0.6",
"targets": [
{
- "datasource": "mysql",
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
+ },
+ "editorMode": "code",
"format": "table",
- "group": [],
"hide": false,
- "metricColumn": "none",
"rawQuery": true,
- "rawSql": "-- Metric 4: change failure rate per month\nwith
_deployments as (\n-- When deploying multiple commits in one pipeline, GitLab
and BitBucket may generate more than one deployment. However, DevLake consider
these deployments as ONE production deployment and use the last one's
finished_date as the finished date.\n\tSELECT\n\t\tcdc.cicd_deployment_id as
deployment_id,\n\t\tmax(cdc.finished_date) as deployment_finished_date\n\tFROM
\n\t\tcicd_deployment_commits cdc\n\t\t [...]
+ "rawSql": "-- Metric 4: change failure rate per month\nwith
_deployments as (\n-- When deploying multiple commits in one pipeline, GitLab
and BitBucket may generate more than one deployment. However, DevLake consider
these deployments as ONE production deployment and use the last one's
finished_date as the finished date.\n\tSELECT\n\t\tcdc.cicd_deployment_id as
deployment_id,\n\t\tmax(cdc.finished_date) as deployment_finished_date\n\tFROM
\n\t\tcicd_deployment_commits cdc\n\t\t [...]
"refId": "A",
- "select": [
- [
+ "sql": {
+ "columns": [
{
- "params": [
- "id"
- ],
- "type": "column"
+ "parameters": [],
+ "type": "function"
}
- ]
- ],
- "table": "ae_projects",
- "timeColumn": "ae_create_time",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
}
],
"title": "Change Failure Rate",
@@ -1049,27 +1150,26 @@
}
],
"refresh": "",
- "schemaVersion": 35,
+ "schemaVersion": 38,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"current": {
- "selected": true,
- "text": [
- "Experience"
- ],
- "value": [
- "Experience"
- ]
+ "selected": false,
+ "text": "All",
+ "value": "$__all"
+ },
+ "datasource": {
+ "type": "mysql",
+ "uid": "P430005175C4C7810"
},
- "datasource": "mysql",
"definition": "select distinct name from teams",
"hide": 0,
"includeAll": true,
"label": "Team",
- "multi": true,
+ "multi": false,
"name": "team",
"options": [],
"query": "select distinct name from teams",
@@ -1089,6 +1189,6 @@
"timezone": "",
"title": "DORA (by Team)",
"uid": "66YkL8y4z",
- "version": 14,
+ "version": 33,
"weekStart": ""
-}
+}
\ No newline at end of file