incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject git commit: AMBARI-3280. Add Component button appears when logged in as a non-admin user. (xiwang via yusaku)
Date Thu, 19 Sep 2013 00:11:11 GMT
Updated Branches:
  refs/heads/trunk 64ff4978b -> 327db479f


AMBARI-3280. Add Component button appears when logged in as a non-admin user. (xiwang via
yusaku)


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

Branch: refs/heads/trunk
Commit: 327db479f695f8c8f58bee1d51dd31c69176f93c
Parents: 64ff497
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Wed Sep 18 17:10:39 2013 -0700
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Wed Sep 18 17:10:39 2013 -0700

----------------------------------------------------------------------
 ambari-web/app/templates/main/host/summary.hbs | 32 +++++++++++----------
 1 file changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/327db479/ambari-web/app/templates/main/host/summary.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/summary.hbs b/ambari-web/app/templates/main/host/summary.hbs
index db8ba18..7b5eab0 100644
--- a/ambari-web/app/templates/main/host/summary.hbs
+++ b/ambari-web/app/templates/main/host/summary.hbs
@@ -126,23 +126,25 @@
               {{/if}}
             </div>
             <div class="span5 row">
-              {{#if view.isAddComponent}}
-                {{#if view.addableComponents.length}}
+              {{#if App.isAdmin}}
+                {{#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>
+                      <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}}
               {{/if}}
             </div>


Mime
View raw message