This is an automated email from the ASF dual-hosted git repository. ababiichuk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push: new cab7384 AMBARI-23730 When Spark2 is selected in left pane, Spark also gets selected along with it. (ababiichuk) cab7384 is described below commit cab73841d296042d549509b419de83ed1d4358fe Author: ababiichuk <ababiic...@hortonworks.com> AuthorDate: Mon Apr 30 17:38:55 2018 +0300 AMBARI-23730 When Spark2 is selected in left pane, Spark also gets selected along with it. (ababiichuk) --- ambari-web/vendor/scripts/theme/bootstrap-ambari.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ambari-web/vendor/scripts/theme/bootstrap-ambari.js b/ambari-web/vendor/scripts/theme/bootstrap-ambari.js index 6102bc3..1059ab3 100644 --- a/ambari-web/vendor/scripts/theme/bootstrap-ambari.js +++ b/ambari-web/vendor/scripts/theme/bootstrap-ambari.js @@ -86,10 +86,14 @@ $(document).ready(function () { function popStateHandler() { var path = window.location.pathname + window.location.hash; + if (path[path.length - 1] !== '/') { + path += '/'; + } $navigationContainer.find('li a').each(function (index, link) { var $link = $(link); var href = $link.attr('data-href') || $link.attr('href'); - if (path.indexOf(href) !== -1 && ['', '#'].indexOf(href) === -1) { + var hrefWithSlash = href == null || href[href.length - 1] === '/' ? href : href + '/'; + if (path.indexOf(hrefWithSlash) !== -1 && ['', '#'].indexOf(href) === -1) { $link.parent().addClass('active'); } else { $link.parent().removeClass('active'); -- To stop receiving notification emails like this one, please contact ababiic...@apache.org.