Commit 9538f65d53167f3adee67ef4d82ce1019a4d9f1f
Committed by
Igor Kulikov
1 parent
bc3c06e5
Fix datakey function (#1992)
Showing
1 changed file
with
3 additions
and
3 deletions
... | ... | @@ -183,9 +183,9 @@ function DatasourceFunc($compile, $templateCache, $mdDialog, $window, $document, |
183 | 183 | w.triggerHandler('resize'); |
184 | 184 | } |
185 | 185 | }).then(function (newDataKey) { |
186 | - if ((newDataKey.type === types.dataKeyType.timeseries) || (newDataKey.type === types.dataKeyType.attribute)) { | |
187 | - let index = scope.dataKeys.indexOf(dataKey); | |
188 | - scope.dataKeys[index] = newDataKey; | |
186 | + if (newDataKey.type === types.dataKeyType.function) { | |
187 | + let index = scope.funcDataKeys.indexOf(dataKey); | |
188 | + scope.funcDataKeys[index] = newDataKey; | |
189 | 189 | } else if (newDataKey.type === types.dataKeyType.alarm) { |
190 | 190 | let index = scope.alarmDataKeys.indexOf(dataKey); |
191 | 191 | scope.alarmDataKeys[index] = newDataKey; | ... | ... |