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:
Keith Grant
2019-04-29 10:08:50 -04:00
committed by GitHub
parent 3c06c97c32
commit 9d66b583b7
36 changed files with 4133 additions and 1427 deletions

49
src/types.js Normal file
View 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,
});