mirror of
https://github.com/nasa/openmct.git
synced 2025-02-18 16:40:58 +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>
|
||||
<tbody>
|
||||
<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}}
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -41,6 +41,13 @@ define(
|
||||
* formatting service, for making values human-readable.
|
||||
*/
|
||||
function RangeColumn() {
|
||||
function findRange(domainObject) {
|
||||
var telemetry = domainObject.getCapability('telemetry'),
|
||||
metadata = telemetry ? telemetry.getMetadata() : {},
|
||||
ranges = metadata.ranges || [{}];
|
||||
return ranges[0].key;
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
* Get the title to display in this column's header.
|
||||
@ -55,8 +62,17 @@ define(
|
||||
* @returns {string} the text to display
|
||||
*/
|
||||
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 {
|
||||
text: handle.getRangeValue(domainObject)
|
||||
cssClass: alarm && alarm.cssClass,
|
||||
text: value
|
||||
};
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user