AMBARI-19125. Active tab is not switched (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/234838f4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/234838f4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/234838f4 Branch: refs/heads/branch-feature-AMBARI-18456 Commit: 234838f4b6651dbebf09d57910aea925c8247f1c Parents: 69cdaa7 Author: Oleg Nechiporenko <[email protected]> Authored: Wed Dec 7 15:01:08 2016 +0200 Committer: Oleg Nechiporenko <[email protected]> Committed: Wed Dec 7 15:01:08 2016 +0200 ---------------------------------------------------------------------- ambari-web/app/templates/common/host_progress_popup.hbs | 8 +++++--- ambari-web/app/views/main/host/menu.js | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/234838f4/ambari-web/app/templates/common/host_progress_popup.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/host_progress_popup.hbs b/ambari-web/app/templates/common/host_progress_popup.hbs index f0a8c17..ae411b1 100644 --- a/ambari-web/app/templates/common/host_progress_popup.hbs +++ b/ambari-web/app/templates/common/host_progress_popup.hbs @@ -266,9 +266,11 @@ <div class="col-sm-12"> {{#if App.supports.logSearch}} {{#if view.isLogSearchInstalled}} - <button type="button" class="btn btn-link pull-right" {{action navigateToHostLogs target="view"}} {{bindAttr class="view.isLogsLinkVisible::hidden"}}> - <i class="glyphicon glyphicon-file"></i> {{t common.host}} {{t common.logs}} - </button> + {{#isAuthorized "SERVICE.VIEW_OPERATIONAL_LOGS"}} + <button type="button" class="btn btn-link pull-right" {{action navigateToHostLogs target="view"}} {{bindAttr class="view.isLogsLinkVisible::hidden"}}> + <i class="glyphicon glyphicon-file"></i> {{t common.host}} {{t common.logs}} + </button> + {{/isAuthorized}} {{/if}} {{/if}} <button type="button" class="btn btn-link pull-right" {{translateAttr title="common.openNewWindow"}} {{action openTaskLogInDialog}}> http://git-wip-us.apache.org/repos/asf/ambari/blob/234838f4/ambari-web/app/views/main/host/menu.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/menu.js b/ambari-web/app/views/main/host/menu.js index b3c52f4..4ebc140 100644 --- a/ambari-web/app/views/main/host/menu.js +++ b/ambari-web/app/views/main/host/menu.js @@ -95,9 +95,9 @@ App.MainHostMenuView = Em.CollectionView.extend({ activateView: function () { var defaultRoute = App.router.get('currentState.name') || "summary"; $.each(this._childViews, function () { - this.set('active', (this.get('content.routing') == defaultRoute ? "active" : "")); + this.set('active', this.get('content.routing') === defaultRoute ? 'active' : ''); }); - }, + }.observes('App.router.currentState.name'), deactivateChildViews: function () { this.get('_childViews').setEach('active', '');
