diff --git a/ui/src/app/components/datasource-entity.directive.js b/ui/src/app/components/datasource-entity.directive.js index afde04e2d2..9ed05b8812 100644 --- a/ui/src/app/components/datasource-entity.directive.js +++ b/ui/src/app/components/datasource-entity.directive.js @@ -165,7 +165,11 @@ function DatasourceEntity($compile, $templateCache, $q, $mdDialog, $window, $doc }; scope.transformAlarmDataKeyChip = function (chip) { - return scope.generateDataKey({chip: chip, type: types.dataKeyType.alarm}); + if (chip.type) { + return scope.generateDataKey({chip: chip.name, type: chip.type}); + } else { + return scope.generateDataKey({chip: chip, type: types.dataKeyType.alarm}); + } }; scope.showColorPicker = function (event, dataKey) { diff --git a/ui/src/app/components/datasource-entity.tpl.html b/ui/src/app/components/datasource-entity.tpl.html index 9a58ecdb66..fe0d23eef7 100644 --- a/ui/src/app/components/datasource-entity.tpl.html +++ b/ui/src/app/components/datasource-entity.tpl.html @@ -125,7 +125,7 @@
entity.no-key-matching - entity.create-new-key + entity.create-new-key