You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2014/02/05 03:48:32 UTC
git commit: AMBARI-4447. Hive and WebHcat won't start with
2.0.6.GlusterFS stack. (jaimin)
Updated Branches:
refs/heads/branch-1.4.4 0a09f08e9 -> c3bed3158
AMBARI-4447. Hive and WebHcat won't start with 2.0.6.GlusterFS stack. (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c3bed315
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c3bed315
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c3bed315
Branch: refs/heads/branch-1.4.4
Commit: c3bed315806955fbfb1afe8dbc848b5a34da009c
Parents: 0a09f08
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Tue Feb 4 18:47:52 2014 -0800
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Tue Feb 4 18:47:52 2014 -0800
----------------------------------------------------------------------
.../app/controllers/wizard/step7_controller.js | 2 +-
ambari-web/app/utils/config.js | 20 +++++++++++++++++---
2 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c3bed315/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index d4ef666..5f58396 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -93,7 +93,7 @@ App.WizardStep7Controller = Em.Controller.extend({
//STEP 2: Load on-site configs by service from local DB
var storedConfigs = this.get('content.serviceConfigProperties');
//STEP 3: Merge pre-defined configs with loaded on-site configs
- var configs = App.config.mergePreDefinedWithStored(storedConfigs, advancedConfigs);
+ var configs = App.config.mergePreDefinedWithStored(storedConfigs, advancedConfigs,this.get('selectedServiceNames'));
//STEP 4: Add advanced configs
App.config.addAdvancedConfigs(configs, advancedConfigs);
//STEP 5: Add custom configs
http://git-wip-us.apache.org/repos/asf/ambari/blob/c3bed315/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 8641acb..e652914 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -230,6 +230,7 @@ App.config = Em.Object.create({
var globalConfigs = [];
var preDefinedConfigs = this.get('preDefinedGlobalProperties').concat(this.get('preDefinedSiteProperties'));
var mappingConfigs = [];
+ var selectedServiceNames = App.Service.find().mapProperty('serviceName');
tags.forEach(function (_tag) {
var isAdvanced = null;
var properties = configGroups.filter(function (serviceConfigProperties) {
@@ -238,7 +239,13 @@ App.config = Em.Object.create({
properties = (properties.length) ? properties.objectAt(0).properties : {};
for (var index in properties) {
- var configsPropertyDef = preDefinedConfigs.findProperty('name', index) || null;
+ var configsPropertyDef = null;
+ var preDefinedConfig = preDefinedConfigs.filterProperty('name', index);
+ preDefinedConfig.forEach(function(_preDefinedConfig){
+ if (selectedServiceNames.contains(_preDefinedConfig.serviceName) || _preDefinedConfig.serviceName === 'MISC') {
+ configsPropertyDef = _preDefinedConfig;
+ }
+ },this);
var serviceConfigObj = App.ServiceConfig.create({
name: index,
value: properties[index],
@@ -354,7 +361,7 @@ App.config = Em.Object.create({
* @param advancedConfigs
* @return {*}
*/
- mergePreDefinedWithStored: function (storedConfigs, advancedConfigs) {
+ mergePreDefinedWithStored: function (storedConfigs, advancedConfigs, selectedServiceNames) {
var mergedConfigs = [];
var preDefinedConfigs = $.extend(true, [], this.get('preDefinedGlobalProperties').concat(this.get('preDefinedSiteProperties')));
var preDefinedNames = [];
@@ -368,7 +375,14 @@ App.config = Em.Object.create({
names = preDefinedNames.concat(storedNames).uniq();
names.forEach(function (name) {
var stored = storedConfigs.findProperty('name', name);
- var preDefined = preDefinedConfigs.findProperty('name', name);
+ var preDefined;
+ var preDefinedConfig = preDefinedConfigs.filterProperty('name', name);
+ preDefinedConfig.forEach(function(_preDefinedConfig){
+ if (selectedServiceNames.contains(_preDefinedConfig.serviceName) || _preDefinedConfig.serviceName === 'MISC') {
+ preDefined = _preDefinedConfig;
+ }
+ },this);
+
var configData = {};
var isAdvanced = advancedConfigs.someProperty('name', name);
if (preDefined && stored) {