]> git-server-git.apps.pok.os.sepia.ceph.com Git - cephmetrics.git/commitdiff
merge.py: Copy over data source if it exists
authorBoris Ranto <branto@redhat.com>
Wed, 6 Dec 2017 16:45:04 +0000 (17:45 +0100)
committerBoris Ranto <branto@redhat.com>
Mon, 11 Dec 2017 16:59:51 +0000 (17:59 +0100)
Signed-off-by: Boris Ranto <branto@redhat.com>
tools/merge.py

index 29e669974071dd1856ca4c2a54136140e7c528e9..710c24eb6b0e40ca260596b380efaaa223247cab 100755 (executable)
@@ -26,7 +26,7 @@ def update(a, b):
         ra = a['rows'][row_nr]
         rb = b['rows'][row_nr]
         for panel_nr in range(len(ra['panels'])):
-            if 'datasource' in ra['panels'][panel_nr].keys():
+            if 'datasource' in rb['panels'][panel_nr].keys():
                 ra['panels'][panel_nr]['datasource'] = rb['panels'][panel_nr]['datasource']
             if 'targets' not in ra['panels'][panel_nr]:
                 continue