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