You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by su...@apache.org on 2018/02/06 10:30:44 UTC

hadoop git commit: YARN-7866. [UI2] Error to be displayed correctly while accessing kerberized cluster without kinit. Contributed by Sunil G.

Repository: hadoop
Updated Branches:
  refs/heads/trunk 2c326088a -> 72415c39c


YARN-7866. [UI2] Error to be displayed correctly while accessing kerberized cluster without kinit. Contributed by Sunil G.


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

Branch: refs/heads/trunk
Commit: 72415c39cff187b7c5ef574188ceee71a5115c73
Parents: 2c32608
Author: Sunil G <su...@apache.org>
Authored: Tue Feb 6 16:00:34 2018 +0530
Committer: Sunil G <su...@apache.org>
Committed: Tue Feb 6 16:00:34 2018 +0530

----------------------------------------------------------------------
 .../src/main/webapp/app/helpers/lower.js        |  3 +++
 .../src/main/webapp/app/initializers/loader.js  |  6 ++++++
 .../src/main/webapp/app/router.js               |  1 +
 .../src/main/webapp/app/routes/application.js   |  2 ++
 .../src/main/webapp/app/templates/notauth.hbs   | 20 ++++++++++++++++++++
 .../src/main/webapp/app/utils/error-utils.js    |  3 +++
 6 files changed, 35 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/72415c39/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/lower.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/lower.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/lower.js
index e519905..34c936f 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/lower.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/lower.js
@@ -21,6 +21,9 @@ import Ember from 'ember';
 
 export function lower(params) {
   const string = params[0];
+  if(!string) {
+    return "";
+  }
   return string.toLowerCase();
 }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/72415c39/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js
index 58c6354..47fe33e 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js
@@ -73,6 +73,9 @@ function updateConfigs(application) {
           Ember.Logger.log("Timeline Updated Address: " + updatedAddress);
         }
         application.advanceReadiness();
+      },
+      error: function() {
+        application.advanceReadiness();
       }
     });
   } else {
@@ -103,6 +106,9 @@ function updateConfigs(application) {
           Ember.Logger.log("Timeline V1 Updated Address: " + updatedAddress);
         }
         application.advanceReadiness();
+      },
+      error: function() {
+        application.advanceReadiness();
       }
     });
   } else {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/72415c39/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 3322a87..b80b196 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
@@ -72,6 +72,7 @@ Router.map(function() {
   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() {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/72415c39/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 33a741a..596b303 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
@@ -36,6 +36,8 @@ export default AbstractRoute.extend({
 
       if (error && error.errors[0] && parseInt(error.errors[0].status) === 404) {
         this.intermediateTransitionTo('/notfound');
+      } else if (error && error.errors[0] && parseInt(error.errors[0].status) === 401) {
+        this.intermediateTransitionTo('/notauth');
       } else {
         this.intermediateTransitionTo('/error');
       }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/72415c39/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/notauth.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/notauth.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/notauth.hbs
new file mode 100644
index 0000000..cdf9310
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/notauth.hbs
@@ -0,0 +1,20 @@
+{{!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--}}
+
+<h2 align = "center">401, Authorization required.</h2>
+<h4 align = "center">Please check your security settings.</h4>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/72415c39/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/error-utils.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/error-utils.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/error-utils.js
index 463f61f..7945be9 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/error-utils.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/error-utils.js
@@ -39,6 +39,9 @@ export default {
         case "404":
           errorType = "Not Found";
           break;
+        case "401":
+          errorType = "Authorization required";
+          break;
         default:
           errorType = "";
           break;


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