From 54a92b5b5ef23b477432deeb1018d370d5d24dff Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Thu, 6 Apr 2017 16:49:09 -0400 Subject: [PATCH] Normalized inventory list/form. This was the way it used to be --- .../inventories/add/inventory-add.controller.js | 6 +++--- .../edit/inventory-edit.controller.js | 6 +++--- .../list/inventory-list.controller.js | 6 +++--- awx/ui/client/src/inventories/main.js | 16 ++++++++-------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/awx/ui/client/src/inventories/add/inventory-add.controller.js b/awx/ui/client/src/inventories/add/inventory-add.controller.js index 19da6885dd..02e608af6c 100644 --- a/awx/ui/client/src/inventories/add/inventory-add.controller.js +++ b/awx/ui/client/src/inventories/add/inventory-add.controller.js @@ -11,7 +11,7 @@ */ function InventoriesAdd($scope, $location, - GenerateForm, InventoriesForm, rbacUiControlService, Rest, Alert, ProcessErrors, + GenerateForm, InventoryForm, rbacUiControlService, Rest, Alert, ProcessErrors, ClearScope, GetBasePath, ParseTypeChange, Wait, ToJSON, $state) { @@ -34,7 +34,7 @@ function InventoriesAdd($scope, $location, // Inject dynamic view var defaultUrl = GetBasePath('inventory'), - form = InventoriesForm; + form = InventoryForm; init(); @@ -98,7 +98,7 @@ function InventoriesAdd($scope, $location, } export default ['$scope', '$location', - 'GenerateForm', 'InventoriesForm', 'rbacUiControlService', 'Rest', 'Alert', + 'GenerateForm', 'InventoryForm', 'rbacUiControlService', 'Rest', 'Alert', 'ProcessErrors', 'ClearScope', 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', '$state', InventoriesAdd ]; diff --git a/awx/ui/client/src/inventories/edit/inventory-edit.controller.js b/awx/ui/client/src/inventories/edit/inventory-edit.controller.js index c08f101ce0..69ac5ccec3 100644 --- a/awx/ui/client/src/inventories/edit/inventory-edit.controller.js +++ b/awx/ui/client/src/inventories/edit/inventory-edit.controller.js @@ -11,13 +11,13 @@ */ function InventoriesEdit($scope, $location, - $stateParams, InventoriesForm, Rest, ProcessErrors, + $stateParams, InventoryForm, Rest, ProcessErrors, ClearScope, GetBasePath, ParseTypeChange, Wait, ToJSON, ParseVariableString, $state, OrgAdminLookup) { // Inject dynamic view var defaultUrl = GetBasePath('inventory'), - form = InventoriesForm, + form = InventoryForm, inventory_id = $stateParams.inventory_id, master = {}, fld, json_data, data; @@ -129,7 +129,7 @@ function InventoriesEdit($scope, $location, } export default ['$scope', '$location', - '$stateParams', 'InventoriesForm', 'Rest', + '$stateParams', 'InventoryForm', 'Rest', 'ProcessErrors', 'ClearScope', 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', 'ParseVariableString', '$state', 'OrgAdminLookup', InventoriesEdit, diff --git a/awx/ui/client/src/inventories/list/inventory-list.controller.js b/awx/ui/client/src/inventories/list/inventory-list.controller.js index 6a2f0e261b..2f43f48100 100644 --- a/awx/ui/client/src/inventories/list/inventory-list.controller.js +++ b/awx/ui/client/src/inventories/list/inventory-list.controller.js @@ -11,10 +11,10 @@ */ function InventoriesList($scope, $rootScope, $location, - $compile, $filter, Rest, InventoriesList, Prompt, + $compile, $filter, Rest, InventoryList, Prompt, ProcessErrors, GetBasePath, Wait, Find, Empty, $state, rbacUiControlService, Dataset) { - let list = InventoriesList, + let list = InventoryList, defaultUrl = GetBasePath('inventory'); init(); @@ -303,6 +303,6 @@ function InventoriesList($scope, $rootScope, $location, } export default ['$scope', '$rootScope', '$location', - '$compile', '$filter', 'Rest', 'InventoriesList', + '$compile', '$filter', 'Rest', 'InventoryList', 'Prompt', 'ProcessErrors', 'GetBasePath', 'Wait', 'Find', 'Empty', '$state', 'rbacUiControlService', 'Dataset', InventoriesList ]; diff --git a/awx/ui/client/src/inventories/main.js b/awx/ui/client/src/inventories/main.js index 1cc57ff9a1..794cf76a5e 100644 --- a/awx/ui/client/src/inventories/main.js +++ b/awx/ui/client/src/inventories/main.js @@ -10,8 +10,8 @@ import inventoryEdit from './edit/main'; import inventoryList from './list/main'; import { templateUrl } from '../shared/template-url/template-url.factory'; import { N_ } from '../i18n'; -import InventoriesList from './inventory.list'; -import InventoriesForm from './inventory.form'; +import InventoryList from './inventory.list'; +import InventoryForm from './inventory.form'; export default angular.module('inventory', [ host.name, @@ -19,8 +19,8 @@ angular.module('inventory', [ inventoryEdit.name, inventoryList.name ]) - .factory('InventoriesForm', InventoriesForm) - .factory('InventoriesList', InventoriesList) + .factory('InventoryForm', InventoryForm) + .factory('InventoryList', InventoryList) .config(['$stateProvider', 'stateDefinitionsProvider', function($stateProvider, stateDefinitionsProvider) { // When stateDefinition.lazyLoad() resolves, states matching name.** or /url** will be de-registered and replaced with resolved states @@ -33,8 +33,8 @@ angular.module('inventory', [ lazyLoad: () => stateDefinitions.generateTree({ parent: 'inventories', // top-most node in the generated tree (will replace this state definition) modes: ['add', 'edit'], - list: 'InventoriesList', - form: 'InventoriesForm', + list: 'InventoryList', + form: 'InventoryForm', controllers: { list: 'InventoryListController', add: 'InventoryAddController', @@ -51,9 +51,9 @@ angular.module('inventory', [ templateUrl: templateUrl('inventories/inventories') }, 'list@inventories': { - templateProvider: function(InventoriesList, generateList) { + templateProvider: function(InventoryList, generateList) { let html = generateList.build({ - list: InventoriesList, + list: InventoryList, mode: 'edit' }); return html;