diff --git a/awx/ui/client/legacy-styles/lists.less b/awx/ui/client/legacy-styles/lists.less index b4d65d1862..484ea4440c 100644 --- a/awx/ui/client/legacy-styles/lists.less +++ b/awx/ui/client/legacy-styles/lists.less @@ -80,6 +80,28 @@ table, tbody { padding-left: 10px; } +.List-tableRow--disabled { + .List-tableCell, .List-tableCell * { + color: @b7grey; + cursor: not-allowed; + } +} + +.List-tableRow--disabled { + .List-actionButton:hover { + color: @list-action-icon; + background-color: @list-actn-bg !important; + } +} + +.List-tableRow--disabled { + .List-actionButtonCell * { + color: @default-err; + font-size: 11px; + text-transform: uppercase; + } +} + .List-tableCell { padding: 7px 15px; border-top:0px!important; diff --git a/awx/ui/client/src/inventories-hosts/inventories/inventories.route.js b/awx/ui/client/src/inventories-hosts/inventories/inventories.route.js index 3d78c78323..fc2888a2eb 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/inventories.route.js +++ b/awx/ui/client/src/inventories-hosts/inventories/inventories.route.js @@ -9,7 +9,12 @@ export default { }, data: { activityStream: true, - activityStreamTarget: 'inventory' + activityStreamTarget: 'inventory', + socket: { + "groups": { + "inventories": ["status_changed"] + } + } }, views: { '@': { diff --git a/awx/ui/client/src/inventories-hosts/inventories/inventory.list.js b/awx/ui/client/src/inventories-hosts/inventories/inventory.list.js index 22319179a5..c863a68106 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/inventory.list.js +++ b/awx/ui/client/src/inventories-hosts/inventories/inventory.list.js @@ -18,6 +18,7 @@ export default ['i18n', function(i18n) { hover: true, basePath: 'inventory', title: false, + disableRow: "{{ inventory.pending_deletion }}", fields: { status: { @@ -97,7 +98,8 @@ export default ['i18n', function(i18n) { ngClick: 'editInventory(inventory)', awToolTip: i18n._('Edit inventory'), dataPlacement: 'top', - ngShow: 'inventory.summary_fields.user_capabilities.edit' + ngShow: 'inventory.summary_fields.user_capabilities.edit', + ngHide: 'inventory.pending_deletion' }, view: { label: i18n._('View'), @@ -111,7 +113,12 @@ export default ['i18n', function(i18n) { ngClick: "deleteInventory(inventory.id, inventory.name)", awToolTip: i18n._('Delete inventory'), dataPlacement: 'top', - ngShow: 'inventory.summary_fields.user_capabilities.delete' + ngShow: 'inventory.summary_fields.user_capabilities.delete', + ngHide: 'inventory.pending_deletion' + + }, + pending_deletion: { + label: i18n._('Pending Delete'), } } };}]; diff --git a/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js index 3f81647145..0af4c78392 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/list/inventory-list.controller.js @@ -102,11 +102,19 @@ function InventoriesList($scope, Prompt({ hdr: 'Delete', - body: '