You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/02/18 14:33:23 UTC
[04/33] ambari git commit: AMBARI-15037. When saving a SCRIPT edit,
it loses the script path (Joe Wang via rzang)
AMBARI-15037. When saving a SCRIPT edit, it loses the script path (Joe Wang via rzang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d036fc01
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d036fc01
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d036fc01
Branch: refs/heads/branch-dev-patch-upgrade
Commit: d036fc0170521a46b4b8977ef5d2d71f3daacfb7
Parents: b900d03
Author: Richard Zang <rz...@apache.org>
Authored: Tue Feb 16 11:09:09 2016 -0800
Committer: Richard Zang <rz...@apache.org>
Committed: Tue Feb 16 11:09:09 2016 -0800
----------------------------------------------------------------------
.../app/controllers/main/alerts/definition_configs_controller.js | 4 ++--
.../main/alerts/definitions_configs_controller_test.js | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/d036fc01/ambari-web/app/controllers/main/alerts/definition_configs_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js
index ec5680c..130434f 100644
--- a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js
+++ b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js
@@ -542,10 +542,10 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({
// `source.parameters` is an array and should be updated separately from other configs
if (this.get('content.parameters.length')) {
- propertiesToUpdate['AlertDefinition/source/parameters'] = this.get('content.rawSourceData.parameters');
+ propertiesToUpdate['AlertDefinition/source'] = this.get('content.rawSourceData');
var parameterConfigs = this.get('configs').filterProperty('name', 'parameter');
parameterConfigs.forEach(function (parameter) {
- propertiesToUpdate['AlertDefinition/source/parameters'].findProperty('name', parameter.get('apiProperty')).value = parameter.get('apiFormattedValue');
+ propertiesToUpdate['AlertDefinition/source'].parameters.findProperty('name', parameter.get('apiProperty')).value = parameter.get('apiFormattedValue');
});
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/d036fc01/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js b/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js
index c957efd..f3cf28c 100644
--- a/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js
+++ b/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js
@@ -537,8 +537,8 @@ describe('App.MainAlertDefinitionConfigsController', function () {
});
it('should update parameters', function () {
- expect(this.result['AlertDefinition/source/parameters']).to.have.property('length').equal(4);
- expect(this.result['AlertDefinition/source/parameters'].mapProperty('value')).to.be.eql(['v11', 'v21', 'v31', 'v41']);
+ expect(this.result['AlertDefinition/source'].parameters).to.have.property('length').equal(4);
+ expect(this.result['AlertDefinition/source'].parameters.mapProperty('value')).to.be.eql(['v11', 'v21', 'v31', 'v41']);
});
});