[Tables] #707 Supporting realtime telemetry tables

Added real-time table type
This commit is contained in:
Henry
2016-03-08 13:29:16 -08:00
parent 20f1dcef45
commit a4eb9d6a94
6 changed files with 94 additions and 69 deletions

View File

@ -36,8 +36,7 @@ define(
function EventTelemetryProvider($q, $timeout) {
var
subscriptions = [],
genInterval = 1000,
startTime = Date.now();
genInterval = 1000;
//
function matchesSource(request) {
@ -80,7 +79,6 @@ define(
function startGenerating() {
$timeout(function () {
//console.log("startGenerating... " + Date.now());
handleSubscriptions();
if (subscriptions.length > 0) {
startGenerating();
@ -93,7 +91,8 @@ define(
callback: callback,
requests: requests
};
console.log("subscribe... " + Date.now() / 1000 + " request:" +
" " + requests[0].id);
function unsubscribe() {
subscriptions = subscriptions.filter(function (s) {
return s !== subscription;
@ -101,7 +100,6 @@ define(
}
subscriptions.push(subscription);
if (subscriptions.length === 1) {
startGenerating();
}