mirror of
https://github.com/ansible/awx.git
synced 2026-02-16 02:30:01 -03:30
Latest UI Inventory updates
This commit is contained in:
@@ -30,12 +30,9 @@ angular.module('GroupFormDefinition', [])
|
||||
},
|
||||
inventory: {
|
||||
label: 'Inventory',
|
||||
type: 'lookup',
|
||||
sourceModel: 'inventory',
|
||||
sourceField: 'name',
|
||||
addRequired: true,
|
||||
editRequired: true,
|
||||
ngClick: 'lookUpInventory()'
|
||||
type: 'hidden',
|
||||
includeOnEdit: true,
|
||||
includeOnAdd: true
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -29,14 +29,19 @@ angular.module('HostFormDefinition', [])
|
||||
editRequired: false
|
||||
},
|
||||
inventory: {
|
||||
label: 'Inventory',
|
||||
type: 'lookup',
|
||||
sourceModel: 'inventory',
|
||||
sourceField: 'name',
|
||||
addRequired: true,
|
||||
editRequired: true,
|
||||
ngClick: 'lookUpInventory()'
|
||||
type: 'hidden',
|
||||
includeOnEdit: true,
|
||||
includeOnAdd: true
|
||||
}
|
||||
// inventory: {
|
||||
// label: 'Inventory',
|
||||
// type: 'lookup',
|
||||
// sourceModel: 'inventory',
|
||||
// sourceField: 'name',
|
||||
// addRequired: true,
|
||||
// editRequired: true,
|
||||
// ngClick: 'lookUpInventory()'
|
||||
// }
|
||||
},
|
||||
|
||||
buttons: { //for now always generates <button> tags
|
||||
|
||||
@@ -59,50 +59,53 @@ angular.module('InventoryFormDefinition', [])
|
||||
|
||||
related: { //related colletions (and maybe items?)
|
||||
|
||||
hosts: {
|
||||
type: 'collection',
|
||||
title: 'Hosts',
|
||||
iterator: 'host',
|
||||
open: false,
|
||||
// hosts: {
|
||||
// type: 'collection',
|
||||
// title: 'Hosts',
|
||||
// iterator: 'host',
|
||||
// open: false,
|
||||
|
||||
actions: {
|
||||
add: {
|
||||
ngClick: "add('hosts')",
|
||||
icon: 'icon-plus',
|
||||
awToolTip: 'Create a new host'
|
||||
},
|
||||
},
|
||||
// actions: {
|
||||
// add: {
|
||||
// ngClick: "add('hosts')",
|
||||
// icon: 'icon-plus',
|
||||
// awToolTip: 'Create a new host'
|
||||
// },
|
||||
// },
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
key: true,
|
||||
label: 'Name'
|
||||
},
|
||||
description: {
|
||||
label: 'Description'
|
||||
}
|
||||
},
|
||||
// fields: {
|
||||
// name: {
|
||||
// key: true,
|
||||
// label: 'Name'
|
||||
// },
|
||||
// description: {
|
||||
// label: 'Description'
|
||||
// }
|
||||
// },
|
||||
|
||||
fieldActions: {
|
||||
edit: {
|
||||
ngClick: "edit('hosts', \{\{ host.id \}\}, '\{\{ host.name \}\}')",
|
||||
icon: 'icon-edit',
|
||||
awToolTip: 'Edit host'
|
||||
},
|
||||
delete: {
|
||||
ngClick: "delete('hosts', \{\{ host.id \}\}, '\{\{ host.name \}\}', 'hosts')",
|
||||
icon: 'icon-remove',
|
||||
class: 'btn-danger',
|
||||
awToolTip: 'Create a new host'
|
||||
}
|
||||
}
|
||||
},
|
||||
// fieldActions: {
|
||||
// edit: {
|
||||
// ngClick: "edit('hosts', \{\{ host.id \}\}, '\{\{ host.name \}\}')",
|
||||
// icon: 'icon-edit',
|
||||
// awToolTip: 'Edit host'
|
||||
// },
|
||||
// delete: {
|
||||
// ngClick: "delete('hosts', \{\{ host.id \}\}, '\{\{ host.name \}\}', 'hosts')",
|
||||
// icon: 'icon-remove',
|
||||
// class: 'btn-danger',
|
||||
// awToolTip: 'Create a new host'
|
||||
// }
|
||||
// }
|
||||
//
|
||||
|
||||
groups: {
|
||||
type: 'tree',
|
||||
title: 'Groups',
|
||||
open: true
|
||||
title: "{{ name }} Children",
|
||||
instructions: "Right click on a host or subgroup to make changes or add additional children.",
|
||||
open: true,
|
||||
actions: { }
|
||||
}
|
||||
}
|
||||
|
||||
}); //InventoryForm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user