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

This commit is contained in:
Sunil G 2018-02-06 16:00:34 +05:30
parent 2c326088ae
commit 72415c39cf
6 changed files with 35 additions and 0 deletions

View File

@ -21,6 +21,9 @@ import Ember from 'ember';
export function lower(params) {
const string = params[0];
if(!string) {
return "";
}
return string.toLowerCase();
}

View File

@ -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 {

View File

@ -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() {

View File

@ -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');
}

View File

@ -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>

View File

@ -39,6 +39,9 @@ export default {
case "404":
errorType = "Not Found";
break;
case "401":
errorType = "Authorization required";
break;
default:
errorType = "";
break;