Commit 6e1b343f504ba91d7e98dd557fe2f135444e4177
Committed by
Andrew Shvayka
1 parent
0f0fdf6e
Alarm widget fix show the incorrect value from alarm details
Showing
2 changed files
with
4 additions
and
2 deletions
@@ -376,6 +376,8 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit, | @@ -376,6 +376,8 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit, | ||
376 | } | 376 | } |
377 | this.stylesInfo[dataKey.def] = getCellStyleInfo(keySettings); | 377 | this.stylesInfo[dataKey.def] = getCellStyleInfo(keySettings); |
378 | this.contentsInfo[dataKey.def] = getCellContentInfo(keySettings, 'value, alarm, ctx'); | 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 | this.columnWidth[dataKey.def] = getColumnWidth(keySettings); | 381 | this.columnWidth[dataKey.def] = getColumnWidth(keySettings); |
380 | this.columns.push(dataKey); | 382 | this.columns.push(dataKey); |
381 | 383 | ||
@@ -932,7 +934,7 @@ class AlarmsDatasource implements DataSource<AlarmDataInfo> { | @@ -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 | return alarm; | 939 | return alarm; |
938 | } | 940 | } |
@@ -189,7 +189,7 @@ export function getAlarmValue(alarm: AlarmDataInfo, key: EntityColumn) { | @@ -189,7 +189,7 @@ export function getAlarmValue(alarm: AlarmDataInfo, key: EntityColumn) { | ||
189 | if (alarmField) { | 189 | if (alarmField) { |
190 | return getDescendantProp(alarm, alarmField.value); | 190 | return getDescendantProp(alarm, alarmField.value); |
191 | } else { | 191 | } else { |
192 | - return getDescendantProp(alarm, key.label); | 192 | + return getDescendantProp(alarm, key.name); |
193 | } | 193 | } |
194 | } | 194 | } |
195 | 195 |