This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch fix#6907
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/fix#6907 by this push:
     new 3b45ec41f fix: date Range for Benchmarks of Deployment Frequency is 
not correct
3b45ec41f is described below

commit 3b45ec41f796118d6c1fa7885ad0d3b6678cebf6
Author: abeizn <[email protected]>
AuthorDate: Tue Mar 5 09:48:51 2024 +0800

    fix: date Range for Benchmarks of Deployment Frequency is not correct
---
 grafana/dashboards/DORA.json           | 4 ++--
 grafana/dashboards/DORAByTeam.json     | 4 ++--
 grafana/dashboards/DORADebug.json      | 2 +-
 grafana/dashboards/DORADrillDown.json  | 8 ++++----
 grafana/dashboards/WeeklyBugRetro.json | 6 +++---
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/grafana/dashboards/DORA.json b/grafana/dashboards/DORA.json
index 210469472..b876191c1 100644
--- a/grafana/dashboards/DORA.json
+++ b/grafana/dashboards/DORA.json
@@ -211,7 +211,7 @@
           "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(($__timeTo()-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   [...]
           "refId": "A",
           "select": [
             [
@@ -355,7 +355,7 @@
           "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(($__timeTo()-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   [...]
           "refId": "A",
           "select": [
             [
diff --git a/grafana/dashboards/DORAByTeam.json 
b/grafana/dashboards/DORAByTeam.json
index 72ced065d..2757649d1 100644
--- a/grafana/dashboards/DORAByTeam.json
+++ b/grafana/dashboards/DORAByTeam.json
@@ -208,7 +208,7 @@
           "format": "table",
           "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(($__timeTo()-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   [...]
           "refId": "A",
           "sql": {
             "columns": [
@@ -326,7 +326,7 @@
           "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(($__timeTo()-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   [...]
           "refId": "A",
           "select": [
             [
diff --git a/grafana/dashboards/DORADebug.json 
b/grafana/dashboards/DORADebug.json
index ca6bc6236..ddc6f4caf 100644
--- a/grafana/dashboards/DORADebug.json
+++ b/grafana/dashboards/DORADebug.json
@@ -321,7 +321,7 @@
           "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(($__timeTo()-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   [...]
           "refId": "A",
           "select": [
             [
diff --git a/grafana/dashboards/DORADrillDown.json 
b/grafana/dashboards/DORADrillDown.json
index c77af9c4a..23cca877a 100644
--- a/grafana/dashboards/DORADrillDown.json
+++ b/grafana/dashboards/DORADrillDown.json
@@ -437,7 +437,7 @@
           "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(($__timeTo()-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   [...]
           "refId": "A",
           "select": [
             [
@@ -566,7 +566,7 @@
           "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(($__timeTo()-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   [...]
           "refId": "A",
           "select": [
             [
@@ -694,7 +694,7 @@
           "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(($__timeTo()-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   [...]
           "refId": "A",
           "select": [
             [
@@ -830,7 +830,7 @@
           "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(($__timeTo()-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   [...]
           "refId": "A",
           "select": [
             [
diff --git a/grafana/dashboards/WeeklyBugRetro.json 
b/grafana/dashboards/WeeklyBugRetro.json
index df90e103a..9a6d8ff5b 100644
--- a/grafana/dashboards/WeeklyBugRetro.json
+++ b/grafana/dashboards/WeeklyBugRetro.json
@@ -1631,7 +1631,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "with bugs as (  \n  select \n    
DATE_ADD(date(i.created_date), INTERVAL -WEEKDAY(date(i.created_date)) DAY) as 
time,\n    count(distinct i.id) as bug_count\n  from\n    issues as 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  where \n    i.type in (${issue_type})\n    and 
$__timeFilter(i.created_date)\n    and b.id in (${board_id})\n  group by time\n 
 order by time desc\n),\n\ncalendar_date as(\n\tSELECT CAST((SYSDATE() [...]
+          "rawSql": "with bugs as (  \n  select \n    
DATE_ADD(date(i.created_date), INTERVAL -WEEKDAY(date(i.created_date)) DAY) as 
time,\n    count(distinct i.id) as bug_count\n  from\n    issues as 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  where \n    i.type in (${issue_type})\n    and 
$__timeFilter(i.created_date)\n    and b.id in (${board_id})\n  group by time\n 
 order by time desc\n),\n\ncalendar_date as(\n\tSELECT CAST(($__timeTo [...]
           "refId": "A",
           "select": [
             [
@@ -1766,7 +1766,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "with bugs as (\n  select \n    
DATE_ADD(date(i.resolution_date), INTERVAL -WEEKDAY(date(i.resolution_date)) 
DAY) as time,\n    count(distinct i.id) as bug_count\n  from\n    issues as 
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  where \n    i.type in (${issue_type})\n    and status = 
'DONE'\n    and $__timeFilter(i.resolution_date)\n    and b.id in 
(${board_id})\n  group by time\n  order by time desc\n),\n\ncalendar_da [...]
+          "rawSql": "with bugs as (\n  select \n    
DATE_ADD(date(i.resolution_date), INTERVAL -WEEKDAY(date(i.resolution_date)) 
DAY) as time,\n    count(distinct i.id) as bug_count\n  from\n    issues as 
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  where \n    i.type in (${issue_type})\n    and status = 
'DONE'\n    and $__timeFilter(i.resolution_date)\n    and b.id in 
(${board_id})\n  group by time\n  order by time desc\n),\n\ncalendar_da [...]
           "refId": "A",
           "select": [
             [
@@ -1903,7 +1903,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "with calendar_date as(\n\tSELECT CAST((SYSDATE()-INTERVAL 
(H+T+U) DAY) AS date) d\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 UNION ALL SELECT  
60\n\t\t\tUNION ALL SELECT  70 UNION ALL SELECT  80 UNION ALL SELECT  90\n\t\t) 
T CROSS JOIN ( SELECT 0 U\n\t\t\tUNION ALL SELEC [...]
+          "rawSql": "with calendar_date as(\n\tSELECT 
CAST(($__timeTo()-INTERVAL (H+T+U) DAY) AS date) d\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 UNION ALL 
SELECT  60\n\t\t\tUNION ALL SELECT  70 UNION ALL SELECT  80 UNION ALL SELECT  
90\n\t\t) T CROSS JOIN ( SELECT 0 U\n\t\t\tUNION ALL SEL [...]
           "refId": "A",
           "select": [
             [

Reply via email to