Repository: ambari
Updated Branches:
  refs/heads/trunk 7290fa0c2 -> d37bef923


AMBARI-11254. Incorrect Graph layout in Preview when zooming in.(xiwang)


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

Branch: refs/heads/trunk
Commit: d37bef923bbcee87c1eae1abbe9420e752df7a01
Parents: 7290fa0
Author: Xi Wang <[email protected]>
Authored: Tue May 19 14:49:15 2015 -0700
Committer: Xi Wang <[email protected]>
Committed: Tue May 19 15:07:20 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/styles/enhanced_service_dashboard.less           | 3 +++
 ambari-web/app/views/common/chart/linear_time.js                | 2 +-
 ambari-web/app/views/common/widget/graph_widget_view.js         | 3 +++
 ambari-web/app/views/main/service/widgets/create/wizard_view.js | 2 +-
 4 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d37bef92/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 53abf21..cece496 100644
--- a/ambari-web/app/styles/enhanced_service_dashboard.less
+++ b/ambari-web/app/styles/enhanced_service_dashboard.less
@@ -161,6 +161,9 @@
       .title {
         height: 0;
       }
+      .chart-container {
+        cursor: default;
+      }
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/d37bef92/ambari-web/app/views/common/chart/linear_time.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/chart/linear_time.js 
b/ambari-web/app/views/common/chart/linear_time.js
index ab824ca..61cd300 100644
--- a/ambari-web/app/views/common/chart/linear_time.js
+++ b/ambari-web/app/views/common/chart/linear_time.js
@@ -674,7 +674,7 @@ App.ChartLinearTimeView = Ember.View.extend({
   },
 
   showGraphInPopup: function() {
-    if(!this.get('hasData')) {
+    if(!this.get('hasData') || this.get('isPreview')) {
       return;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d37bef92/ambari-web/app/views/common/widget/graph_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/widget/graph_widget_view.js 
b/ambari-web/app/views/common/widget/graph_widget_view.js
index f0a2118..9c94563 100644
--- a/ambari-web/app/views/common/widget/graph_widget_view.js
+++ b/ambari-web/app/views/common/widget/graph_widget_view.js
@@ -263,6 +263,9 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, {
     description: function () {
       return this.get('parentView.content.description');
     }.property('parentView.content.description'),
+    isPreview: function () {
+      return this.get('parentView.isPreview');
+    }.property('parentView.isPreview'),
 
     /**
      * set custom time range for graph widget

http://git-wip-us.apache.org/repos/asf/ambari/blob/d37bef92/ambari-web/app/views/main/service/widgets/create/wizard_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/widgets/create/wizard_view.js 
b/ambari-web/app/views/main/service/widgets/create/wizard_view.js
index e39d494..70d43be 100644
--- a/ambari-web/app/views/main/service/widgets/create/wizard_view.js
+++ b/ambari-web/app/views/main/service/widgets/create/wizard_view.js
@@ -28,7 +28,7 @@ App.WidgetWizardView = Em.View.extend(App.WizardMenuMixin, {
   previewWidgetClass: function () {
     switch (this.get('controller.content.widgetType')) {
       case 'GRAPH':
-        return App.GraphWidgetView.extend(App.WidgetPreviewMixin);
+        return App.GraphWidgetView.extend(App.WidgetPreviewMixin, {isPreview: 
true});
       case 'TEMPLATE':
         return App.TemplateWidgetView.extend(App.WidgetPreviewMixin);
       case 'NUMBER':

Reply via email to