Skip to content
Browse files

AMBARI-1033. Nagios and Ganglia links should use public host names in…

… URLs. (Srimanth Gunturi via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/AMBARI-666@1418973 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent d9376e8 commit 762191fe315b95f9c7a6626ad5c1ab425e156649 Yusaku Sako committed Dec 9, 2012
View
3 AMBARI-666-CHANGES.txt
@@ -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)
View
14 ambari-web/app/controllers/global/cluster_controller.js
@@ -82,7 +82,7 @@ App.ClusterController = Em.Controller.extend({
*
* 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,14 +96,18 @@ App.ClusterController = Em.Controller.extend({
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";
}
}
}
}
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,14 +130,18 @@ App.ClusterController = Em.Controller.extend({
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";
}
}
}
}
return null;
}
- }.property('App.router.updateController.isUpdated'),
+ }.property('App.router.updateController.isUpdated', 'dataLoadList.hosts'),
isNagiosInstalled:function () {
if (App.testMode) {
View
1 ambari-web/app/mappers/hosts_mapper.js
@@ -20,6 +20,7 @@ App.hostsMapper = App.QuickDataMapper.create({
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',
View
1 ambari-web/app/models/host.js
@@ -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'),

0 comments on commit 762191f

Please sign in to comment.
Something went wrong with that request. Please try again.