Skip to content

Commit

Permalink
[Time Conductor] support TOI from real-time tables
Browse files Browse the repository at this point in the history
  • Loading branch information
akhenry committed Oct 22, 2016
1 parent 029d2b3 commit f580661
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
4 changes: 3 additions & 1 deletion platform/features/table/res/templates/rt-table.html
Original file line number Diff line number Diff line change
@@ -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>
8 changes: 6 additions & 2 deletions platform/features/table/src/controllers/MCTTableController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f580661

Please sign in to comment.