File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 25
25
SPACE_UUID_MAP [s ["uuid" ]] = new_space ["uuid" ]
26
26
27
27
print ('Getting all spaces and content' )
28
+ full_spaces = []
29
+ for s in all_spaces :
30
+ print (f'Getting all charts and dashboards for space { s ["name" ]} ' )
31
+ full_spaces .append (source_client .space (s ["uuid" ], summary = False ))
28
32
full_spaces = [source_client .space (s ["uuid" ], summary = False ) for s in all_spaces ]
29
33
all_charts = [chart for space in full_spaces for chart in space ["queries" ]]
30
34
all_dashboards = [dashboard for space in full_spaces for dashboard in space ["dashboards" ]]
55
59
if tile ['type' ] == 'saved_chart' :
56
60
if "belongsToDashboard" in tile ["properties" ] and tile ["properties" ]["belongsToDashboard" ] == True :
57
61
print (f'Copying chart that belongs to dashboard: { tile ["properties" ]["chartName" ]} ' )
58
- chart = target_client .saved_chart (tile ['properties' ]['savedChartUuid' ])
62
+ chart = source_client .saved_chart (tile ['properties' ]['savedChartUuid' ])
63
+ if 'spaceUuid' in chart :
64
+ chart ['spaceUuid' ] = SPACE_UUID_MAP [chart ['spaceUuid' ]]
59
65
new_chart = target_client .create_saved_chart ({** chart , 'dashboardUuid' : new_dashboard ["uuid" ]})
60
66
CHART_UUID_MAP [chart ["uuid" ]] = new_chart ["uuid" ]
61
67
You can’t perform that action at this time.
0 commit comments