Adds osm_automated tag to automated dashboards 08/8708/2
authorlavado <glavado@whitestack.com>
Fri, 20 Mar 2020 21:59:41 +0000 (16:59 -0500)
committerpalsus <subhankar.pal@altran.com>
Wed, 13 May 2020 13:39:20 +0000 (15:39 +0200)
Fixes Bug 1027.

Change-Id: Id4ef8828b93acc6a68b1020ff25043c36f4878e5
Signed-off-by: lavado <glavado@whitestack.com>
(cherry picked from commit e304bb892c98c77665910de132ae940d62a89666)

osm_mon/dashboarder/backends/grafana.py
osm_mon/dashboarder/templates/ns_scoped.json
osm_mon/dashboarder/templates/project_scoped.json

index 491cd52..4f1fe52 100644 (file)
@@ -34,7 +34,8 @@ headers = {
 
 
 def get_all_dashboard_uids():
-    response = requests.request("GET", url + "search?query=%", headers=headers)
+    # Gets only dashboards that were automated by OSM (with tag 'osm_automated')
+    response = requests.request("GET", url + "search?tag=osm_automated", headers=headers)
     dashboards = response.json()
     dashboard_uids = []
     for dashboard in dashboards:
index 977ec21..222d836 100644 (file)
   "refresh": "5s",
   "schemaVersion": 20,
   "style": "dark",
-  "tags": [],
+  "tags": ["osm_automated"],
   "templating": {
     "list": [
       {
index e58d922..2f49164 100644 (file)
   "refresh": "5s",
   "schemaVersion": 20,
   "style": "dark",
-  "tags": [],
+  "tags": ["osm_automated"],
   "templating": {
     "list": [
       {