mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Added icon on inventories view for manage inventory
With the Manage Inventory page being essentially nested below the Edit Inventory page, I have added a new icon and a new button for getting to these pages.
This commit is contained in:
parent
9ed89f9622
commit
698f2e7b8f
@ -318,6 +318,10 @@ export function InventoriesList($scope, $rootScope, $location, $log, $routeParam
|
||||
$location.path($location.path() + '/' + id);
|
||||
};
|
||||
|
||||
$scope.manageInventory = function(id){
|
||||
$location.path($location.path() + '/' + id + '/manage');
|
||||
}
|
||||
|
||||
$scope.deleteInventory = function (id, name) {
|
||||
|
||||
var action = function () {
|
||||
@ -613,6 +617,10 @@ export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $
|
||||
});
|
||||
};
|
||||
|
||||
$scope.manageInventory = function(){
|
||||
$location.path($location.path() + '/manage');
|
||||
}
|
||||
|
||||
$scope.showActivity = function () {
|
||||
Stream({ scope: $scope });
|
||||
};
|
||||
|
||||
@ -22,6 +22,15 @@ export default
|
||||
well: true,
|
||||
|
||||
actions: {
|
||||
manage: {
|
||||
'class': "btn-primary btn-xs activity-btn",
|
||||
ngClick: "manageInventory()",
|
||||
awToolTip: "Manage Inventory",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-sitemap",
|
||||
mode: 'edit',
|
||||
iconSize: 'large'
|
||||
},
|
||||
stream: {
|
||||
'class': "btn-primary btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
|
||||
@ -49,7 +49,7 @@ export default
|
||||
label: 'Name',
|
||||
columnClass: 'col-md-4 col-sm-6 col-xs-6',
|
||||
modalColumnClass: 'col-md-8',
|
||||
linkTo: '/#/inventories/{{inventory.id}}/manage'
|
||||
linkTo: '/#/inventories/{{inventory.id}}'
|
||||
},
|
||||
organization: {
|
||||
label: 'Organization',
|
||||
@ -97,12 +97,18 @@ export default
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
failed_hosts: {
|
||||
//label: 'Failures',
|
||||
ngHref: "{{ inventory.failed_hosts_link }}",
|
||||
iconClass: "{{ 'fa icon-failures-' + inventory.failed_hosts_class }}",
|
||||
awToolTip: "{{ inventory.failed_hosts_tip }}",
|
||||
dataPlacement: "top"
|
||||
// failed_hosts: {
|
||||
// //label: 'Failures',
|
||||
// ngHref: "{{ inventory.failed_hosts_link }}",
|
||||
// iconClass: "{{ 'fa icon-failures-' + inventory.failed_hosts_class }}",
|
||||
// awToolTip: "{{ inventory.failed_hosts_tip }}",
|
||||
// dataPlacement: "top"
|
||||
// },
|
||||
manage: {
|
||||
label: 'Manage',
|
||||
ngClick: 'manageInventory(inventory.id)',
|
||||
awToolTip: 'Manage Inventory',
|
||||
dataPlacement: 'top'
|
||||
},
|
||||
edit: {
|
||||
label: 'Edit',
|
||||
|
||||
@ -83,11 +83,11 @@ export default
|
||||
ngClick: "createGroup()",
|
||||
awToolTip: "Create a new group"
|
||||
},
|
||||
properties: {
|
||||
mode: 'all',
|
||||
awToolTip: "Edit inventory properties",
|
||||
ngClick: 'editInventoryProperties()'
|
||||
},
|
||||
// properties: {
|
||||
// mode: 'all',
|
||||
// awToolTip: "Edit inventory properties",
|
||||
// ngClick: 'editInventoryProperties()'
|
||||
// },
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
|
||||
@ -162,6 +162,9 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
||||
case 'copy':
|
||||
icon = "fa-copy";
|
||||
break;
|
||||
case 'manage':
|
||||
icon = "fa-sitemap";
|
||||
break;
|
||||
}
|
||||
icon += (size) ? " " + size : "";
|
||||
return Icon(icon);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user