diff --git a/awx/ui/client/src/inventories/standard/edit/inventory-edit.controller.js b/awx/ui/client/src/inventories/standard/edit/inventory-edit.controller.js index 205b483779..5b0c19195c 100644 --- a/awx/ui/client/src/inventories/standard/edit/inventory-edit.controller.js +++ b/awx/ui/client/src/inventories/standard/edit/inventory-edit.controller.js @@ -29,6 +29,7 @@ function InventoriesEdit($scope, $location, $scope = angular.extend($scope, inventoryData); + $scope.credential_name = (inventoryData.summary_fields.credential && inventoryData.summary_fields.credential.name) ? inventoryData.summary_fields.credential.name : null; $scope.organization_name = inventoryData.summary_fields.organization.name; $scope.inventory_variables = inventoryData.variables === null || inventoryData.variables === '' ? '---' : ParseVariableString(inventoryData.variables); $scope.parseType = 'yaml'; diff --git a/awx/ui/client/src/inventories/standard/inventory.form.js b/awx/ui/client/src/inventories/standard/inventory.form.js index 08e3d8df48..b6fa892974 100644 --- a/awx/ui/client/src/inventories/standard/inventory.form.js +++ b/awx/ui/client/src/inventories/standard/inventory.form.js @@ -68,6 +68,17 @@ function(i18n, InventoryCompletedJobsList) { ngDisabled: '!(inventory_obj.summary_fields.user_capabilities.edit || canAdd) || !canEditOrg', awLookupWhen: '(inventory_obj.summary_fields.user_capabilities.edit || canAdd) && canEditOrg' }, + insights_credential: { + label: i18n._('Insights Credential'), + type: 'lookup', + list: 'CredentialList', + basePath: 'credentials', + sourceModel: 'credential', + sourceField: 'name', + search: { + credential_type: 13 //insights + } + }, inventory_variables: { realName: 'variables', label: i18n._('Variables'),