Repository: tez Updated Branches: refs/heads/master 74b09b575 -> 19ee67bac
TEZ-2946. Tez UI: At times RM return a huge error message making the yellow error bar to fill the whole screen (sree) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/19ee67ba Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/19ee67ba Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/19ee67ba Branch: refs/heads/master Commit: 19ee67bac92b635577827f399119ec8f1876f556 Parents: 74b09b5 Author: Sreenath Somarajapuram <[email protected]> Authored: Sat Nov 21 11:58:52 2015 +0530 Committer: Sreenath Somarajapuram <[email protected]> Committed: Sat Nov 21 11:58:52 2015 +0530 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../main/webapp/app/scripts/helpers/error-bar.js | 17 ++++++++++++++++- tez-ui/src/main/webapp/app/styles/main.less | 12 ++++++++---- 3 files changed, 25 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/19ee67ba/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index dd86196..c828df3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ INCOMPATIBLE CHANGES TEZ-2949. Allow duplicate dag names within session for Tez. ALL CHANGES: + TEZ-2946. Tez UI: At times RM return a huge error message making the yellow error bar to fill the whole screen TEZ-2949. Allow duplicate dag names within session for Tez. TEZ-2952. NPE in TestOnFileUnorderedKVOutput TEZ-2480. Exception when closing output is ignored. http://git-wip-us.apache.org/repos/asf/tez/blob/19ee67ba/tez-ui/src/main/webapp/app/scripts/helpers/error-bar.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/scripts/helpers/error-bar.js b/tez-ui/src/main/webapp/app/scripts/helpers/error-bar.js index dadc829..42df27f 100644 --- a/tez-ui/src/main/webapp/app/scripts/helpers/error-bar.js +++ b/tez-ui/src/main/webapp/app/scripts/helpers/error-bar.js @@ -39,11 +39,26 @@ App.Helpers.ErrorBar = (function () { */ show: function (message, details) { var errorBar = $('.error-bar'), - messageElement; + messageElement, + lineEndIndex; errorBar.find('.expander').unbind('click'); errorBar.find('.details').removeClass('visible'); + if(typeof message == 'string') { + lineEndIndex = message.indexOf('\n'); + + if(lineEndIndex == -1) { + lineEndIndex = message.indexOf('<br'); + } + + if(lineEndIndex != -1) { + details = details ? "<br />" + details : ""; + details = message.substr(lineEndIndex) + details; + message = message.substr(0, lineEndIndex); + } + } + if(details) { messageElement = $('<a class="expander" href="#">' + message + '</a>'); messageElement.click(function (event) { http://git-wip-us.apache.org/repos/asf/tez/blob/19ee67ba/tez-ui/src/main/webapp/app/styles/main.less ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/styles/main.less b/tez-ui/src/main/webapp/app/styles/main.less index 1344edf..0a57a87 100644 --- a/tez-ui/src/main/webapp/app/styles/main.less +++ b/tez-ui/src/main/webapp/app/styles/main.less @@ -191,7 +191,9 @@ body, html { } .message-container { - width:90%; + width:100%; + overflow: scroll; + max-height: 100px; .align-children-left; @@ -203,8 +205,8 @@ body, html { } .close-container { - width:10%; - + position: absolute; + right: 15px; .align-children-right; } } @@ -237,8 +239,10 @@ body, html { overflow: auto; max-height: 300px; + .force-scrollbar; + &.visible { - display: inline; + display: block; } }
