incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject git commit: AMBARI-3333 'Services', 'Dashboard' 'Navigation errors. (atkach)
Date Wed, 25 Sep 2013 10:20:45 GMT
Updated Branches:
  refs/heads/branch-1.4.1 69e649487 -> d25301697


AMBARI-3333 'Services', 'Dashboard' 'Navigation errors. (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/d2530169
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/d2530169
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/d2530169

Branch: refs/heads/branch-1.4.1
Commit: d25301697fadf25f99617582fd0d16204d62c380
Parents: 69e6494
Author: atkach <andrey91.07@gmail.com>
Authored: Wed Sep 25 13:20:37 2013 +0300
Committer: atkach <andrey91.07@gmail.com>
Committed: Wed Sep 25 13:20:37 2013 +0300

----------------------------------------------------------------------
 ambari-web/app/app.js                             | 14 ++++++++++++++
 ambari-web/app/views/main/host/summary.js         |  2 +-
 ambari-web/app/views/main/service/info/summary.js |  5 ++---
 ambari-web/app/views/wizard/step1_view.js         |  2 +-
 4 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/d2530169/ambari-web/app/app.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index 53c2aa0..2dba7a3 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -64,6 +64,20 @@ module.exports = Em.Application.create({
 });
 
 /**
+ * overwritten set method of Ember.View to avoid uncaught errors
+ * when trying to set property of destroyed view
+ */
+Em.View.reopen({
+  set: function(attr, value){
+    if(!this.get('isDestroyed') && !this.get('isDestroying')){
+      this._super(attr, value);
+    } else {
+      console.error('Calling set on destroyed view');
+    }
+  }
+});
+
+/**
  * Ambari overrides the default date transformer.
  * This is done because of the non-standard data
  * sent. For example Nagios sends date as "12345678".

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/d2530169/ambari-web/app/views/main/host/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/summary.js b/ambari-web/app/views/main/host/summary.js
index efb1797..4cceddb 100644
--- a/ambari-web/app/views/main/host/summary.js
+++ b/ambari-web/app/views/main/host/summary.js
@@ -341,7 +341,7 @@ App.MainHostSummaryView = Em.View.extend({
       if (pulsate && !self.get('isBlinking')) {
         self.set('isBlinking', true);
         uiEffects.pulsate(self.$('.components-health'), 1000, function () {
-          !self.get('isDestroyed') && self.set('isBlinking', false);
+          self.set('isBlinking', false);
           self.doBlinking();
         });
       }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/d2530169/ambari-web/app/views/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js
index dd597c1..cba1a95 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -266,9 +266,8 @@ App.MainServiceInfoSummaryView = Em.View.extend({
           components.push(obj);
         }
       });
-      if(!this.get('isDestroyed') && !this.get('isDestroying')){
-        this.set('components', components);
-      }
+      this.set('components', components);
+
   },
   
   _hostComponentsUpd: function() {

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/d2530169/ambari-web/app/views/wizard/step1_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step1_view.js b/ambari-web/app/views/wizard/step1_view.js
index 08be0c3..f3d9af9 100644
--- a/ambari-web/app/views/wizard/step1_view.js
+++ b/ambari-web/app/views/wizard/step1_view.js
@@ -106,7 +106,7 @@ App.WizardStep1View = Em.View.extend({
             } else {
               error = Em.I18n.t('installer.step1.advancedRepo.localRepo.error.noUrl')
             }
-            if (!childView.get('isDestroyed') && !childView.get('isDestroying') &&
childView.get('isVisible'))
+            if (childView.get('isVisible'))
               childView.set('errorMessage', error);
           }
         }


Mime
View raw message