Files
awx/src/types.js
Keith Grant 9d66b583b7 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
2019-04-29 10:08:50 -04:00

50 lines
1.1 KiB
JavaScript

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,
});