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 9cb43222f feat: update all dashboards that use the self-constructed 
calendar mo… (#5179)
9cb43222f is described below

commit 9cb43222f5f38fe3c969fdbb5f1ee2691a49cb23
Author: abeizn <[email protected]>
AuthorDate: Tue May 16 18:26:19 2023 +0800

    feat: update all dashboards that use the self-constructed calendar mo… 
(#5179)
    
    * feat: update all dashboards that use the self-constructed calendar months
    
    * feat: update dora debug
    
    * feat: update dora panel
    
    * feat: add cm.month_timestamp
---
 grafana/dashboards/DORA.json      | 8 ++++----
 grafana/dashboards/DORADebug.json | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/grafana/dashboards/DORA.json b/grafana/dashboards/DORA.json
index eb36a0ca0..c705b03f9 100644
--- a/grafana/dashboards/DORA.json
+++ b/grafana/dashboards/DORA.json
@@ -636,7 +636,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\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": [
             [
@@ -727,7 +727,7 @@
           "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 
project_pr_metrics ppm on ppm.id = pr.id\n\t\tjoin project_mapping pm on 
pr.base_repo_id = pm.row_id and pm.`table` = 'repos'\n\t\tjoin 
cicd_deployment_commits cdc on ppm.deploy [...]
+          "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 
project_pr_metrics ppm on ppm.id = pr.id\n\t\tjoin project_mapping pm on 
pr.base_repo_id = pm.row_id and pm.`table` = 'repos'\n\t\tjoin 
cicd_deployment_commits cdc on ppm.deploy [...]
           "refId": "A",
           "select": [
             [
@@ -841,7 +841,7 @@
           "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 and pm.`table` = 'boards'\n\tWHERE\n\t  pm.pro [...]
+          "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\tWHERE\n\t  pm.pro [...]
           "refId": "A",
           "select": [
             [
@@ -953,7 +953,7 @@
           "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": [
             [
diff --git a/grafana/dashboards/DORADebug.json 
b/grafana/dashboards/DORADebug.json
index ba74081c6..26e76a981 100644
--- a/grafana/dashboards/DORADebug.json
+++ b/grafana/dashboards/DORADebug.json
@@ -551,7 +551,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\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": [
             [
@@ -1749,7 +1749,7 @@
           "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 
project_pr_metrics ppm on ppm.id = pr.id\n\t\tjoin project_mapping pm on 
pr.base_repo_id = pm.row_id and pm.`table` = 'repos'\n\t\tjoin 
cicd_deployment_commits cdc on ppm.deploy [...]
+          "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 
project_pr_metrics ppm on ppm.id = pr.id\n\t\tjoin project_mapping pm on 
pr.base_repo_id = pm.row_id and pm.`table` = 'repos'\n\t\tjoin 
cicd_deployment_commits cdc on ppm.deploy [...]
           "refId": "A",
           "select": [
             [
@@ -2453,7 +2453,7 @@
           "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 and pm.`table` = 'boards'\n\tWHERE\n\t  pm.pro [...]
+          "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\tWHERE\n\t  pm.pro [...]
           "refId": "A",
           "select": [
             [
@@ -2836,7 +2836,7 @@
           "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": [
             [

Reply via email to