mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 14:27:42 -02:30
adding related tabs for inventories
for groups, hosts, sources, and completed jobs. this is for the tabs themselves.
This commit is contained in:
committed by
Jared Tabor
parent
14ec5183d2
commit
96c25fe464
@@ -129,6 +129,135 @@ export default ['i18n', function(i18n) {
|
|||||||
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4',
|
class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
groups: {
|
||||||
|
name: 'groups',
|
||||||
|
// awToolTip: i18n._('Please save before assigning permissions'),
|
||||||
|
// dataPlacement: 'top',
|
||||||
|
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/root_groups/',
|
||||||
|
type: 'collection',
|
||||||
|
title: i18n._('Groups'),
|
||||||
|
iterator: 'group',
|
||||||
|
index: false,
|
||||||
|
open: false,
|
||||||
|
// search: {
|
||||||
|
// order_by: 'username'
|
||||||
|
// },
|
||||||
|
actions: {
|
||||||
|
add: {
|
||||||
|
label: i18n._('Add'),
|
||||||
|
ngClick: "$state.go('.add')",
|
||||||
|
awToolTip: i18n._('Add a permission'),
|
||||||
|
actionClass: 'btn List-buttonSubmit',
|
||||||
|
buttonContent: '+ ADD',
|
||||||
|
// ngShow: '(inventory_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fields: {
|
||||||
|
name: {
|
||||||
|
label: i18n._('Name'),
|
||||||
|
// linkBase: 'users',
|
||||||
|
class: 'col-lg-3 col-md-3 col-sm-3 col-xs-4'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hosts: {
|
||||||
|
name: 'hosts',
|
||||||
|
// awToolTip: i18n._('Please save before assigning permissions'),
|
||||||
|
// dataPlacement: 'top',
|
||||||
|
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/hosts/',
|
||||||
|
type: 'collection',
|
||||||
|
title: i18n._('Hosts'),
|
||||||
|
iterator: 'host',
|
||||||
|
index: false,
|
||||||
|
open: false,
|
||||||
|
// search: {
|
||||||
|
// order_by: 'username'
|
||||||
|
// },
|
||||||
|
actions: {
|
||||||
|
add: {
|
||||||
|
label: i18n._('Add'),
|
||||||
|
ngClick: "$state.go('.add')",
|
||||||
|
awToolTip: i18n._('Add a permission'),
|
||||||
|
actionClass: 'btn List-buttonSubmit',
|
||||||
|
buttonContent: '+ ADD',
|
||||||
|
// ngShow: '(inventory_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fields: {
|
||||||
|
name: {
|
||||||
|
label: i18n._('Name'),
|
||||||
|
// linkBase: 'users',
|
||||||
|
class: 'col-lg-3 col-md-3 col-sm-3 col-xs-4'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
inventory_sources: {
|
||||||
|
name: 'inventory_sources',
|
||||||
|
// awToolTip: i18n._('Please save before assigning permissions'),
|
||||||
|
// dataPlacement: 'top',
|
||||||
|
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/inventory_sources/',
|
||||||
|
type: 'collection',
|
||||||
|
title: i18n._('Sources'),
|
||||||
|
iterator: 'inventory_source',
|
||||||
|
index: false,
|
||||||
|
open: false,
|
||||||
|
// search: {
|
||||||
|
// order_by: 'username'
|
||||||
|
// },
|
||||||
|
actions: {
|
||||||
|
add: {
|
||||||
|
label: i18n._('Add'),
|
||||||
|
ngClick: "$state.go('.add')",
|
||||||
|
awToolTip: i18n._('Add a permission'),
|
||||||
|
actionClass: 'btn List-buttonSubmit',
|
||||||
|
buttonContent: '+ ADD',
|
||||||
|
// ngShow: '(inventory_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fields: {
|
||||||
|
name: {
|
||||||
|
label: i18n._('Name'),
|
||||||
|
// linkBase: 'users',
|
||||||
|
class: 'col-lg-3 col-md-3 col-sm-3 col-xs-4'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//this is a placeholder for when we're ready for completed jobs
|
||||||
|
completed_jobs: {
|
||||||
|
name: 'completed_jobs',
|
||||||
|
// awToolTip: i18n._('Please save before assigning permissions'),
|
||||||
|
// dataPlacement: 'top',
|
||||||
|
basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/completed_jobs/',
|
||||||
|
type: 'collection',
|
||||||
|
title: i18n._('Completed Jobs'),
|
||||||
|
iterator: 'completed_job',
|
||||||
|
index: false,
|
||||||
|
open: false,
|
||||||
|
// search: {
|
||||||
|
// order_by: 'username'
|
||||||
|
// },
|
||||||
|
actions: {
|
||||||
|
add: {
|
||||||
|
label: i18n._('Add'),
|
||||||
|
ngClick: "$state.go('.add')",
|
||||||
|
awToolTip: i18n._('Add a permission'),
|
||||||
|
actionClass: 'btn List-buttonSubmit',
|
||||||
|
buttonContent: '+ ADD',
|
||||||
|
// ngShow: '(inventory_obj.summary_fields.user_capabilities.edit || canAdd)'
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fields: {
|
||||||
|
name: {
|
||||||
|
label: i18n._('Name'),
|
||||||
|
// linkBase: 'users',
|
||||||
|
class: 'col-lg-3 col-md-3 col-sm-3 col-xs-4'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -483,9 +483,10 @@ export default ['$injector', '$stateExtender', '$log', 'i18n', function($injecto
|
|||||||
ListDefinition: () => {
|
ListDefinition: () => {
|
||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
inventorySourceData: ['$stateParams', 'GroupManageService', function($stateParams, GroupManageService) {
|
inventorySourceData: ['$stateParams', //'GroupManageService',
|
||||||
|
function($stateParams){ //, GroupManageService) {
|
||||||
if($stateParams.hasOwnProperty('group_id')){
|
if($stateParams.hasOwnProperty('group_id')){
|
||||||
return GroupManageService.getInventorySource({ group: $stateParams.group_id }).then(res => res.data.results[0]);
|
return; //GroupManageService.getInventorySource({ group: $stateParams.group_id }).then(res => res.data.results[0]);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user