Latest UI Inventory updates

This commit is contained in:
chouseknecht
2013-05-14 01:52:04 -04:00
parent fe5a454441
commit 2612ebd792
22 changed files with 682 additions and 433 deletions

View File

@@ -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
}
},

View File

@@ -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

View File

@@ -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