You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2016/07/22 20:53:45 UTC
ambari git commit: AMBARI-17862. Unexpected warning modal window is
appearing while config modification (akovalenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 6b5387363 -> b26764636
AMBARI-17862. Unexpected warning modal window is appearing while config modification (akovalenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b2676463
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b2676463
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b2676463
Branch: refs/heads/trunk
Commit: b267646365d108303e55c8988ccff2ea1cd045e3
Parents: 6b53873
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Fri Jul 22 22:34:37 2016 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Fri Jul 22 22:35:11 2016 +0300
----------------------------------------------------------------------
ambari-web/app/controllers/main/service/info/configs.js | 11 ++++++++---
ambari-web/app/mixins/common/configs/enhanced_configs.js | 4 ++--
.../test/controllers/main/service/info/config_test.js | 6 +++---
3 files changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b2676463/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index f302eb2..923f146 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -317,9 +317,14 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.AddSecurityConfi
return null;
}
var hash = {};
- this.get('selectedService.configs').forEach(function (config) {
+ var sortedProperties = this.get('selectedService.configs').slice().sort(function(a, b) {
+ if (a.get('id') > b.get('id')) return -1;
+ if (a.get('id') < b.get('id')) return 1;
+ return 0;
+ });
+ sortedProperties.forEach(function (config) {
if (config.isRequiredByAgent) {
- hash[config.get('name')] = {
+ hash[config.get('id')] = {
value: App.config.formatPropertyValue(config),
overrides: [],
isFinal: config.get('isFinal')
@@ -328,7 +333,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.AddSecurityConfi
if (!config.get('overrides.length')) return;
config.get('overrides').forEach(function (override) {
- hash[config.get('name')].overrides.push(App.config.formatPropertyValue(override));
+ hash[config.get('id')].overrides.push(App.config.formatPropertyValue(override));
});
}
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/b2676463/ambari-web/app/mixins/common/configs/enhanced_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index 923734d..bc2c956 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -391,8 +391,8 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP
if (Em.isNone(recommended)) {
stepConfig.get('configs').removeObject(config);
} else if (Em.isNone(initial)) {
- stepConfig.get('configs').pushObject(this._createNewProperty(Em.get(p, 'propertyName'),
- Em.get(p, 'propertyFileName'),Em.get(p, 'serviceName'), recommended, Em.get(p, 'parentConfigs')));
+ stepConfig.get('configs').pushObject(this._createNewProperty(Em.get(p, 'propertyName'), Em.get(p, 'propertyFileName'),Em.get(p, 'serviceName'),
+ recommended, App.configsCollection.getConfigByName(Em.get(p, 'propertyName'), Em.get(p, 'propertyFileName')).propertyDependsOn));
} else {
Em.set(config, 'value', recommended);
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/b2676463/ambari-web/test/controllers/main/service/info/config_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/info/config_test.js b/ambari-web/test/controllers/main/service/info/config_test.js
index 0aeb479..fb127a2 100644
--- a/ambari-web/test/controllers/main/service/info/config_test.js
+++ b/ambari-web/test/controllers/main/service/info/config_test.js
@@ -54,12 +54,12 @@ describe("App.MainServiceInfoConfigsController", function () {
msg: "properties only used for ui purpose should be excluded from hash",
configs: [
Em.Object.create({
- name: "hive.llap.daemon.task.scheduler.enable.preemption",
+ id: "hive.llap.daemon.task.scheduler.enable.preemption",
isRequiredByAgent: true,
isFinal: false
}),
Em.Object.create({
- name: "ambari.copy.hive.llap.daemon.num.executors",
+ id: "ambari.copy.hive.llap.daemon.num.executors",
isRequiredByAgent: false,
isFinal: false
})
@@ -76,7 +76,7 @@ describe("App.MainServiceInfoConfigsController", function () {
mainServiceInfoConfigsController.set('selectedService', {configs: t.configs});
var stackDrivenConfig = t.configs.findProperty('isRequiredByAgent');
var configs = {};
- configs[stackDrivenConfig.name] = {
+ configs[stackDrivenConfig.id] = {
value: stackDrivenConfig.value,
overrides: [],
isFinal: stackDrivenConfig.isFinal