Updated Branches:
  refs/heads/trunk 4c2e398e0 -> 214e13211

AMBARI-3044 Ambari Suddenly Clears Entry For Services/Components Configuration. 
(atkach)


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

Branch: refs/heads/trunk
Commit: c8e2dec2fafb1215a5fa9cccc3a1060ade49cd22
Parents: 4c2e398
Author: atkach <[email protected]>
Authored: Wed Aug 28 14:21:13 2013 +0300
Committer: atkach <[email protected]>
Committed: Thu Aug 29 15:24:06 2013 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/main.js      | 6 ++++--
 ambari-web/app/models/cluster_states.js | 4 ++++
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c8e2dec2/ambari-web/app/controllers/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main.js 
b/ambari-web/app/controllers/main.js
index ec721af..6f2701f 100644
--- a/ambari-web/app/controllers/main.js
+++ b/ambari-web/app/controllers/main.js
@@ -89,9 +89,11 @@ App.MainController = Em.Controller.extend({
 
     this.set('reloadTimeOut',
         setTimeout(function () {
-          location.reload()
+          if (App.clusterStatus.get('isInstalled')) {
+            location.reload();
+          }
         }, App.pageReloadTime)
     );
-  }.observes("App.router.location.lastSetURL")
+  }.observes("App.router.location.lastSetURL", "App.clusterStatus.isInstalled")
 
 })
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c8e2dec2/ambari-web/app/models/cluster_states.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/cluster_states.js 
b/ambari-web/app/models/cluster_states.js
index 14c0e90..081ba9d 100644
--- a/ambari-web/app/models/cluster_states.js
+++ b/ambari-web/app/models/cluster_states.js
@@ -28,6 +28,10 @@ App.clusterStatus = Ember.Object.create({
   wizardControllerName: null,
   localdb: null,
   key: 'CLUSTER_CURRENT_STATUS',
+  isInstalled: function(){
+    var notInstalledStates = ['CLUSTER_NOT_CREATED_1', 
'CLUSTER_DEPLOY_PREP_2', 'CLUSTER_INSTALLING_3', 'SERVICE_STARTING_3'];
+    return !notInstalledStates.contains(this.get('clusterState'));
+  }.property('clusterState'),
   /**
    * get cluster data from server and update cluster status
    * @param isAsync: set this to true if the call is to be made 
asynchronously.  if unspecified, false is assumed

Reply via email to