----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13606/#review32159 -----------------------------------------------------------
src/webui/master/static/js/controllers.js <https://reviews.apache.org/r/13606/#comment60859> The `update` function looks almost identical between SlaveCtrl and SlaveFrameworkCtrl. Can we make this its own function and get rid of the cut/paste? src/webui/master/static/js/services.js <https://reviews.apache.org/r/13606/#comment60861> This could be something like: _.each([ 'cpus_user_time_secs' ], function(n) { this[n] = 0.0 }); src/webui/master/static/js/services.js <https://reviews.apache.org/r/13606/#comment60862> Because the parameters are the same here, why not just do this: _.each(this.metrics, function(v, name) { this.metrics[name] += stats[name]; } src/webui/master/static/slave.html <https://reviews.apache.org/r/13606/#comment60867> Having to look up something from a root object seems like the wrong way to do things. Maybe change the ng-repeat to fetch from both monitor and frameworks (doing an _.extend on the data) at the same time? - Thomas Rampelberg On Jan. 15, 2014, 2:30 a.m., Ben Mahler wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/13606/ > ----------------------------------------------------------- > > (Updated Jan. 15, 2014, 2:30 a.m.) > > > Review request for mesos, Benjamin Hindman and Vinod Kone. > > > Repository: mesos-git > > > Description > ------- > > This adds a Top abstraction to the webui for periodically polling the > monitoring endpoint. > > Instead of having each controller have to deal with monitoring information > during the update cycle, this allows each controller to setup asynchronous > monitoring updates, stopping it when the controller becomes inactive. > > > Diffs > ----- > > src/webui/master/static/js/controllers.js > 01fe64ca6b784b210a5687f4e1cda60cead8671d > src/webui/master/static/js/services.js > 122519a5a4de93edf1fd7a5256e565cc78c59670 > src/webui/master/static/slave.html 134aa0b10a232a37654a4ef9ac4bb149dbbebdea > src/webui/master/static/slave_executor.html > 81c10cbf4dd77f65dd8c3081281740c2be1e5b56 > src/webui/master/static/slave_framework.html > 04a041e9a4e8e1364617d09412f0a81a160ee48a > > Diff: https://reviews.apache.org/r/13606/diff/ > > > Testing > ------- > > Ran the long-lived-framework. > > > Thanks, > > Ben Mahler > >