소스 검색

AMBARI-6003. metrics hostname is not correct for storm. (Buzhor Denys via akovalenko)

Aleksandr Kovalenko 11 년 전
부모
커밋
3a2b83c0e9
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      ambari-web/app/controllers/wizard/step7_controller.js

+ 3 - 2
ambari-web/app/controllers/wizard/step7_controller.js

@@ -551,8 +551,9 @@ App.WizardStep7Controller = Em.Controller.extend({
       gangliaServerHost = this.get('wizardController').getDBProperty('masterComponentHosts').findProperty('component', 'GANGLIA_SERVER').hostName;
       dependentConfigs.forEach(function (configName) {
         var config = configs.findProperty('name', configName);
-        var replaceStr = '.jar=host=';
-        config.value = config.defaultValue = config.value.replace(replaceStr, replaceStr + gangliaServerHost);
+        var replaceStr = config.value.match(/.jar=host[^,]+/)[0];
+        var replaceWith = replaceStr.slice(0, replaceStr.lastIndexOf('=') - replaceStr.length + 1) + gangliaServerHost;
+        config.value = config.defaultValue = config.value.replace(replaceStr, replaceWith);
         config.forceUpdate = true;
       }, this);
     }