소스 검색

AMBARI-1965. core-site properties are incorrectly populated in Advanced/General category of MapReduce service. (yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1469160 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 년 전
부모
커밋
8cda9eed46
3개의 변경된 파일11개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 0
      CHANGES.txt
  2. 1 1
      ambari-web/app/templates/common/configs/service_config.hbs
  3. 7 3
      ambari-web/app/utils/config.js

+ 3 - 0
CHANGES.txt

@@ -752,6 +752,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1965. core-site properties are incorrectly populated in Advanced/
+ General category of MapReduce service. (yusaku)
+
  AMBARI-1963. Deploying progress bar shows 0 tasks after installation failure
  and going back to a previous step to retry. (yusaku)
 

+ 1 - 1
ambari-web/app/templates/common/configs/service_config.hbs

@@ -49,7 +49,7 @@
 <div class="accordion">
   {{#each category in selectedService.configCategories}}
     {{#if category.isCustomView}}
-      {{#if App.supports.capacityScheduler}}
+      {{#if App.supports.capacitySchedulerUi}}
       {{view category.customView categoryBinding="category" serviceBinding="selectedService" canEditBinding="view.canEdit" serviceConfigsBinding="selectedService.configs"}}
       {{/if}}
     {{else}}

+ 7 - 3
ambari-web/app/utils/config.js

@@ -105,7 +105,8 @@ App.config = Em.Object.create({
           defaultValue: properties[index],
           filename: _tag.siteName + ".xml",
           isUserProperty: false,
-          isOverridable: true
+          isOverridable: true,
+          serviceName: serviceName
         };
 
         if (configsPropertyDef) {
@@ -116,6 +117,10 @@ App.config = Em.Object.create({
           serviceConfigObj.unit = (configsPropertyDef.unit !== undefined) ? configsPropertyDef.unit : undefined;
           serviceConfigObj.description = (configsPropertyDef.description !== undefined) ? configsPropertyDef.description : undefined;
           serviceConfigObj.isOverridable = configsPropertyDef.isOverridable === undefined ? true : configsPropertyDef.isOverridable;
+          serviceConfigObj.serviceName = configsPropertyDef ? configsPropertyDef.serviceName : null;
+        }
+        if(serviceConfigObj.serviceName === 'MAPREDUCE' && serviceConfigObj.filename === 'core-site.xml'){
+          serviceConfigObj.isVisible = false;
         }
         if (_tag.siteName === 'global') {
           if (configsPropertyDef) {
@@ -140,7 +145,6 @@ App.config = Em.Object.create({
             }
           }
           serviceConfigObj.id = 'puppet var';
-          serviceConfigObj.serviceName = configsPropertyDef ? configsPropertyDef.serviceName : null;
           serviceConfigObj.displayName = configsPropertyDef ? configsPropertyDef.displayName : null;
           serviceConfigObj.category = configsPropertyDef ? configsPropertyDef.category : null;
           serviceConfigObj.options = configsPropertyDef ? configsPropertyDef.options : null;
@@ -150,7 +154,6 @@ App.config = Em.Object.create({
           serviceConfigObj.id = 'site property';
           serviceConfigObj.displayType = 'advanced';
           serviceConfigObj.displayName = configsPropertyDef ? configsPropertyDef.displayName : index;
-          serviceConfigObj.serviceName = serviceName;
           if (!isAdvanced || this.get('customFileNames').contains(serviceConfigObj.filename)) {
             var categoryMetaData = this.identifyCategory(serviceConfigObj);
             if (categoryMetaData != null) {
@@ -231,6 +234,7 @@ App.config = Em.Object.create({
         configData = preDefined;
         if (isAdvanced) {
           configData.category = (configData.category === undefined) ? configCategory : configData.category;
+          configData.filename = advancedConfigs.findProperty('name', configData.name).filename;
         }
       }
       mergedConfigs.push(configData);