Browse Source

Add support for entityLabel in HTML value card, replace entityLabel on entityName, if label doesn't exist (#2239)

pull/2252/head
Chantsova Ekaterina 7 years ago
committed by Igor Kulikov
parent
commit
f4656f3ea0
  1. 2
      application/src/main/data/json/system/widget_bundles/cards.json
  2. 2
      ui/src/app/common/utils.service.js

2
application/src/main/data/json/system/widget_bundles/cards.json

File diff suppressed because one or more lines are too long

2
ui/src/app/common/utils.service.js

@ -522,7 +522,7 @@ function Utils($mdColorPalette, $rootScope, $window, $translate, $q, $timeout, t
} else if (variableName === 'deviceName') {
label = label.split(variable).join(datasource.entityName);
} else if (variableName === 'entityLabel') {
label = label.split(variable).join(datasource.entityLabel);
label = label.split(variable).join(datasource.entityLabel || datasource.entityName);
} else if (variableName === 'aliasName') {
label = label.split(variable).join(datasource.aliasName);
} else if (variableName === 'entityDescription') {

Loading…
Cancel
Save