You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2015/04/20 13:23:32 UTC

ambari git commit: AMBARI-10592 It takes a long time to zoom in on a graph widget. (atkach)

Repository: ambari
Updated Branches:
  refs/heads/trunk 4b953b715 -> d36d89464


AMBARI-10592 It takes a long time to zoom in on a graph widget. (atkach)


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

Branch: refs/heads/trunk
Commit: d36d8946413f4748ba3ffd2fc706e8415ac7a279
Parents: 4b953b7
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Mon Apr 20 14:06:12 2015 +0300
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Mon Apr 20 14:06:12 2015 +0300

----------------------------------------------------------------------
 .../app/views/common/widget/graph_widget_view.js     | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d36d8946/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 02fcf35..d800a73 100644
--- a/ambari-web/app/views/common/widget/graph_widget_view.js
+++ b/ambari-web/app/views/common/widget/graph_widget_view.js
@@ -188,6 +188,8 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, {
    */
   graphView: App.ChartLinearTimeView.extend({
 
+    noTitleUnderGraph: true,
+
     /**
      * graph height
      * @type {number}
@@ -208,6 +210,10 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, {
       return this.get('parentView.content.properties.graph_type') === 'STACK' ? 'area' : 'line';
     }.property('parentView.content.properties.graph_type'),
 
+    title: function () {
+      return this.get('parentView.content.displayName');
+    }.property('parentView.content.displayName'),
+
     transformToSeries: function (seriesData) {
       var seriesArray = [];
 
@@ -217,8 +223,15 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, {
       return seriesArray;
     },
 
+    loadData: function () {
+      var self = this;
+      Em.run.next(function () {
+        self._refreshGraph(self.get('parentView.data'))
+      });
+    },
+
     didInsertElement: function () {
-      this._refreshGraph(this.get('parentView.data'));
+      this.loadData();
     }.observes('parentView.data')
   })
 });
\ No newline at end of file