You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/12/07 11:41:45 UTC
[1/2] ambari git commit: AMBARI-14243. FE: Show message on login page
if authentication failed
Repository: ambari
Updated Branches:
refs/heads/trunk 285539424 -> 2915a9a34
AMBARI-14243. FE: Show message on login page if authentication failed
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dcaaca2e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dcaaca2e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dcaaca2e
Branch: refs/heads/trunk
Commit: dcaaca2ea87cd5bed4a44730f446de443349a92a
Parents: 2855394
Author: Alex Antonenko <hi...@gmail.com>
Authored: Mon Dec 7 12:34:23 2015 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Mon Dec 7 12:34:23 2015 +0200
----------------------------------------------------------------------
ambari-web/app/controllers/login_controller.js | 4 ++--
ambari-web/app/router.js | 9 ++++++++-
2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcaaca2e/ambari-web/app/controllers/login_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/login_controller.js b/ambari-web/app/controllers/login_controller.js
index a3b8e32..fc64a54 100644
--- a/ambari-web/app/controllers/login_controller.js
+++ b/ambari-web/app/controllers/login_controller.js
@@ -37,7 +37,7 @@ App.LoginController = Em.Object.extend({
postLogin: function (isConnected, isAuthenticated, responseText) {
if (!isConnected) {
- this.set('errorMessage', Em.I18n.t('login.error.bad.connection'));
+ this.set('errorMessage', responseText || Em.I18n.t('login.error.bad.connection'));
} else if (!isAuthenticated) {
var errorMessage = "";
if( responseText === "User is disabled" ){
@@ -51,4 +51,4 @@ App.LoginController = Em.Object.extend({
this.set('isSubmitDisabled', false);
}
-});
\ No newline at end of file
+});
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcaaca2e/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index 0df7485..7bd3a58 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -221,6 +221,9 @@ App.Router = Em.Router.extend({
} finally {
this.setAuthenticated(false);
}
+ } else if (data.status >= 500) {
+ this.setAuthenticated(false);
+ this.loginErrorCallback(data);
}
},
@@ -331,12 +334,16 @@ App.Router = Em.Router.extend({
loginErrorCallback: function(request) {
var controller = this.get('loginController');
this.setAuthenticated(false);
- if (request.status == 403) {
+ if (request.status > 400) {
var responseMessage = request.responseText;
try{
responseMessage = JSON.parse(request.responseText).message;
}catch(e){}
+ }
+ if (request.status == 403) {
controller.postLogin(true, false, responseMessage);
+ } else if (request.status == 500) {
+ controller.postLogin(false, false, responseMessage);
} else {
controller.postLogin(false, false, null);
}
[2/2] ambari git commit: AMBARI-14244. Textarea with task logs is too
wide
Posted by al...@apache.org.
AMBARI-14244. Textarea with task logs is too wide
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2915a9a3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2915a9a3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2915a9a3
Branch: refs/heads/trunk
Commit: 2915a9a34b0fee2d001be60bd85fceddc9c57f0d
Parents: dcaaca2
Author: Alex Antonenko <hi...@gmail.com>
Authored: Mon Dec 7 12:39:45 2015 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Mon Dec 7 12:39:45 2015 +0200
----------------------------------------------------------------------
ambari-web/app/styles/application.less | 1 +
ambari-web/app/styles/stack_versions.less | 1 +
ambari-web/app/views/common/host_progress_popup_body_view.js | 7 ++++---
ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js | 7 ++++---
4 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/2915a9a3/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index ae92649..d80278c 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -1820,6 +1820,7 @@ a:focus {
display: none;
resize: none;
overflow: hidden;
+ box-sizing: border-box;
}
.task-top-wrap {
http://git-wip-us.apache.org/repos/asf/ambari/blob/2915a9a3/ambari-web/app/styles/stack_versions.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/stack_versions.less b/ambari-web/app/styles/stack_versions.less
index 8529606..f6d816d 100644
--- a/ambari-web/app/styles/stack_versions.less
+++ b/ambari-web/app/styles/stack_versions.less
@@ -252,6 +252,7 @@
textarea {
width: 100%;
min-height: 100px;
+ box-sizing: border-box;
}
}
.task-list {
http://git-wip-us.apache.org/repos/asf/ambari/blob/2915a9a3/ambari-web/app/views/common/host_progress_popup_body_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/host_progress_popup_body_view.js b/ambari-web/app/views/common/host_progress_popup_body_view.js
index d9006ad..2f78f03 100644
--- a/ambari-web/app/views/common/host_progress_popup_body_view.js
+++ b/ambari-web/app/views/common/host_progress_popup_body_view.js
@@ -722,13 +722,14 @@ App.HostProgressPopupBodyView = App.TableView.extend({
* @method createClipBoard
*/
createClipBoard: function () {
- var logElement = $(".task-detail-log-maintext");
+ var logElement = $(".task-detail-log-maintext"),
+ logElementRect = logElement[0].getBoundingClientRect();
$(".task-detail-log-clipboard-wrap").html('<textarea class="task-detail-log-clipboard"></textarea>');
$(".task-detail-log-clipboard")
.html("stderr: \n" + $(".stderr").html() + "\n stdout:\n" + $(".stdout").html())
.css('display', 'block')
- .width(logElement.width())
- .height(logElement.height())
+ .width(logElementRect.width)
+ .height(logElementRect.height)
.select();
logElement.css("display", "none");
http://git-wip-us.apache.org/repos/asf/ambari/blob/2915a9a3/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js b/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js
index e309b4c..8dfd398 100644
--- a/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js
+++ b/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js
@@ -247,13 +247,14 @@ App.WizardStep9HostLogPopupBodyView = Em.View.extend({
* @method createClipBoard
*/
createClipBoard: function () {
- var log = $(".task-detail-log-maintext");
+ var log = $(".task-detail-log-maintext"),
+ logRect = log[0].getBoundingClientRect();
$(".task-detail-log-clipboard-wrap").html('<textarea class="task-detail-log-clipboard"></textarea>');
$(".task-detail-log-clipboard")
.html("stderr: \n" + $(".stderr").html() + "\n stdout:\n" + $(".stdout").html())
.css("display", "block")
- .width(log.width())
- .height(log.height())
+ .width(logRect.width)
+ .height(logRect.height)
.select();
log.css("display", "none")
},