Browse Source

AMBARI-14172 spark_thrift_cmd_opts fail to work. (ababiichuk)

aBabiichuk 9 years ago
parent
commit
53ab860fcb

+ 2 - 6
ambari-web/app/controllers/main/service/info/configs.js

@@ -486,13 +486,9 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A
   onLoadOverrides: function (allConfigs) {
     this.get('servicesToLoad').forEach(function(serviceName) {
       var configGroups = serviceName == this.get('content.serviceName') ? this.get('configGroups') : this.get('dependentConfigGroups').filterProperty('serviceName', serviceName);
-      var serviceNames = [ serviceName ];
-      if(serviceName === 'OOZIE') {
-        // For Oozie, also add ELService properties which are marked as FALCON properties.
-        serviceNames.push('FALCON');
-      }
+      var configTypes = App.StackService.find(serviceName).get('configTypeList');
       var configsByService = this.get('allConfigs').filter(function (c) {
-        return serviceNames.contains(c.get('serviceName'));
+        return configTypes.contains(App.config.getConfigTagFromFileName(c.get('filename')));
       });
       var serviceConfig = App.config.createServiceConfig(serviceName, configGroups, configsByService, configsByService.length);
       this.addHostNamesToConfigs(serviceConfig);

+ 6 - 0
ambari-web/app/models/stack_service.js

@@ -44,6 +44,12 @@ App.StackService = DS.Model.extend({
   configs: DS.attr('array'),
   requiredServices: DS.attr('array'),
 
+  /**
+   * @type {String[]}
+   */
+  configTypeList: function() {
+    return Object.keys(this.get('configTypes') || {});
+  }.property('configTypes'),
   /**
    * contains array of serviceNames that have configs that
    * depends on configs from current service