You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by xi...@apache.org on 2015/04/14 22:45:40 UTC

ambari git commit: AMBARI-10450-2. Implement Widget Browser.(xiwang)

Repository: ambari
Updated Branches:
  refs/heads/trunk d2bc7bd37 -> 073cec990


AMBARI-10450-2. Implement Widget Browser.(xiwang)


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

Branch: refs/heads/trunk
Commit: 073cec990dc65e17909a64dc26fcef854e7d85bb
Parents: d2bc7bd
Author: Xi Wang <xi...@apache.org>
Authored: Tue Apr 14 13:35:00 2015 -0700
Committer: Xi Wang <xi...@apache.org>
Committed: Tue Apr 14 13:35:10 2015 -0700

----------------------------------------------------------------------
 .../controllers/main/service/info/summary.js    | 20 +++++++++++---------
 .../app/styles/enhanced_service_dashboard.less  |  2 --
 .../modal_popups/widget_browser_popup.hbs       |  5 ++---
 ambari-web/app/utils/ajax/ajax.js               |  2 +-
 4 files changed, 14 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/073cec99/ambari-web/app/controllers/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/summary.js b/ambari-web/app/controllers/main/service/info/summary.js
index 1581add..447cc0d 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -404,15 +404,17 @@ App.MainServiceInfoSummaryController = Em.Controller.extend({
         data.items.map(function (widget) {
           var widgetType = widget.Widgets.widget_type;
           var widgetName = widget.Widgets.widget_name;
-          return Em.Object.create({
-            iconPath: "/img/widget-" + widgetType.toLowerCase() + ".png",
-            widgetName: widgetName,
-            displayName: widget.Widgets.display_name,
-            description: widget.Widgets.description,
-            widgetType: widgetType,
-            serviceName: widget.Widgets.metrics.mapProperty('service_name').uniq().join('-'),
-            added: addedWidgetsNames.contains(widgetName)
-          });
+          if (widgetType != "HEATMAP") {
+            return Em.Object.create({
+              iconPath: "/img/widget-" + widgetType.toLowerCase() + ".png",
+              widgetName: widgetName,
+              displayName: widget.Widgets.display_name,
+              description: widget.Widgets.description,
+              widgetType: widgetType,
+              serviceName: widget.Widgets.metrics.mapProperty('service_name').uniq().join('-'),
+              added: addedWidgetsNames.contains(widgetName)
+            });
+          }
         })
       );
       this.set('isAllSharedWidgetsLoaded', true);

http://git-wip-us.apache.org/repos/asf/ambari/blob/073cec99/ambari-web/app/styles/enhanced_service_dashboard.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/enhanced_service_dashboard.less b/ambari-web/app/styles/enhanced_service_dashboard.less
index 53e2e85..5b7c21a 100644
--- a/ambari-web/app/styles/enhanced_service_dashboard.less
+++ b/ambari-web/app/styles/enhanced_service_dashboard.less
@@ -358,7 +358,6 @@
       }
       .label-description {
         padding-top: 5px;
-        position: relative;
         .label-text {
           display: block;
           font-size: 14px;
@@ -380,7 +379,6 @@
       .widget-section-actions {
         position: relative;
         top: -30px;
-        left: 30%;
         .btn {
           padding: 3px 8px;
           width: 60px;

http://git-wip-us.apache.org/repos/asf/ambari/blob/073cec99/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs b/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs
index 0c85676..c483226 100644
--- a/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs
+++ b/ambari-web/app/templates/common/modal_popups/widget_browser_popup.hbs
@@ -58,7 +58,7 @@
                   <p class="label-text">{{widget.displayName}}</p>
                   <p class="description-text">{{widget.description}}</p>
                 </div>
-                <span class="widget-section-actions">
+                <div class="widget-section-actions pull-right">
                   {{#if widget.added}}
                     <button type="button" class="btn btn-primary added-btn" {{action "hideWidget" widget target="controller"}} >
                       {{t dashboard.widgets.browser.action.added}}
@@ -83,13 +83,12 @@
                       {{t dashboard.widgets.browser.action.add}}
                     </button>
                   {{/if}}
-                </span>
+                </div>
               </div>
             {{/each}}
           </div>
         {{/if}}
       </div>
-
     </div>
 
       <div {{bindAttr class="view.filteringComplete:hidden :table-overlay"}}>

http://git-wip-us.apache.org/repos/asf/ambari/blob/073cec99/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index 9db008c..19f42a6 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -2407,7 +2407,7 @@ var urls = {
   },
 
   'widgets.all.shared.get': {
-    real: '/widgets?Widgets/scope=CLUSTER&fields=*',
+    real: '/clusters/{clusterName}/widgets?Widgets/scope=CLUSTER&fields=*',
     mock: '/data/widget_layouts/all_shared_widgets.json'
   },