Skip to content

Commit ff32a7e

Browse files
author
Adityashankar Kini
committed
Fix for bug in dashboard panel create
1 parent b286aa8 commit ff32a7e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sdcclient/_client.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,17 @@ def add_dashboard_panel(self, dashboard, name, panel_type, metrics, scope=None,
426426
# Convert list of metrics to format used by Sysdig Cloud
427427
#
428428
property_names = {}
429+
k_count = 0
430+
v_count = 0
429431
for i, metric in enumerate(metrics):
430432
property_name = 'v' if 'aggregations' in metric else 'k'
433+
434+
if property_name == 'k':
435+
i = k_count
436+
k_count += 1
437+
else:
438+
i = v_count
439+
i_count += 1
431440
property_names[metric['id']] = property_name + str(i)
432441

433442
panel_configuration['metrics'].append({

0 commit comments

Comments
 (0)