diff --git a/example/eventGenerator/bundle.js b/example/eventGenerator/bundle.js index 608f61eaac..6773442494 100644 --- a/example/eventGenerator/bundle.js +++ b/example/eventGenerator/bundle.js @@ -57,6 +57,13 @@ define([ }, "telemetry": { "source": "eventGenerator", + "domains": [ + { + "key": "time", + "name": "Time", + "format": "utc" + } + ], "ranges": [ { "format": "string" diff --git a/example/eventGenerator/src/EventTelemetryProvider.js b/example/eventGenerator/src/EventTelemetryProvider.js index 79bdec0c40..eb368ebd69 100644 --- a/example/eventGenerator/src/EventTelemetryProvider.js +++ b/example/eventGenerator/src/EventTelemetryProvider.js @@ -36,7 +36,9 @@ define( function EventTelemetryProvider($q, $timeout) { var subscriptions = [], - genInterval = 1000; + genInterval = 1000, + generating = false, + id = Math.random() * 100000; // function matchesSource(request) { @@ -78,10 +80,13 @@ define( } function startGenerating() { + generating = true; $timeout(function () { handleSubscriptions(); - if (subscriptions.length > 0) { + if (generating && subscriptions.length > 0) { startGenerating(); + } else { + generating = false; } }, genInterval); } @@ -91,8 +96,6 @@ 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; @@ -100,7 +103,7 @@ define( } subscriptions.push(subscription); - if (subscriptions.length === 1) { + if (!generating) { startGenerating(); } diff --git a/example/generator/src/SinewaveTelemetryProvider.js b/example/generator/src/SinewaveTelemetryProvider.js index c4062e659c..a50cf4b2cf 100644 --- a/example/generator/src/SinewaveTelemetryProvider.js +++ b/example/generator/src/SinewaveTelemetryProvider.js @@ -34,7 +34,8 @@ define( * @constructor */ function SinewaveTelemetryProvider($q, $timeout) { - var subscriptions = []; + var subscriptions = [], + generating = false; // function matchesSource(request) { @@ -75,10 +76,13 @@ define( } function startGenerating() { + generating = true; $timeout(function () { handleSubscriptions(); - if (subscriptions.length > 0) { + if (generating && subscriptions.length > 0) { startGenerating(); + } else { + generating = false; } }, 1000); } @@ -97,7 +101,7 @@ define( subscriptions.push(subscription); - if (subscriptions.length === 1) { + if (!generating) { startGenerating(); } diff --git a/platform/features/table/bundle.js b/platform/features/table/bundle.js index 1ee305ac2d..a635fb039a 100644 --- a/platform/features/table/bundle.js +++ b/platform/features/table/bundle.js @@ -101,7 +101,8 @@ define([ "composition": [] }, "views": [ - "realtime" + "rt-table", + "scrolling-table" ] } ], @@ -137,7 +138,7 @@ define([ }, { "name": "Real-time Table", - "key": "realtime", + "key": "rt-table", "glyph": "\ue605", "templateUrl": "templates/rt-table.html", "needs": [ diff --git a/platform/features/table/res/templates/mct-data-table.html b/platform/features/table/res/templates/mct-table.html similarity index 95% rename from platform/features/table/res/templates/mct-data-table.html rename to platform/features/table/res/templates/mct-table.html index b637bb0418..2f7ade13b4 100644 --- a/platform/features/table/res/templates/mct-data-table.html +++ b/platform/features/table/res/templates/mct-table.html @@ -1,5 +1,7 @@