Fixed a bug in the WebUI where the cluster name flashes in the navbar. "{{state.cluster}}" flashes in the upper right of the nav bar before the template is replaced by Angular. Angular provides the ngCloak directive[1] to hide elements until they are rendered, and this is an appropriate use case. The rest of the page can render fine without waiting for this floating element.
[1] http://docs.angularjs.org/api/ng.directive:ngCloak From: Ross Allen <ross...@mesosphe.re> Review: https://reviews.apache.org/r/12615 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/57a60e16 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/57a60e16 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/57a60e16 Branch: refs/heads/master Commit: 57a60e165db7056d517e39497c4e846ea87cf96b Parents: 53e5f33 Author: Benjamin Mahler <bmah...@twitter.com> Authored: Thu Jul 18 11:50:31 2013 -0700 Committer: Benjamin Mahler <bmah...@twitter.com> Committed: Thu Jul 18 11:50:31 2013 -0700 ---------------------------------------------------------------------- src/webui/master/static/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/57a60e16/src/webui/master/static/index.html ---------------------------------------------------------------------- diff --git a/src/webui/master/static/index.html b/src/webui/master/static/index.html index a14e813..342082d 100644 --- a/src/webui/master/static/index.html +++ b/src/webui/master/static/index.html @@ -43,7 +43,9 @@ <li data-tabname="slaves"><a href="#/slaves">Slaves</a></li> </ul> <ul class="nav pull-right"> - <li><p class="navbar-text">{{state.cluster}}</p></li> + <li> + <p class="navbar-text" data-ng-cloak>{{state.cluster}}</p> + </li> </ul> </div> </div>