mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 17:33:23 +00:00
[Scrolling List] Show limits in RT scrolling list
Show limits in a real-time scrolling list view, WTD-1317.
This commit is contained in:
parent
dddc2f976e
commit
510597a51a
@ -38,7 +38,8 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-repeat="row in rtscroll.rows()">
|
<tr ng-repeat="row in rtscroll.rows()">
|
||||||
<td ng-repeat="cell in row">
|
<td ng-repeat="cell in row"
|
||||||
|
ng-class="cell.cssClass">
|
||||||
{{cell.text}}
|
{{cell.text}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -41,6 +41,13 @@ define(
|
|||||||
* formatting service, for making values human-readable.
|
* formatting service, for making values human-readable.
|
||||||
*/
|
*/
|
||||||
function RangeColumn() {
|
function RangeColumn() {
|
||||||
|
function findRange(domainObject) {
|
||||||
|
var telemetry = domainObject.getCapability('telemetry'),
|
||||||
|
metadata = telemetry ? telemetry.getMetadata() : {},
|
||||||
|
ranges = metadata.ranges || [{}];
|
||||||
|
return ranges[0].key;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* Get the title to display in this column's header.
|
* Get the title to display in this column's header.
|
||||||
@ -55,8 +62,17 @@ define(
|
|||||||
* @returns {string} the text to display
|
* @returns {string} the text to display
|
||||||
*/
|
*/
|
||||||
getValue: function (domainObject, handle) {
|
getValue: function (domainObject, handle) {
|
||||||
|
var range = findRange(domainObject),
|
||||||
|
limit = domainObject.getCapability('limit'),
|
||||||
|
value = handle.getRangeValue(domainObject),
|
||||||
|
alarm = limit && limit.evaluate(
|
||||||
|
handle.getDatum(domainObject),
|
||||||
|
range
|
||||||
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
text: handle.getRangeValue(domainObject)
|
cssClass: alarm && alarm.cssClass,
|
||||||
|
text: value
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user