[Time Conductor] support TOI from real-time tables

This commit is contained in:
Henry 2016-10-22 14:46:14 -07:00
parent 029d2b3058
commit f5806613b9
4 changed files with 11 additions and 6 deletions

View File

@ -7,7 +7,6 @@
enableFilter="true"
enableSort="true"
default-sort="defaultSort"
on-row-click="tableController.onRowClick(event, rowIndex, sortColumn, sortDirection)"
class="tabular-holder has-control-bar">
</mct-table>
</div>

View File

@ -1,10 +1,12 @@
<div ng-controller="RealtimeTableController">
<div ng-controller="RealtimeTableController as tableController">
<mct-table
headers="headers"
rows="rows"
time-columns="tableController.timeColumns"
enableFilter="true"
enableSort="true"
class="tabular-holder has-control-bar"
default-sort="defaultSort"
auto-scroll="true">
</mct-table>
</div>

View File

@ -621,10 +621,14 @@ define(
&& this.$scope.displayRows.length > 0) {
var formattedTOI = this.toiFormatter.format(newTOI);
// array, searchElement, min, max
this.$scope.toiRowIndex = this.binarySearch(this.$scope.displayRows,
var rowIndex = this.binarySearch(this.$scope.displayRows,
formattedTOI, 0, this.$scope.displayRows.length - 1);
this.scrollToRow(this.$scope.toiRowIndex);
if (rowIndex > 0 && rowIndex < this.$scope.displayRows.length) {
this.$scope.toiRowIndex = rowIndex;
this.scrollToRow(this.$scope.toiRowIndex);
}
}
console.log('toiRowIndex '+ this.$scope.toiRowIndex + ' length: ' + this.$scope.displayRows.length);
};
/**

View File

@ -35,8 +35,8 @@ define(
* @param telemetryFormatter
* @constructor
*/
function RealtimeTableController($scope, telemetryHandler, telemetryFormatter) {
TableController.call(this, $scope, telemetryHandler, telemetryFormatter);
function RealtimeTableController($scope, telemetryHandler, telemetryFormatter, openmct) {
TableController.call(this, $scope, telemetryHandler, telemetryFormatter, openmct);
this.maxRows = 100000;
}