From: Patrick Seidensal Date: Fri, 11 Jun 2021 09:48:00 +0000 (+0200) Subject: mgr/dashboard: Remove hard-coded timezone off Grafana dashboards X-Git-Tag: v17.1.0~1555^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5527c1c54f4cdc8d0ba6c86b259baa555bbd9def;p=ceph.git mgr/dashboard: Remove hard-coded timezone off Grafana dashboards Remove hard-coded timezone off Grafana dashboards to enable the Grafana administrator to decide which timezone should be used for dashboards. If we hard-coded those values, changing the global settings in Grafana wouldn't have an effect. And the administrators can't change the automatically imported Grafana dashboards provided by us. Fixes: https://tracker.ceph.com/issues/51212 Signed-off-by: Patrick Seidensal --- diff --git a/monitoring/grafana/dashboards/ceph-cluster.json b/monitoring/grafana/dashboards/ceph-cluster.json index 447dbb29322e..d6cc4cf03fdf 100644 --- a/monitoring/grafana/dashboards/ceph-cluster.json +++ b/monitoring/grafana/dashboards/ceph-cluster.json @@ -1245,7 +1245,7 @@ "30d" ] }, - "timezone": "browser", + "timezone": "", "title": "Ceph - Cluster", "version": 13 } diff --git a/monitoring/grafana/dashboards/host-details.json b/monitoring/grafana/dashboards/host-details.json index 237349dd36a1..71ac36f3709a 100644 --- a/monitoring/grafana/dashboards/host-details.json +++ b/monitoring/grafana/dashboards/host-details.json @@ -1208,7 +1208,7 @@ "30d" ] }, - "timezone": "browser", + "timezone": "", "title": "Host Details", "uid": "rtOg0AiWz", "version": 4 diff --git a/monitoring/grafana/dashboards/pool-detail.json b/monitoring/grafana/dashboards/pool-detail.json index 41554ed30683..dd6bc3927faf 100644 --- a/monitoring/grafana/dashboards/pool-detail.json +++ b/monitoring/grafana/dashboards/pool-detail.json @@ -658,7 +658,7 @@ "30d" ] }, - "timezone": "browser", + "timezone": "", "title": "Ceph Pool Details", "uid": "-xyV8KCiz", "version": 1 diff --git a/monitoring/grafana/dashboards/pool-overview.json b/monitoring/grafana/dashboards/pool-overview.json index cd699348b07f..c405f6075e17 100644 --- a/monitoring/grafana/dashboards/pool-overview.json +++ b/monitoring/grafana/dashboards/pool-overview.json @@ -1554,7 +1554,7 @@ "30d" ] }, - "timezone": "browser", + "timezone": "", "title": "Ceph Pools Overview", "uid": "z99hzWtmk", "variables": { diff --git a/src/pybind/mgr/dashboard/ci/check_grafana_dashboards.py b/src/pybind/mgr/dashboard/ci/check_grafana_dashboards.py new file mode 100644 index 000000000000..47e553c84e58 --- /dev/null +++ b/src/pybind/mgr/dashboard/ci/check_grafana_dashboards.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +# pylint: disable=F0401 +""" +This script does: +* Scan through Angular html templates and extract tags +* Check if every tag has a corresponding Grafana dashboard by `uid` + +Usage: + python