Commit 6e1b343f504ba91d7e98dd557fe2f135444e4177

Authored by Vladyslav_Prykhodko
Committed by Andrew Shvayka
1 parent 0f0fdf6e

Alarm widget fix show the incorrect value from alarm details

... ... @@ -376,6 +376,8 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
376 376 }
377 377 this.stylesInfo[dataKey.def] = getCellStyleInfo(keySettings);
378 378 this.contentsInfo[dataKey.def] = getCellContentInfo(keySettings, 'value, alarm, ctx');
  379 + this.contentsInfo[dataKey.def].units = dataKey.units;
  380 + this.contentsInfo[dataKey.def].decimals = dataKey.decimals;
379 381 this.columnWidth[dataKey.def] = getColumnWidth(keySettings);
380 382 this.columns.push(dataKey);
381 383
... ... @@ -932,7 +934,7 @@ class AlarmsDatasource implements DataSource<AlarmDataInfo> {
932 934 }
933 935 }
934 936 }
935   - alarm[dataKey.label] = value;
  937 + alarm[dataKey.name] = value;
936 938 });
937 939 return alarm;
938 940 }
... ...
... ... @@ -189,7 +189,7 @@ export function getAlarmValue(alarm: AlarmDataInfo, key: EntityColumn) {
189 189 if (alarmField) {
190 190 return getDescendantProp(alarm, alarmField.value);
191 191 } else {
192   - return getDescendantProp(alarm, key.label);
  192 + return getDescendantProp(alarm, key.name);
193 193 }
194 194 }
195 195
... ...