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:
Jared Tabor
2015-03-12 12:16:47 -04:00
parent 9ed89f9622
commit 698f2e7b8f
5 changed files with 38 additions and 12 deletions

View File

@@ -318,6 +318,10 @@ export function InventoriesList($scope, $rootScope, $location, $log, $routeParam
$location.path($location.path() + '/' + id); $location.path($location.path() + '/' + id);
}; };
$scope.manageInventory = function(id){
$location.path($location.path() + '/' + id + '/manage');
}
$scope.deleteInventory = function (id, name) { $scope.deleteInventory = function (id, name) {
var action = function () { 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 () { $scope.showActivity = function () {
Stream({ scope: $scope }); Stream({ scope: $scope });
}; };

View File

@@ -22,6 +22,15 @@ export default
well: true, well: true,
actions: { actions: {
manage: {
'class': "btn-primary btn-xs activity-btn",
ngClick: "manageInventory()",
awToolTip: "Manage Inventory",
dataPlacement: "top",
icon: "icon-sitemap",
mode: 'edit',
iconSize: 'large'
},
stream: { stream: {
'class': "btn-primary btn-xs activity-btn", 'class': "btn-primary btn-xs activity-btn",
ngClick: "showActivity()", ngClick: "showActivity()",

View File

@@ -49,7 +49,7 @@ export default
label: 'Name', label: 'Name',
columnClass: 'col-md-4 col-sm-6 col-xs-6', columnClass: 'col-md-4 col-sm-6 col-xs-6',
modalColumnClass: 'col-md-8', modalColumnClass: 'col-md-8',
linkTo: '/#/inventories/{{inventory.id}}/manage' linkTo: '/#/inventories/{{inventory.id}}'
}, },
organization: { organization: {
label: 'Organization', label: 'Organization',
@@ -97,12 +97,18 @@ export default
}, },
fieldActions: { fieldActions: {
failed_hosts: { // failed_hosts: {
//label: 'Failures', // //label: 'Failures',
ngHref: "{{ inventory.failed_hosts_link }}", // ngHref: "{{ inventory.failed_hosts_link }}",
iconClass: "{{ 'fa icon-failures-' + inventory.failed_hosts_class }}", // iconClass: "{{ 'fa icon-failures-' + inventory.failed_hosts_class }}",
awToolTip: "{{ inventory.failed_hosts_tip }}", // awToolTip: "{{ inventory.failed_hosts_tip }}",
dataPlacement: "top" // dataPlacement: "top"
// },
manage: {
label: 'Manage',
ngClick: 'manageInventory(inventory.id)',
awToolTip: 'Manage Inventory',
dataPlacement: 'top'
}, },
edit: { edit: {
label: 'Edit', label: 'Edit',

View File

@@ -83,11 +83,11 @@ export default
ngClick: "createGroup()", ngClick: "createGroup()",
awToolTip: "Create a new group" awToolTip: "Create a new group"
}, },
properties: { // properties: {
mode: 'all', // mode: 'all',
awToolTip: "Edit inventory properties", // awToolTip: "Edit inventory properties",
ngClick: 'editInventoryProperties()' // ngClick: 'editInventoryProperties()'
}, // },
refresh: { refresh: {
mode: 'all', mode: 'all',
awToolTip: "Refresh the page", awToolTip: "Refresh the page",

View File

@@ -162,6 +162,9 @@ angular.module('GeneratorHelpers', [systemStatus.name])
case 'copy': case 'copy':
icon = "fa-copy"; icon = "fa-copy";
break; break;
case 'manage':
icon = "fa-sitemap";
break;
} }
icon += (size) ? " " + size : ""; icon += (size) ? " " + size : "";
return Icon(icon); return Icon(icon);