You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Tomasz Janiszewski <ja...@gmail.com> on 2017/05/01 20:45:03 UTC
Re: Review Request 58872: Ensured sandbox URI request reroute after
fetched `$scope.state`.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58872/#review173504
-----------------------------------------------------------
Fix it, then Ship it!
I tested it and it fixes the issue. I think code need some comments, it's simple but not obvious.
src/webui/master/static/js/controllers.js
Lines 1019 (patched)
<https://reviews.apache.org/r/58872/#comment246494>
Please add a comment for this condition with information why it can happen. The comment could be the same as previously used:
> When navigating directly to this page, e.g. pasting the URL into the browser
src/webui/master/static/js/controllers.js
Lines 1024 (patched)
<https://reviews.apache.org/r/58872/#comment246496>
It's not obious why we remove update listener on route change start. Can you add a comment with clarification?
- Tomasz Janiszewski
On Kwi 29, 2017, 6:22 po po\u0142udniu, haosdent huang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58872/
> -----------------------------------------------------------
>
> (Updated Kwi 29, 2017, 6:22 po po\u0142udniu)
>
>
> Review request for mesos, Benjamin Mahler and Tomasz Janiszewski.
>
>
> Bugs: MESOS-4992
> https://issues.apache.org/jira/browse/MESOS-4992
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Ensured sandbox URI request reroute after fetched `$scope.state`.
>
>
> Diffs
> -----
>
> src/webui/master/static/js/controllers.js a021962573d452de1581e6a7717016eac7d0cd85
>
>
> Diff: https://reviews.apache.org/r/58872/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> haosdent huang
>
>
Re: Review Request 58872: Ensured sandbox URI request reroute after
fetched `$scope.state`.
Posted by Tomasz Janiszewski <ja...@gmail.com>.
> On Maj 1, 2017, 8:45 po poĊudniu, Tomasz Janiszewski wrote:
> > src/webui/master/static/js/controllers.js
> > Lines 1024 (patched)
> > <https://reviews.apache.org/r/58872/diff/1/?file=1703827#file1703827line1024>
> >
> > It's not obious why we remove update listener on route change start. Can you add a comment with clarification?
>
> haosdent huang wrote:
> It is because we no need to call this again if route change, so we remove it here. We do it in almost places which depends on `$scope.state`.
>
> ```
> var removeListener = $scope.$on('state_updated', update);
> $scope.$on('$routeChangeStart', removeListener);
> ```
>
> Do you think we need to add comment about this here?
No that's fine. Just spoted it's a template.
- Tomasz
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58872/#review173504
-----------------------------------------------------------
On Maj 3, 2017, 4:15 rano, haosdent huang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58872/
> -----------------------------------------------------------
>
> (Updated Maj 3, 2017, 4:15 rano)
>
>
> Review request for mesos, Benjamin Mahler and Tomasz Janiszewski.
>
>
> Bugs: MESOS-4992
> https://issues.apache.org/jira/browse/MESOS-4992
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Open sandbox link in a new tab would fail since it depends on agents
> information loading finish. This patch fixes it by ensuring the agents
> information loaded first and then rerouting the sandbox request.
>
>
> Diffs
> -----
>
> src/webui/master/static/js/controllers.js a021962573d452de1581e6a7717016eac7d0cd85
>
>
> Diff: https://reviews.apache.org/r/58872/diff/2/
>
>
> Testing
> -------
>
>
> Thanks,
>
> haosdent huang
>
>
Re: Review Request 58872: Ensured sandbox URI request reroute after
fetched `$scope.state`.
Posted by haosdent huang <ha...@apache.org>.
> On May 1, 2017, 8:45 p.m., Tomasz Janiszewski wrote:
> > src/webui/master/static/js/controllers.js
> > Lines 1019 (patched)
> > <https://reviews.apache.org/r/58872/diff/1/?file=1703827#file1703827line1019>
> >
> > Please add a comment for this condition with information why it can happen. The comment could be the same as previously used:
> >
> > > When navigating directly to this page, e.g. pasting the URL into the browser
Thank you very much, have updated.
> On May 1, 2017, 8:45 p.m., Tomasz Janiszewski wrote:
> > src/webui/master/static/js/controllers.js
> > Lines 1024 (patched)
> > <https://reviews.apache.org/r/58872/diff/1/?file=1703827#file1703827line1024>
> >
> > It's not obious why we remove update listener on route change start. Can you add a comment with clarification?
It is because we no need to call this again if route change, so we remove it here. We do it in almost places which depends on `$scope.state`.
```
var removeListener = $scope.$on('state_updated', update);
$scope.$on('$routeChangeStart', removeListener);
```
Do you think we need to add comment about this here?
- haosdent
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58872/#review173504
-----------------------------------------------------------
On May 3, 2017, 4:15 a.m., haosdent huang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58872/
> -----------------------------------------------------------
>
> (Updated May 3, 2017, 4:15 a.m.)
>
>
> Review request for mesos, Benjamin Mahler and Tomasz Janiszewski.
>
>
> Bugs: MESOS-4992
> https://issues.apache.org/jira/browse/MESOS-4992
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Open sandbox link in a new tab would fail since it depends on agents
> information loading finish. This patch fixes it by ensuring the agents
> information loaded first and then rerouting the sandbox request.
>
>
> Diffs
> -----
>
> src/webui/master/static/js/controllers.js a021962573d452de1581e6a7717016eac7d0cd85
>
>
> Diff: https://reviews.apache.org/r/58872/diff/2/
>
>
> Testing
> -------
>
>
> Thanks,
>
> haosdent huang
>
>