ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject ambari git commit: AMBARI-17001. Additional OS are added with empty Base URL (onechiporenko)
Date Thu, 02 Jun 2016 10:13:17 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 046e0f693 -> affeb7f8a


AMBARI-17001. Additional OS are added with empty Base URL (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/affeb7f8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/affeb7f8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/affeb7f8

Branch: refs/heads/trunk
Commit: affeb7f8aec8ced09b8025810218da43a9615dd5
Parents: 046e0f6
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Thu Jun 2 12:28:34 2016 +0300
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Thu Jun 2 13:13:13 2016 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step1_controller.js    | 2 +-
 ambari-web/app/mappers/stack_mapper.js                   | 3 ++-
 ambari-web/app/models/repository.js                      | 3 ++-
 ambari-web/test/models/repository_test.js                | 2 +-
 ambari-web/test/utils/configs/config_initializer_test.js | 4 ++--
 5 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/affeb7f8/ambari-web/app/controllers/wizard/step1_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step1_controller.js b/ambari-web/app/controllers/wizard/step1_controller.js
index 5ff34bd..3af28de 100644
--- a/ambari-web/app/controllers/wizard/step1_controller.js
+++ b/ambari-web/app/controllers/wizard/step1_controller.js
@@ -246,7 +246,7 @@ App.WizardStep1Controller = Em.Controller.extend({
    */
   doRestoreDefaultValue: function (event) {
     var repo = event.contexts[0];
-    repo.set('baseUrl', repo.get('latestBaseUrl'));
+    repo.set('baseUrl', repo.get('baseUrlInit'));
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/affeb7f8/ambari-web/app/mappers/stack_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/stack_mapper.js b/ambari-web/app/mappers/stack_mapper.js
index e421e2e..b1a5faf 100644
--- a/ambari-web/app/mappers/stack_mapper.js
+++ b/ambari-web/app/mappers/stack_mapper.js
@@ -75,6 +75,7 @@ App.stackMapper = App.QuickDataMapper.create({
   configRepository: {
     id: 'id',
     base_url: 'base_url',
+    base_url_init: 'base_url',
     default_base_url: 'default_base_url',
     latest_base_url: 'latest_base_url',
     mirrors_list: 'mirrors_list',
@@ -118,7 +119,7 @@ App.stackMapper = App.QuickDataMapper.create({
       operatingSystems.id = stack.id + "-" + operatingSystems.os_type;
       operatingSystems.stack_id = operatingSystems.stack_name + "-" + operatingSystems.stack_version;
       operatingSystems.repositories = repositoriesArray;
-      operatingSystems.is_selected = (ops.isSelected == true || ops.isSelected == undefined);
+      operatingSystems.is_selected = ops.isSelected == true || ops.isSelected == undefined;
       resultOS.push(this.parseIt(operatingSystems, this.get('configOS')));
       operatingSystemsArray.pushObject(operatingSystems);
         

http://git-wip-us.apache.org/repos/asf/ambari/blob/affeb7f8/ambari-web/app/models/repository.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/repository.js b/ambari-web/app/models/repository.js
index 37ef0b3..6fc5731 100644
--- a/ambari-web/app/models/repository.js
+++ b/ambari-web/app/models/repository.js
@@ -25,6 +25,7 @@ App.Repository = DS.Model.extend({
   repoId: DS.attr('string'),
   osType: DS.attr('string'),
   baseUrl: DS.attr('string'),
+  baseUrlInit: DS.attr('string'),
   defaultBaseUrl: DS.attr('string'),
   latestBaseUrl: DS.attr('string'),
   repoName: DS.attr('string'),
@@ -53,7 +54,7 @@ App.Repository = DS.Model.extend({
     return this.get('repoName').contains('UTILS');
   }.property('repoName'),
 
-  undo: Em.computed.notEqualProperties('baseUrl', 'latestBaseUrl'),
+  undo: Em.computed.notEqualProperties('baseUrl', 'baseUrlInit'),
 
   notEmpty: Em.computed.notEqual('baseUrl', ''),
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/affeb7f8/ambari-web/test/models/repository_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/models/repository_test.js b/ambari-web/test/models/repository_test.js
index d3a2875..02416d0 100644
--- a/ambari-web/test/models/repository_test.js
+++ b/ambari-web/test/models/repository_test.js
@@ -32,7 +32,7 @@ describe('App.Repository', function () {
     model = getModel();
   });
 
-  App.TestAliases.testAsComputedNotEqualProperties(getModel(), 'undo', 'baseUrl', 'latestBaseUrl');
+  App.TestAliases.testAsComputedNotEqualProperties(getModel(), 'undo', 'baseUrl', 'baseUrlInit');
 
   App.TestAliases.testAsComputedAlias(getModel(), 'isSelected', 'operatingSystem.isSelected',
'boolean');
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/affeb7f8/ambari-web/test/utils/configs/config_initializer_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/configs/config_initializer_test.js b/ambari-web/test/utils/configs/config_initializer_test.js
index 7eeea6d..48eae23 100644
--- a/ambari-web/test/utils/configs/config_initializer_test.js
+++ b/ambari-web/test/utils/configs/config_initializer_test.js
@@ -1220,7 +1220,7 @@ describe('App.ConfigInitializer', function () {
   });
 
   describe('#_filterMountPoint', function() {
-    var cases = [
+    [
       {
         mPoint: {
           mountpoint: '/'
@@ -1366,7 +1366,7 @@ describe('App.ConfigInitializer', function () {
     ].forEach(function(test) {
       it('mount point "{0}" should be {1}'.format(test.mPoint.mountpoint, test.e ? 'valid'
: 'invalid'), function() {
         var fFn = App.ConfigInitializer._filterMountPoint(test.localDB);
-        expect(fFn(test.mPoint)).to.be.eql(test.e);
+        expect(fFn(test.mPoint)).to.be.equal(test.e);
       });
     });
   });


Mime
View raw message