mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
Move code under lib/ansible to js/shared
This commit is contained in:
@@ -45,6 +45,17 @@ import {UsersList, UsersAdd, UsersEdit} from 'tower/controllers/Users';
|
|||||||
import {TeamsList, TeamsAdd, TeamsEdit} from 'tower/controllers/Teams';
|
import {TeamsList, TeamsAdd, TeamsEdit} from 'tower/controllers/Teams';
|
||||||
import {PermissionsAdd, PermissionsList, PermissionsEdit} from 'tower/controllers/Permissions';
|
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', [
|
var tower = angular.module('Tower', [
|
||||||
|
|||||||
@@ -10,9 +10,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import Utilities from './Utilities';
|
||||||
|
|
||||||
|
export default
|
||||||
angular.module('AuthService', ['ngCookies', 'Utilities'])
|
angular.module('AuthService', ['ngCookies', Utilities.name])
|
||||||
|
|
||||||
.factory('Authorization', ['$http', '$rootScope', '$location', '$cookieStore', 'GetBasePath', 'Store',
|
.factory('Authorization', ['$http', '$rootScope', '$location', '$cookieStore', 'GetBasePath', 'Store',
|
||||||
function ($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'])
|
angular.module('InventoryTree', ['Utilities', 'RestServices', 'GroupsHelper', 'PromptDialog'])
|
||||||
|
|
||||||
.factory('SortNodes', [
|
.factory('SortNodes', [
|
||||||
@@ -603,4 +603,4 @@ angular.module('InventoryTree', ['Utilities', 'RestServices', 'GroupsHelper', 'P
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
export default
|
||||||
angular.module('ModalDialog', ['Utilities', 'ParseHelper'])
|
angular.module('ModalDialog', ['Utilities', 'ParseHelper'])
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -51,9 +51,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import AuthService from './AuthService';
|
||||||
|
|
||||||
|
export default
|
||||||
angular.module('RestServices', ['ngCookies', 'AuthService'])
|
angular.module('RestServices', ['ngCookies', AuthService.name])
|
||||||
.factory('Rest', ['$http', '$rootScope', '$cookieStore', '$q', 'Authorization',
|
.factory('Rest', ['$http', '$rootScope', '$cookieStore', '$q', 'Authorization',
|
||||||
function ($http, $rootScope, $cookieStore, $q, Authorization) {
|
function ($http, $rootScope, $cookieStore, $q, Authorization) {
|
||||||
return {
|
return {
|
||||||
@@ -267,4 +268,4 @@ angular.module('RestServices', ['ngCookies', 'AuthService'])
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
* @methodOf lib.ansible.function:Socket
|
* @methodOf lib.ansible.function:Socket
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
|
export default
|
||||||
angular.module('SocketIO', ['AuthService', 'Utilities'])
|
angular.module('SocketIO', ['AuthService', 'Utilities'])
|
||||||
|
|
||||||
.factory('Socket', ['$rootScope', '$location', '$log', 'Authorization', 'Store', function ($rootScope, $location, $log, Authorization, Store) {
|
.factory('Socket', ['$rootScope', '$location', '$log', 'Authorization', 'Store', function ($rootScope, $location, $log, Authorization, Store) {
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
* @methodOf lib.ansible.function:Timer
|
* @methodOf lib.ansible.function:Timer
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
|
export default
|
||||||
angular.module('TimerService', ['ngCookies', 'Utilities'])
|
angular.module('TimerService', ['ngCookies', 'Utilities'])
|
||||||
.factory('Timer', ['$rootScope', '$cookieStore', '$location', 'GetBasePath', 'Empty',
|
.factory('Timer', ['$rootScope', '$cookieStore', '$location', 'GetBasePath', 'Empty',
|
||||||
function ($rootScope, $cookieStore) {
|
function ($rootScope, $cookieStore) {
|
||||||
@@ -65,4 +66,4 @@ angular.module('TimerService', ['ngCookies', 'Utilities'])
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export default
|
||||||
angular.module('Utilities', ['RestServices', 'Utilities'])
|
angular.module('Utilities', ['RestServices', 'Utilities'])
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export default
|
||||||
angular.module('ApiLoader', ['Utilities'])
|
angular.module('ApiLoader', ['Utilities'])
|
||||||
|
|
||||||
.factory('LoadBasePaths', ['$http', '$rootScope', 'Store', 'ProcessErrors',
|
.factory('LoadBasePaths', ['$http', '$rootScope', 'Store', 'ProcessErrors',
|
||||||
@@ -72,4 +73,4 @@ angular.module('ApiLoader', ['Utilities'])
|
|||||||
return $rootScope.defaultUrls[set];
|
return $rootScope.defaultUrls[set];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
@@ -13,6 +13,9 @@
|
|||||||
|
|
||||||
/* global chkPass:false */
|
/* global chkPass:false */
|
||||||
|
|
||||||
|
import {chkPass} from './pwdmeter';
|
||||||
|
|
||||||
|
export default
|
||||||
angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'JobsHelper'])
|
angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'JobsHelper'])
|
||||||
|
|
||||||
// awpassmatch: Add to password_confirm field. Will test if value
|
// awpassmatch: Add to password_confirm field. Will test if value
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export default
|
||||||
angular.module('AWFilters', [])
|
angular.module('AWFilters', [])
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -91,4 +92,4 @@ angular.module('AWFilters', [])
|
|||||||
}
|
}
|
||||||
return input;
|
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.
|
* 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';
|
||||||
|
|
||||||
|
export default
|
||||||
angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator'])
|
angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', ListGenerator.name])
|
||||||
|
|
||||||
.factory('GenerateForm', ['$rootScope', '$location', '$compile', 'GenerateList', 'SearchWidget', 'PaginateWidget', 'Attr',
|
.factory('GenerateForm', ['$rootScope', '$location', '$compile', 'GenerateList', 'SearchWidget', 'PaginateWidget', 'Attr',
|
||||||
'Icon', 'Column', 'NavigationLink', 'HelpCollapse', 'Button', 'DropDown', 'Empty', 'SelectIcon', 'Store',
|
'Icon', 'Column', 'NavigationLink', 'HelpCollapse', 'Button', 'DropDown', 'Empty', 'SelectIcon', 'Store',
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
export default
|
||||||
angular.module('GeneratorHelpers', [])
|
angular.module('GeneratorHelpers', [])
|
||||||
|
|
||||||
.factory('Attr', function () {
|
.factory('Attr', function () {
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
export default
|
||||||
angular.module('ListGenerator', ['GeneratorHelpers'])
|
angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||||
.factory('GenerateList', ['$location', '$compile', '$rootScope', 'SearchWidget', 'PaginateWidget', 'Attr', 'Icon',
|
.factory('GenerateList', ['$location', '$compile', '$rootScope', 'SearchWidget', 'PaginateWidget', 'Attr', 'Icon',
|
||||||
'Column', 'DropDown', 'NavigationLink', 'Button', 'SelectIcon', 'Breadcrumbs',
|
'Column', 'DropDown', 'NavigationLink', 'Button', 'SelectIcon', 'Breadcrumbs',
|
||||||
@@ -25,6 +25,8 @@
|
|||||||
* @methodOf lib.ansible.function:prompt-dialog
|
* @methodOf lib.ansible.function:prompt-dialog
|
||||||
* @description discuss difference b/t this and other modals
|
* @description discuss difference b/t this and other modals
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
export default
|
||||||
angular.module('PromptDialog', ['Utilities'])
|
angular.module('PromptDialog', ['Utilities'])
|
||||||
.factory('Prompt', ['$sce',
|
.factory('Prompt', ['$sce',
|
||||||
function ($sce) {
|
function ($sce) {
|
||||||
@@ -42,7 +42,7 @@ String.prototype.strReverse = function () {
|
|||||||
|
|
||||||
var nScore = 0;
|
var nScore = 0;
|
||||||
|
|
||||||
function chkPass(pwd) {
|
export function chkPass(pwd) {
|
||||||
// Simultaneous variable declaration and value assignment aren't supported in IE apparently
|
// 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*
|
// so I'm forced to assign the same value individually per var to support a crappy browser *sigh*
|
||||||
var nLength = 0,
|
var nLength = 0,
|
||||||
@@ -324,4 +324,4 @@ function chkPass(pwd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return nScore;
|
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);
|
||||||
Reference in New Issue
Block a user