Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9262417E00 for ; Wed, 22 Oct 2014 15:16:14 +0000 (UTC) Received: (qmail 45517 invoked by uid 500); 22 Oct 2014 15:16:14 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 45484 invoked by uid 500); 22 Oct 2014 15:16:14 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 45475 invoked by uid 99); 22 Oct 2014 15:16:14 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2014 15:16:14 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C03049B2247; Wed, 22 Oct 2014 15:16:12 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: atkach@apache.org To: commits@ambari.apache.org Message-Id: <3031a9e280a14a80a51b5c9fffaf17f8@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) 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 Authored: Wed Oct 22 18:15:53 2014 +0300 Committer: atkach 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 +});