Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-07-17 Thread Benjamin Mahler


> On July 18, 2017, 4:08 a.m., Benjamin Mahler wrote:
> >

Since these were pretty minor adjustments, I took care of these and committed 
your patch. I didn't add the `dataSizeMb` filter to clean some of the code up, 
so if you want to follow up with a patch for that, that would be much 
appreciated :)


- Benjamin


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


On June 28, 2017, 8:52 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 8:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/6/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> ui_bug3
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-07-17 Thread Benjamin Mahler

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


Fix it, then Ship it!





src/webui/master/static/agent.html
Lines 167 (patched)


Just to be very clear can we s/Role/Reservation Role/ here? I've seen users 
be confused about the distinction between allocation role and reservation role, 
and we'll be specifying this distinction anyway in the more complete table 
[1](https://docs.google.com/spreadsheets/d/19I3gNn5SvRcQLp2Th5yHGvIfFLfZTM1PWkoEQDuuGG4/edit#gid=0).



src/webui/master/static/agent.html
Lines 179 (patched)


It would clean up a lot of the UI html if we have a size-specific filter 
(i.e. `dataSizeMb`), because all of these `1024*1024`s we're accumulating are 
detracting from readability of the code and we sometimes forget to add them. 
Could you send a follow up patch to add `dataSizeMb` and clean up the 
`1024*1024`s throughout the html pages?



src/webui/master/static/js/controllers.js
Lines 604 (patched)


This is describing the "what", could we describe the "why"? E.g. we 
transform the map into an array for inclusion in ng-repeat

By the way, from what I can tell, we may not need to conver to an array 
(e.g. https://stackoverflow.com/a/15127934) but it seems that the 
recommendation is to always convert to an array as you've done due to some 
issues (I didn't dig in further, you might want to).



src/webui/master/static/js/controllers.js
Lines 605 (patched)


How about `reserved_resources_as_array`? It starts to get really confusing 
if we have variables like `reserved_resources` and `resource_reservations` 
since they're the same information in map vs array form but the names don't 
suggest this?


- Benjamin Mahler


On June 28, 2017, 8:52 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 8:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/6/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> ui_bug3
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-07-14 Thread Mesos Reviewbot Windows

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



Patch looks great!

Reviews applied: [60867, 60636, 60369, 60539, 60370]

Passed command: support\windows-build.bat

- Mesos Reviewbot Windows


On June 28, 2017, 8:52 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 8:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/6/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> ui_bug3
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-07-04 Thread haosdent huang

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


Fix it, then Ship it!




Ship It!


src/webui/master/static/agent.html
Lines 176 (patched)


Should we use * here to keep consistent with other parts? Beside this, 
other changes LGTM!


- haosdent huang


On June 28, 2017, 8:52 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 8:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/5/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> ui_bug3
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-07-04 Thread Andrei Budnik


> On July 3, 2017, 6:27 p.m., haosdent huang wrote:
> > src/webui/master/static/js/controllers.js
> > Lines 610 (patched)
> > 
> >
> > How about
> > 
> > ```
> > $scope.agent.resource_reservations = 
> > _($scope.state.reserved_resources).map(function(role, reservation)) {
> >   reservation.role = role
> >   return reservation;
> > }
> > 
> > ```
> 
> Andrei Budnik wrote:
> This code:
> ```javascript
> $scope.agent.resource_reservations = _($scope.state.reserved_resources)
>   .map(function(role, reservation) {
> reservation.role = role;
> return reservation;
>   });
> ```
> causes an exception:
> ```
> angular-1.2.3.min.js:84 TypeError: Cannot create property 'role' on 
> string 'dyn'
> at http://127.0.0.1:5050/static/js/controllers.js:607:32
> at http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:889
> at w.each.w.forEach 
> (http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:743)
> at Function.w.map.w.collect 
> (http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:855)
> at w.(anonymous function) [as map] 
> (http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:11745)
> at http://127.0.0.1:5050/static/js/controllers.js:606:14
> at http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:66:439
> at D (http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:91:464)
> at D (http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:91:464)
> at http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:93:98
> ```
> 
> haosdent huang wrote:
> what's the content of $scope.state.reserved_resources in your side?
> 
> Andrei Budnik wrote:
> From `curl localhost:5051/state | jq`:
> ```javascript
>   "reserved_resources": {
> "dyn": {
>   "disk": 0,
>   "gpus": 0,
>   "mem": 1024,
>   "cpus": 2
> },
> "ads": {
>   "disk": 0,
>   "gpus": 0,
>   "mem": 5120,
>   "cpus": 9
> }
>   }
> ```
> 
> haosdent huang wrote:
> How about 
> 
> ```
> $scope.agent.resource_reservations = _($scope.state.reserved_resources)
>   .map(function(reservation, role) {
> reservation.role = role;
> return reservation;
>   });
> ```

It works!
Updated patch.


- Andrei


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


On June 28, 2017, 8:52 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 8:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/5/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> ui_bug3
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-07-04 Thread haosdent huang


> On July 3, 2017, 6:27 p.m., haosdent huang wrote:
> > src/webui/master/static/js/controllers.js
> > Lines 610 (patched)
> > 
> >
> > How about
> > 
> > ```
> > $scope.agent.resource_reservations = 
> > _($scope.state.reserved_resources).map(function(role, reservation)) {
> >   reservation.role = role
> >   return reservation;
> > }
> > 
> > ```
> 
> Andrei Budnik wrote:
> This code:
> ```javascript
> $scope.agent.resource_reservations = _($scope.state.reserved_resources)
>   .map(function(role, reservation) {
> reservation.role = role;
> return reservation;
>   });
> ```
> causes an exception:
> ```
> angular-1.2.3.min.js:84 TypeError: Cannot create property 'role' on 
> string 'dyn'
> at http://127.0.0.1:5050/static/js/controllers.js:607:32
> at http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:889
> at w.each.w.forEach 
> (http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:743)
> at Function.w.map.w.collect 
> (http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:855)
> at w.(anonymous function) [as map] 
> (http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:11745)
> at http://127.0.0.1:5050/static/js/controllers.js:606:14
> at http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:66:439
> at D (http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:91:464)
> at D (http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:91:464)
> at http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:93:98
> ```
> 
> haosdent huang wrote:
> what's the content of $scope.state.reserved_resources in your side?
> 
> Andrei Budnik wrote:
> From `curl localhost:5051/state | jq`:
> ```javascript
>   "reserved_resources": {
> "dyn": {
>   "disk": 0,
>   "gpus": 0,
>   "mem": 1024,
>   "cpus": 2
> },
> "ads": {
>   "disk": 0,
>   "gpus": 0,
>   "mem": 5120,
>   "cpus": 9
> }
>   }
> ```

How about 

```
$scope.agent.resource_reservations = _($scope.state.reserved_resources)
  .map(function(reservation, role) {
reservation.role = role;
return reservation;
  });
```


- haosdent


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


On June 28, 2017, 8:52 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 8:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/4/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> ui_bug3
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-07-04 Thread Andrei Budnik


> On July 3, 2017, 6:27 p.m., haosdent huang wrote:
> > src/webui/master/static/js/controllers.js
> > Lines 610 (patched)
> > 
> >
> > How about
> > 
> > ```
> > $scope.agent.resource_reservations = 
> > _($scope.state.reserved_resources).map(function(role, reservation)) {
> >   reservation.role = role
> >   return reservation;
> > }
> > 
> > ```
> 
> Andrei Budnik wrote:
> This code:
> ```javascript
> $scope.agent.resource_reservations = _($scope.state.reserved_resources)
>   .map(function(role, reservation) {
> reservation.role = role;
> return reservation;
>   });
> ```
> causes an exception:
> ```
> angular-1.2.3.min.js:84 TypeError: Cannot create property 'role' on 
> string 'dyn'
> at http://127.0.0.1:5050/static/js/controllers.js:607:32
> at http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:889
> at w.each.w.forEach 
> (http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:743)
> at Function.w.map.w.collect 
> (http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:855)
> at w.(anonymous function) [as map] 
> (http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:11745)
> at http://127.0.0.1:5050/static/js/controllers.js:606:14
> at http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:66:439
> at D (http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:91:464)
> at D (http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:91:464)
> at http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:93:98
> ```
> 
> haosdent huang wrote:
> what's the content of $scope.state.reserved_resources in your side?

>From `curl localhost:5051/state | jq`:
```javascript
  "reserved_resources": {
"dyn": {
  "disk": 0,
  "gpus": 0,
  "mem": 1024,
  "cpus": 2
},
"ads": {
  "disk": 0,
  "gpus": 0,
  "mem": 5120,
  "cpus": 9
}
  }
```


- Andrei


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


On June 28, 2017, 8:52 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 8:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/4/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> ui_bug3
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-07-04 Thread haosdent huang


> On July 3, 2017, 6:27 p.m., haosdent huang wrote:
> > src/webui/master/static/js/controllers.js
> > Lines 610 (patched)
> > 
> >
> > How about
> > 
> > ```
> > $scope.agent.resource_reservations = 
> > _($scope.state.reserved_resources).map(function(role, reservation)) {
> >   reservation.role = role
> >   return reservation;
> > }
> > 
> > ```
> 
> Andrei Budnik wrote:
> This code:
> ```javascript
> $scope.agent.resource_reservations = _($scope.state.reserved_resources)
>   .map(function(role, reservation) {
> reservation.role = role;
> return reservation;
>   });
> ```
> causes an exception:
> ```
> angular-1.2.3.min.js:84 TypeError: Cannot create property 'role' on 
> string 'dyn'
> at http://127.0.0.1:5050/static/js/controllers.js:607:32
> at http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:889
> at w.each.w.forEach 
> (http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:743)
> at Function.w.map.w.collect 
> (http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:855)
> at w.(anonymous function) [as map] 
> (http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:11745)
> at http://127.0.0.1:5050/static/js/controllers.js:606:14
> at http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:66:439
> at D (http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:91:464)
> at D (http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:91:464)
> at http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:93:98
> ```

what's the content of $scope.state.reserved_resources in your side?


- haosdent


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


On June 28, 2017, 8:52 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 8:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/4/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> ui_bug3
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-07-04 Thread Andrei Budnik


> On July 3, 2017, 6:27 p.m., haosdent huang wrote:
> > src/webui/master/static/js/controllers.js
> > Lines 610 (patched)
> > 
> >
> > How about
> > 
> > ```
> > $scope.agent.resource_reservations = 
> > _($scope.state.reserved_resources).map(function(role, reservation)) {
> >   reservation.role = role
> >   return reservation;
> > }
> > 
> > ```

This code:
```javascript
$scope.agent.resource_reservations = _($scope.state.reserved_resources)
  .map(function(role, reservation) {
reservation.role = role;
return reservation;
  });
```
causes an exception:
```
angular-1.2.3.min.js:84 TypeError: Cannot create property 'role' on string 'dyn'
at http://127.0.0.1:5050/static/js/controllers.js:607:32
at http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:889
at w.each.w.forEach 
(http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:743)
at Function.w.map.w.collect 
(http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:855)
at w.(anonymous function) [as map] 
(http://127.0.0.1:5050/static/js/underscore-1.4.3.min.js:1:11745)
at http://127.0.0.1:5050/static/js/controllers.js:606:14
at http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:66:439
at D (http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:91:464)
at D (http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:91:464)
at http://127.0.0.1:5050/static/js/angular-1.2.3.min.js:93:98
```


- Andrei


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


On June 28, 2017, 8:52 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 8:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/4/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> ui_bug3
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-07-03 Thread haosdent huang


> On June 27, 2017, 5:33 p.m., haosdent huang wrote:
> > src/webui/master/static/js/controllers.js
> > Lines 604 (patched)
> > 
> >
> > `ng-repeat` support map, have you try
> > 
> > ```
> > ng-repeat="(role, reservation) in $data"
> > ```
> 
> Andrei Budnik wrote:
> If I change this:
> ```html
> 
>   {{reservation.role}}
>   
> {{(state.reserved_resources_allocated[reservation.role].cpus | number) || 
> 0}} / {{reservation.cpus | number}}
>   
> {{(state.reserved_resources_allocated[reservation.role].gpus | number) || 
> 0}} / {{reservation.gpus | number}}
>   {{(state.reserved_resources_allocated[reservation.role].mem 
> * (1024 * 1024) | dataSize) || 0}} / {{reservation.mem * (1024 * 1024) | 
> dataSize}}
>   
> {{(state.reserved_resources_allocated[reservation.role].disk * (1024 * 
> 1024) | dataSize) || 0}} / {{reservation.disk * (1024 * 1024) | 
> dataSize}}
> 
> ```
> to that:
> ```html
> 
>   {{role}}
>   
> {{(state.reserved_resources_allocated[reservation.role].cpus | number) || 
> 0}} / {{reservation.cpus | number}}
>   
> {{(state.reserved_resources_allocated[reservation.role].gpus | number) || 
> 0}} / {{reservation.gpus | number}}
>   {{(state.reserved_resources_allocated[reservation.role].mem 
> * (1024 * 1024) | dataSize) || 0}} / {{reservation.mem * (1024 * 1024) | 
> dataSize}}
>   
> {{(state.reserved_resources_allocated[reservation.role].disk * (1024 * 
> 1024) | dataSize) || 0}} / {{reservation.disk * (1024 * 1024) | 
> dataSize}}
> 
> ```
> Then it will look like in the 
> [picture](https://reviews.apache.org/r/60370/file/1508/).
> 
> haosdent huang wrote:
> It is because you convert it from map to arrary at
> 
> ```
> $scope.agent.resource_reservations = roles.map
> ```
> 
> Have you remove it?
> 
> I test with 
> 
> ```
>   
> {{role}}
>   
> ```
> 
> and work for me.
> 
> Andrei Budnik wrote:
> Yeah, I can use this code:
> ```html
> 
>   {{role}}
>   {{(state.reserved_resources_allocated[role].cpus || 0) | 
> number}} / {{reservation.cpus | number}}
>   {{(state.reserved_resources_allocated[role].gpus || 0) | 
> number}} / {{reservation.gpus | number}}
>   {{(state.reserved_resources_allocated[role].mem * (1024 * 
> 1024) || 0) | dataSize}} / {{reservation.mem * (1024 * 1024) | dataSize}}
>   {{(state.reserved_resources_allocated[role].disk * (1024 * 
> 1024) || 0) | dataSize}} / {{reservation.disk * (1024 * 1024) | 
> dataSize}}
> 
> ```
> but filter becomes missing, see 
> [picture](https://reviews.apache.org/r/60370/file/1509/).

I see, it is because datatable don't support map. so it would hide filter.


- haosdent


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


On June 28, 2017, 8:52 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 8:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/3/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> ui_bug3
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-07-03 Thread haosdent huang

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




src/webui/master/static/js/controllers.js
Lines 610 (patched)


How about

```
$scope.agent.resource_reservations = 
_($scope.state.reserved_resources).map(function(role, reservation)) {
  reservation.role = role
  return reservation;
}

```


- haosdent huang


On June 28, 2017, 8:52 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 8:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/3/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> ui_bug3
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-28 Thread Mesos Reviewbot Windows

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



Bad patch!

Reviews applied: [60370, 60369]

Failed command: python support/apply-reviews.py -n -r 60369

Error:
Traceback (most recent call last):
  File "support/apply-reviews.py", line 417, in 
main()
  File "support/apply-reviews.py", line 412, in main
reviewboard(options)
  File "support/apply-reviews.py", line 402, in reviewboard
apply_review(options)
  File "support/apply-reviews.py", line 158, in apply_review
fetch_patch(options)
  File "support/apply-reviews.py", line 194, in fetch_patch
patch.write(patch.read())
IOError: File not open for reading

Full log: http://mesos-winbot.westus.cloudapp.azure.com/logs/124/console

- Mesos Reviewbot Windows


On June 28, 2017, 4:52 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 4:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/3/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> ui_bug3
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-28 Thread Andrei Budnik


> On June 23, 2017, 4:06 p.m., haosdent huang wrote:
> > src/webui/master/static/agent.html
> > Lines 184 (patched)
> > 
> >
> > Is `|| 0` necessary here?
> 
> Andrei Budnik wrote:
> I think yes, because we might miss information about a specific role in 
> state.reserved_resources_allocated. E.g., we have both statically reserved 
> resources for both "ads" and "dyn" roles, but only one role is actually 
> allocated. Let's assume that resources from "dyn" role are used to launch 
> some task, while "ads" role isn't used, hence no item for "ads" in 
> state.reserved_resources_allocated exists. In the latter case 0 is used as a 
> default value.
> 
> haosdent huang wrote:
> Hmm, but
> 
> ```
> state.unreserved_resources_allocated.cpus | number
> ```
> 
> above would show `/0` as well.
> 
> Should we keep consistency since almost part use this pattern
> 
> ```
>   
> {{monitor.frameworks[framework.id].statistics.cpus_total_usage | number}} 
> / {{framework.cpus | number}}
> ```
> 
> Andrei Budnik wrote:
> `unreserved_resources_allocated` is always defined.
> 
> If I change this:
> ```html
>   {{reservation.role}}
>   
> {{(state.reserved_resources_allocated[reservation.role].cpus | number) || 
> 0}} / {{reservation.cpus | number}}
>   
> {{(state.reserved_resources_allocated[reservation.role].gpus | number) || 
> 0}} / {{reservation.gpus | number}}
>   {{(state.reserved_resources_allocated[reservation.role].mem 
> * (1024 * 1024) | dataSize) || 0}} / {{reservation.mem * (1024 * 1024) | 
> dataSize}}
>   
> {{(state.reserved_resources_allocated[reservation.role].disk * (1024 * 
> 1024) | dataSize) || 0}} / {{reservation.disk * (1024 * 1024) | 
> dataSize}}
> ```
> to that:
> ```html
>   {{reservation.role}}
>   {{state.reserved_resources_allocated[reservation.role].cpus 
> | number}} / {{reservation.cpus | number}}
>   {{state.reserved_resources_allocated[reservation.role].gpus 
> | number}} / {{reservation.gpus | number}}
>   {{state.reserved_resources_allocated[reservation.role].mem 
> * (1024 * 1024) | dataSize}} / {{reservation.mem * (1024 * 1024) | 
> dataSize}}
>   {{state.reserved_resources_allocated[reservation.role].disk 
> * (1024 * 1024) | dataSize}} / {{reservation.disk * (1024 * 1024) | 
> dataSize}}
> ```
> Then it will look like in the 
> [picture](https://reviews.apache.org/r/60370/file/1507/).
> 
> haosdent huang wrote:
> Let's put filter at the end. e.g.
> 
> ```
> {{(state.reserved_resources_allocated[reservation.role].cpus || 0) | 
> number}}
> ```

Fixed.


- Andrei


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


On June 28, 2017, 8:52 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 8:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/3/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> ui_bug3
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-28 Thread Andrei Budnik

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

(Updated June 28, 2017, 8:52 p.m.)


Review request for mesos, Benjamin Mahler and haosdent huang.


Bugs: MESOS-6441
https://issues.apache.org/jira/browse/MESOS-6441


Repository: mesos


Description
---

Updated agent webui page to display allocated resources per each role.


Diffs (updated)
-

  src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
  src/webui/master/static/js/controllers.js 
67bfd030649dd21840c16188a4964f814aa232d7 


Diff: https://reviews.apache.org/r/60370/diff/3/

Changes: https://reviews.apache.org/r/60370/diff/2-3/


Testing
---

See screenshot.


File Attachments (updated)


agent.html
  
https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
ui_bug
  
https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
ui_bug2
  
https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
ui_bug3
  
https://reviews.apache.org/media/uploaded/files/2017/06/28/51553e9d-7fb9-40c0-b47c-b62fc6c37393__ui_bug3.png


Thanks,

Andrei Budnik



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-28 Thread Andrei Budnik


> On June 27, 2017, 5:33 p.m., haosdent huang wrote:
> > src/webui/master/static/js/controllers.js
> > Lines 604 (patched)
> > 
> >
> > `ng-repeat` support map, have you try
> > 
> > ```
> > ng-repeat="(role, reservation) in $data"
> > ```
> 
> Andrei Budnik wrote:
> If I change this:
> ```html
> 
>   {{reservation.role}}
>   
> {{(state.reserved_resources_allocated[reservation.role].cpus | number) || 
> 0}} / {{reservation.cpus | number}}
>   
> {{(state.reserved_resources_allocated[reservation.role].gpus | number) || 
> 0}} / {{reservation.gpus | number}}
>   {{(state.reserved_resources_allocated[reservation.role].mem 
> * (1024 * 1024) | dataSize) || 0}} / {{reservation.mem * (1024 * 1024) | 
> dataSize}}
>   
> {{(state.reserved_resources_allocated[reservation.role].disk * (1024 * 
> 1024) | dataSize) || 0}} / {{reservation.disk * (1024 * 1024) | 
> dataSize}}
> 
> ```
> to that:
> ```html
> 
>   {{role}}
>   
> {{(state.reserved_resources_allocated[reservation.role].cpus | number) || 
> 0}} / {{reservation.cpus | number}}
>   
> {{(state.reserved_resources_allocated[reservation.role].gpus | number) || 
> 0}} / {{reservation.gpus | number}}
>   {{(state.reserved_resources_allocated[reservation.role].mem 
> * (1024 * 1024) | dataSize) || 0}} / {{reservation.mem * (1024 * 1024) | 
> dataSize}}
>   
> {{(state.reserved_resources_allocated[reservation.role].disk * (1024 * 
> 1024) | dataSize) || 0}} / {{reservation.disk * (1024 * 1024) | 
> dataSize}}
> 
> ```
> Then it will look like in the 
> [picture](https://reviews.apache.org/r/60370/file/1508/).
> 
> haosdent huang wrote:
> It is because you convert it from map to arrary at
> 
> ```
> $scope.agent.resource_reservations = roles.map
> ```
> 
> Have you remove it?
> 
> I test with 
> 
> ```
>   
> {{role}}
>   
> ```
> 
> and work for me.

Yeah, I can use this code:
```html

  {{role}}
  {{(state.reserved_resources_allocated[role].cpus || 0) | number}} 
/ {{reservation.cpus | number}}
  {{(state.reserved_resources_allocated[role].gpus || 0) | number}} 
/ {{reservation.gpus | number}}
  {{(state.reserved_resources_allocated[role].mem * (1024 * 1024) 
|| 0) | dataSize}} / {{reservation.mem * (1024 * 1024) | dataSize}}
  {{(state.reserved_resources_allocated[role].disk * (1024 * 1024) 
|| 0) | dataSize}} / {{reservation.disk * (1024 * 1024) | dataSize}}

```
but filter becomes missing, see 
[picture](https://reviews.apache.org/r/60370/file/1509/).


- Andrei


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


On June 28, 2017, 12:37 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 12:37 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/2/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-28 Thread haosdent huang


> On June 23, 2017, 4:06 p.m., haosdent huang wrote:
> > src/webui/master/static/agent.html
> > Lines 184 (patched)
> > 
> >
> > Is `|| 0` necessary here?
> 
> Andrei Budnik wrote:
> I think yes, because we might miss information about a specific role in 
> state.reserved_resources_allocated. E.g., we have both statically reserved 
> resources for both "ads" and "dyn" roles, but only one role is actually 
> allocated. Let's assume that resources from "dyn" role are used to launch 
> some task, while "ads" role isn't used, hence no item for "ads" in 
> state.reserved_resources_allocated exists. In the latter case 0 is used as a 
> default value.
> 
> haosdent huang wrote:
> Hmm, but
> 
> ```
> state.unreserved_resources_allocated.cpus | number
> ```
> 
> above would show `/0` as well.
> 
> Should we keep consistency since almost part use this pattern
> 
> ```
>   
> {{monitor.frameworks[framework.id].statistics.cpus_total_usage | number}} 
> / {{framework.cpus | number}}
> ```
> 
> Andrei Budnik wrote:
> `unreserved_resources_allocated` is always defined.
> 
> If I change this:
> ```html
>   {{reservation.role}}
>   
> {{(state.reserved_resources_allocated[reservation.role].cpus | number) || 
> 0}} / {{reservation.cpus | number}}
>   
> {{(state.reserved_resources_allocated[reservation.role].gpus | number) || 
> 0}} / {{reservation.gpus | number}}
>   {{(state.reserved_resources_allocated[reservation.role].mem 
> * (1024 * 1024) | dataSize) || 0}} / {{reservation.mem * (1024 * 1024) | 
> dataSize}}
>   
> {{(state.reserved_resources_allocated[reservation.role].disk * (1024 * 
> 1024) | dataSize) || 0}} / {{reservation.disk * (1024 * 1024) | 
> dataSize}}
> ```
> to that:
> ```html
>   {{reservation.role}}
>   {{state.reserved_resources_allocated[reservation.role].cpus 
> | number}} / {{reservation.cpus | number}}
>   {{state.reserved_resources_allocated[reservation.role].gpus 
> | number}} / {{reservation.gpus | number}}
>   {{state.reserved_resources_allocated[reservation.role].mem 
> * (1024 * 1024) | dataSize}} / {{reservation.mem * (1024 * 1024) | 
> dataSize}}
>   {{state.reserved_resources_allocated[reservation.role].disk 
> * (1024 * 1024) | dataSize}} / {{reservation.disk * (1024 * 1024) | 
> dataSize}}
> ```
> Then it will look like in the 
> [picture](https://reviews.apache.org/r/60370/file/1507/).

Let's put filter at the end. e.g.

```
{{(state.reserved_resources_allocated[reservation.role].cpus || 0) | number}}
```


- haosdent


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


On June 28, 2017, 12:37 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 12:37 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/2/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-28 Thread haosdent huang


> On June 27, 2017, 5:33 p.m., haosdent huang wrote:
> > src/webui/master/static/js/controllers.js
> > Lines 604 (patched)
> > 
> >
> > `ng-repeat` support map, have you try
> > 
> > ```
> > ng-repeat="(role, reservation) in $data"
> > ```
> 
> Andrei Budnik wrote:
> If I change this:
> ```html
> 
>   {{reservation.role}}
>   
> {{(state.reserved_resources_allocated[reservation.role].cpus | number) || 
> 0}} / {{reservation.cpus | number}}
>   
> {{(state.reserved_resources_allocated[reservation.role].gpus | number) || 
> 0}} / {{reservation.gpus | number}}
>   {{(state.reserved_resources_allocated[reservation.role].mem 
> * (1024 * 1024) | dataSize) || 0}} / {{reservation.mem * (1024 * 1024) | 
> dataSize}}
>   
> {{(state.reserved_resources_allocated[reservation.role].disk * (1024 * 
> 1024) | dataSize) || 0}} / {{reservation.disk * (1024 * 1024) | 
> dataSize}}
> 
> ```
> to that:
> ```html
> 
>   {{role}}
>   
> {{(state.reserved_resources_allocated[reservation.role].cpus | number) || 
> 0}} / {{reservation.cpus | number}}
>   
> {{(state.reserved_resources_allocated[reservation.role].gpus | number) || 
> 0}} / {{reservation.gpus | number}}
>   {{(state.reserved_resources_allocated[reservation.role].mem 
> * (1024 * 1024) | dataSize) || 0}} / {{reservation.mem * (1024 * 1024) | 
> dataSize}}
>   
> {{(state.reserved_resources_allocated[reservation.role].disk * (1024 * 
> 1024) | dataSize) || 0}} / {{reservation.disk * (1024 * 1024) | 
> dataSize}}
> 
> ```
> Then it will look like in the 
> [picture](https://reviews.apache.org/r/60370/file/1508/).

It is because you convert it from map to arrary at

```
$scope.agent.resource_reservations = roles.map
```

Have you remove it?

I test with 

```
  
{{role}}
  
```

and work for me.


- haosdent


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


On June 28, 2017, 12:37 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 12:37 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/2/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-28 Thread Andrei Budnik


> On June 27, 2017, 5:33 p.m., haosdent huang wrote:
> > src/webui/master/static/js/controllers.js
> > Lines 604 (patched)
> > 
> >
> > `ng-repeat` support map, have you try
> > 
> > ```
> > ng-repeat="(role, reservation) in $data"
> > ```

If I change this:
```html

  {{reservation.role}}
  {{(state.reserved_resources_allocated[reservation.role].cpus | 
number) || 0}} / {{reservation.cpus | number}}
  {{(state.reserved_resources_allocated[reservation.role].gpus | 
number) || 0}} / {{reservation.gpus | number}}
  {{(state.reserved_resources_allocated[reservation.role].mem * 
(1024 * 1024) | dataSize) || 0}} / {{reservation.mem * (1024 * 1024) | 
dataSize}}
  {{(state.reserved_resources_allocated[reservation.role].disk * 
(1024 * 1024) | dataSize) || 0}} / {{reservation.disk * (1024 * 1024) | 
dataSize}}

```
to that:
```html

  {{role}}
  {{(state.reserved_resources_allocated[reservation.role].cpus | 
number) || 0}} / {{reservation.cpus | number}}
  {{(state.reserved_resources_allocated[reservation.role].gpus | 
number) || 0}} / {{reservation.gpus | number}}
  {{(state.reserved_resources_allocated[reservation.role].mem * 
(1024 * 1024) | dataSize) || 0}} / {{reservation.mem * (1024 * 1024) | 
dataSize}}
  {{(state.reserved_resources_allocated[reservation.role].disk * 
(1024 * 1024) | dataSize) || 0}} / {{reservation.disk * (1024 * 1024) | 
dataSize}}

```
Then it will look like in the 
[picture](https://reviews.apache.org/r/60370/file/1508/).


- Andrei


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


On June 28, 2017, 12:37 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 12:37 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/2/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> ui_bug2
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-28 Thread Andrei Budnik

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

(Updated June 28, 2017, 12:37 p.m.)


Review request for mesos, Benjamin Mahler and haosdent huang.


Bugs: MESOS-6441
https://issues.apache.org/jira/browse/MESOS-6441


Repository: mesos


Description
---

Updated agent webui page to display allocated resources per each role.


Diffs
-

  src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
  src/webui/master/static/js/controllers.js 
67bfd030649dd21840c16188a4964f814aa232d7 


Diff: https://reviews.apache.org/r/60370/diff/2/


Testing
---

See screenshot.


File Attachments (updated)


agent.html
  
https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
ui_bug
  
https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
ui_bug2
  
https://reviews.apache.org/media/uploaded/files/2017/06/28/b89990c9-9aa5-432a-a0da-3f90c9428127__ui_bug2.png


Thanks,

Andrei Budnik



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-28 Thread Andrei Budnik


> On June 23, 2017, 4:06 p.m., haosdent huang wrote:
> > src/webui/master/static/agent.html
> > Lines 184 (patched)
> > 
> >
> > Is `|| 0` necessary here?
> 
> Andrei Budnik wrote:
> I think yes, because we might miss information about a specific role in 
> state.reserved_resources_allocated. E.g., we have both statically reserved 
> resources for both "ads" and "dyn" roles, but only one role is actually 
> allocated. Let's assume that resources from "dyn" role are used to launch 
> some task, while "ads" role isn't used, hence no item for "ads" in 
> state.reserved_resources_allocated exists. In the latter case 0 is used as a 
> default value.
> 
> haosdent huang wrote:
> Hmm, but
> 
> ```
> state.unreserved_resources_allocated.cpus | number
> ```
> 
> above would show `/0` as well.
> 
> Should we keep consistency since almost part use this pattern
> 
> ```
>   
> {{monitor.frameworks[framework.id].statistics.cpus_total_usage | number}} 
> / {{framework.cpus | number}}
> ```

`unreserved_resources_allocated` is always defined.

If I change this:
```html
  {{reservation.role}}
  {{(state.reserved_resources_allocated[reservation.role].cpus | 
number) || 0}} / {{reservation.cpus | number}}
  {{(state.reserved_resources_allocated[reservation.role].gpus | 
number) || 0}} / {{reservation.gpus | number}}
  {{(state.reserved_resources_allocated[reservation.role].mem * 
(1024 * 1024) | dataSize) || 0}} / {{reservation.mem * (1024 * 1024) | 
dataSize}}
  {{(state.reserved_resources_allocated[reservation.role].disk * 
(1024 * 1024) | dataSize) || 0}} / {{reservation.disk * (1024 * 1024) | 
dataSize}}
```
to that:
```html
  {{reservation.role}}
  {{state.reserved_resources_allocated[reservation.role].cpus | 
number}} / {{reservation.cpus | number}}
  {{state.reserved_resources_allocated[reservation.role].gpus | 
number}} / {{reservation.gpus | number}}
  {{state.reserved_resources_allocated[reservation.role].mem * 
(1024 * 1024) | dataSize}} / {{reservation.mem * (1024 * 1024) | dataSize}}
  {{state.reserved_resources_allocated[reservation.role].disk * 
(1024 * 1024) | dataSize}} / {{reservation.disk * (1024 * 1024) | 
dataSize}}
```
Then it will look like in the 
[picture](https://reviews.apache.org/r/60370/file/1507/).


- Andrei


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


On June 28, 2017, 12:29 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 28, 2017, 12:29 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/2/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> ui_bug
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-28 Thread Andrei Budnik

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

(Updated June 28, 2017, 12:29 p.m.)


Review request for mesos, Benjamin Mahler and haosdent huang.


Bugs: MESOS-6441
https://issues.apache.org/jira/browse/MESOS-6441


Repository: mesos


Description
---

Updated agent webui page to display allocated resources per each role.


Diffs
-

  src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
  src/webui/master/static/js/controllers.js 
67bfd030649dd21840c16188a4964f814aa232d7 


Diff: https://reviews.apache.org/r/60370/diff/2/


Testing
---

See screenshot.


File Attachments (updated)


agent.html
  
https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
ui_bug
  
https://reviews.apache.org/media/uploaded/files/2017/06/28/1b7755e3-0b11-46ab-9ae4-71f19bce0cd6__ui_bug.png


Thanks,

Andrei Budnik



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-27 Thread haosdent huang

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




src/webui/master/static/js/controllers.js
Lines 604 (patched)


`ng-repeat` support map, have you try

```
ng-repeat="(role, reservation) in $data"
```


- haosdent huang


On June 27, 2017, 5:10 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 27, 2017, 5:10 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/2/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-27 Thread haosdent huang


> On June 23, 2017, 4:06 p.m., haosdent huang wrote:
> > src/webui/master/static/agent.html
> > Lines 176 (patched)
> > 
> >
> > Should we use `*` here to keep consistent with other parts?
> 
> Andrei Budnik wrote:
> There is related discussion in the ticket, so it looks like we have 
> agreed on calling it "Unreserved".

> it looks like we have agreed on calling it "Unreserved".

It would be great that could post the link to that comment here.


> On June 23, 2017, 4:06 p.m., haosdent huang wrote:
> > src/webui/master/static/agent.html
> > Lines 184 (patched)
> > 
> >
> > Is `|| 0` necessary here?
> 
> Andrei Budnik wrote:
> I think yes, because we might miss information about a specific role in 
> state.reserved_resources_allocated. E.g., we have both statically reserved 
> resources for both "ads" and "dyn" roles, but only one role is actually 
> allocated. Let's assume that resources from "dyn" role are used to launch 
> some task, while "ads" role isn't used, hence no item for "ads" in 
> state.reserved_resources_allocated exists. In the latter case 0 is used as a 
> default value.

Hmm, but

```
state.unreserved_resources_allocated.cpus | number
```

above would show `/0` as well.

Should we keep consistency since almost part use this pattern

```
  {{monitor.frameworks[framework.id].statistics.cpus_total_usage | 
number}} / {{framework.cpus | number}}
```


- haosdent


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


On June 27, 2017, 5:10 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 27, 2017, 5:10 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/2/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-27 Thread Andrei Budnik

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

(Updated June 27, 2017, 5:10 p.m.)


Review request for mesos, Benjamin Mahler and haosdent huang.


Bugs: MESOS-6441
https://issues.apache.org/jira/browse/MESOS-6441


Repository: mesos


Description
---

Updated agent webui page to display allocated resources per each role.


Diffs (updated)
-

  src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
  src/webui/master/static/js/controllers.js 
67bfd030649dd21840c16188a4964f814aa232d7 


Diff: https://reviews.apache.org/r/60370/diff/2/

Changes: https://reviews.apache.org/r/60370/diff/1-2/


Testing
---

See screenshot.


File Attachments


agent.html
  
https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png


Thanks,

Andrei Budnik



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-26 Thread Andrei Budnik


> On June 23, 2017, 4:06 p.m., haosdent huang wrote:
> > src/webui/master/static/agent.html
> > Lines 176 (patched)
> > 
> >
> > Should we use `*` here to keep consistent with other parts?

There is related discussion in the ticket, so it looks like we have agreed on 
calling it "Unreserved".


> On June 23, 2017, 4:06 p.m., haosdent huang wrote:
> > src/webui/master/static/agent.html
> > Lines 184 (patched)
> > 
> >
> > Is `|| 0` necessary here?

I think yes, because we might miss information about a specific role in 
state.reserved_resources_allocated. E.g., we have both statically reserved 
resources for both "ads" and "dyn" roles, but only one role is actually 
allocated. Let's assume that resources from "dyn" role are used to launch some 
task, while "ads" role isn't used, hence no item for "ads" in 
state.reserved_resources_allocated exists. In the latter case 0 is used as a 
default value.


- Andrei


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


On June 22, 2017, 3:26 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 22, 2017, 3:26 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/1/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-23 Thread haosdent huang

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




src/webui/master/static/agent.html
Lines 176 (patched)


Should we use `*` here to keep consistent with other parts?



src/webui/master/static/agent.html
Lines 184 (patched)


Is `|| 0` necessary here?



src/webui/master/static/agent.html
Lines 186 (patched)


Is `|| 0` necessary here?


- haosdent huang


On June 22, 2017, 3:26 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 22, 2017, 3:26 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/1/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>



Re: Review Request 60370: Updated agent webui page to display allocated resources per each role.

2017-06-22 Thread Mesos Reviewbot Windows

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



Patch looks great!

Reviews applied: [60369, 60370]

Passed command: support\windows-build.bat

- Mesos Reviewbot Windows


On June 22, 2017, 3:26 p.m., Andrei Budnik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60370/
> ---
> 
> (Updated June 22, 2017, 3:26 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and haosdent huang.
> 
> 
> Bugs: MESOS-6441
> https://issues.apache.org/jira/browse/MESOS-6441
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Updated agent webui page to display allocated resources per each role.
> 
> 
> Diffs
> -
> 
>   src/webui/master/static/agent.html 71e5e702e5e64e6f46c84791247aa5156c046ed9 
>   src/webui/master/static/js/controllers.js 
> 67bfd030649dd21840c16188a4964f814aa232d7 
> 
> 
> Diff: https://reviews.apache.org/r/60370/diff/1/
> 
> 
> Testing
> ---
> 
> See screenshot.
> 
> 
> File Attachments
> 
> 
> agent.html
>   
> https://reviews.apache.org/media/uploaded/files/2017/06/22/66cc61b4-04c8-451e-a434-58f556397724__Resource_Reservations.png
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>