ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject git commit: AMBARI-7901 Slider View: When metrics are being shown, page keeps jumping to the top. (atkach)
Date Wed, 22 Oct 2014 15:16:12 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 06ff32dcd -> 4e003e581


AMBARI-7901 Slider View: When metrics are being shown, page keeps jumping to the top. (atkach)


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

Branch: refs/heads/trunk
Commit: 4e003e581ae6797b93ab6b94cba7750465b8c738
Parents: 06ff32d
Author: atkach <atkach@hortonworks.com>
Authored: Wed Oct 22 18:15:53 2014 +0300
Committer: atkach <atkach@hortonworks.com>
Committed: Wed Oct 22 18:15:53 2014 +0300

----------------------------------------------------------------------
 .../src/main/resources/ui/app/views/common/chart_view.js       | 5 ++++-
 .../ui/test/unit/controllers/slider_controller_test.js         | 6 ++----
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4e003e58/contrib/views/slider/src/main/resources/ui/app/views/common/chart_view.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/views/common/chart_view.js b/contrib/views/slider/src/main/resources/ui/app/views/common/chart_view.js
index 7874dca..021117c 100644
--- a/contrib/views/slider/src/main/resources/ui/app/views/common/chart_view.js
+++ b/contrib/views/slider/src/main/resources/ui/app/views/common/chart_view.js
@@ -350,6 +350,8 @@ App.ChartView = Ember.View.extend({
       this.set('isPopup', true);
     }
     else {
+      //set height for empty container while graph drawing to avoid viewport shrinking by
height
+      graph_container.css('height', graph_container.css('height'));
       graph_container.children().each(function (index, value) {
         $(value).children().remove();
       });
@@ -371,6 +373,7 @@ App.ChartView = Ember.View.extend({
       }
       this.set('isPopup', false);
     }
+    graph_container.css('height', 'auto');
   },
 
   /**
@@ -908,4 +911,4 @@ App.ChartView.CreateRateFormatter = function (unitsPrefix, valueFormatter)
{
     value = valueFormatter(value) + suffix;
     return value;
   };
-};
\ No newline at end of file
+};

http://git-wip-us.apache.org/repos/asf/ambari/blob/4e003e58/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_controller_test.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_controller_test.js
b/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_controller_test.js
index 871130a..0ec84c8 100644
--- a/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_controller_test.js
+++ b/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_controller_test.js
@@ -27,9 +27,7 @@ test('getViewDisplayParametersSuccessCallback', function () {
         "description" : "description s1",
         "label" : "display s1",
         "instance_data": {
-          "java.home": "/usr/jdk64/jdk1.7.0_45"
-        },
-        "properties": {
+          "java.home": "/usr/jdk64/jdk1.7.0_45",
           "slider.user": "admin"
         }
       }
@@ -40,4 +38,4 @@ test('getViewDisplayParametersSuccessCallback', function () {
   equal(App.get('javaHome'), '/usr/jdk64/jdk1.7.0_45', 'valid default java_home property
is set');
   equal(App.get('sliderUser'), 'admin', 'valid sliderUser is set');
 
-});
\ No newline at end of file
+});


Mime
View raw message