Преглед изворни кода

AMBARI-8222. Correct hostname:port regex should be used for timeline server properties to replace hostname. (jaimin)

Jaimin Jetly пре 10 година
родитељ
комит
0e143629d3
1 измењених фајлова са 6 додато и 6 уклоњено
  1. 6 6
      ambari-web/app/models/service_config.js

+ 6 - 6
ambari-web/app/models/service_config.js

@@ -388,20 +388,20 @@ App.ServiceConfigProperty = Ember.Object.extend({
         break;
         break;
       case 'yarn.timeline-service.webapp.address':
       case 'yarn.timeline-service.webapp.address':
         var atsHost =  masterComponentHostsInDB.findProperty('component', 'APP_TIMELINE_SERVER');
         var atsHost =  masterComponentHostsInDB.findProperty('component', 'APP_TIMELINE_SERVER');
-        if (atsHost) {
-          this.setDefaultValue("(0.0.0.0)(?=:)", atsHost.hostName);
+        if (atsHost && atsHost.hostName) {
+          this.setDefaultValue(hostWithPort,atsHost.hostName);
         }
         }
         break;
         break;
       case 'yarn.timeline-service.webapp.https.address':
       case 'yarn.timeline-service.webapp.https.address':
         var atsHost =  masterComponentHostsInDB.findProperty('component', 'APP_TIMELINE_SERVER');
         var atsHost =  masterComponentHostsInDB.findProperty('component', 'APP_TIMELINE_SERVER');
-        if (atsHost) {
-          this.setDefaultValue("(0.0.0.0)(?=:)", atsHost.hostName);
+        if (atsHost && atsHost.hostName) {
+          this.setDefaultValue(hostWithPort,atsHost.hostName);
         }
         }
         break;
         break;
       case 'yarn.timeline-service.address':
       case 'yarn.timeline-service.address':
         var atsHost =  masterComponentHostsInDB.findProperty('component', 'APP_TIMELINE_SERVER');
         var atsHost =  masterComponentHostsInDB.findProperty('component', 'APP_TIMELINE_SERVER');
-        if (atsHost) {
-          this.setDefaultValue("(0.0.0.0)(?=:)", atsHost.hostName);
+        if (atsHost && atsHost.hostName) {
+          this.setDefaultValue(hostWithPort,atsHost.hostName);
         }
         }
         break;
         break;
       case 'nm_hosts':
       case 'nm_hosts':