Skip to content

Commit

Permalink
Centralize interval.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeiklejohn committed Aug 21, 2012
1 parent b23872c commit 8f268a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions priv/admin/js/app.js
Expand Up @@ -3,6 +3,8 @@ minispade.register('app', function() {
ready: Ember.alias('initialize')
});

RiakControl.refreshInterval = 1000;

RiakControl.ApplicationController = Ember.Controller.extend();

RiakControl.ApplicationView = Ember.View.extend({
Expand Down
4 changes: 2 additions & 2 deletions priv/admin/js/ring.js
Expand Up @@ -25,7 +25,7 @@ minispade.register('ring', function() {
},

startInterval: function() {
this._intervalId = setInterval($.proxy(this.load, this), 500);
this._intervalId = setInterval($.proxy(this.load, this), RiakControl.refreshInterval);
},

cancelInterval: function() {
Expand Down Expand Up @@ -80,7 +80,7 @@ minispade.register('ring', function() {
},

startInterval: function() {
this._intervalId = setInterval($.proxy(this.load, this), 500);
this._intervalId = setInterval($.proxy(this.load, this), RiakControl.refreshInterval);
},

cancelInterval: function() {
Expand Down
2 changes: 1 addition & 1 deletion priv/admin/js/snapshot.js
Expand Up @@ -5,7 +5,7 @@ minispade.register('snapshot', function() {
},

startInterval: function() {
this._intervalId = setInterval($.proxy(this.load, this), 500);
this._intervalId = setInterval($.proxy(this.load, this), RiakControl.refreshInterval);
},

cancelInterval: function() {
Expand Down

0 comments on commit 8f268a5

Please sign in to comment.