Re: Review Request 38169: Refactoring resources table to show dedicated.

2015-09-09 Thread Aurora ReviewBot

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


Master (01e611a) is green with this patch.
  ./build-support/jenkins/build.sh

However, it appears that it might lack test coverage.

I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On Sept. 9, 2015, 7:10 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38169/
> ---
> 
> (Updated Sept. 9, 2015, 7:10 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Joshua Cohen.
> 
> 
> Bugs: AURORA-1461
> https://issues.apache.org/jira/browse/AURORA-1461
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Making Resources table dynamic to display only non-zero resource vectors (see 
> pics attached). Table width is now dependent on the number of visible columns.
> 
> 
> Diffs
> -
> 
>   src/main/resources/scheduler/assets/js/controllers.js 
> 9436e9b21347db572f235b81687baea3252074f5 
>   src/main/resources/scheduler/assets/role.html 
> 2572c4b4497aa78d3fa31457a5dc7c57e6565027 
> 
> Diff: https://reviews.apache.org/r/38169/diff/
> 
> 
> Testing
> ---
> 
> 
> File Attachments
> 
> 
> resources_full.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/ada720ce-bb97-4321-99bb-0574bf14b653__resources_full.png
> resources_partial.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/a6e4aa7e-ca7e-4ca4-900e-fda6cfdcaff3__resources_partial.png
> resources_min.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/c44964f2-d8d7-41b0-8a4f-995a1e3538f1__resources_min.png
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 38169: Refactoring resources table to show dedicated.

2015-09-09 Thread David McLaughlin

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

Ship it!


Ship It!

- David McLaughlin


On Sept. 9, 2015, 7:10 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38169/
> ---
> 
> (Updated Sept. 9, 2015, 7:10 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Joshua Cohen.
> 
> 
> Bugs: AURORA-1461
> https://issues.apache.org/jira/browse/AURORA-1461
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Making Resources table dynamic to display only non-zero resource vectors (see 
> pics attached). Table width is now dependent on the number of visible columns.
> 
> 
> Diffs
> -
> 
>   src/main/resources/scheduler/assets/js/controllers.js 
> 9436e9b21347db572f235b81687baea3252074f5 
>   src/main/resources/scheduler/assets/role.html 
> 2572c4b4497aa78d3fa31457a5dc7c57e6565027 
> 
> Diff: https://reviews.apache.org/r/38169/diff/
> 
> 
> Testing
> ---
> 
> 
> File Attachments
> 
> 
> resources_full.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/ada720ce-bb97-4321-99bb-0574bf14b653__resources_full.png
> resources_partial.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/a6e4aa7e-ca7e-4ca4-900e-fda6cfdcaff3__resources_partial.png
> resources_min.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/c44964f2-d8d7-41b0-8a4f-995a1e3538f1__resources_min.png
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 38169: Refactoring resources table to show dedicated.

2015-09-08 Thread Maxim Khutornenko

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

(Updated Sept. 8, 2015, 9:10 p.m.)


Review request for Aurora, David McLaughlin and Joshua Cohen.


Changes
---

Joshua's comments.


Bugs: AURORA-1461
https://issues.apache.org/jira/browse/AURORA-1461


Repository: aurora


Description
---

Making Resources table dynamic to display only non-zero resource vectors (see 
pics attached). Table width is now dependent on the number of visible columns. 

Not particularly happy about ng-class approach to control table width, so any 
suggestions how to make it better are welcome.

May not apply cleanly, diffed against 38081.


Diffs (updated)
-

  src/main/resources/scheduler/assets/js/controllers.js 
98920196db34f2eb4dcad93429274517e7383efe 
  src/main/resources/scheduler/assets/role.html 
2572c4b4497aa78d3fa31457a5dc7c57e6565027 

Diff: https://reviews.apache.org/r/38169/diff/


Testing
---


File Attachments


resources_full.png
  
https://reviews.apache.org/media/uploaded/files/2015/09/08/ada720ce-bb97-4321-99bb-0574bf14b653__resources_full.png
resources_partial.png
  
https://reviews.apache.org/media/uploaded/files/2015/09/08/a6e4aa7e-ca7e-4ca4-900e-fda6cfdcaff3__resources_partial.png
resources_min.png
  
https://reviews.apache.org/media/uploaded/files/2015/09/08/c44964f2-d8d7-41b0-8a4f-995a1e3538f1__resources_min.png


Thanks,

Maxim Khutornenko



Re: Review Request 38169: Refactoring resources table to show dedicated.

2015-09-08 Thread Aurora ReviewBot

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


This patch does not apply cleanly on master (2773826), do you need to rebase?

I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On Sept. 8, 2015, 9:10 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38169/
> ---
> 
> (Updated Sept. 8, 2015, 9:10 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Joshua Cohen.
> 
> 
> Bugs: AURORA-1461
> https://issues.apache.org/jira/browse/AURORA-1461
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Making Resources table dynamic to display only non-zero resource vectors (see 
> pics attached). Table width is now dependent on the number of visible 
> columns. 
> 
> Not particularly happy about ng-class approach to control table width, so any 
> suggestions how to make it better are welcome.
> 
> May not apply cleanly, diffed against 38081.
> 
> 
> Diffs
> -
> 
>   src/main/resources/scheduler/assets/js/controllers.js 
> 98920196db34f2eb4dcad93429274517e7383efe 
>   src/main/resources/scheduler/assets/role.html 
> 2572c4b4497aa78d3fa31457a5dc7c57e6565027 
> 
> Diff: https://reviews.apache.org/r/38169/diff/
> 
> 
> Testing
> ---
> 
> 
> File Attachments
> 
> 
> resources_full.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/ada720ce-bb97-4321-99bb-0574bf14b653__resources_full.png
> resources_partial.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/a6e4aa7e-ca7e-4ca4-900e-fda6cfdcaff3__resources_partial.png
> resources_min.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/c44964f2-d8d7-41b0-8a4f-995a1e3538f1__resources_min.png
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 38169: Refactoring resources table to show dedicated.

2015-09-08 Thread David McLaughlin

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



src/main/resources/scheduler/assets/js/controllers.js (line 183)


Since the max length of 6 assumes a column can fit into 2 bootstrap 
columns, the logic can just be col-md-{columns.length * 2} here.



src/main/resources/scheduler/assets/js/controllers.js (line 206)


Style nit, but declare the function before you call it.


- David McLaughlin


On Sept. 8, 2015, 9:10 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38169/
> ---
> 
> (Updated Sept. 8, 2015, 9:10 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Joshua Cohen.
> 
> 
> Bugs: AURORA-1461
> https://issues.apache.org/jira/browse/AURORA-1461
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Making Resources table dynamic to display only non-zero resource vectors (see 
> pics attached). Table width is now dependent on the number of visible 
> columns. 
> 
> Not particularly happy about ng-class approach to control table width, so any 
> suggestions how to make it better are welcome.
> 
> May not apply cleanly, diffed against 38081.
> 
> 
> Diffs
> -
> 
>   src/main/resources/scheduler/assets/js/controllers.js 
> 98920196db34f2eb4dcad93429274517e7383efe 
>   src/main/resources/scheduler/assets/role.html 
> 2572c4b4497aa78d3fa31457a5dc7c57e6565027 
> 
> Diff: https://reviews.apache.org/r/38169/diff/
> 
> 
> Testing
> ---
> 
> 
> File Attachments
> 
> 
> resources_full.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/ada720ce-bb97-4321-99bb-0574bf14b653__resources_full.png
> resources_partial.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/a6e4aa7e-ca7e-4ca4-900e-fda6cfdcaff3__resources_partial.png
> resources_min.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/c44964f2-d8d7-41b0-8a4f-995a1e3538f1__resources_min.png
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 38169: Refactoring resources table to show dedicated.

2015-09-08 Thread Maxim Khutornenko

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

(Updated Sept. 8, 2015, 10:54 p.m.)


Review request for Aurora, David McLaughlin and Joshua Cohen.


Changes
---

David's comments.


Bugs: AURORA-1461
https://issues.apache.org/jira/browse/AURORA-1461


Repository: aurora


Description
---

Making Resources table dynamic to display only non-zero resource vectors (see 
pics attached). Table width is now dependent on the number of visible columns. 

Not particularly happy about ng-class approach to control table width, so any 
suggestions how to make it better are welcome.

May not apply cleanly, diffed against 38081.


Diffs (updated)
-

  src/main/resources/scheduler/assets/js/controllers.js 
98920196db34f2eb4dcad93429274517e7383efe 
  src/main/resources/scheduler/assets/role.html 
2572c4b4497aa78d3fa31457a5dc7c57e6565027 

Diff: https://reviews.apache.org/r/38169/diff/


Testing
---


File Attachments


resources_full.png
  
https://reviews.apache.org/media/uploaded/files/2015/09/08/ada720ce-bb97-4321-99bb-0574bf14b653__resources_full.png
resources_partial.png
  
https://reviews.apache.org/media/uploaded/files/2015/09/08/a6e4aa7e-ca7e-4ca4-900e-fda6cfdcaff3__resources_partial.png
resources_min.png
  
https://reviews.apache.org/media/uploaded/files/2015/09/08/c44964f2-d8d7-41b0-8a4f-995a1e3538f1__resources_min.png


Thanks,

Maxim Khutornenko



Re: Review Request 38169: Refactoring resources table to show dedicated.

2015-09-08 Thread Aurora ReviewBot

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


This patch does not apply cleanly on master (2773826), do you need to rebase?

I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On Sept. 8, 2015, 10:54 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38169/
> ---
> 
> (Updated Sept. 8, 2015, 10:54 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Joshua Cohen.
> 
> 
> Bugs: AURORA-1461
> https://issues.apache.org/jira/browse/AURORA-1461
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Making Resources table dynamic to display only non-zero resource vectors (see 
> pics attached). Table width is now dependent on the number of visible 
> columns. 
> 
> Not particularly happy about ng-class approach to control table width, so any 
> suggestions how to make it better are welcome.
> 
> May not apply cleanly, diffed against 38081.
> 
> 
> Diffs
> -
> 
>   src/main/resources/scheduler/assets/js/controllers.js 
> 98920196db34f2eb4dcad93429274517e7383efe 
>   src/main/resources/scheduler/assets/role.html 
> 2572c4b4497aa78d3fa31457a5dc7c57e6565027 
> 
> Diff: https://reviews.apache.org/r/38169/diff/
> 
> 
> Testing
> ---
> 
> 
> File Attachments
> 
> 
> resources_full.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/ada720ce-bb97-4321-99bb-0574bf14b653__resources_full.png
> resources_partial.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/a6e4aa7e-ca7e-4ca4-900e-fda6cfdcaff3__resources_partial.png
> resources_min.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/c44964f2-d8d7-41b0-8a4f-995a1e3538f1__resources_min.png
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 38169: Refactoring resources table to show dedicated.

2015-09-08 Thread Joshua Cohen

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



src/main/resources/scheduler/assets/js/controllers.js (line 178)


A nit really, but I always feel like the safety of calling `hasOwnProperty` 
is overkill when we know ahead of time that there's no inheritance and we're 
not going to be using a name that will conflict with something higher up the 
prototype chain. The cleaner/simpler:

var vector = consumption[column.map];
return !vector || (vector.numCpus > 0 || ...);



src/main/resources/scheduler/assets/js/controllers.js (lines 198 - 205)


The repetition between the CPU, RAM, and Disk sections is enhanced by the 
addition of the additional types of consumption. Can you extract a function to 
reduce this?



src/main/resources/scheduler/assets/role.html (lines 35 - 36)


I'd do this in the controller instead of the view. Add something like:

$scope.resourcesClass = ...;

Then in the view just do:



I don't *think* you need/want to use ng-class, since the value isn't going 
to change after render.


- Joshua Cohen


On Sept. 8, 2015, 3:14 a.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38169/
> ---
> 
> (Updated Sept. 8, 2015, 3:14 a.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Joshua Cohen.
> 
> 
> Bugs: AURORA-1461
> https://issues.apache.org/jira/browse/AURORA-1461
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Making Resources table dynamic to display only non-zero resource vectors (see 
> pics attached). Table width is now dependent on the number of visible 
> columns. 
> 
> Not particularly happy about ng-class approach to control table width, so any 
> suggestions how to make it better are welcome.
> 
> May not apply cleanly, diffed against 38081.
> 
> 
> Diffs
> -
> 
>   src/main/resources/scheduler/assets/js/controllers.js 
> 98920196db34f2eb4dcad93429274517e7383efe 
>   src/main/resources/scheduler/assets/role.html 
> 2572c4b4497aa78d3fa31457a5dc7c57e6565027 
> 
> Diff: https://reviews.apache.org/r/38169/diff/
> 
> 
> Testing
> ---
> 
> 
> File Attachments
> 
> 
> resources_full.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/ada720ce-bb97-4321-99bb-0574bf14b653__resources_full.png
> resources_partial.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/a6e4aa7e-ca7e-4ca4-900e-fda6cfdcaff3__resources_partial.png
> resources_min.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/c44964f2-d8d7-41b0-8a4f-995a1e3538f1__resources_min.png
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 38169: Refactoring resources table to show dedicated.

2015-09-07 Thread Aurora ReviewBot

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


This patch does not apply cleanly on master (2773826), do you need to rebase?

I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On Sept. 8, 2015, 3:14 a.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38169/
> ---
> 
> (Updated Sept. 8, 2015, 3:14 a.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Joshua Cohen.
> 
> 
> Bugs: AURORA-1461
> https://issues.apache.org/jira/browse/AURORA-1461
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Making Resources table dynamic to display only non-zero resource vectors (see 
> pics attached). Table width is now dependent on the number of visible 
> columns. 
> 
> Not particularly happy about ng-class approach to control table width, so any 
> suggestions how to make it better are welcome.
> 
> May not apply cleanly, diffed against 38081.
> 
> 
> Diffs
> -
> 
>   src/main/resources/scheduler/assets/js/controllers.js 
> 98920196db34f2eb4dcad93429274517e7383efe 
>   src/main/resources/scheduler/assets/role.html 
> 2572c4b4497aa78d3fa31457a5dc7c57e6565027 
> 
> Diff: https://reviews.apache.org/r/38169/diff/
> 
> 
> Testing
> ---
> 
> 
> File Attachments
> 
> 
> resources_full.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/ada720ce-bb97-4321-99bb-0574bf14b653__resources_full.png
> resources_partial.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/a6e4aa7e-ca7e-4ca4-900e-fda6cfdcaff3__resources_partial.png
> resources_min.png
>   
> https://reviews.apache.org/media/uploaded/files/2015/09/08/c44964f2-d8d7-41b0-8a4f-995a1e3538f1__resources_min.png
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>