1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

adding insights credential to inventory form

in order to create an insights inventory
This commit is contained in:
Jared Tabor 2017-05-31 10:54:51 -07:00
parent 15a739687f
commit 289835f01b
2 changed files with 12 additions and 0 deletions

View File

@ -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';

View File

@ -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'),