mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
add applications.edit.organization route
This commit is contained in:
@@ -83,7 +83,7 @@ function EditApplicationsController (models, $state, strings, $scope) {
|
||||
};
|
||||
|
||||
vm.form.organization._resource = 'organization';
|
||||
vm.form.organization._route = 'applications.add.organization';
|
||||
vm.form.organization._route = 'applications.edit.organization';
|
||||
vm.form.organization._model = organization;
|
||||
vm.form.organization._placeholder = strings.get('SELECT AN ORGANIZATION');
|
||||
|
||||
|
||||
@@ -203,6 +203,59 @@ function ApplicationsRun ($stateExtender, strings) {
|
||||
}
|
||||
});
|
||||
|
||||
$stateExtender.addState({
|
||||
name: 'applications.edit.organization',
|
||||
url: '/organization?selected',
|
||||
searchPrefix: 'organization',
|
||||
params: {
|
||||
organization_search: {
|
||||
value: {
|
||||
page_size: 5,
|
||||
order_by: 'name',
|
||||
role_level: 'admin_role'
|
||||
},
|
||||
dynamic: true,
|
||||
squash: ''
|
||||
}
|
||||
},
|
||||
data: {
|
||||
basePath: 'organizations',
|
||||
formChildState: true
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
skip: true
|
||||
},
|
||||
views: {
|
||||
'organization@applications.edit': {
|
||||
templateProvider: (ListDefinition, generateList) => {
|
||||
const html = generateList.build({
|
||||
mode: 'lookup',
|
||||
list: ListDefinition,
|
||||
input_type: 'radio'
|
||||
});
|
||||
|
||||
return `<lookup-modal>${html}</lookup-modal>`;
|
||||
}
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
ListDefinition: ['OrganizationList', list => list],
|
||||
Dataset: ['ListDefinition', 'QuerySet', '$stateParams', 'GetBasePath',
|
||||
(list, qs, $stateParams, GetBasePath) => qs.search(
|
||||
GetBasePath('organizations'),
|
||||
$stateParams[`${list.iterator}_search`]
|
||||
)
|
||||
]
|
||||
},
|
||||
onExit ($state) {
|
||||
if ($state.transition) {
|
||||
$('#form-modal').modal('hide');
|
||||
$('.modal-backdrop').remove();
|
||||
$('body').removeClass('modal-open');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$stateExtender.addState({
|
||||
name: 'applications.edit.permissions',
|
||||
route: '/permissions?{permission_search:queryset}',
|
||||
|
||||
Reference in New Issue
Block a user