mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
update to perm ui for rbac branch
This commit is contained in:
parent
70c7c0242b
commit
064a04cf16
@ -480,25 +480,7 @@ export function ProjectsAdd(Refresh, $scope, $rootScope, $compile, $location, $l
|
||||
url: $scope.current_url
|
||||
});
|
||||
|
||||
var id = data.id,
|
||||
url = GetBasePath('projects') + id + '/organizations/',
|
||||
org = { id: $scope.organization };
|
||||
Rest.setUrl(url);
|
||||
Rest.post(org)
|
||||
.success(function () {
|
||||
Wait('stop');
|
||||
$rootScope.flashMessage = "New project successfully created!";
|
||||
if (base === 'projects') {
|
||||
ReturnToCaller();
|
||||
}
|
||||
else {
|
||||
ReturnToCaller(1);
|
||||
}
|
||||
})
|
||||
.error(function (data, status) {
|
||||
ProcessErrors($scope, data, status, form, { hdr: 'Error!',
|
||||
msg: 'Failed to add organization to project. POST returned status: ' + status });
|
||||
});
|
||||
$state.go("^");
|
||||
})
|
||||
.error(function (data, status) {
|
||||
Wait('stop');
|
||||
|
||||
@ -151,6 +151,17 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
editRequired: false,
|
||||
subForm: 'sourceSubForm'
|
||||
},
|
||||
organization: {
|
||||
label: 'Organization',
|
||||
type: 'lookup',
|
||||
sourceModel: 'organization',
|
||||
sourceField: 'name',
|
||||
ngClick: 'lookUpOrganization()',
|
||||
awRequiredWhen: {
|
||||
variable: "organizationrequired",
|
||||
init: "true"
|
||||
}
|
||||
},
|
||||
credential: {
|
||||
label: 'SCM Credential',
|
||||
type: 'lookup',
|
||||
@ -234,50 +245,6 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
},
|
||||
|
||||
related: {
|
||||
organizations: {
|
||||
type: 'collection',
|
||||
title: 'Organizations',
|
||||
iterator: 'organization',
|
||||
index: false,
|
||||
open: false,
|
||||
|
||||
actions: {
|
||||
add: {
|
||||
ngClick: "add('organizations')",
|
||||
label: 'Add',
|
||||
awToolTip: 'Add an organization',
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ADD'
|
||||
}
|
||||
},
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
key: true,
|
||||
label: 'Name'
|
||||
},
|
||||
description: {
|
||||
label: 'Description'
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
edit: {
|
||||
label: 'Edit',
|
||||
ngClick: "edit('organizations', organization.id, organization.name)",
|
||||
icon: 'icon-edit',
|
||||
awToolTip: 'Edit the organization',
|
||||
'class': 'btn btn-default'
|
||||
},
|
||||
"delete": {
|
||||
label: 'Delete',
|
||||
ngClick: "delete('organizations', organization.id, organization.name, 'organization')",
|
||||
icon: 'icon-trash',
|
||||
"class": 'btn-danger',
|
||||
awToolTip: 'Delete the organization'
|
||||
}
|
||||
}
|
||||
},
|
||||
permissions: {
|
||||
type: 'collection',
|
||||
title: 'Permissions',
|
||||
@ -314,13 +281,9 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
|
||||
relatedSets: function(urls) {
|
||||
return {
|
||||
organizations: {
|
||||
iterator: 'organization',
|
||||
url: urls.organizations
|
||||
},
|
||||
permissions: {
|
||||
iterator: 'permission',
|
||||
url: urls.resource_access_list
|
||||
url: urls.access_list
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user