ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject git commit: Revert "AMBARI-7691 Cluster state is lost when session is expired during cluster installation. (atkach)" This reverts commit ba2594d5be7de9f058e0cd62043f2af05a351a07.
Date Wed, 08 Oct 2014 17:14:51 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.7.0 e293cf727 -> 1ee822f23


Revert "AMBARI-7691 Cluster state is lost when session is expired during cluster installation.
(atkach)"
This reverts commit ba2594d5be7de9f058e0cd62043f2af05a351a07.


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

Branch: refs/heads/branch-1.7.0
Commit: 1ee822f23a8e21aaf941db38d944b627fc76a28d
Parents: e293cf7
Author: atkach <atkach@hortonworks.com>
Authored: Wed Oct 8 20:14:39 2014 +0300
Committer: atkach <atkach@hortonworks.com>
Committed: Wed Oct 8 20:14:39 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/mappers/stack_mapper.js       | 4 ++--
 ambari-web/app/mixins/common/userPref.js     | 4 +---
 ambari-web/test/mappers/stack_mapper_test.js | 6 +-----
 3 files changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1ee822f2/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 4bfea03..8319f87 100644
--- a/ambari-web/app/mappers/stack_mapper.js
+++ b/ambari-web/app/mappers/stack_mapper.js
@@ -73,7 +73,7 @@ App.stackMapper = App.QuickDataMapper.create({
     var resulOS = [];
     var resultRepo = [];
 
-    var stackVersions = json.items.filterProperty('Versions.active');
+    var stackVersions =   json.items.filterProperty('Versions.active');
     stackVersions.sortProperty('Versions.stack_version').reverse().forEach(function(item)
{
       var stack = item.Versions;
       var operatingSystemsArray = [];
@@ -106,9 +106,9 @@ App.stackMapper = App.QuickDataMapper.create({
       
     }, this);
 
-    App.store.commit();
     App.store.loadMany(modelRepo, resultRepo);
     App.store.loadMany(modelOS, resulOS);
     App.store.loadMany(modelStack, resultStack);
+
   }
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ee822f2/ambari-web/app/mixins/common/userPref.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/userPref.js b/ambari-web/app/mixins/common/userPref.js
index 78a2023..90a115d 100644
--- a/ambari-web/app/mixins/common/userPref.js
+++ b/ambari-web/app/mixins/common/userPref.js
@@ -80,9 +80,7 @@ App.UserPref = Em.Mixin.create({
    * @param {Object} value
    */
   postUserPref: function (key, value) {
-    if (!App.get('isAdmin')) {
-      return $.Deferred().reject().promise();
-    };
+    if(!App.get('isAdmin')) return;
     var keyValuePair = {};
     keyValuePair[key] = JSON.stringify(value);
     return App.ajax.send({

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ee822f2/ambari-web/test/mappers/stack_mapper_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mappers/stack_mapper_test.js b/ambari-web/test/mappers/stack_mapper_test.js
index 82e2901..2f8b10d 100644
--- a/ambari-web/test/mappers/stack_mapper_test.js
+++ b/ambari-web/test/mappers/stack_mapper_test.js
@@ -260,10 +260,6 @@ describe('App.stackMapper', function () {
       App.resetDsStoreTypeMap(App.Repository);
       App.resetDsStoreTypeMap(App.OperatingSystem);
       App.resetDsStoreTypeMap(App.Stack);
-      sinon.stub(App.store, 'commit', Em.K);
-    });
-    afterEach(function(){
-      App.store.commit.restore();
     });
 
 		
@@ -286,4 +282,4 @@ describe('App.stackMapper', function () {
       expect(App.Repository.find().get('length')).to.equal(8);
     });
   });
-});
+});
\ No newline at end of file


Mime
View raw message