Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't refresh overview graphs more often than required

Change-Id: I6f23eb5b9339567599931194650569113d91f178
Reviewed-on: http://review.northscale.com/1873
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  • Loading branch information...
commit 27296ec64f90ffe38cc9f8efbd114bd43c98e07a 1 parent f6dd03a
@alk alk authored alk committed
Showing with 9 additions and 2 deletions.
  1. +9 −2 deps/menelaus/priv/js/overview.js
View
11 deps/menelaus/priv/js/overview.js
@@ -66,11 +66,18 @@ var OverviewSection = {
init: function () {
_.defer($m(this, 'initLater'));
- this.statsCell = new Cell(function (poolDetails) {
- return future.get({url: '/pools/default/overviewStats'});
+ // this fake cell makes sure our stats cell is not recomputed when pool details change
+ this.statsCellArg = new Cell(function (poolDetails) {
+ return 1;
}, {
poolDetails: DAO.cells.currentPoolDetailsCell
});
+
+ this.statsCell = new Cell(function (arg) {
+ return future.get({url: '/pools/default/overviewStats'});
+ }, {
+ arg: this.statsCellArg
+ });
this.statsCell.subscribeValue($m(this, 'onStatsValue'));
},
plotGraph: function (graphJQ, stats, attr) {
Please sign in to comment.
Something went wrong with that request. Please try again.