-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15215/#review28206
-----------------------------------------------------------



src/webui/master/static/js/app.js
<https://reviews.apache.org/r/15215/#comment54886>

    Use the Angular $window service instead a global: 
http://docs-angularjs-org-dev.appspot.com/api/ng.$window



src/webui/master/static/js/app.js
<https://reviews.apache.org/r/15215/#comment54890>

    `window.resize` fires a lot when resizing the window, which will cause a 
bunch of `scope.$apply` calls that are not necessary and potentially expensive.
    
    Can you throttle the calls be 1 every second or so?
    
    Underscore provides a `throttle` function for this purpose: 
http://underscorejs.org/#throttle



src/webui/master/static/js/app.js
<https://reviews.apache.org/r/15215/#comment54892>

    The return value of `reduce` is not being used here, so this can just be a 
forEach:
    
    data.forEach(function(...


- Ross Allen


On Nov. 4, 2013, 11:05 p.m., Shingo Omura wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15215/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2013, 11:05 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, Ross Allen, and Vinod 
> Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Support d3 bar charts for slaves, tasks, resources in mesos webui.
> 
> - introduced d3 angular module and d3-bar angular directive.
> - tipsy used for tooltipping on d3 chart because ui-bootstrap's tooltipping 
> doesn't work well with d3.
>   tipsy: https://gist.github.com/ilyabo/1373263
> - color scheme would be changed for better presentation.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-797
> 
> 
> Diffs
> -----
> 
>   src/webui/master/static/css/d3-bar.css PRE-CREATION 
>   src/webui/master/static/css/tipsy.css PRE-CREATION 
>   src/webui/master/static/home.html 4f9e2d9 
>   src/webui/master/static/index.html 47403d8 
>   src/webui/master/static/js/app.js b918799 
>   src/webui/master/static/js/controllers.js 0c930a2 
>   src/webui/master/static/js/d3.v.3.3.9.js PRE-CREATION 
>   src/webui/master/static/js/d3.v.3.3.9.min.js PRE-CREATION 
>   src/webui/master/static/js/jquery.tipsy.js PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/15215/diff/
> 
> 
> Testing
> -------
> 
> testing on my laptop, single host deployment.
> using mesos-execute, I confirmed the bar charts was updated.
> screenshot is here: 
> https://twitter.com/everpeace/status/397320001725554689/photo/1
> 
> 
> Thanks,
> 
> Shingo Omura
> 
>

Reply via email to