tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject tez git commit: TEZ-2134. TEZ UI: On request failure, display request URL and server name in error bar. (Sreenath Somarajapuram via hitesh)
Date Wed, 25 Feb 2015 18:30:49 GMT
Repository: tez
Updated Branches:
  refs/heads/branch-0.6 295aadaf5 -> 280d00529


TEZ-2134. TEZ UI: On request failure, display request URL and server name in error bar. (Sreenath
Somarajapuram via hitesh)

(cherry picked from commit b36b9b1f7d2b9acee01368fd93daba3cb45d77cd)


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

Branch: refs/heads/branch-0.6
Commit: 280d005298298e4cda7e52eac9f61830eb27906c
Parents: 295aada
Author: Hitesh Shah <hitesh@apache.org>
Authored: Wed Feb 25 10:29:34 2015 -0800
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Wed Feb 25 10:30:43 2015 -0800

----------------------------------------------------------------------
 CHANGES.txt                                                 | 1 +
 tez-ui/src/main/webapp/app/scripts/app.js                   | 6 ++++++
 tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js | 3 +--
 .../main/webapp/app/scripts/controllers/dags_controller.js  | 2 +-
 .../scripts/controllers/task_task_attempts_controller.js    | 4 ++--
 .../app/scripts/controllers/tez-app-dags-controller.js      | 2 +-
 .../app/scripts/controllers/vertex_tasks_controller.js      | 2 +-
 tez-ui/src/main/webapp/app/scripts/helpers/misc.js          | 9 +++++++++
 .../src/main/webapp/app/scripts/mixins/paginated_content.js | 4 ++--
 .../main/webapp/app/scripts/models/TimelineRestAdapter.js   | 1 +
 tez-ui/src/main/webapp/app/scripts/router.js                | 2 +-
 11 files changed, 26 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/280d0052/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e830270..0ce11cd 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@ Release 0.6.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2134. TEZ UI: On request failure, display request URL and server name in error bar.
   TEZ-2136. Some enhancements to the new Tez UI.
   TEZ-2135. ACL checks handled incorrectly in AMWebController.
   TEZ-1990. Tez UI: DAG details page shows Nan for end time when a DAG is running.

http://git-wip-us.apache.org/repos/asf/tez/blob/280d0052/tez-ui/src/main/webapp/app/scripts/app.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/app.js b/tez-ui/src/main/webapp/app/scripts/app.js
index 6ae5d2a..1a2af0e 100644
--- a/tez-ui/src/main/webapp/app/scripts/app.js
+++ b/tez-ui/src/main/webapp/app/scripts/app.js
@@ -70,6 +70,7 @@ App.ready = function () {
       hash = hash || {}; // hash may be undefined
       hash.crossDomain = true;
       hash.xhrFields = {withCredentials: true};
+      hash.targetServer = "Timeline Server";
       return this._super(url, method, hash);
     },
     namespace: App.Configs.restNamespace.applicationHistory,
@@ -130,6 +131,7 @@ App.ready = function () {
       }
       hash.crossDomain = true;
       hash.xhrFields = {withCredentials: true};
+      hash.targetServer = "Resource Manager";
       return this._super(url, method, hash);
     },
     host: App.env.RMWebUrl,
@@ -166,6 +168,10 @@ App.ready = function () {
   });
 };
 
+$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
+  jqXHR.requestOptions = originalOptions;
+});
+
 /* Order and include */
 require('scripts/default-configs');
 

