Merge "Fix missing metric names for Alarm"

This commit is contained in:
Zuul 2018-04-09 09:37:16 +00:00 committed by Gerrit Code Review
commit 4bcc3b5b00
1 changed files with 7 additions and 1 deletions

View File

@ -67,7 +67,13 @@ def show_alarm_id(data):
def show_metric_name(data):
return data['metrics'][0]['name']
if len(data['metrics']) > 1:
names = []
for metric in data['metrics']:
names.append(metric['name'])
return ', '.join(['%s' % (n) for n in names])
else:
return data['metrics'][0]['name']
def show_def_name(data):