Selaa lähdekoodia

AMBARI-6183 Various issues on hdfs services page after enabling HA. (Buzhor Denys via ababiichuk)

aBabiichuk 11 vuotta sitten
vanhempi
commit
76e758c436

+ 2 - 1
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,' +

+ 14 - 3
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;