http://git-wip-us.apache.org/repos/asf/tez/blob/280d0052/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js b/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js
index 2b1304d..17efab7 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js
@@ -71,8 +71,7 @@ App.DagTasksController = Em.ObjectController.extend(App.PaginatedContentMixin,
A
     store = this.get('store'),
     fetcher;
     childEntityType = this.get('childEntityType');
-    var defaultErrMsg = 'Error while loading tasks. could not connect to %@'
-      .fmt(App.env.timelineBaseUrl);
+    var defaultErrMsg = 'Error while loading tasks.';
 
     that.set('loading', true);
     store.unloadAll(childEntityType);

http://git-wip-us.apache.org/repos/asf/tez/blob/280d0052/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
index a001ce2..66a33f1 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
@@ -67,7 +67,7 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin,
App.C
     childEntityType = this.get('childEntityType'),
     fetcher,
     record;
-    var defaultErrMsg = 'Error while loading dag info. could not connect to %@'.fmt(App.env.timelineBaseUrl);
+    var defaultErrMsg = 'Error while loading dag info.';
 
     that.set('loading', true);
     store.unloadAll(childEntityType);

http://git-wip-us.apache.org/repos/asf/tez/blob/280d0052/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js
b/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js
index b400375..d30cb21 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js
@@ -44,8 +44,8 @@ App.TaskAttemptsController = Em.ObjectController.extend(App.PaginatedContentMixi
   loadEntities: function () {
     var that = this;
     var childEntityType = this.get('childEntityType');
-    var defaultErrMsg = 'Error while loading %@. could not connect to %@'
-      .fmt(childEntityType, App.env.timelineBaseUrl);
+    var defaultErrMsg = 'Error while loading %@.'
+      .fmt(childEntityType);
 
     that.set('loading', true);
     this.get('store').unloadAll(childEntityType);

http://git-wip-us.apache.org/repos/asf/tez/blob/280d0052/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js
index 5d1ae0b..b448ca8 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js
@@ -53,7 +53,7 @@ App.TezAppDagsController = Em.ObjectController.extend(App.PaginatedContentMixin,
     childEntityType = this.get('childEntityType'),
     fetcher,
     record;
-    var defaultErrMsg = 'Error while loading dag info. could not connect to %@'.fmt(App.env.timelineBaseUrl);
+    var defaultErrMsg = 'Error while loading dag info.';
 
     that.set('loading', true);
     store.unloadAll(childEntityType);

http://git-wip-us.apache.org/repos/asf/tez/blob/280d0052/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js
index bba5aa0..912064a 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js
@@ -63,7 +63,7 @@ App.VertexTasksController = Em.ObjectController.extend(App.PaginatedContentMixin
     store = this.get('store'),
     fetcher;
     childEntityType = this.get('childEntityType');
-    var defaultErrMsg = 'Error while loading tasks. could not connect to %@'.fmt(App.env.timelineBaseUrl);
+    var defaultErrMsg = 'Error while loading tasks.';
 
     that.set('loading', true);
     store.unloadAll(childEntityType);

http://git-wip-us.apache.org/repos/asf/tez/blob/280d0052/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/helpers/misc.js b/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
index cebe988..1bb3197 100644
--- a/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
+++ b/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
@@ -178,6 +178,15 @@ App.Helpers.misc = {
     if (!!error.responseText) {
       msg += error.responseText;
     }
+
+    if(error.requestOptions) {
+      msg = '%@<br/>Could not retrieve expected data from %@ @ %@'.fmt(
+        msg,
+        error.requestOptions.targetServer,
+        error.requestOptions.url
+      )
+    }
+
     return {
       errCode: error.status || 'Unknown', 
       msg: msg,

http://git-wip-us.apache.org/repos/asf/tez/blob/280d0052/tez-ui/src/main/webapp/app/scripts/mixins/paginated_content.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/mixins/paginated_content.js b/tez-ui/src/main/webapp/app/scripts/mixins/paginated_content.js
index f371f28..5e158e1 100644
--- a/tez-ui/src/main/webapp/app/scripts/mixins/paginated_content.js
+++ b/tez-ui/src/main/webapp/app/scripts/mixins/paginated_content.js
@@ -69,8 +69,8 @@ App.PaginatedContentMixin = Em.Mixin.create({
   loadEntities: function() {
     var that = this;
     var childEntityType = this.get('childEntityType');
-    var defaultErrMsg = 'Error while loading %@. could not connect to %@'
-      .fmt(childEntityType, App.env.timelineBaseUrl);
+    var defaultErrMsg = 'Error while loading %@.'
+      .fmt(childEntityType);
 
 
     that.set('loading', true);

http://git-wip-us.apache.org/repos/asf/tez/blob/280d0052/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
index 09c81ad..cc167df 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
@@ -28,6 +28,7 @@ App.TimelineRESTAdapter = DS.RESTAdapter.extend({
     hash = hash || {}; // hash may be undefined
     hash.crossDomain = true;
     hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "Timeline Server";
     return this._super(url, method, hash);
   },
 	namespace: App.Configs.restNamespace.timeline,

http://git-wip-us.apache.org/repos/asf/tez/blob/280d0052/tez-ui/src/main/webapp/app/scripts/router.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/router.js b/tez-ui/src/main/webapp/app/scripts/router.js
index 0af1d05..8c81ef7 100644
--- a/tez-ui/src/main/webapp/app/scripts/router.js
+++ b/tez-ui/src/main/webapp/app/scripts/router.js
@@ -116,7 +116,7 @@ App.ApplicationRoute = Em.Route.extend({
     error: function(error, transition, originRoute) {
       this.replaceWith('error');
       Em.Logger.error(error);
-      var defaultError = 'Error while loading %@. could not connect to %@'.fmt(transition.targetName,
App.env.timelineBaseUrl);
+      var defaultError = 'Error while loading %@.'.fmt(transition.targetName);
       var err = App.Helpers.misc.formatError(error, defaultError);
       var msg = 'error code: %@, message: %@'.fmt(err.errCode, err.msg);
       App.Helpers.ErrorBar.getInstance().show(msg, error.details);


Mime
View raw message