mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
Move code under lib/ansible to js/shared
This commit is contained in:
parent
f28543ecae
commit
36a596b68f
@ -45,6 +45,17 @@ import {UsersList, UsersAdd, UsersEdit} from 'tower/controllers/Users';
|
||||
import {TeamsList, TeamsAdd, TeamsEdit} from 'tower/controllers/Teams';
|
||||
import {PermissionsAdd, PermissionsList, PermissionsEdit} from 'tower/controllers/Permissions';
|
||||
|
||||
import 'tower/shared/RestServices';
|
||||
import 'tower/shared/api-loader';
|
||||
import 'tower/shared/form-generator';
|
||||
import 'tower/shared/Modal';
|
||||
import 'tower/shared/prompt-dialog';
|
||||
import 'tower/shared/directives';
|
||||
import 'tower/shared/filters';
|
||||
import 'tower/shared/InventoryTree';
|
||||
import 'tower/shared/Timer';
|
||||
import 'tower/shared/Socket';
|
||||
|
||||
|
||||
|
||||
var tower = angular.module('Tower', [
|
||||
|
||||
@ -10,9 +10,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
import Utilities from './Utilities';
|
||||
|
||||
|
||||
angular.module('AuthService', ['ngCookies', 'Utilities'])
|
||||
export default
|
||||
angular.module('AuthService', ['ngCookies', Utilities.name])
|
||||
|
||||
.factory('Authorization', ['$http', '$rootScope', '$location', '$cookieStore', 'GetBasePath', 'Store',
|
||||
function ($http, $rootScope, $location, $cookieStore, GetBasePath, Store) {
|
||||
@ -155,4 +156,4 @@ angular.module('AuthService', ['ngCookies', 'Utilities'])
|
||||
}
|
||||
};
|
||||
}
|
||||
]);
|
||||
]);
|
||||
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export default
|
||||
angular.module('InventoryTree', ['Utilities', 'RestServices', 'GroupsHelper', 'PromptDialog'])
|
||||
|
||||
.factory('SortNodes', [
|
||||
@ -603,4 +603,4 @@ angular.module('InventoryTree', ['Utilities', 'RestServices', 'GroupsHelper', 'P
|
||||
}
|
||||
};
|
||||
}
|
||||
]);
|
||||
]);
|
||||
@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export default
|
||||
angular.module('ModalDialog', ['Utilities', 'ParseHelper'])
|
||||
|
||||
/**
|
||||
@ -51,9 +51,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
import AuthService from './AuthService';
|
||||
|
||||
|
||||
angular.module('RestServices', ['ngCookies', 'AuthService'])
|
||||
export default
|
||||
angular.module('RestServices', ['ngCookies', AuthService.name])
|
||||
.factory('Rest', ['$http', '$rootScope', '$cookieStore', '$q', 'Authorization',
|
||||
function ($http, $rootScope, $cookieStore, $q, Authorization) {
|
||||
return {
|
||||
@ -267,4 +268,4 @@ angular.module('RestServices', ['ngCookies', 'AuthService'])
|
||||
}
|
||||
};
|
||||
}
|
||||
]);
|
||||
]);
|
||||
@ -19,6 +19,7 @@
|
||||
* @methodOf lib.ansible.function:Socket
|
||||
* @description
|
||||
*/
|
||||
export default
|
||||
angular.module('SocketIO', ['AuthService', 'Utilities'])
|
||||
|
||||
.factory('Socket', ['$rootScope', '$location', '$log', 'Authorization', 'Store', function ($rootScope, $location, $log, Authorization, Store) {
|
||||
@ -18,6 +18,7 @@
|
||||
* @methodOf lib.ansible.function:Timer
|
||||
* @description
|
||||
*/
|
||||
export default
|
||||
angular.module('TimerService', ['ngCookies', 'Utilities'])
|
||||
.factory('Timer', ['$rootScope', '$cookieStore', '$location', 'GetBasePath', 'Empty',
|
||||
function ($rootScope, $cookieStore) {
|
||||
@ -65,4 +66,4 @@ angular.module('TimerService', ['ngCookies', 'Utilities'])
|
||||
}
|
||||
};
|
||||
}
|
||||
]);
|
||||
]);
|
||||
@ -14,6 +14,7 @@
|
||||
|
||||
|
||||
|
||||
export default
|
||||
angular.module('Utilities', ['RestServices', 'Utilities'])
|
||||
|
||||
/**
|
||||
@ -19,6 +19,7 @@
|
||||
|
||||
|
||||
|
||||
export default
|
||||
angular.module('ApiLoader', ['Utilities'])
|
||||
|
||||
.factory('LoadBasePaths', ['$http', '$rootScope', 'Store', 'ProcessErrors',
|
||||
@ -72,4 +73,4 @@ angular.module('ApiLoader', ['Utilities'])
|
||||
return $rootScope.defaultUrls[set];
|
||||
};
|
||||
}
|
||||
]);
|
||||
]);
|
||||
@ -13,6 +13,9 @@
|
||||
|
||||
/* global chkPass:false */
|
||||
|
||||
import {chkPass} from './pwdmeter';
|
||||
|
||||
export default
|
||||
angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'JobsHelper'])
|
||||
|
||||
// awpassmatch: Add to password_confirm field. Will test if value
|
||||
@ -11,6 +11,7 @@
|
||||
|
||||
|
||||
|
||||
export default
|
||||
angular.module('AWFilters', [])
|
||||
|
||||
//
|
||||
@ -91,4 +92,4 @@ angular.module('AWFilters', [])
|
||||
}
|
||||
return input;
|
||||
};
|
||||
}]);
|
||||
}]);
|
||||
@ -132,9 +132,11 @@
|
||||
* Applying CodeMirror to the text area is handled by ParseTypeChange() found in helpers/Parse.js. Within the controller will be a call to ParseTypeChange that creates the CodeMirror object and sets up the required $scope methods for handles getting, settting and type conversion.
|
||||
*/
|
||||
|
||||
import GeneratorHelpers from './generator-helpers';
|
||||
import ListGenerator from './list-generator';
|
||||
|
||||
|
||||
angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator'])
|
||||
export default
|
||||
angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', ListGenerator.name])
|
||||
|
||||
.factory('GenerateForm', ['$rootScope', '$location', '$compile', 'GenerateList', 'SearchWidget', 'PaginateWidget', 'Attr',
|
||||
'Icon', 'Column', 'NavigationLink', 'HelpCollapse', 'Button', 'DropDown', 'Empty', 'SelectIcon', 'Store',
|
||||
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export default
|
||||
angular.module('GeneratorHelpers', [])
|
||||
|
||||
.factory('Attr', function () {
|
||||
@ -97,7 +97,7 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export default
|
||||
angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
.factory('GenerateList', ['$location', '$compile', '$rootScope', 'SearchWidget', 'PaginateWidget', 'Attr', 'Icon',
|
||||
'Column', 'DropDown', 'NavigationLink', 'Button', 'SelectIcon', 'Breadcrumbs',
|
||||
@ -25,6 +25,8 @@
|
||||
* @methodOf lib.ansible.function:prompt-dialog
|
||||
* @description discuss difference b/t this and other modals
|
||||
*/
|
||||
|
||||
export default
|
||||
angular.module('PromptDialog', ['Utilities'])
|
||||
.factory('Prompt', ['$sce',
|
||||
function ($sce) {
|
||||
@ -42,7 +42,7 @@ String.prototype.strReverse = function () {
|
||||
|
||||
var nScore = 0;
|
||||
|
||||
function chkPass(pwd) {
|
||||
export function chkPass(pwd) {
|
||||
// Simultaneous variable declaration and value assignment aren't supported in IE apparently
|
||||
// so I'm forced to assign the same value individually per var to support a crappy browser *sigh*
|
||||
var nLength = 0,
|
||||
@ -324,4 +324,4 @@ function chkPass(pwd) {
|
||||
}
|
||||
|
||||
return nScore;
|
||||
}
|
||||
}
|
||||
9
awx/ui/static/js/system-status/index.js
Normal file
9
awx/ui/static/js/system-status/index.js
Normal file
@ -0,0 +1,9 @@
|
||||
import conversionService from './conversions.service'
|
||||
import smartStatusGraph from './smart-status.directive'
|
||||
import controller from './smart-status.controller'
|
||||
|
||||
export default
|
||||
angular.module('systemStatus', [])
|
||||
.service('conversions', conversionService)
|
||||
.directive('smartStatusGraph', smartStatusGraph)
|
||||
.controller('smartStatusLoad', controller);
|
||||
Loading…
x
Reference in New Issue
Block a user