|
|
|
@ -371,7 +371,9 @@ function EntitiesTableWidgetController($element, $scope, $filter, $mdMedia, $mdP |
|
|
|
content = strContent; |
|
|
|
} |
|
|
|
} else { |
|
|
|
content = defaultContent(key, value); |
|
|
|
var decimals = (contentInfo.decimals || contentInfo.decimals === 0) ? contentInfo.decimals : vm.widgetConfig.decimals; |
|
|
|
var units = contentInfo.units || vm.widgetConfig.units; |
|
|
|
content = vm.ctx.utils.formatValue(value, decimals, units, true); |
|
|
|
} |
|
|
|
return content; |
|
|
|
} else { |
|
|
|
@ -379,14 +381,6 @@ function EntitiesTableWidgetController($element, $scope, $filter, $mdMedia, $mdP |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function defaultContent(key, value) { |
|
|
|
if (angular.isDefined(value)) { |
|
|
|
return value; |
|
|
|
} else { |
|
|
|
return ''; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function defaultStyle(/*key, value*/) { |
|
|
|
return {}; |
|
|
|
} |
|
|
|
@ -542,7 +536,9 @@ function EntitiesTableWidgetController($element, $scope, $filter, $mdMedia, $mdP |
|
|
|
|
|
|
|
vm.contentsInfo[dataKey.label] = { |
|
|
|
useCellContentFunction: useCellContentFunction, |
|
|
|
cellContentFunction: cellContentFunction |
|
|
|
cellContentFunction: cellContentFunction, |
|
|
|
units: dataKey.units, |
|
|
|
decimals: dataKey.decimals |
|
|
|
}; |
|
|
|
|
|
|
|
var columnWidth = angular.isDefined(keySettings.columnWidth) ? keySettings.columnWidth : '0px'; |
|
|
|
|