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