AMBARI-14244. Textarea with task logs is too wide
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2915a9a3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2915a9a3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2915a9a3 Branch: refs/heads/trunk Commit: 2915a9a34b0fee2d001be60bd85fceddc9c57f0d Parents: dcaaca2 Author: Alex Antonenko <hiv...@gmail.com> Authored: Mon Dec 7 12:39:45 2015 +0200 Committer: Alex Antonenko <hiv...@gmail.com> Committed: Mon Dec 7 12:39:45 2015 +0200 ---------------------------------------------------------------------- ambari-web/app/styles/application.less | 1 + ambari-web/app/styles/stack_versions.less | 1 + ambari-web/app/views/common/host_progress_popup_body_view.js | 7 ++++--- ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js | 7 ++++--- 4 files changed, 10 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/2915a9a3/ambari-web/app/styles/application.less ---------------------------------------------------------------------- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index ae92649..d80278c 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -1820,6 +1820,7 @@ a:focus { display: none; resize: none; overflow: hidden; + box-sizing: border-box; } .task-top-wrap { http://git-wip-us.apache.org/repos/asf/ambari/blob/2915a9a3/ambari-web/app/styles/stack_versions.less ---------------------------------------------------------------------- diff --git a/ambari-web/app/styles/stack_versions.less b/ambari-web/app/styles/stack_versions.less index 8529606..f6d816d 100644 --- a/ambari-web/app/styles/stack_versions.less +++ b/ambari-web/app/styles/stack_versions.less @@ -252,6 +252,7 @@ textarea { width: 100%; min-height: 100px; + box-sizing: border-box; } } .task-list { http://git-wip-us.apache.org/repos/asf/ambari/blob/2915a9a3/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 d9006ad..2f78f03 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 @@ -722,13 +722,14 @@ App.HostProgressPopupBodyView = App.TableView.extend({ * @method createClipBoard */ createClipBoard: function () { - var logElement = $(".task-detail-log-maintext"); + var logElement = $(".task-detail-log-maintext"), + logElementRect = logElement[0].getBoundingClientRect(); $(".task-detail-log-clipboard-wrap").html('<textarea class="task-detail-log-clipboard"></textarea>'); $(".task-detail-log-clipboard") .html("stderr: \n" + $(".stderr").html() + "\n stdout:\n" + $(".stdout").html()) .css('display', 'block') - .width(logElement.width()) - .height(logElement.height()) + .width(logElementRect.width) + .height(logElementRect.height) .select(); logElement.css("display", "none"); http://git-wip-us.apache.org/repos/asf/ambari/blob/2915a9a3/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js b/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js index e309b4c..8dfd398 100644 --- a/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js +++ b/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js @@ -247,13 +247,14 @@ App.WizardStep9HostLogPopupBodyView = Em.View.extend({ * @method createClipBoard */ createClipBoard: function () { - var log = $(".task-detail-log-maintext"); + var log = $(".task-detail-log-maintext"), + logRect = log[0].getBoundingClientRect(); $(".task-detail-log-clipboard-wrap").html('<textarea class="task-detail-log-clipboard"></textarea>'); $(".task-detail-log-clipboard") .html("stderr: \n" + $(".stderr").html() + "\n stdout:\n" + $(".stdout").html()) .css("display", "block") - .width(log.width()) - .height(log.height()) + .width(logRect.width) + .height(logRect.height) .select(); log.css("display", "none") },