mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 11:25:08 -02:30
Merge branch 'loginRefactor2' into devel
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,6 +13,7 @@ awx/public/static
|
|||||||
awx/ui/tests/test-results.xml
|
awx/ui/tests/test-results.xml
|
||||||
awx/ui/static/js/awx.min.js
|
awx/ui/static/js/awx.min.js
|
||||||
awx/ui/static/js/local_settings.json
|
awx/ui/static/js/local_settings.json
|
||||||
|
awx/ui/client/src/local_settings.json
|
||||||
awx/ui/static/css/awx.min.css
|
awx/ui/static/css/awx.min.css
|
||||||
awx/main/fixtures
|
awx/main/fixtures
|
||||||
awx/*.log
|
awx/*.log
|
||||||
|
|||||||
17
awx/ui/client/src/login/authenticationServices/main.js
Normal file
17
awx/ui/client/src/login/authenticationServices/main.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/*************************************************
|
||||||
|
* Copyright (c) 2015 Ansible, Inc.
|
||||||
|
*
|
||||||
|
* All Rights Reserved
|
||||||
|
*************************************************/
|
||||||
|
|
||||||
|
import authenticationService from './authentication.service';
|
||||||
|
import checkAccess from './checkAccess.factory';
|
||||||
|
import isAdmin from './isAdmin.factory';
|
||||||
|
import timer from './timer.factory';
|
||||||
|
|
||||||
|
export default
|
||||||
|
angular.module('authentication', [])
|
||||||
|
.factory('Authorization', authenticationService)
|
||||||
|
.factory('CheckAccess', checkAccess)
|
||||||
|
.factory('IsAdmin', isAdmin)
|
||||||
|
.factory('Timer', timer);
|
||||||
@@ -9,8 +9,7 @@ import {templateUrl} from '../shared/template-url/template-url.factory';
|
|||||||
export default {
|
export default {
|
||||||
name: 'signIn',
|
name: 'signIn',
|
||||||
route: '/login',
|
route: '/login',
|
||||||
templateUrl: templateUrl('login/loginScreen'), //templateUrl('management-jobs/schedule/schedule'),
|
templateUrl: templateUrl('login/loginBackDrop'),
|
||||||
// controller: 'authenticationController',
|
|
||||||
resolve: {
|
resolve: {
|
||||||
features: ['FeaturesService', function(FeaturesService) {
|
features: ['FeaturesService', function(FeaturesService) {
|
||||||
return FeaturesService.get();
|
return FeaturesService.get();
|
||||||
|
|||||||
@@ -3,11 +3,6 @@
|
|||||||
.LoginModal-header {
|
.LoginModal-header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #171717;
|
background-color: #171717;
|
||||||
border-left: 1px solid #686868;
|
|
||||||
border-right: 1px solid #686868;
|
|
||||||
border-top: 1px solid #686868;
|
|
||||||
border-top-left-radius: 6px;
|
|
||||||
border-top-right-radius: 6px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.LoginModal-alert {
|
.LoginModal-alert {
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*************************************************/
|
*************************************************/
|
||||||
import authenticationController from './authentication.controller';
|
import authenticationController from './loginModal.controller';
|
||||||
|
|
||||||
/* jshint unused: vars */
|
/* jshint unused: vars */
|
||||||
export default
|
export default
|
||||||
@@ -13,7 +13,7 @@ export default
|
|||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
scope: true,
|
scope: true,
|
||||||
controller: authenticationController,
|
controller: authenticationController,
|
||||||
templateUrl: templateUrl('login/loginModal'),
|
templateUrl: templateUrl('login/loginModal/loginModal'),
|
||||||
link: function(scope, element, attrs) {
|
link: function(scope, element, attrs) {
|
||||||
// Display the login dialog
|
// Display the login dialog
|
||||||
$('#login-modal').modal({
|
$('#login-modal').modal({
|
||||||
@@ -17,12 +17,12 @@
|
|||||||
class="form-horizontal"
|
class="form-horizontal"
|
||||||
autocomplete="off" novalidate>
|
autocomplete="off" novalidate>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-offset-1
|
<label class="control-label
|
||||||
col-md-2 col-sm-offset-1 col-sm-2
|
col-md-2 col-sm-2
|
||||||
col-xs-3 prepend-asterisk
|
col-xs-3 prepend-asterisk
|
||||||
LoginModal-labelAsterisk">Username
|
LoginModal-labelAsterisk">Username
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-8 col-sm-8 col-xs-9">
|
<div class="col-md-10 col-sm-10 col-xs-9">
|
||||||
<input type="text" name="login_username"
|
<input type="text" name="login_username"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
ng-model="login_username"
|
ng-model="login_username"
|
||||||
@@ -38,12 +38,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-offset-1
|
<label class="control-label
|
||||||
col-md-2 col-sm-offset-1 col-sm-2
|
col-md-2 col-sm-2
|
||||||
col-xs-3 prepend-asterisk
|
col-xs-3 prepend-asterisk
|
||||||
LoginModal-labelAsterisk">Password
|
LoginModal-labelAsterisk">Password
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-8 col-sm-8 col-xs-9">
|
<div class="col-md-10 col-sm-10 col-xs-9">
|
||||||
<input type="password"
|
<input type="password"
|
||||||
name="login_password"
|
name="login_password"
|
||||||
id="login-password"
|
id="login-password"
|
||||||
13
awx/ui/client/src/login/loginModal/main.js
Normal file
13
awx/ui/client/src/login/loginModal/main.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
/*************************************************
|
||||||
|
* Copyright (c) 2015 Ansible, Inc.
|
||||||
|
*
|
||||||
|
* All Rights Reserved
|
||||||
|
*************************************************/
|
||||||
|
|
||||||
|
import thirdPartySignOn from './thirdPartySignOn/main';
|
||||||
|
|
||||||
|
import loginModalDirective from './loginModal.directive';
|
||||||
|
|
||||||
|
export default
|
||||||
|
angular.module('loginModal', [thirdPartySignOn.name])
|
||||||
|
.directive('loginModal', loginModalDirective);
|
||||||
11
awx/ui/client/src/login/loginModal/thirdPartySignOn/main.js
Normal file
11
awx/ui/client/src/login/loginModal/thirdPartySignOn/main.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/*************************************************
|
||||||
|
* Copyright (c) 2015 Ansible, Inc.
|
||||||
|
*
|
||||||
|
* All Rights Reserved
|
||||||
|
*************************************************/
|
||||||
|
|
||||||
|
import thirdPartySignOnDirective from './thirdPartySignOn.directive';
|
||||||
|
|
||||||
|
export default
|
||||||
|
angular.module('thirdPartySignOn', [])
|
||||||
|
.directive('thirdPartySignOn', thirdPartySignOnDirective);
|
||||||
@@ -12,7 +12,7 @@ export default
|
|||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
scope: true,
|
scope: true,
|
||||||
// controller: authenticationController,
|
// controller: authenticationController,
|
||||||
templateUrl: templateUrl('login/thirdPartySignOn'),
|
templateUrl: templateUrl('login/loginModal/thirdPartySignOn/thirdPartySignOn'),
|
||||||
link: function(scope, element, attrs) {
|
link: function(scope, element, attrs) {
|
||||||
// these vars will be set programatically once
|
// these vars will be set programatically once
|
||||||
// api stuff lands
|
// api stuff lands
|
||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
Authorization.logout();
|
Authorization.logout();
|
||||||
$location.path('/login');
|
$location.path('/login');
|
||||||
}],
|
}],
|
||||||
templateUrl: '/static/partials/blank.html', //templateUrl('management-jobs/schedule/schedule'),
|
templateUrl: '/static/partials/blank.html',
|
||||||
resolve: {
|
resolve: {
|
||||||
features: ['FeaturesService', function(FeaturesService) {
|
features: ['FeaturesService', function(FeaturesService) {
|
||||||
return FeaturesService.get();
|
return FeaturesService.get();
|
||||||
|
|||||||
@@ -4,29 +4,19 @@
|
|||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
import authenticationService from './authentication.service';
|
import authentication from './authenticationServices/main';
|
||||||
import checkAccess from './checkAccess.factory';
|
import loginModal from './loginModal/main';
|
||||||
import isAdmin from './isAdmin.factory';
|
|
||||||
import timer from './timer.factory';
|
|
||||||
import loginRoute from './login.route';
|
import loginRoute from './login.route';
|
||||||
import logoutRoute from './logout.route';
|
import logoutRoute from './logout.route';
|
||||||
import loginModalDirective from './loginModal.directive';
|
|
||||||
import thirdPartySignOnDirective from './thirdPartySignOn.directive';
|
|
||||||
|
|
||||||
export default
|
export default
|
||||||
angular.module('login', [
|
angular.module('login', [authentication.name, loginModal.name])
|
||||||
])
|
.config(['$routeProvider', function($routeProvider) {
|
||||||
.factory('Authorization', authenticationService)
|
var url = loginRoute.route;
|
||||||
.factory('CheckAccess', checkAccess)
|
delete loginRoute.route;
|
||||||
.factory('IsAdmin', isAdmin)
|
$routeProvider.when(url, loginRoute);
|
||||||
.factory('Timer', timer)
|
url = logoutRoute.route;
|
||||||
.directive('loginModal', loginModalDirective)
|
delete logoutRoute.route;
|
||||||
.directive('thirdPartySignOn', thirdPartySignOnDirective)
|
$routeProvider.when(url, logoutRoute);
|
||||||
.config(['$routeProvider', function($routeProvider) {
|
}]);
|
||||||
var url = loginRoute.route;
|
|
||||||
delete loginRoute.route;
|
|
||||||
$routeProvider.when(url, loginRoute);
|
|
||||||
url = logoutRoute.route;
|
|
||||||
delete logoutRoute.route;
|
|
||||||
$routeProvider.when(url, logoutRoute);
|
|
||||||
}]);
|
|
||||||
|
|||||||
Reference in New Issue
Block a user