mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
represent signing
This commit is contained in:
parent
9bf56d9f64
commit
0a5e992040
2 changed files with 8 additions and 2 deletions
|
|
@ -17,11 +17,13 @@
|
|||
angular.module('zeppelinWebApp').controller('LoginCtrl', LoginCtrl);
|
||||
|
||||
LoginCtrl.$inject = ['$scope', '$rootScope', '$http', '$httpParamSerializer', 'baseUrlSrv'];
|
||||
$scope.SigningIn = false;
|
||||
|
||||
function LoginCtrl($scope, $rootScope, $http, $httpParamSerializer, baseUrlSrv) {
|
||||
$scope.loginParams = {};
|
||||
$scope.login = function() {
|
||||
|
||||
$scope.SigningIn = true;
|
||||
$http({
|
||||
method: 'POST',
|
||||
url: baseUrlSrv.getRestApiBase() + '/login',
|
||||
|
|
@ -39,6 +41,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;
|
||||
});
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue