tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject tez git commit: TEZ-2946. Tez UI: At times RM return a huge error message making the yellow error bar to fill the whole screen (sree)
Date Sat, 21 Nov 2015 06:31:33 GMT
Repository: tez
Updated Branches:
  refs/heads/branch-0.7 9e6b06dd4 -> 1e84c3bd8


TEZ-2946. Tez UI: At times RM return a huge error message making the yellow error bar to fill
the whole screen (sree)

(cherry picked from commit 19ee67bac92b635577827f399119ec8f1876f556)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/1e84c3bd
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/1e84c3bd
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/1e84c3bd

Branch: refs/heads/branch-0.7
Commit: 1e84c3bd83056a806f09cbce8990c0d3ef109ed2
Parents: 9e6b06d
Author: Sreenath Somarajapuram <sree@apache.org>
Authored: Sat Nov 21 11:58:52 2015 +0530
Committer: Sreenath Somarajapuram <sree@apache.org>
Committed: Sat Nov 21 12:00:56 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/1e84c3bd/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 422d215..2aeb71c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,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-2933. Tez UI: Load application details from RM when available
   TEZ-2908. Tez UI: Errors are logged, but not displayed in the UI when AM fetch fails

http://git-wip-us.apache.org/repos/asf/tez/blob/1e84c3bd/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/1e84c3bd/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 3771c1a..043a76e 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;
     }
   }
 


Mime
View raw message