Better inventory navigation. Breadcrumbs now includes a hover activated drop-down. Debating whether using hover activation is a good thing. Obviously doesn't work on mobile, so will need to build a work around.

This commit is contained in:
chouseknecht
2013-09-20 12:06:08 -04:00
parent c2e428aca0
commit 50ebe9d165
6 changed files with 202 additions and 128 deletions

View File

@@ -17,12 +17,18 @@ angular.module('InventoryFormDefinition', [])
well: true,
navigationLinks: {
inventory: {
href: "/#/inventories/{{ inventory_id }}",
label: "Inventory Properties",
icon: "icon-edit",
active: true
},
hosts: {
href: "/#/inventories/{{ inventory_id }}/hosts",
label: 'Hosts',
icon: 'icon-laptop'
},
Groups: {
groups: {
href: "/#/inventories/{{ inventory_id }}/groups",
label: 'Groups',
icon: 'icon-sitemap'

View File

@@ -32,25 +32,6 @@ angular.module('InventoryHostsFormDefinition', [])
sourceModel: 'groups',
sourceField: 'name',
nosort: true
},
dropdown: {
type: 'DropDown',
searchable: false,
nosort: true,
label: 'Jobs',
"class": "btn-sm",
//ngDisabled: 'host.last_job == null',
options: [
{ ngClick: "allJobs(\{\{ host.id \}\})", label: 'All jobs', ngShow: 'host.last_job' },
{ ngClick: "allHostSummaries(\{\{ host.id \}\},'\{\{ host.name \}\}', \{\{ inventory_id \}\})", label: 'All host summaries',
ngShow: 'host.last_job' },
{ ngClick: 'viewJobs(\{\{ host.last_job \}\})', label: 'Latest job', ngShow: 'host.last_job' },
{ ngClick: "viewLastEvents(\{\{ host.id \}\}, '\{\{ host.last_job \}\}', '\{\{ host.name \}\}', " +
"'\{\{ host.summary_fields.last_job.name \}\}')", label: 'Latest job events', ngShow: 'host.last_job' },
{ ngClick: "viewLastSummary(\{\{ host.id \}\}, '\{\{ host.last_job \}\}', '\{\{ host.name \}\}', " +
"'\{\{ host.summary_fields.last_job.name \}\}')", label: 'Latest host summary', ngShow: 'host.last_job' },
{ ngClick: "", label: 'No job data available', ngShow: 'host.last_job == null' }
]
}
},
@@ -76,6 +57,25 @@ angular.module('InventoryHostsFormDefinition', [])
},
fieldActions: {
ViewJobs: {
type: 'DropDown',
label: 'Jobs',
icon: 'icon-zoom-in',
"class": "btn-default btn-sm",
options: [
{ ngClick: "allJobs(\{\{ host.id \}\})", label: 'All jobs', ngShow: 'host.last_job' },
{ ngClick: "allHostSummaries(\{\{ host.id \}\},'\{\{ host.name \}\}', \{\{ inventory_id \}\})", label: 'All host summaries',
ngShow: 'host.last_job' },
{ ngClick: 'viewJobs(\{\{ host.last_job \}\})', label: 'Latest job', ngShow: 'host.last_job' },
{ ngClick: "viewLastEvents(\{\{ host.id \}\}, '\{\{ host.last_job \}\}', '\{\{ host.name \}\}', " +
"'\{\{ host.summary_fields.last_job.name \}\}')", label: 'Latest job events', ngShow: 'host.last_job' },
{ ngClick: "viewLastSummary(\{\{ host.id \}\}, '\{\{ host.last_job \}\}', '\{\{ host.name \}\}', " +
"'\{\{ host.summary_fields.last_job.name \}\}')", label: 'Latest host summary', ngShow: 'host.last_job' },
{ ngClick: "", label: 'No job data available', ngShow: 'host.last_job == null' }
]
},
"delete": {
ngClick: "deleteHost(\{\{ host.id \}\},'\{\{ host.name \}\}')",
icon: 'icon-trash',

View File

@@ -28,7 +28,8 @@ angular.module('InventoriesListDefinition', [])
badgeTipPlacement: 'bottom'
},
description: {
label: 'Description'
label: 'Description',
link: true
},
organization: {
label: 'Organization',
@@ -56,37 +57,25 @@ angular.module('InventoriesListDefinition', [])
type: 'DropDown',
label: 'Jobs',
icon: 'icon-zoom-in',
'class': 'btn-xs',
'class': 'btn-default btn-xs',
options: [
{ ngClick: 'viewJobs(\{\{ inventory.id \}\})', label: 'All Jobs' },
{ ngClick: "viewFailedJobs(\{\{ inventory.id \}\})", label: 'Failed jobs' }
]
},
hosts: {
label: 'Hosts',
ngClick: "editHosts(\{\{ inventory.id \}\})",
icon: 'icon-laptop',
"class": 'btn-xs btn-default',
awToolTip: 'Edit Hosts'
},
groups: {
label: 'Groups',
ngClick: "editGroups(\{\{ inventory.id \}\})",
icon: 'icon-sitemap',
"class": 'btn-xs btn-default',
awToolTip: 'Edit Groups'
},
edit: {
ngClick: "editInventory(\{\{ inventory.id \}\})",
edit: {
type: 'DropDown',
label: 'Edit',
icon: 'icon-edit',
"class": 'btn-xs btn-default',
awToolTip: 'Edit Inventory Properties'
'class': 'btn-default btn-xs',
options: [
{ ngClick: "editInventory(\{\{ inventory.id \}\})", label: 'Inventory Properties' },
{ ngClick: "editHosts(\{\{ inventory.id \}\})", label: 'Hosts' },
{ ngClick: "editGroups(\{\{ inventory.id \}\})", label: 'Groups' }
]
},
"delete": {
label: 'Delete',
ngClick: "deleteInventory(\{\{ inventory.id \}\},'\{\{ inventory.name \}\}')",
icon: 'icon-trash',
"class": 'btn-xs btn-danger',