Browse Source
Merge pull request #13889 from thingsboard/feature/alarm-details-json
Add alarm details field to alarm widget
pull/13894/head
Andrew Shvayka
12 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
8 additions and
0 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/alarm/alarms-table-widget.component.ts
-
ui-ngx/src/app/shared/models/alarm.models.ts
|
|
|
@ -851,6 +851,9 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit, |
|
|
|
content = this.defaultContent(key, contentInfo, value); |
|
|
|
} |
|
|
|
if (isDefined(content)) { |
|
|
|
if (typeof content === 'object') { |
|
|
|
content = JSON.stringify(content); |
|
|
|
} |
|
|
|
content = this.utils.customTranslation(content, content); |
|
|
|
switch (typeof content) { |
|
|
|
case 'string': |
|
|
|
|
|
|
|
@ -271,6 +271,11 @@ export const alarmFields: {[fieldName: string]: AlarmField} = { |
|
|
|
keyName: 'assignee', |
|
|
|
value: 'assignee', |
|
|
|
name: 'alarm.assignee' |
|
|
|
}, |
|
|
|
details: { |
|
|
|
keyName: 'details', |
|
|
|
value: 'details', |
|
|
|
name: 'alarm.details' |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|