You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2024/06/28 04:35:55 UTC
(incubator-devlake) branch main updated: fix: update weekly report (#7678)
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 aefa74f38 fix: update weekly report (#7678)
aefa74f38 is described below
commit aefa74f3844b2aab15b216f4e39ea14dd4fa0921
Author: Louis.z <lo...@gmail.com>
AuthorDate: Fri Jun 28 12:35:51 2024 +0800
fix: update weekly report (#7678)
Co-authored-by: Startrekzky <ka...@merico.dev>
---
grafana/dashboards/WeeklyReport.json | 55 ++++++++++++++++--------------------
1 file changed, 24 insertions(+), 31 deletions(-)
diff --git a/grafana/dashboards/WeeklyReport.json b/grafana/dashboards/WeeklyReport.json
index 221bd4df5..82d18a03a 100644
--- a/grafana/dashboards/WeeklyReport.json
+++ b/grafana/dashboards/WeeklyReport.json
@@ -18,7 +18,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
- "id": 40,
+ "id": 21,
"links": [],
"liveNow": false,
"panels": [
@@ -43,7 +43,7 @@
"content": "- This dashboard shows all the key metrics in the weekly report.",
"mode": "markdown"
},
- "pluginVersion": "10.4.1",
+ "pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
@@ -87,6 +87,7 @@
"mode": "off"
}
},
+ "decimals": 1,
"mappings": [
{
"options": {
@@ -108,7 +109,7 @@
}
]
},
- "unit": "none"
+ "unit": "d"
},
"overrides": []
},
@@ -144,6 +145,7 @@
"valueSize": 12
},
"tooltip": {
+ "maxHeight": 600,
"mode": "single",
"sort": "none"
},
@@ -160,7 +162,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _deployed_prs as(\n SELECT\n pr.id,\n cdc.finished_date as pr_deployed_date,\n -- convert null to 0 if a PR has no cycle_time to make sure cycle_time equals the sum of the four metrics below\n\t\tcoalesce(prm.pr_cycle_time/60,0) as cycle_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n join cicd_deployment_commits cdc on prm.dep [...]
+ "rawSql": "with _deployed_prs as(\n SELECT\n pr.id,\n cdc.finished_date as pr_deployed_date,\n -- convert null to 0 if a PR has no cycle_time\n\t prm.pr_cycle_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n join cicd_deployment_commits cdc on prm.deployment_commit_id = cdc.id\n WHERE\n -- filter the deployed PRs\n cdc.finished_date is [...]
"refId": "A",
"select": [
[
@@ -276,6 +278,7 @@
"options": {
"barRadius": 0,
"barWidth": 0.5,
+ "colorByField": "period",
"fullHighlight": false,
"groupWidth": 0.7,
"legend": {
@@ -285,12 +288,13 @@
"showLegend": true
},
"orientation": "horizontal",
- "showValue": "auto",
+ "showValue": "always",
"stacking": "none",
"text": {
"valueSize": 12
},
"tooltip": {
+ "maxHeight": 600,
"mode": "single",
"sort": "none"
},
@@ -307,7 +311,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _deployed_prs as(\n SELECT\n pr.id,\n cdc.finished_date as pr_deployed_date,\n -- convert null to 0 if a PR has no cycle_time to make sure cycle_time equals the sum of the four metrics below\n\t\tcoalesce(prm.pr_cycle_time/60,0) as cycle_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n join cicd_deployment_commits cdc on prm.dep [...]
+ "rawSql": "with _deployed_prs as(\n SELECT\n pr.id,\n cdc.finished_date as pr_deployed_date,\n -- convert null to 0 if a PR has no cycle_time to make sure cycle_time equals the sum of the four metrics below\n\t\tcoalesce(prm.pr_cycle_time/60,0) as cycle_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n join cicd_deployment_commits cdc on prm.dep [...]
"refId": "A",
"select": [
[
@@ -383,15 +387,16 @@
"mappings": [
{
"options": {
- "0.0001": {
+ "0.00001": {
"color": "red",
"index": 0,
- "text": "No deployments in PROD environment in this period."
+ "text": "No production deployments in this period"
}
},
"type": "value"
}
],
+ "noValue": "No production deployments in this period",
"thresholds": {
"mode": "absolute",
"steps": [
@@ -435,6 +440,7 @@
"valueSize": 12
},
"tooltip": {
+ "maxHeight": 600,
"mode": "multi",
"sort": "none"
},
@@ -451,7 +457,7 @@
"metricColumn": "none",
"queryType": "randomWalk",
"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\t\tSELECT\n\t\t\tcdc.cicd_deployment_id,\n\t\t\tmax(cdc.finished_date) as deployment_finished_date\n\t\tFROM cicd_deployment_commits cdc\n\t\tJOIN project_m [...]
+ "rawSql": "with _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\t\tSELECT\n\t\t\tcdc.cicd_deployment_id,\n\t\t\tmax(cdc.finished_date) as deployment_finished_date\n\t\tFROM cicd_deployment_commits cdc\n\t\tJOIN project_mapping pm on cdc.cicd_scope_id = pm.row_id and [...]
"refId": "A",
"select": [
[
@@ -501,7 +507,8 @@
"fieldConfig": {
"defaults": {
"color": {
- "mode": "thresholds"
+ "fixedColor": "green",
+ "mode": "fixed"
},
"custom": {
"axisBorderShow": false,
@@ -531,7 +538,7 @@
"0.00001": {
"color": "red",
"index": 0,
- "text": "No deployments in PROD environment in this period."
+ "text": "No production deployments in this period"
}
},
"type": "value"
@@ -548,23 +555,7 @@
},
"unit": "percentunit"
},
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "change_failure_rate"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "blue",
- "mode": "fixed"
- }
- }
- ]
- }
- ]
+ "overrides": []
},
"gridPos": {
"h": 8,
@@ -597,6 +588,7 @@
"valueSize": 12
},
"tooltip": {
+ "maxHeight": 600,
"mode": "single",
"sort": "none"
},
@@ -614,7 +606,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "-- Metric 3: 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": "with _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\tJOIN project_mapping pm on cdc.cicd_scope_id [...]
"refId": "A",
"select": [
[
@@ -714,13 +706,14 @@
]
},
"time": {
- "from": "now-6M",
+ "from": "now-7d",
"to": "now"
},
+ "timeRangeUpdatedDuringEditOrView": false,
"timepicker": {},
"timezone": "",
"title": "Weekly Report",
"uid": "fdpx91qgjm0owb",
- "version": 17,
+ "version": 11,
"weekStart": ""
}
\ No newline at end of file