Repository: ambari Updated Branches: refs/heads/branch-2.4 28bb59f44 -> 8327649e8
AMBARI-16856. Quick Links missing for Spark (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8327649e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8327649e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8327649e Branch: refs/heads/branch-2.4 Commit: 8327649e87aeb09622f6513bf8562f106be176a8 Parents: 28bb59f Author: Alex Antonenko <[email protected]> Authored: Thu May 26 19:45:15 2016 +0300 Committer: Alex Antonenko <[email protected]> Committed: Thu May 26 19:49:35 2016 +0300 ---------------------------------------------------------------------- ambari-web/app/views/common/quick_view_link_view.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/8327649e/ambari-web/app/views/common/quick_view_link_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/quick_view_link_view.js b/ambari-web/app/views/common/quick_view_link_view.js index 44bc8f0..b5567c2 100644 --- a/ambari-web/app/views/common/quick_view_link_view.js +++ b/ambari-web/app/views/common/quick_view_link_view.js @@ -398,20 +398,21 @@ App.QuickViewLinks = Em.View.extend({ var quickLinks = []; var configProperties = this.get('configProperties'); var protocol = this.setProtocol(configProperties, quickLinksConfig.get('protocol')); + var publicHostName = hosts[0].publicHostName; var links = Em.get(quickLinksConfig, 'links'); links.forEach(function (link) { var componentName = link.component_name; var hostNameForComponent = hosts.findProperty('componentName',componentName); if (hostNameForComponent) { - var publicHostName = hostNameForComponent.publicHostName; + publicHostName = hostNameForComponent.publicHostName; if (link.protocol) { protocol = this.setProtocol(configProperties, link.protocol); } - var newItem = this.getHostLink(link, publicHostName, protocol, configProperties, response); //quicklink generated for the hbs template - if (!Em.isNone(newItem)) { - quickLinks.push(newItem); - } + } + var newItem = this.getHostLink(link, publicHostName, protocol, configProperties, response); //quicklink generated for the hbs template + if (!Em.isNone(newItem)) { + quickLinks.push(newItem); } }, this); this.set('quickLinks', quickLinks); @@ -628,6 +629,9 @@ App.QuickViewLinks = Em.View.extend({ break; default: hosts = hosts.concat(componentHosts); + if(hosts.length < 1 && this.getWithDefault('content.hostComponents', []).someProperty('isMaster')) { + hosts = this.findHosts(this.get('content.hostComponents').findProperty('isMaster').get('componentName'), response); + } break; } }, this);
