mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
Add empty initial states and adjust rendering logic.
This commit is contained in:
@@ -104,6 +104,12 @@ class OrganizationAccessList extends React.Component {
|
|||||||
sortedColumnKey: 'username',
|
sortedColumnKey: 'username',
|
||||||
isCompact: false,
|
isCompact: false,
|
||||||
showWarning: false,
|
showWarning: false,
|
||||||
|
warningTitle: '',
|
||||||
|
warningMsg: '',
|
||||||
|
deleteType: '',
|
||||||
|
deleteRoleId: null,
|
||||||
|
deleteResourceId: null,
|
||||||
|
results: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
this.fetchOrgAccessList = this.fetchOrgAccessList.bind(this);
|
this.fetchOrgAccessList = this.fetchOrgAccessList.bind(this);
|
||||||
@@ -300,10 +306,10 @@ class OrganizationAccessList extends React.Component {
|
|||||||
} = this.state;
|
} = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{!error && !results && (
|
{!error && results.length <= 0 && (
|
||||||
<h1>Loading...</h1> // TODO: replace with proper loading state
|
<h1>Loading...</h1> // TODO: replace with proper loading state
|
||||||
)}
|
)}
|
||||||
{error && !results && (
|
{error && results.length <= 0 && (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<div>{error.message}</div>
|
<div>{error.message}</div>
|
||||||
{error.response && (
|
{error.response && (
|
||||||
@@ -311,7 +317,7 @@ class OrganizationAccessList extends React.Component {
|
|||||||
)}
|
)}
|
||||||
</Fragment> // TODO: replace with proper error handling
|
</Fragment> // TODO: replace with proper error handling
|
||||||
)}
|
)}
|
||||||
{results && (
|
{results.length > 0 && (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<DataListToolbar
|
<DataListToolbar
|
||||||
sortedColumnKey={sortedColumnKey}
|
sortedColumnKey={sortedColumnKey}
|
||||||
|
|||||||
Reference in New Issue
Block a user