hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject hadoop git commit: YARN-8797. [UI2] Improve error pages in new YARN UI. Contributed by Akhil PB.
Date Fri, 05 Oct 2018 09:05:09 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-3.1 6407f2a0e -> f3f0a9a2c


YARN-8797. [UI2] Improve error pages in new YARN UI. Contributed by Akhil PB.

(cherry picked from commit 94d82f416258b65c8ab7849a459af78abebdf7d0)


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

Branch: refs/heads/branch-3.1
Commit: f3f0a9a2ca1dc3b6d4b6858e4e3c8840f1228fa3
Parents: 6407f2a
Author: Sunil G <sunilg@apache.org>
Authored: Fri Oct 5 14:28:54 2018 +0530
Committer: Sunil G <sunilg@apache.org>
Committed: Fri Oct 5 14:34:55 2018 +0530

----------------------------------------------------------------------
 .../src/main/webapp/app/controllers/application.js           | 7 +++++--
 .../hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js | 7 ++++---
 .../hadoop-yarn-ui/src/main/webapp/app/routes/application.js | 8 ++++++--
 .../hadoop-yarn-ui/src/main/webapp/app/templates/error.hbs   | 2 +-
 .../src/main/webapp/app/templates/notfound.hbs               | 2 +-
 5 files changed, 17 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/f3f0a9a2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js
index 3e8fcce..50a2909 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js
@@ -61,11 +61,14 @@ export default Ember.Controller.extend({
   }.property('currentPath'),
 
   clusterInfo: function() {
-    return this.model.clusterInfo.get('firstObject');
+    if (this.model && this.model.clusterInfo) {
+      return this.model.clusterInfo.get('firstObject');
+    }
+    return null;
   }.property('model.clusterInfo'),
 
   userInfo: function() {
-    if (this.model.userInfo) {
+    if (this.model && this.model.userInfo) {
       return this.model.userInfo.get('firstObject');
     }
     return null;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f3f0a9a2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js
index b80b196..cd12fd2 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js
@@ -70,9 +70,6 @@ Router.map(function() {
     this.route('info', {path: '/:component_name/instances/:instance_name/info'});
   });
   this.route('yarn-app-attempt', { path: '/yarn-app-attempt/:app_attempt_id'});
-  this.route('error');
-  this.route('notfound', { path: '*:' });
-  this.route('notauth', { path: '*:' });
   this.route('yarn-queues', { path: '/yarn-queues/:queue_name' });
   this.route('yarn-queue-apps', { path: '/yarn-queue-apps/:queue_name' });
   this.route('yarn-tools', function() {
@@ -92,6 +89,10 @@ Router.map(function() {
   });
   this.route('yarn-flowrun-metric', { path: '/yarn-flowrun-metric/:flowrun_uid/:metric_id'});
   this.route('timeline-error', {path: 'timeline-error/:error_id'});
+
+  this.route('notauth');
+  this.route('notfound');
+  this.route('error', { path: '*:' });
 });
 
 export default Router;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f3f0a9a2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js
index 60d1efd..adb57b1 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js
@@ -22,7 +22,9 @@ import AbstractRoute from './abstract';
 export default AbstractRoute.extend({
   model() {
     return Ember.RSVP.hash({
-      clusterInfo: this.store.findAll('ClusterInfo', {reload: true}),
+      clusterInfo: this.store.findAll('ClusterInfo', {reload: true}).catch(function() {
+        return null;
+      }),
       userInfo: this.store.findAll('cluster-user-info', {reload: true}).catch(function()
{
         return null;
       })
@@ -37,7 +39,9 @@ export default AbstractRoute.extend({
      * error handler page.
      */
     error: function (error) {
-      Ember.Logger.log(error.stack);
+      if (error && error.stack) {
+        Ember.Logger.log(error.stack);
+      }
 
       if (error && error.errors[0] && parseInt(error.errors[0].status) ===
404) {
         this.intermediateTransitionTo('/notfound');

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f3f0a9a2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/error.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/error.hbs
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/error.hbs
index 2e2a6e5..aace3c7 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/error.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/error.hbs
@@ -16,4 +16,4 @@
   limitations under the License.
 --}}
 
-<h3 align = "center">Sorry, Error Occurred.</h3>
+<h3 align = "center">Sorry, error occurred.</h3>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f3f0a9a2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/notfound.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/notfound.hbs
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/notfound.hbs
index 588ea44..8f60a2b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/notfound.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/notfound.hbs
@@ -17,4 +17,4 @@
 --}}
 
 <h2 align = "center">404, Not Found</h2>
-<h4 align = "center">Please Check your URL</h4>
+<h4 align = "center">Please check your URL</h4>


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message