Repository: ignite
Updated Branches:
  refs/heads/master 5818b198b -> 966bf201d


IGNITE-9565. Web Console: Update chartjs streaming plugin and use TTL feature.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/966bf201
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/966bf201
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/966bf201

Branch: refs/heads/master
Commit: 966bf201d1619ff9181d076f304c75cf3bb37924
Parents: 5818b19
Author: Alexander Kalinin <[email protected]>
Authored: Mon Sep 17 10:28:43 2018 +0700
Committer: Alexey Kuznetsov <[email protected]>
Committed: Mon Sep 17 10:28:43 2018 +0700

----------------------------------------------------------------------
 .../frontend/app/components/ignite-chart/controller.js          | 5 +----
 modules/web-console/frontend/package.json                       | 2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/966bf201/modules/web-console/frontend/app/components/ignite-chart/controller.js
----------------------------------------------------------------------
diff --git 
a/modules/web-console/frontend/app/components/ignite-chart/controller.js 
b/modules/web-console/frontend/app/components/ignite-chart/controller.js
index 62c2076..c60ef5a 100644
--- a/modules/web-console/frontend/app/components/ignite-chart/controller.js
+++ b/modules/web-console/frontend/app/components/ignite-chart/controller.js
@@ -217,6 +217,7 @@ export class IgniteChartController {
                         duration: this.currentRange.value * 1000 * 60,
                         frameRate: 1000 / this.refreshRate || 1 / 3,
                         refresh: this.refreshRate || 3000,
+                        ttl: this.maxPointsNumber,
                         onRefresh: () => {
                             this.onRefresh();
                         }
@@ -291,10 +292,6 @@ export class IgniteChartController {
                     this.addDataset(key);
                 }
 
-                // Prune excessive data points.
-                if (this.maxPointsNumber && 
this.config.data.datasets[datasetIndex].length - this.maxPointsNumber > 0)
-                    this.config.data.datasets[datasetIndex].data.splice(0, 
this.config.data.datasets[datasetIndex].length - this.maxPointsNumber);
-
                 this.config.data.datasets[datasetIndex].data.push({x: 
dataPoint.x, y: dataPoint.y[key]});
                 this.config.data.datasets[datasetIndex].borderColor = 
this.chartColors[datasetIndex];
                 this.config.data.datasets[datasetIndex].borderWidth = 2;

http://git-wip-us.apache.org/repos/asf/ignite/blob/966bf201/modules/web-console/frontend/package.json
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/package.json 
b/modules/web-console/frontend/package.json
index 938a48f..ec885c4 100644
--- a/modules/web-console/frontend/package.json
+++ b/modules/web-console/frontend/package.json
@@ -56,7 +56,7 @@
     "browser-update": "3.1.13",
     "bson-objectid": "1.1.5",
     "chart.js": "2.7.2",
-    "chartjs-plugin-streaming": "1.5.0",
+    "chartjs-plugin-streaming": "1.6.1",
     "file-saver": "1.3.3",
     "font-awesome": "4.7.0",
     "jquery": "3.2.1",

Reply via email to