[Limits] Begin using limits from scrolling list view

WTD-1223.
This commit is contained in:
Victor Woeltjen 2015-06-05 17:59:58 -07:00
parent dc6c43a4cd
commit 88f938b1b6
3 changed files with 15 additions and 7 deletions

View File

@ -36,19 +36,19 @@
<!-- ng-class is temporarily hard-coded in next element -->
<div
class="tr"
ng-repeat="row in rows"
ng-repeat="row in rows track by $index"
ng-class="{ 's-stale': $index%3==0 }"
>
<!-- ng-class is temporarily hard-coded in next element -->
<div
class="td"
ng-class="{ 's-cell-type-value': $index > 1 }"
ng-repeat="cell in row"
ng-repeat="cell in row track by $index"
>
<!-- ng-class is temporarily hard-coded in next element -->
<span
class="l-cell-contents"
ng-class="{ 's-limit-upr-yellow': cell > 0 }"
ng-class="cell.cssClass"
>
{{cell}}
</span>

View File

@ -55,9 +55,17 @@ define(
* @returns {string} the text to display
*/
getValue: function (domainObject, data, index) {
return telemetryFormatter.formatRangeValue(
data.getRangeValue(index, rangeMetadata.key)
);
var range = rangeMetadata.key,
limit = domainObject.getCapability('limit'),
value = data.getRangeValue(index, range),
cell = telemetryFormatter.formatRangeValue(value);
return {
cssClass: limit && limit.evaluate(value, range),
toString: function () {
return cell;
}
};
}
};
}

View File

@ -142,7 +142,7 @@ define(
// column object itself)
return values.map(function (value) {
return columns.map(function (column) {
return column.getValue(
column.getValue(
objects[value.objectIndex],
datas[value.objectIndex],
value.pointIndex