You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2014/06/18 17:42:03 UTC
git commit: AMBARI-6183 Various issues on hdfs services page after
enabling HA. (Buzhor Denys via ababiichuk)
Repository: ambari
Updated Branches:
refs/heads/trunk 87da5f323 -> 76e758c43
AMBARI-6183 Various issues on hdfs services page after enabling HA. (Buzhor Denys via ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/76e758c4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/76e758c4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/76e758c4
Branch: refs/heads/trunk
Commit: 76e758c4361bac1b864622446e26b3d9beb79a6a
Parents: 87da5f3
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Wed Jun 18 18:37:15 2014 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Wed Jun 18 18:37:43 2014 +0300
----------------------------------------------------------------------
.../app/controllers/global/update_controller.js | 3 ++-
.../app/views/common/quick_view_link_view.js | 17 ++++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/76e758c4/ambari-web/app/controllers/global/update_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js
index e9c125e..bfd0822 100644
--- a/ambari-web/app/controllers/global/update_controller.js
+++ b/ambari-web/app/controllers/global/update_controller.js
@@ -203,7 +203,8 @@ App.UpdateController = Em.Controller.extend({
isATSInstalled = App.cache['services'].mapProperty('ServiceInfo.service_name').contains('YARN') && App.get('isHadoop21Stack'),
flumeHandlerParam = isFlumeInstalled ? 'ServiceComponentInfo/component_name=FLUME_HANDLER|' : '',
atsHandlerParam = isATSInstalled ? 'ServiceComponentInfo/component_name=APP_TIMELINE_SERVER|' : '',
- realUrl = '/components/?' + flumeHandlerParam + atsHandlerParam +
+ haComponents = App.get('isHaEnabled') ? 'ServiceComponentInfo/component_name=JOURNALNODE|' : '',
+ realUrl = '/components/?' + flumeHandlerParam + atsHandlerParam + haComponents +
'ServiceComponentInfo/category=MASTER&fields=' +
'ServiceComponentInfo/Version,' +
'ServiceComponentInfo/StartTime,' +
http://git-wip-us.apache.org/repos/asf/ambari/blob/76e758c4/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 c5df154..5f931ff 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -70,6 +70,17 @@ App.QuickViewLinks = Em.View.extend({
* list of files that contains properties for enabling/disabling ssl
*/
requiredSiteNames: ['global','core-site', 'hdfs-site', 'hbase-site', 'oozie-site', 'yarn-site', 'mapred-site'],
+ /**
+ * Get public host name by its host name.
+ *
+ * @method getPublicHostName
+ * @param {Object[]} hosts - list of hosts from response
+ * @param {String} hostName
+ * @return {String}
+ **/
+ getPublicHostName: function(hosts, hostName) {
+ return Em.get(hosts.findProperty('Hosts.host_name', hostName), 'Hosts.public_host_name');
+ },
setConfigProperties: function () {
this.set('configProperties', []);
@@ -126,13 +137,13 @@ App.QuickViewLinks = Em.View.extend({
});
// assign each namenode status label
if (this.get('content.activeNameNode')) {
- hosts.findProperty('publicHostName', this.get('content.activeNameNode.publicHostName')).status = Em.I18n.t('quick.links.label.active');
+ hosts.findProperty('publicHostName', this.getPublicHostName(response.items, this.get('content.activeNameNode.hostName'))).status = Em.I18n.t('quick.links.label.active');
}
if (this.get('content.standbyNameNode')) {
- hosts.findProperty('publicHostName', this.get('content.standbyNameNode.publicHostName')).status = Em.I18n.t('quick.links.label.standby');
+ hosts.findProperty('publicHostName', this.getPublicHostName(response.items, this.get('content.standbyNameNode.hostName'))).status = Em.I18n.t('quick.links.label.standby');
}
if (this.get('content.standbyNameNode2')) {
- hosts.findProperty('publicHostName', this.get('content.standbyNameNode2.publicHostName')).status = Em.I18n.t('quick.links.label.standby');
+ hosts.findProperty('publicHostName', this.getPublicHostName(response.items, this.get('content.standbyNameNode2.hostName'))).status = Em.I18n.t('quick.links.label.standby');
}
}
break;