Inventory refactor: Edit hosts and delete hosts work. Consolidated host actions down to one column.

This commit is contained in:
Chris Houseknecht
2014-01-10 21:50:51 +00:00
parent 3d5a09e39e
commit 8279012ffa
5 changed files with 71 additions and 90 deletions

View File

@@ -24,19 +24,9 @@ angular.module('InventoryHostsDefinition', [])
name: {
key: true,
label: 'Hosts',
ngClick: "editHost(\{\{ host.id \}\}, '\{\{ host.name \}\}')",
searchPlaceholder: "search_place_holder"
},
enabled_flag: {
label: 'Enabled',
badgeIcon: "\{\{ 'fa icon-enabled-' + host.enabled \}\}",
badgePlacement: 'left',
badgeToolTip: "\{\{ host.enabledToolTip \}\}",
badgeTipPlacement: "top",
badgeTipWatch: "host.enabledToolTip",
ngClick: "toggle_host_enabled(\{\{ host.id \}\}, \{\{ host.has_inventory_sources \}\})",
searchable: false,
showValue: false
ngClick: "editHost(\{\{ host.id \}\})",
searchPlaceholder: "search_place_holder",
columnClass: 'col-lg-9'
},
/*groups: {
label: 'Groups',
@@ -71,33 +61,34 @@ angular.module('InventoryHostsDefinition', [])
},
fieldActions: {
enabled_flag: {
//label: 'Enabled',
iconClass: "\{\{ 'fa icon-enabled-' + host.enabled \}\}",
dataPlacement: 'top',
awToolTip: "\{\{ host.enabledToolTip \}\}",
ngClick: "toggleHostEnabled(\{\{ host.id \}\}, \{\{ host.has_inventory_sources \}\})"
},
active_failures: {
//label: 'Job Status',
awToolTip: "\{\{ host.badgeToolTip \}\}",
dataPlacement: 'top',
badgeNgHref: '\{\{ host.activeFailuresLink \}\}',
iconClass: "\{\{ 'fa icon-failures-' + host.has_active_failures \}\}",
badgePlacement: 'left',
badgeToolTip: "\{\{ host.badgeToolTip \}\}",
badgeTipPlacement: 'top'
iconClass: "\{\{ 'fa icon-failures-' + host.has_active_failures \}\}"
},
edit: {
//label: 'Edit',
ngClick: "editGroup(\{\{ host.id \}\})",
ngClick: "editHost(\{\{ host.id \}\})",
icon: 'icon-edit',
"class": 'btn-xs btn-primary',
awToolTip: 'Edit host'
awToolTip: 'Edit host',
dataPlacement: 'top'
},
"delete": {
//label: 'Delete',
ngClick: "deleteHost(\{\{ host.id \}\},'\{\{ host.name \}\}')",
icon: 'icon-trash',
"class": 'btn-xs btn-primary',
awToolTip: 'Delete host'
awToolTip: 'Delete host',
dataPlacement: 'top'
}
},