Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make fleet status update interval configurable #18

Open
xueshanf opened this issue Mar 31, 2015 · 1 comment
Open

Make fleet status update interval configurable #18

xueshanf opened this issue Mar 31, 2015 · 1 comment
Assignees

Comments

@xueshanf
Copy link

Currently it is set to 5000 milliseconds in main.js. Very frequent update seems driving load high on a small t2 EC2 machine. It would be helpful to be able to configure it at docker run time.

My workaround is to change it like so:

ngconstant: {
      options: {
        name: 'config',
        dest: '<%= yeoman.dist %>/scripts/config.js',
        constants: {
          'ENVIRONMENT': 'production',
          'CACHE_VERSION': '<%= ((new Date()).valueOf().toString()) + (Math.floor((Math.random()*1000000)+1).toString()) %>',
          'STATUS_INTERVAL': '60000'
        }
...

In main controller:

angular.module('fleetuiApp')
  .controller('MainCtrl', function ($scope, $interval, machineService, unitService, STATUS_INTERVAL) {
...

$interval(getUnitsInfo,  parseInt(STATUS_INTERVAL));

And it needs a rebuild of the fleet-ui image.
It would be nice to be able to pass the STATUS_INTERVAL at docker run time.

@subicura
Copy link
Contributor

subicura commented Apr 1, 2015

Hi! This is really good idea. I'll add interval option like select tag UI. Thanks!

@subicura subicura self-assigned this Apr 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants