ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject git commit: AMBARI-3761 "Uncaught exception" in JS while navigating through services on Services page. (ababiichuk)
Date Wed, 13 Nov 2013 18:15:59 GMT
Updated Branches:
  refs/heads/trunk a0d57eb11 -> 4d910297a


AMBARI-3761 "Uncaught exception" in JS while navigating through services on Services page.
(ababiichuk)


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

Branch: refs/heads/trunk
Commit: 4d910297abc1c726e15315492c3d8d15bfe949a1
Parents: a0d57eb
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Wed Nov 13 20:09:25 2013 +0200
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Wed Nov 13 20:15:43 2013 +0200

----------------------------------------------------------------------
 .../app/views/common/quick_view_link_view.js     | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/4d910297/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 b9f4a0d..7190cda 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -73,14 +73,19 @@ App.QuickViewLinks = Em.View.extend({
   /**
    * Updated quick links. Here we put correct hostname to url
    */
-  quickLinks: function () {
+  quickLinks: [],
+
+  didInsertElement: function() {
+    this.setQuickLinks();
+  },
+  setQuickLinks: function () {
     this.loadTags();
     var serviceName = this.get('content.serviceName');
     var components = this.get('content.hostComponents');
     var host;
     var self = this;
     var version = App.get('currentStackVersionNumber');
-
+    var quickLinks = [];
     switch (serviceName) {
       case "HDFS":
         if ( this.get('content.snameNode')) { // not HA
@@ -125,14 +130,14 @@ App.QuickViewLinks = Em.View.extend({
     }
 
     if (!host) {
-      return [
+      quickLinks = [
         {
           label: this.t('quick.links.error.label'),
           url: 'javascript:alert("' + this.t('contact.administrator') + '");return false;'
         }
       ];
-    }
-    return this.get('content.quickLinks').map(function (item) {
+    } else {
+    quickLinks = this.get('content.quickLinks').map(function (item) {
       if (host == 'noActiveNN') {
         item.set('disabled', true);
       } else {
@@ -149,7 +154,9 @@ App.QuickViewLinks = Em.View.extend({
       }
       return item;
     });
-  }.property('content.quickLinks.@each.label','actualTags'),
+    }
+    this.set('quickLinks',quickLinks);
+  }.observes('content.quickLinks.@each.label'),
 
   setProtocol: function(service_id){
     var properties  = this.ambariProperties();


Mime
View raw message