You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/04/27 05:19:47 UTC

svn commit: r1476480 - in /incubator/ambari/trunk: CHANGES.txt ambari-web/app/templates/main/host/summary.hbs ambari-web/app/views/main/host/summary.js

Author: yusaku
Date: Sat Apr 27 03:19:47 2013
New Revision: 1476480

URL: http://svn.apache.org/r1476480
Log:
AMBARI-2034. Disable "Add Component" button in the Host Details page if the host is in UNKNOWN state or !isHeartbeating. (yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs
    incubator/ambari/trunk/ambari-web/app/views/main/host/summary.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1476480&r1=1476479&r2=1476480&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Sat Apr 27 03:19:47 2013
@@ -802,6 +802,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-2034. Disable "Add Component" button in the Host Details page if the
+ host is in UNKNOWN state or !isHeartbeating. (yusaku)
+
  AMBARI-2033. Decommission DataNode does not have any request context.
  (yusaku)
 

Modified: incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs?rev=1476480&r1=1476479&r2=1476480&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs Sat Apr 27 03:19:47 2013
@@ -120,22 +120,24 @@
               {{/if}}
             </div>
             <div class="span5 row">
-              {{#if view.addableComponents.length}}
-                <div class="btn-group">
-                  <button id="add_component" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
-                    {{t common.addComponent}}
-                    <span class="caret pull-right"></span>
-                  </button>
-                  <ul class="dropdown-menu">
-                    {{#each component in view.addableComponents}}
-                      <li>
-                      <a href="javascript:void(null)" data-toggle="modal" {{action addComponent component target="controller"}}>
-                        {{component.displayName}}
-                      </a>
-                      </li>
-                    {{/each}}
-                  </ul>
-                </div>
+              {{#if view.isAddComponent}}
+                {{#if view.addableComponents.length}}
+                    <div class="btn-group">
+                        <button id="add_component" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
+                          {{t common.addComponent}}
+                            <span class="caret pull-right"></span>
+                        </button>
+                        <ul class="dropdown-menu">
+                          {{#each component in view.addableComponents}}
+                              <li>
+                                  <a href="javascript:void(null)" data-toggle="modal" {{action addComponent component target="controller"}}>
+                                    {{component.displayName}}
+                                  </a>
+                              </li>
+                          {{/each}}
+                        </ul>
+                    </div>
+                {{/if}}
               {{/if}}
             </div>
           </div>

Modified: incubator/ambari/trunk/ambari-web/app/views/main/host/summary.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/host/summary.js?rev=1476480&r1=1476479&r2=1476480&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/host/summary.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/host/summary.js Sat Apr 27 03:19:47 2013
@@ -129,7 +129,9 @@ App.MainHostSummaryView = Em.View.extend
       return App.format.role(this.get('componentName'));
     }.property('componentName')
   }),
-
+  isAddComponent: function(){
+    return this.get('content.healthClass') !== 'health-status-DEAD-YELLOW';
+  }.property('content.healthClass'),
   addableComponents:function(){
     var components = [];
     var services = App.Service.find();