From d9aa35566b218d055e8c7118f419375b6ac05dac Mon Sep 17 00:00:00 2001 From: Joe Fiorini Date: Mon, 30 Mar 2015 10:16:11 -0400 Subject: [PATCH] Replace string usage of lib/ansible path --- .../static/js/controllers/Authentication.js | 4 +- awx/ui/static/js/shared/AuthService.js | 2 +- awx/ui/static/js/shared/InventoryTree.js | 2 +- awx/ui/static/js/shared/Modal.js | 6 +- awx/ui/static/js/shared/RestServices.js | 8 +-- awx/ui/static/js/shared/Socket.js | 6 +- awx/ui/static/js/shared/Timer.js | 6 +- awx/ui/static/js/shared/Utilities.js | 58 +++++++++---------- awx/ui/static/js/shared/api-loader.js | 4 +- awx/ui/static/js/shared/directives.js | 4 +- awx/ui/static/js/shared/filters.js | 2 +- awx/ui/static/js/shared/form-generator.js | 4 +- awx/ui/static/js/shared/generator-helpers.js | 2 +- .../list-generator/list-generator.factory.js | 6 +- awx/ui/static/js/shared/prompt-dialog.js | 6 +- awx/ui/static/js/shared/pwdmeter.js | 2 +- 16 files changed, 61 insertions(+), 61 deletions(-) diff --git a/awx/ui/static/js/controllers/Authentication.js b/awx/ui/static/js/controllers/Authentication.js index 8460ff2df6..35d50e1c66 100644 --- a/awx/ui/static/js/controllers/Authentication.js +++ b/awx/ui/static/js/controllers/Authentication.js @@ -17,7 +17,7 @@ * Tower (app.js) verifies the user is authenticated and that the user session is not expired. If either condition is not true, * the user is redirected to /#/login and the Authentication controller. * - * Methods for checking the session state are found in [lib/ansible/AuthService.js](/static/docs/api/lib.ansible.function:AuthService), which is referenced here as Authorization. + * Methods for checking the session state are found in [js/shared/AuthService.js](/static/docs/api/shared.function:AuthService), which is referenced here as Authorization. * * #Login Modal Dialog * @@ -44,7 +44,7 @@ * * - Call Authorization.retrieveToken(username, password) - sends a POST request to /api/v1/authtoken to get a new token value. * - Call Authorization.setToken(token, expires) to store the token and exipration time in a session cookie. - * - Start the expiration timer by calling the init() method of [lib/ansible/Timer.js](/static/docs/api/lib.ansible.function:Timer) + * - Start the expiration timer by calling the init() method of [js/shared/Timer.js](/static/docs/api/shared.function:Timer) * - Get user informaton by calling Authorization.getUser() - sends a GET request to /api/v1/me * - Store user information in the session cookie by calling Authorization.setUser(). * - Get the Tower license by calling Authorization.getLicense() - sends a GET request to /api/vi/config diff --git a/awx/ui/static/js/shared/AuthService.js b/awx/ui/static/js/shared/AuthService.js index 255fb99b9f..717122a01c 100644 --- a/awx/ui/static/js/shared/AuthService.js +++ b/awx/ui/static/js/shared/AuthService.js @@ -3,7 +3,7 @@ */ /** * @ngdoc function - * @name lib.ansible.function:AuthService + * @name shared.function:AuthService * @description AuthService.js * * User authentication functions diff --git a/awx/ui/static/js/shared/InventoryTree.js b/awx/ui/static/js/shared/InventoryTree.js index 6b464010f1..eecc1bef51 100644 --- a/awx/ui/static/js/shared/InventoryTree.js +++ b/awx/ui/static/js/shared/InventoryTree.js @@ -4,7 +4,7 @@ */ /** * @ngdoc function - * @name lib.ansible.function:inventoryTree + * @name shared.function:inventoryTree * @description * InventoryTree.js * diff --git a/awx/ui/static/js/shared/Modal.js b/awx/ui/static/js/shared/Modal.js index 6466e2b617..e0fcc028d5 100644 --- a/awx/ui/static/js/shared/Modal.js +++ b/awx/ui/static/js/shared/Modal.js @@ -4,7 +4,7 @@ */ /** * @ngdoc function - * @name lib.ansible.function:Modal + * @name shared.function:Modal * @description * Modal.js * @@ -19,8 +19,8 @@ angular.module('ModalDialog', ['Utilities', 'ParseHelper']) /** * @ngdoc method - * @name lib.ansible.function:Modal#CreateDialog - * @methodOf lib.ansible.function:Modal + * @name shared.function:Modal#CreateDialog + * @methodOf shared.function:Modal * @description * CreateDialog({ * id: - id attribute value of the target DOM element diff --git a/awx/ui/static/js/shared/RestServices.js b/awx/ui/static/js/shared/RestServices.js index 67311c3f3b..519f17e3e5 100644 --- a/awx/ui/static/js/shared/RestServices.js +++ b/awx/ui/static/js/shared/RestServices.js @@ -3,7 +3,7 @@ */ /** * @ngdoc function - * @name lib.ansible.function:RestServices + * @name shared.function:RestServices * @description * * A wrapper for angular's $http service. Post user authentication API requests should go through Rest rather than directly using $http. The goal is to decouple @@ -20,7 +20,7 @@ * /api/v1/credentials/?name=SSH Key&kind=ssh * ``` * - * When constructing the URL be sure to use the GetBasePath() method found in lib/ansible/Utilities.js. GetBasePath uses the response objects from /api and + * When constructing the URL be sure to use the GetBasePath() method found in js/shared/Utilities.js. GetBasePath uses the response objects from /api and * /api//to construct the base portion of the path. This way the API version number and base endpoints are not hard-coded within the application. * * #Action methods: .get(), put(), .post(), .destroy(), options() @@ -39,13 +39,13 @@ * // review the data object and take action * }) * .error(function(status, data) { - * // handle the error - typically a call to ProcessErrors() found in lib/ansible/Utitlties.js + * // handle the error - typically a call to ProcessErrors() found in js/shared/Utitlties.js * }); * ``` * * ##Options Reqeusts * - * options() requests are used by the GetChoices() method found in lib/ansible/Utilities.js. Sending an Options request to an API endpoint returns an object that includes + * options() requests are used by the GetChoices() method found in js/shared/Utilities.js. Sending an Options request to an API endpoint returns an object that includes * possible values for fields that are typically presented in the UI as dropdowns or <select> elements. GetChoices will inspect the response object for the request * field and return an array of { label: 'Choice Label', value: 'choice 1' } objects. * diff --git a/awx/ui/static/js/shared/Socket.js b/awx/ui/static/js/shared/Socket.js index b90f5f36cc..1f01588de8 100644 --- a/awx/ui/static/js/shared/Socket.js +++ b/awx/ui/static/js/shared/Socket.js @@ -3,7 +3,7 @@ */ /** * @ngdoc function - * @name lib.ansible.function:Socket + * @name shared.function:Socket * @description * Socket.js * @@ -15,8 +15,8 @@ /** * @ngdoc method - * @name lib.ansible.function:Socket#SocketIO - * @methodOf lib.ansible.function:Socket + * @name shared.function:Socket#SocketIO + * @methodOf shared.function:Socket * @description */ export default diff --git a/awx/ui/static/js/shared/Timer.js b/awx/ui/static/js/shared/Timer.js index f64e6b5469..42ce09df07 100644 --- a/awx/ui/static/js/shared/Timer.js +++ b/awx/ui/static/js/shared/Timer.js @@ -3,7 +3,7 @@ */ /** * @ngdoc function - * @name lib.ansible.function:Timer + * @name shared.function:Timer * @description * Timer.js * @@ -14,8 +14,8 @@ /** * @ngdoc method - * @name lib.ansible.function:Timer#TimerService - * @methodOf lib.ansible.function:Timer + * @name shared.function:Timer#TimerService + * @methodOf shared.function:Timer * @description */ export default diff --git a/awx/ui/static/js/shared/Utilities.js b/awx/ui/static/js/shared/Utilities.js index 22f4e67055..94e8cb9e54 100644 --- a/awx/ui/static/js/shared/Utilities.js +++ b/awx/ui/static/js/shared/Utilities.js @@ -4,7 +4,7 @@ */ /** * @ngdoc function - * @name lib.ansible.function:Utilities + * @name shared.function:Utilities * @description * Utility functions * @@ -19,8 +19,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#ClearScope - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#ClearScope + * @methodOf shared.function:Utilities * @description * Place to remove things that might be lingering from a prior tab or view. * This used to destroy the scope, but that causes issues in angular 1.2.x @@ -56,8 +56,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#Empty - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#Empty + * @methodOf shared.function:Utilities * @description Empty() * * Test if a value is 'empty'. Returns true if val is null | '' | undefined. @@ -74,8 +74,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#ToggleClass - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#ToggleClass + * @methodOf shared.function:Utilities * @description */ .factory('ToggleClass', function () { @@ -92,8 +92,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#Alert - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#Alert + * @methodOf shared.function:Utilities * @description Pass in the header and message you want displayed on TB modal dialog found in index.html. * Assumes an #id of 'alert-modal'. Pass in an optional TB alert class (i.e. alert-danger, alert-success, * alert-info...). Pass an optional function(){}, if you want a specific action to occur when user @@ -166,8 +166,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#ProcessErrors - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#ProcessErrors + * @methodOf shared.function:Utilities * @description For handling errors that are returned from the API */ .factory('ProcessErrors', ['$rootScope', '$cookieStore', '$log', '$location', 'Alert', 'Wait', @@ -348,8 +348,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#HelpDialog - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#HelpDialog + * @methodOf shared.function:Utilities * @description Display a help dialog * * HelpDialog({ defn: }) @@ -537,8 +537,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#ReturnToCaller - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#ReturnToCaller + * @methodOf shared.function:Utilities * @description * Split the current path by '/' and use the array elements from 0 up to and * including idx as the new path. If no idx value supplied, use 0 to length - 1. @@ -562,8 +562,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#FormatDate - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#FormatDate + * @methodOf shared.function:Utilities * @description * Wrapper for data filter- an attempt to insure all dates display in * the same format. Pass in date object or string. See: http://docs.angularjs.org/api/ng.filter:date @@ -578,8 +578,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#Wait - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#Wait + * @methodOf shared.function:Utilities * @description * Display a spinning icon in the center of the screen to freeze the * UI while waiting on async things to complete (i.e. API calls). @@ -661,8 +661,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#GetChoices - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#GetChoices + * @methodOf shared.function:Utilities * @description Make an Options call to the API and retrieve dropdown options * GetChoices({ * scope: Parent $scope @@ -716,8 +716,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#Find - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#Find + * @methodOf shared.function:Utilities * @description * Search an array of objects, returning the matchting object or null * @@ -747,8 +747,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#DebugForm - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#DebugForm + * @methodOf shared.function:Utilities * @description * DebugForm({ form:
, scope: }); * @@ -782,8 +782,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#Store - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#Store + * @methodOf shared.function:Utilities * @description Store * * Wrapper for local storage. All local storage requests flow through here so that we can @@ -813,8 +813,8 @@ angular.module('Utilities', ['RestServices', 'Utilities']) /** * @ngdoc method - * @name lib.ansible.function:Utilities#ApplyEllipsis - * @methodOf lib.ansible.function:Utilities + * @name shared.function:Utilities#ApplyEllipsis + * @methodOf shared.function:Utilities * @description * ApplyEllipsis() * discuss significance diff --git a/awx/ui/static/js/shared/api-loader.js b/awx/ui/static/js/shared/api-loader.js index 7cb8c83662..cd63fb1676 100644 --- a/awx/ui/static/js/shared/api-loader.js +++ b/awx/ui/static/js/shared/api-loader.js @@ -5,13 +5,13 @@ */ /** * @ngdoc overview - * @name lib.ansible + * @name shared * @description lib files * */ /** * @ngdoc function - * @name lib.ansible.function:api-loader + * @name shared.function:api-loader * @description Read /api and /api/X to discover all the base paths needed * to access the primary model objects. * diff --git a/awx/ui/static/js/shared/directives.js b/awx/ui/static/js/shared/directives.js index 9fa121b43c..c131dc1a1f 100644 --- a/awx/ui/static/js/shared/directives.js +++ b/awx/ui/static/js/shared/directives.js @@ -3,7 +3,7 @@ */ /** * @ngdoc function - * @name lib.ansible.function:directives + * @name shared.function:directives * @description * Custom directives for form validation * @@ -743,7 +743,7 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job // // chkPass // - // Enables use of lib/ansible/pwdmeter.js to check strengh of passwords. + // Enables use of js/shared/pwdmeter.js to check strengh of passwords. // See controllers/Users.js for example. // .directive('chkPass', [ function() { diff --git a/awx/ui/static/js/shared/filters.js b/awx/ui/static/js/shared/filters.js index 0234439ac5..dca6168266 100644 --- a/awx/ui/static/js/shared/filters.js +++ b/awx/ui/static/js/shared/filters.js @@ -3,7 +3,7 @@ */ /** * @ngdoc function - * @name lib.ansible.function:filters + * @name shared.function:filters * @description * Custom filters * diff --git a/awx/ui/static/js/shared/form-generator.js b/awx/ui/static/js/shared/form-generator.js index 516b478081..ce17e929ed 100644 --- a/awx/ui/static/js/shared/form-generator.js +++ b/awx/ui/static/js/shared/form-generator.js @@ -3,7 +3,7 @@ */ /** * @ngdoc function - * @name lib.ansible.function:form-generator + * @name shared.function:form-generator * @description * * Generate form HTML from a form object. Form objects are found in /forms. @@ -97,7 +97,7 @@ * | hasShowInputButton (sensitive type only) | This creates a button next to the input that toggles the input as text and password types. | * The form object contains a buttons object for defining any buttons to be included in the generated HTML. Generally all forms will have a Reset and a Submit button. If no buttons should be generated define buttons as an empty object, or set the showButtons option to false. * - * The icon used for the button is determined by SelectIcon() found in lib/ansible/generator-helpers.js. + * The icon used for the button is determined by SelectIcon() found in js/shared/generator-helpers.js. * * | Attribute | Description | * | --------- | ----------- | diff --git a/awx/ui/static/js/shared/generator-helpers.js b/awx/ui/static/js/shared/generator-helpers.js index a68844e7a7..25f7324833 100644 --- a/awx/ui/static/js/shared/generator-helpers.js +++ b/awx/ui/static/js/shared/generator-helpers.js @@ -3,7 +3,7 @@ */ /** * @ngdoc function - * @name lib.ansible.function:generator-helpers + * @name shared.function:generator-helpers * @description * GeneratorHelpers * diff --git a/awx/ui/static/js/shared/list-generator/list-generator.factory.js b/awx/ui/static/js/shared/list-generator/list-generator.factory.js index 10401317cb..ed320a23ba 100644 --- a/awx/ui/static/js/shared/list-generator/list-generator.factory.js +++ b/awx/ui/static/js/shared/list-generator/list-generator.factory.js @@ -3,7 +3,7 @@ */ /** * @ngdoc function - * @name lib.ansible.function:list-generator + * @name shared.function:list-generator * @description * #ListGenerator * @@ -84,7 +84,7 @@ * | 'class' | Set to a string containing any CSS classes to add to the <a> element. | * | dataPlacement | Set to the Bootstrip tooltip placement - right, left, top, bottom, etc. | * | dataTipWatch | Set to the $scope variable that contains the text and HTML to display in the tooltip. A $scope.$watch will be added to the variable so that anytime its value changes the tooltip will change. | - * | iconClass | By default the CSS icon class is set by the SelectIcon() method in lib/ansible/generator-helpers.js. The icon is based on the action name. Use iconClass to override the default value. | + * | iconClass | By default the CSS icon class is set by the SelectIcon() method in js/shared/generator-helpers.js. The icon is based on the action name. Use iconClass to override the default value. | * | mode | One of 'all' or 'edit'. Will generally be 'all'. Note that field actions are not displayed when the list is in 'lookup' mode. | * | ngClass | Adds the ng-class directive. Set to the JS expressino that ng-class will evaluate. | * | ngShow | Adds the ng-show directive. Set to the JS expression that ng-show will evaluate. | @@ -92,7 +92,7 @@ * ##Actions * * A list can contain an actions object. The actions object contains an object for each action button displayed in the top-right corner of the list container. An action can have the same - * attributes as an action defined in fieldAction. Both are actions. Clicking on an action evaluates the JS found in the ngClick attribute. In both cases icon is generated automatically by the SelectIcon() method in lib/ansible/generator-helpers.js. + * attributes as an action defined in fieldAction. Both are actions. Clicking on an action evaluates the JS found in the ngClick attribute. In both cases icon is generated automatically by the SelectIcon() method in js/shared/generator-helpers.js. * The real difference is that an <a> element is used to generate fieldAction items while a <button> element is used for action items. */ diff --git a/awx/ui/static/js/shared/prompt-dialog.js b/awx/ui/static/js/shared/prompt-dialog.js index ffabfff727..210d82f070 100644 --- a/awx/ui/static/js/shared/prompt-dialog.js +++ b/awx/ui/static/js/shared/prompt-dialog.js @@ -3,7 +3,7 @@ */ /** * @ngdoc function - * @name lib.ansible.function:prompt-dialog + * @name shared.function:prompt-dialog * @description * PromptDialog * Prompt the user with a Yes/No dialog to confirm an action such @@ -21,8 +21,8 @@ /** * @ngdoc method -* @name lib.ansible.function:prompt-dialog#PromptDialog -* @methodOf lib.ansible.function:prompt-dialog +* @name shared.function:prompt-dialog#PromptDialog +* @methodOf shared.function:prompt-dialog * @description discuss difference b/t this and other modals */ diff --git a/awx/ui/static/js/shared/pwdmeter.js b/awx/ui/static/js/shared/pwdmeter.js index 575205b223..66049eb8fa 100644 --- a/awx/ui/static/js/shared/pwdmeter.js +++ b/awx/ui/static/js/shared/pwdmeter.js @@ -24,7 +24,7 @@ **/ /** * @ngdoc function - * @name lib.ansible.function:pwdmeter + * @name shared.function:pwdmeter * @description ** CLH 09/05/13 - Set required strength in config.js ** 02/10/14 - Applied jsHint