mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Normalized inventory list/form. This was the way it used to be
This commit is contained in:
parent
2e177598c2
commit
54a92b5b5e
@ -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
|
||||
];
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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
|
||||
];
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user