Browse Source

Fix datakey function (#1992)

pull/2053/head
Vladyslav 7 years ago
committed by Igor Kulikov
parent
commit
9538f65d53
  1. 6
      ui/src/app/components/datasource-func.directive.js

6
ui/src/app/components/datasource-func.directive.js

@ -183,9 +183,9 @@ function DatasourceFunc($compile, $templateCache, $mdDialog, $window, $document,
w.triggerHandler('resize'); w.triggerHandler('resize');
} }
}).then(function (newDataKey) { }).then(function (newDataKey) {
if ((newDataKey.type === types.dataKeyType.timeseries) || (newDataKey.type === types.dataKeyType.attribute)) { if (newDataKey.type === types.dataKeyType.function) {
let index = scope.dataKeys.indexOf(dataKey); let index = scope.funcDataKeys.indexOf(dataKey);
scope.dataKeys[index] = newDataKey; scope.funcDataKeys[index] = newDataKey;
} else if (newDataKey.type === types.dataKeyType.alarm) { } else if (newDataKey.type === types.dataKeyType.alarm) {
let index = scope.alarmDataKeys.indexOf(dataKey); let index = scope.alarmDataKeys.indexOf(dataKey);
scope.alarmDataKeys[index] = newDataKey; scope.alarmDataKeys[index] = newDataKey;

Loading…
Cancel
Save