Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id ABED9200C2C for ; Fri, 3 Mar 2017 21:06:38 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AA6C2160B6D; Fri, 3 Mar 2017 20:06:38 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D1018160B5E for ; Fri, 3 Mar 2017 21:06:37 +0100 (CET) Received: (qmail 51279 invoked by uid 500); 3 Mar 2017 20:06:37 -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 51268 invoked by uid 99); 3 Mar 2017 20:06:37 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Mar 2017 20:06:37 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EDD12DFC15; Fri, 3 Mar 2017 20:06:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ababiichuk@apache.org To: commits@ambari.apache.org Message-Id: <427e6dc583734932bf98a30a78c28a83@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-20311 Full-height modals overflow viewport vertically. (ababiichuk) Date: Fri, 3 Mar 2017 20:06:36 +0000 (UTC) archived-at: Fri, 03 Mar 2017 20:06:38 -0000 Repository: ambari Updated Branches: refs/heads/trunk f896b8411 -> dc899c918 AMBARI-20311 Full-height modals overflow viewport vertically. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dc899c91 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dc899c91 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dc899c91 Branch: refs/heads/trunk Commit: dc899c918ec6ab6b698972dfb9b0d632b8fe2d7b Parents: f896b84 Author: ababiichuk Authored: Fri Mar 3 20:02:00 2017 +0200 Committer: ababiichuk Committed: Fri Mar 3 22:06:44 2017 +0200 ---------------------------------------------------------------------- ambari-web/app/styles/common.less | 4 ++-- ambari-web/app/styles/log_file_search.less | 3 --- .../app/templates/common/host_progress_popup.hbs | 8 ++++---- .../common/host_progress_popup_body_view.js | 19 ++++++++----------- ambari-web/app/views/common/modal_popup.js | 11 ++++++----- 5 files changed, 20 insertions(+), 25 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/dc899c91/ambari-web/app/styles/common.less ---------------------------------------------------------------------- diff --git a/ambari-web/app/styles/common.less b/ambari-web/app/styles/common.less index ad1da66..c5ab5b9 100644 --- a/ambari-web/app/styles/common.less +++ b/ambari-web/app/styles/common.less @@ -195,9 +195,9 @@ // modal body content padding @modal-body-padding: 15px; // modal header height -@modal-header-height: 50px; +@modal-header-height: 57px; // modal footer height -@modal-footer-height: 60px; +@modal-footer-height: 75px; .btn-primary[disabled] { .icon-spinner { http://git-wip-us.apache.org/repos/asf/ambari/blob/dc899c91/ambari-web/app/styles/log_file_search.less ---------------------------------------------------------------------- diff --git a/ambari-web/app/styles/log_file_search.less b/ambari-web/app/styles/log_file_search.less index cf5ef29..3e02cea 100644 --- a/ambari-web/app/styles/log_file_search.less +++ b/ambari-web/app/styles/log_file_search.less @@ -157,9 +157,6 @@ } .log-tail-popup.full-height-modal { - @log-tail-header-height: 60px; - @log-tail-bottom-wrap-height: 50px; - @log-tail-content-height: calc(~"100%" - (@log-tail-header-height + @log-tail-bottom-wrap-height + @modal-footer-height)); .top-wrap { border-bottom: none !important; http://git-wip-us.apache.org/repos/asf/ambari/blob/dc899c91/ambari-web/app/templates/common/host_progress_popup.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/host_progress_popup.hbs b/ambari-web/app/templates/common/host_progress_popup.hbs index ae411b1..c9d344c 100644 --- a/ambari-web/app/templates/common/host_progress_popup.hbs +++ b/ambari-web/app/templates/common/host_progress_popup.hbs @@ -22,7 +22,7 @@ {{!-- SERVICES --}}
-
+
@@ -103,7 +103,7 @@ {{!-- HOSTS ---}}
-
+

{{t common.hosts}}

@@ -192,7 +192,7 @@ {{!-- TASKS ---}}
-
+

{{t common.tasks}}

@@ -256,7 +256,7 @@
-
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/dc899c91/ambari-web/app/views/common/host_progress_popup_body_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/host_progress_popup_body_view.js b/ambari-web/app/views/common/host_progress_popup_body_view.js index f119c3b..25be849 100644 --- a/ambari-web/app/views/common/host_progress_popup_body_view.js +++ b/ambari-web/app/views/common/host_progress_popup_body_view.js @@ -301,14 +301,14 @@ App.HostProgressPopupBodyView = App.TableView.extend({ */ resizeHandler: function() { if (this.get('state') === 'destroyed' || !this.get('parentView.isOpen')) return; - var headerHeight = 48, - modalFooterHeight = 60, - taskTopWrapHeight = 40, - modalTopOffset = $('.modal').offset().top, - contentPaddingBottom = 40, - hostsPageBarHeight = 45, - tabbedContentNavHeight = 68, - logComponentFileNameHeight = 30, + var modal = this.get('parentView').$().find('.modal'), + headerHeight = $(modal).find('.modal-header').outerHeight(true), + modalFooterHeight = $(modal).find('.modal-footer').outerHeight(true), + taskTopWrapHeight = $(modal).find('.top-wrap:visible').outerHeight(true), + modalTopOffset = $(modal).offset().top, + contentPaddingBottom = parseFloat($(modal).find('.modal-dialog').css('marginBottom')) || 0, + hostsPageBarHeight = $(modal).find('#host-info tfoot').outerHeight(true), + logComponentFileNameHeight = $(modal).find('#host-info tfoot').outerHeight(true), levelName = this.get('currentLevelName'), boLevelHeightMap = { 'REQUESTS_LIST': { @@ -334,9 +334,6 @@ App.HostProgressPopupBodyView = App.TableView.extend({ if (levelName && levelName in boLevelHeightMap) { resizeTarget = boLevelHeightMap[levelName].target; currentLevelHeight = boLevelHeightMap[levelName].height; - if (levelName === 'TASK_DETAILS' && $('.task-detail-info').hasClass('task-detail-info-tabbed')) { - currentLevelHeight -= tabbedContentNavHeight; - } if (!Em.isArray(resizeTarget)) { resizeTarget = [resizeTarget]; } http://git-wip-us.apache.org/repos/asf/ambari/blob/dc899c91/ambari-web/app/views/common/modal_popup.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/modal_popup.js b/ambari-web/app/views/common/modal_popup.js index f09ae62..4248301 100644 --- a/ambari-web/app/views/common/modal_popup.js +++ b/ambari-web/app/views/common/modal_popup.js @@ -161,17 +161,18 @@ App.ModalPopup = Ember.View.extend({ fitHeight: function () { if (this.get('state') === 'destroyed') return; - var popup = this.$().find('#modal'); - var block = this.$().find('#modal > .modal-body'); - var wh = $(window).height(); + var popup = this.$().find('#modal'), + wrapper = $(popup).find('.modal-dialog'), + block = $(popup).find('.modal-body'), + wh = $(window).height(), + top = wh * 0.05, + newMaxHeight = wh - top * 2 - (wrapper.height() - block.height()); - var top = wh * 0.05; popup.css({ 'top': top + 'px', 'marginTop': 0 }); - var newMaxHeight = $(window).height() - top * 2 - (popup.height() - block.height()); newMaxHeight = Math.max(newMaxHeight, 500); block.css('max-height', newMaxHeight); }