You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2016/11/18 03:05:49 UTC
zeppelin git commit: [ZEPPELIN-1670] Disabling login button double
click.
Repository: zeppelin
Updated Branches:
refs/heads/master 12105aeee -> f28c2b308
[ZEPPELIN-1670] Disabling login button double click.
### What is this PR for?
This PR is for preventing double click login button.
### What type of PR is it?
Bug Fix | Improvement
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1670
### Screenshots (if appropriate)
![image](https://cloud.githubusercontent.com/assets/3348133/20334136/26cb5510-abfb-11e6-81cd-4f9db0a119c7.png)
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: astroshim <hs...@nflabs.com>
Closes #1644 from astroshim/ZEPPELIN-1670 and squashes the following commits:
f32d2ae [astroshim] fix variable position
0a5e992 [astroshim] represent signing
Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/f28c2b30
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/f28c2b30
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/f28c2b30
Branch: refs/heads/master
Commit: f28c2b308e063fcc92b7bd1e56c4e743fd20f18f
Parents: 12105ae
Author: astroshim <hs...@nflabs.com>
Authored: Wed Nov 16 19:03:58 2016 +0900
Committer: Lee moon soo <mo...@apache.org>
Committed: Thu Nov 17 19:05:42 2016 -0800
----------------------------------------------------------------------
zeppelin-web/src/components/login/login.controller.js | 4 +++-
zeppelin-web/src/components/login/login.html | 7 +++++--
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/f28c2b30/zeppelin-web/src/components/login/login.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/login/login.controller.js b/zeppelin-web/src/components/login/login.controller.js
index c30110c..09b2981 100644
--- a/zeppelin-web/src/components/login/login.controller.js
+++ b/zeppelin-web/src/components/login/login.controller.js
@@ -17,11 +17,12 @@
angular.module('zeppelinWebApp').controller('LoginCtrl', LoginCtrl);
LoginCtrl.$inject = ['$scope', '$rootScope', '$http', '$httpParamSerializer', 'baseUrlSrv'];
-
function LoginCtrl($scope, $rootScope, $http, $httpParamSerializer, baseUrlSrv) {
+ $scope.SigningIn = false;
$scope.loginParams = {};
$scope.login = function() {
+ $scope.SigningIn = true;
$http({
method: 'POST',
url: baseUrlSrv.getRestApiBase() + '/login',
@@ -39,6 +40,7 @@
$rootScope.userName = $scope.loginParams.userName;
}, function errorCallback(errorResponse) {
$scope.loginParams.errorText = 'The username and password that you entered don\'t match.';
+ $scope.SigningIn = false;
});
};
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/f28c2b30/zeppelin-web/src/components/login/login.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/login/login.html b/zeppelin-web/src/components/login/login.html
index 28aca16..cd3b604 100644
--- a/zeppelin-web/src/components/login/login.html
+++ b/zeppelin-web/src/components/login/login.html
@@ -41,8 +41,11 @@ limitations under the License.
</div>
</div>
- <div class="modal-footer">
- <div>
+ <div class="modal-footer" ng-switch on="SigningIn">
+ <div ng-switch-when="true">
+ <button type="button" class="btn btn-default btn-primary" disabled><i class="fa fa-circle-o-notch fa-spin"></i> Signing In</button>
+ </div>
+ <div ng-switch-default>
<button type="button" class="btn btn-default btn-primary" ng-click="login()">Login</button>
</div>
</div>