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 4c91af298 fix: jenkins dashboard update fullname to jobname (#4597)
4c91af298 is described below
commit 4c91af298d83b772e35c06a3cd6b2e1188ce2a0f
Author: abeizn <[email protected]>
AuthorDate: Tue Mar 7 19:23:29 2023 +0800
fix: jenkins dashboard update fullname to jobname (#4597)
---
grafana/dashboards/Jenkins.json | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/grafana/dashboards/Jenkins.json b/grafana/dashboards/Jenkins.json
index 637ed9cb6..a36d87e16 100644
--- a/grafana/dashboards/Jenkins.json
+++ b/grafana/dashboards/Jenkins.json
@@ -15,8 +15,8 @@
"editable": true,
"gnetId": null,
"graphTooltip": 0,
- "id": 20,
- "iteration": 1669388827168,
+ "id": 33,
+ "iteration": 1678171137345,
"links": [],
"panels": [
{
@@ -89,7 +89,7 @@
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n count(*)\nFROM \n cicd_pipelines\nWHERE\n
$__timeFilter(finished_date)\n and result = 'SUCCESS'\n and id like
\"%jenkins%\"\n and name in ($job_id)\n -- the following condition will
remove the month with incomplete data\n and finished_date >=
DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL
+1 MONTH)",
+ "rawSql": "SELECT\n count(*)\nFROM \n cicd_pipelines\nWHERE\n
$__timeFilter(finished_date)\n and result = 'SUCCESS'\n and id like
\"%jenkins%\"\n and cicd_scope_id in ($job_id)\n -- the following condition
will remove the month with incomplete data\n and finished_date >=
DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL
+1 MONTH)",
"refId": "A",
"select": [
[
@@ -168,7 +168,7 @@
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n 1.0 * count(case when result = 'SUCCESS' then 1
else null end)/count(*)\nFROM cicd_pipelines\nWHERE\n
$__timeFilter(finished_date)\n and id like \"%jenkins%\"\n and name in
($job_id)\n -- the following condition will remove the month with incomplete
data\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL
-DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)",
+ "rawSql": "SELECT\n 1.0 * count(case when result = 'SUCCESS' then 1
else null end)/count(*)\nFROM cicd_pipelines\nWHERE\n
$__timeFilter(finished_date)\n and id like \"%jenkins%\"\n and cicd_scope_id
in ($job_id)\n -- the following condition will remove the month with
incomplete data\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(),
INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)",
"refId": "A",
"select": [
[
@@ -332,7 +332,7 @@
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n result,\n count(*) as build_count\nFROM
cicd_pipelines\nWHERE\n $__timeFilter(finished_date)\n and id like
\"%jenkins%\"\n and name in ($job_id)\n -- the following condition will
remove the month with incomplete data\n and finished_date >=
DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL
+1 MONTH)\nGROUP BY 1\nORDER BY 2 desc",
+ "rawSql": "SELECT\n result,\n count(*) as build_count\nFROM
cicd_pipelines\nWHERE\n $__timeFilter(finished_date)\n and id like
\"%jenkins%\"\n and cicd_scope_id in ($job_id)\n -- the following condition
will remove the month with incomplete data\n and finished_date >=
DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL
+1 MONTH)\nGROUP BY 1\nORDER BY 2 desc",
"refId": "A",
"select": [
[
@@ -409,7 +409,7 @@
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n avg(duration_sec/60) as
duration_in_minutes\nFROM cicd_pipelines\nWHERE\n
$__timeFilter(finished_date)\n and id like \"%jenkins%\"\n and name in
($job_id)\n -- the following condition will remove the month with incomplete
data\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL
-DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)",
+ "rawSql": "SELECT\n avg(duration_sec/60) as
duration_in_minutes\nFROM cicd_pipelines\nWHERE\n
$__timeFilter(finished_date)\n and id like \"%jenkins%\"\n and cicd_scope_id
in ($job_id)\n -- the following condition will remove the month with
incomplete data\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(),
INTERVAL -DAY($__timeFrom())+1 DAY), INTERVAL +1 MONTH)",
"refId": "A",
"select": [
[
@@ -508,7 +508,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "WITH _builds as(\n SELECT\n
DATE_ADD(date(finished_date), INTERVAL -DAYOFMONTH(date(finished_date))+1 DAY)
as time,\n count(*) as build_count\n FROM cicd_pipelines\n WHERE\n
$__timeFilter(finished_date)\n and result = 'SUCCESS'\n and id like
\"%jenkins%\"\n and name in ($job_id)\n -- the following condition will
remove the month with incomplete data\n and finished_date >=
DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), [...]
+ "rawSql": "WITH _builds as(\n SELECT\n
DATE_ADD(date(finished_date), INTERVAL -DAYOFMONTH(date(finished_date))+1 DAY)
as time,\n count(*) as build_count\n FROM cicd_pipelines\n WHERE\n
$__timeFilter(finished_date)\n and result = 'SUCCESS'\n and id like
\"%jenkins%\"\n and cicd_scope_id in ($job_id)\n -- the following
condition will remove the month with incomplete data\n and finished_date >=
DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom() [...]
"refId": "A",
"select": [
[
@@ -624,7 +624,7 @@
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "WITH _build_success_rate as(\r\n SELECT\r\n
DATE_ADD(date(finished_date), INTERVAL -DAYOFMONTH(date(finished_date))+1 DAY)
as time,\r\n result\r\n FROM\r\n cicd_pipelines\r\n WHERE\r\n
$__timeFilter(finished_date)\r\n and id like \"%jenkins%\"\r\n and name
in ($job_id)\r\n -- the following condition will remove the month with
incomplete data\r\n and finished_date >= DATE_ADD(DATE_ADD($__timeFrom(),
INTERVAL -DAY($__timeFrom())+1 DAY), INTER [...]
+ "rawSql": "WITH _build_success_rate as(\r\n SELECT\r\n
DATE_ADD(date(finished_date), INTERVAL -DAYOFMONTH(date(finished_date))+1 DAY)
as time,\r\n result\r\n FROM\r\n cicd_pipelines\r\n WHERE\r\n
$__timeFilter(finished_date)\r\n and id like \"%jenkins%\"\r\n and
cicd_scope_id in ($job_id)\r\n -- the following condition will remove the
month with incomplete data\r\n and finished_date >=
DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DA [...]
"refId": "A",
"select": [
[
@@ -764,7 +764,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n DATE_ADD(date(finished_date), INTERVAL
-DAYOFMONTH(date(finished_date))+1 DAY) as time,\n count(distinct case when
result = 'SUCCESS' then id else null end) as successful_build_count,\n
count(distinct case when result != 'SUCCESS' then id else null end) as
failed_build_count\nFROM cicd_pipelines\nWHERE\n
$__timeFilter(finished_date)\n and id like \"%jenkins%\"\n and name in
($job_id)\n -- the following condition will remove the month with incomplete d
[...]
+ "rawSql": "SELECT\n DATE_ADD(date(finished_date), INTERVAL
-DAYOFMONTH(date(finished_date))+1 DAY) as time,\n count(distinct case when
result = 'SUCCESS' then id else null end) as successful_build_count,\n
count(distinct case when result != 'SUCCESS' then id else null end) as
failed_build_count\nFROM cicd_pipelines\nWHERE\n
$__timeFilter(finished_date)\n and id like \"%jenkins%\"\n and cicd_scope_id
in ($job_id)\n -- the following condition will remove the month with inc [...]
"refId": "A",
"select": [
[
@@ -877,7 +877,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "WITH _builds as(\n SELECT\n
DATE_ADD(date(finished_date), INTERVAL -DAYOFMONTH(date(finished_date))+1 DAY)
as time,\n avg(duration_sec) as mean_duration_sec\n FROM \n
cicd_pipelines\n WHERE\n $__timeFilter(finished_date)\n and id like
\"%jenkins%\"\n and name in ($job_id)\n -- the following condition will
remove the month with incomplete data\n and finished_date >=
DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY), INTERV
[...]
+ "rawSql": "WITH _builds as(\n SELECT\n
DATE_ADD(date(finished_date), INTERVAL -DAYOFMONTH(date(finished_date))+1 DAY)
as time,\n avg(duration_sec) as mean_duration_sec\n FROM \n
cicd_pipelines\n WHERE\n $__timeFilter(finished_date)\n and id like
\"%jenkins%\"\n and cicd_scope_id in ($job_id)\n -- the following
condition will remove the month with incomplete data\n and finished_date >=
DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 DAY [...]
"refId": "A",
"select": [
[
@@ -945,7 +945,7 @@
]
},
"datasource": "mysql",
- "definition": "select distinct concat(name, '--', name) as text from
cicd_pipelines where id like \"%jenkins%\" ",
+ "definition": "select distinct cicd_scope_id as text from
cicd_pipelines where id like \"%jenkins%\" ",
"description": null,
"error": null,
"hide": 0,
@@ -954,9 +954,9 @@
"multi": true,
"name": "job_id",
"options": [],
- "query": "select distinct concat(name, '--', name) as text from
cicd_pipelines where id like \"%jenkins%\" ",
+ "query": "select distinct cicd_scope_id as text from cicd_pipelines
where id like \"%jenkins%\" ",
"refresh": 1,
- "regex": "/^(?<text>.*)--(?<value>.*)$/",
+ "regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
@@ -971,5 +971,5 @@
"timezone": "",
"title": "Jenkins",
"uid": "W8AiDFQnk",
- "version": 13
+ "version": 10
}
\ No newline at end of file