incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1418973 - in /incubator/ambari/branches/AMBARI-666: AMBARI-666-CHANGES.txt ambari-web/app/controllers/global/cluster_controller.js ambari-web/app/mappers/hosts_mapper.js ambari-web/app/models/host.js
Date Sun, 09 Dec 2012 14:28:14 GMT
Author: yusaku
Date: Sun Dec  9 14:28:13 2012
New Revision: 1418973

URL: http://svn.apache.org/viewvc?rev=1418973&view=rev
Log:
AMBARI-1033. Nagios and Ganglia links should use public host names in URLs. (Srimanth Gunturi
via yusaku)

Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/cluster_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js

Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1418973&r1=1418972&r2=1418973&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Sun Dec  9 14:28:13 2012
@@ -424,6 +424,9 @@ AMBARI-666 branch (unreleased changes)
 
   IMPROVEMENTS
 
+  AMBARI-1033. Nagios and Ganglia links should use public host names in URLs.
+  (Srimanth Gunturi via yusaku)
+
   AMBARI-1030. Metrics links in web ui should link to Ganglia UI. (Srimanth
   Gunturi via yusaku)
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/cluster_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/cluster_controller.js?rev=1418973&r1=1418972&r2=1418973&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/cluster_controller.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/cluster_controller.js
Sun Dec  9 14:28:13 2012
@@ -82,7 +82,7 @@ App.ClusterController = Em.Controller.ex
    *
    * If null is returned, it means GANGLIA service is not installed.
    */
-  gangliaUrl:function () {
+  gangliaUrl: function () {
     if (App.testMode) {
       return 'http://gangliaserver/ganglia/?t=yes';
     } else {
@@ -96,6 +96,10 @@ App.ClusterController = Em.Controller.ex
           if (gangliaSvcComponent) {
             var hostName = gangliaSvcComponent.get('host.hostName');
             if (hostName) {
+              var host = App.Host.find(hostName);
+              if (host) {
+                hostName = host.get('publicHostName');
+              }
               return "http://" + hostName + "/ganglia";
             }
           }
@@ -103,7 +107,7 @@ App.ClusterController = Em.Controller.ex
       }
       return null;
     }
-  }.property('App.router.updateController.isUpdated'),
+  }.property('App.router.updateController.isUpdated', 'dataLoadList.hosts'),
 
   /**
    * Provides the URL to use for NAGIOS server. This URL
@@ -126,6 +130,10 @@ App.ClusterController = Em.Controller.ex
           if (nagiosSvcComponent) {
             var hostName = nagiosSvcComponent.get('host.hostName');
             if (hostName) {
+              var host = App.Host.find(hostName);
+              if (host) {
+                hostName = host.get('publicHostName');
+              }
               return "http://" + hostName + "/nagios";
             }
           }
@@ -133,7 +141,7 @@ App.ClusterController = Em.Controller.ex
       }
       return null;
     }
-  }.property('App.router.updateController.isUpdated'),
+  }.property('App.router.updateController.isUpdated', 'dataLoadList.hosts'),
 
   isNagiosInstalled:function () {
     if (App.testMode) {

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js?rev=1418973&r1=1418972&r2=1418973&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js Sun Dec  9
14:28:13 2012
@@ -20,6 +20,7 @@ App.hostsMapper = App.QuickDataMapper.cr
   config: {
     id: 'Hosts.host_name',
     host_name: 'Hosts.host_name',
+    public_host_name: 'Hosts.public_host_name',
     cluster_id: 'Hosts.cluster_name',// 1
     components_key: 'host_components',
     components_type: 'array',

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js?rev=1418973&r1=1418972&r2=1418973&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js Sun Dec  9 14:28:13
2012
@@ -22,6 +22,7 @@ var misc = require('utils/misc');
 
 App.Host = DS.Model.extend({
   hostName: DS.attr('string'),
+  publicHostName: DS.attr('string'),
   cluster: DS.belongsTo('App.Cluster'),
   components: DS.hasMany('App.Component'),
   hostComponents: DS.hasMany('App.HostComponent'),



Mime
View raw message