ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject ambari git commit: AMBARI-14810 When their are multiple Job History Servers in the cluster, QuickLinks should show the URL for all instances. (atkach)
Date Wed, 27 Jan 2016 15:44:19 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 c8adfb900 -> 17093e420


AMBARI-14810 When their are multiple Job History Servers in the cluster, QuickLinks should
show the URL for all instances. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/17093e42
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/17093e42
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/17093e42

Branch: refs/heads/branch-2.2
Commit: 17093e420939d0136c0a638b8a1fabc9afced3bb
Parents: c8adfb9
Author: Andrii Tkach <atkach@hortonworks.com>
Authored: Wed Jan 27 17:40:21 2016 +0200
Committer: Andrii Tkach <atkach@hortonworks.com>
Committed: Wed Jan 27 17:40:21 2016 +0200

----------------------------------------------------------------------
 .../app/views/common/quick_view_link_view.js      | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/17093e42/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 7825c09..ece034c 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -228,6 +228,9 @@ App.QuickViewLinks = Em.View.extend({
             }
             if (item.get('service_id')==='OOZIE') {
               newItem.url = item.get('template').fmt(protocol, host.publicHostName, port,
App.router.get('loginName'));
+            } else if (item.get('service_id')==='MAPREDUCE2') {
+              var hostPortConfigValue = "%@:%@".fmt(host.publicHostName, port);
+              newItem.url = item.get('template').fmt(protocol, hostPortConfigValue);
             } else {
               newItem.url = item.get('template').fmt(protocol, host.publicHostName, port);
             }
@@ -259,10 +262,11 @@ App.QuickViewLinks = Em.View.extend({
       return [App.get('singleNodeAlias')];
     }
     var hosts = [];
+    var components;
     switch (serviceName) {
       case 'OOZIE':
         // active OOZIE components
-        var components = this.get('content.hostComponents').filterProperty('componentName','OOZIE_SERVER').filterProperty('workStatus',
'STARTED');
+        components = this.get('content.hostComponents').filterProperty('componentName','OOZIE_SERVER').filterProperty('workStatus',
'STARTED');
         if (components && components.length > 1) {
           components.forEach(function (component) {
             hosts.push({
@@ -361,6 +365,18 @@ App.QuickViewLinks = Em.View.extend({
       case "ATLAS":
         hosts[0] = this.findComponentHost(response.items, "ATLAS_SERVER");
         break;
+      case "MAPREDUCE2":
+        components = this.get('content.hostComponents').filterProperty('componentName', 'HISTORYSERVER');
+        if (components && components.length > 1) {
+          components.forEach(function (component) {
+            hosts.push({
+              'publicHostName': response.items.findProperty('Hosts.host_name', component.get('hostName')).Hosts.public_host_name
+            });
+          });
+        } else if (components && components.length === 1) {
+          hosts[0] = this.findComponentHost(response.items, 'HISTORYSERVER');
+        }
+        break;
       default:
         var service = App.StackService.find().findProperty('serviceName', serviceName);
         if (service && service.get('hasMaster')) {


Mime
View raw message