ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject ambari git commit: AMBARI-16856. Quick Links missing for Spark (alexantonenko)
Date Thu, 26 May 2016 16:48:44 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 50f832aa3 -> f948e3870


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/f948e387
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f948e387
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f948e387

Branch: refs/heads/trunk
Commit: f948e3870083ac0f79237bfb5de1ef4077848b2c
Parents: 50f832a
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Thu May 26 19:45:15 2016 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Thu May 26 19:48:36 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/f948e387/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);


Mime
View raw message