You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2014/07/09 20:26:13 UTC

git commit: AMBARI-6442. JS error occurs periodically when Job Details page is opened (Max Shepel via alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk b1e5641d2 -> 673f649b0


AMBARI-6442. JS error occurs periodically when Job Details page is opened (Max Shepel via alexantonenko)


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

Branch: refs/heads/trunk
Commit: 673f649b0733554542996c47e0546d8d4227c27a
Parents: b1e5641
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed Jul 9 21:23:23 2014 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Jul 9 21:23:23 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/views/common/quick_view_link_view.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/673f649b/ambari-web/app/views/common/quick_view_link_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/quick_view_link_view.js b/ambari-web/app/views/common/quick_view_link_view.js
index fb76c5b..703523a 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -33,6 +33,7 @@ App.QuickViewLinks = Em.View.extend({
   },
 
   loadTagsSuccess: function (data) {
+    this.get('actualTags').clear();
     var tags = [];
     for (var prop in data.Clusters.desired_configs) {
       tags.push(Em.Object.create({
@@ -40,7 +41,7 @@ App.QuickViewLinks = Em.View.extend({
         tagName: data.Clusters.desired_configs[prop]['tag']
       }));
     }
-    this.set('actualTags', tags);
+    this.get('actualTags').pushObjects(tags);
     this.setConfigProperties();
     this.getQuickLinksHosts();
   },
@@ -85,14 +86,13 @@ App.QuickViewLinks = Em.View.extend({
   },
 
   setConfigProperties: function () {
-    this.set('configProperties', []);
+    this.get('configProperties').clear();
     var requiredSiteNames = this.get('requiredSiteNames');
     var tags = this.get('actualTags').filter(function (tag) {
       return requiredSiteNames.contains(tag.siteName);
     });
     var data = App.router.get('configurationController').getConfigsByTags(tags);
-    this.set('configProperties', data);
-
+    this.get('configProperties').pushObjects(data);
   },
 
   ambariProperties: function () {
@@ -263,7 +263,7 @@ App.QuickViewLinks = Em.View.extend({
     var properties = this.ambariProperties();
     var configProperties = this.get('configProperties');
     var hadoopSslEnabled = false;
-    if (configProperties) {
+    if (configProperties && configProperties.length > 0) {
       var site = configProperties.findProperty('type', 'core-site');
       site.properties['hadoop.ssl.enabled'] && site.properties['hadoop.ssl.enabled'] === 'true' ? hadoopSslEnabled = true : null;
     }