Fix datakey function (#1992)
This commit is contained in:
parent
bc3c06e51d
commit
9538f65d53
@ -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…
x
Reference in New Issue
Block a user