mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-10 01:51:49 -05:00
158 paginated data list (#180)
* working: rename OrganizationTeamsList to PaginatedDataList * convert org notifications list fully to PaginatedDataList * update NotificationList tests * refactor org access to use PaginatedDataList * update tests for org access refactor; fix pagination & sorting * restore Add Role functionality to Org roles * fix displayed text when list of items is empty * preserve query params when navigating through pagination * fix bugs after RBAC rebase * fix lint errors, fix add org access button
This commit is contained in:
49
src/types.js
Normal file
49
src/types.js
Normal file
@@ -0,0 +1,49 @@
|
||||
import { shape, arrayOf, number, string, bool } from 'prop-types';
|
||||
|
||||
export const Role = shape({
|
||||
descendent_roles: arrayOf(string),
|
||||
role: shape({
|
||||
id: number.isRequired,
|
||||
name: string.isRequired,
|
||||
description: string,
|
||||
user_capabilities: shape({
|
||||
unattach: bool,
|
||||
}).isRequired,
|
||||
}),
|
||||
});
|
||||
|
||||
export const AccessRecord = shape({
|
||||
id: number.isRequired,
|
||||
username: string.isRequired,
|
||||
url: string.isRequired,
|
||||
email: string,
|
||||
first_name: string,
|
||||
last_name: string,
|
||||
is_superuser: bool,
|
||||
is_system_auditor: bool,
|
||||
created: string,
|
||||
last_login: string,
|
||||
ldap_dn: string,
|
||||
related: shape({}),
|
||||
summary_fields: shape({
|
||||
direct_access: arrayOf(Role).isRequired,
|
||||
indirect_access: arrayOf(Role).isRequired,
|
||||
}).isRequired,
|
||||
type: string,
|
||||
});
|
||||
|
||||
export const Organization = shape({
|
||||
id: number.isRequired,
|
||||
name: string.isRequired,
|
||||
custom_virtualenv: string, // ?
|
||||
description: string,
|
||||
max_hosts: number,
|
||||
related: shape(),
|
||||
summary_fields: shape({
|
||||
object_roles: shape(),
|
||||
}),
|
||||
type: string,
|
||||
url: string,
|
||||
created: string,
|
||||
modified: string,
|
||||
});
|
||||
Reference in New Issue
Block a user