From: Ernesto Puerta Date: Mon, 2 Dec 2019 20:28:35 +0000 (+0100) Subject: mgr/dashboard,grafana: remove shortcut menu X-Git-Tag: v15.1.0~690^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1182073f0cece98c74f62bdc2f966380aad30c40;p=ceph.git mgr/dashboard,grafana: remove shortcut menu Remove shortcut menu (links) and add check in grafana CI script. Fixes: https://tracker.ceph.com/issues/43091 Signed-off-by: Ernesto Puerta --- diff --git a/monitoring/grafana/dashboards/host-details.json b/monitoring/grafana/dashboards/host-details.json index c4d139a68c00..17ee37e5b1a9 100644 --- a/monitoring/grafana/dashboards/host-details.json +++ b/monitoring/grafana/dashboards/host-details.json @@ -38,17 +38,7 @@ "graphTooltip": 0, "id": null, "iteration": 1557386759572, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "tags": [ - "overview" - ], - "title": "Shortcuts", - "type": "dashboards" - } - ], + "links": [], "panels": [ { "gridPos": { @@ -1221,5 +1211,5 @@ "timezone": "browser", "title": "Host Details", "uid": "rtOg0AiWz", - "version": 3 + "version": 4 } diff --git a/src/pybind/mgr/dashboard/ci/check_grafana_uids.py b/src/pybind/mgr/dashboard/ci/check_grafana_uids.py index 134bb6e7fbd3..fac3b9953971 100644 --- a/src/pybind/mgr/dashboard/ci/check_grafana_uids.py +++ b/src/pybind/mgr/dashboard/ci/check_grafana_uids.py @@ -85,6 +85,13 @@ def get_grafana_dashboards(base_dir): with open(json_file) as f: dashboard_config = json.load(f) uid = dashboard_config.get('uid') + + # Grafana dashboard checks + title = dashboard_config['title'] + assert len(title) > 0, \ + "Title not found in '{}'".format(json_file) + assert len(dashboard_config.get('links', [])) == 0, \ + "Links found in '{}'".format(json_file) if not uid: continue if uid in dashboards: @@ -92,9 +99,10 @@ def get_grafana_dashboards(base_dir): error_msg = 'Duplicated UID {} found, already defined in {}'.\ format(uid, dashboards[uid]['file']) exit(error_msg) + dashboards[uid] = { 'file': json_file, - 'title': dashboard_config['title'] + 'title': title } return dashboards