mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 22:46:01 -03:30
Removes unnecessary fragment elements. Fixes vertical alignment on notif row item. Bind notification list functions to constructor
This commit is contained in:
@@ -44,7 +44,7 @@ class NotificationListItem extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<I18n>
|
<I18n>
|
||||||
{({ i18n }) => (
|
{({ i18n }) => (
|
||||||
<li key={itemId} className="pf-c-data-list__item">
|
<li key={itemId} className="pf-c-data-list__item pf-u-flex-row pf-u-align-items-center">
|
||||||
<div className="pf-c-data-list__cell pf-u-flex-row">
|
<div className="pf-c-data-list__cell pf-u-flex-row">
|
||||||
<div className="pf-u-display-inline-flex">
|
<div className="pf-u-display-inline-flex">
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
@@ -49,6 +49,19 @@ class Notifications extends Component {
|
|||||||
successTemplateIds: [],
|
successTemplateIds: [],
|
||||||
errorTemplateIds: []
|
errorTemplateIds: []
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.onSearch = this.onSearch.bind(this);
|
||||||
|
this.getQueryParams = this.getQueryParams.bind(this);
|
||||||
|
this.onSort = this.onSort.bind(this);
|
||||||
|
this.onSetPage = this.onSetPage.bind(this);
|
||||||
|
this.onSelectAll = this.onSelectAll.bind(this);
|
||||||
|
this.onSelect = this.onSelect.bind(this);
|
||||||
|
this.toggleError = this.toggleError.bind(this);
|
||||||
|
this.toggleSuccess = this.toggleSuccess.bind(this);
|
||||||
|
this.updateUrl = this.updateUrl.bind(this);
|
||||||
|
this.postToError = this.postToError.bind(this);
|
||||||
|
this.postToSuccess = this.postToSuccess.bind(this);
|
||||||
|
this.fetchNotifications = this.fetchNotifications.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
@@ -296,7 +309,6 @@ class Notifications extends Component {
|
|||||||
</EmptyStateBody>
|
</EmptyStateBody>
|
||||||
</EmptyState>
|
</EmptyState>
|
||||||
)}
|
)}
|
||||||
<Fragment>
|
|
||||||
{(
|
{(
|
||||||
typeof noInitialResults !== 'undefined'
|
typeof noInitialResults !== 'undefined'
|
||||||
&& !noInitialResults
|
&& !noInitialResults
|
||||||
@@ -348,7 +360,6 @@ class Notifications extends Component {
|
|||||||
{loading ? <div>loading...</div> : ''}
|
{loading ? <div>loading...</div> : ''}
|
||||||
{error ? <div>error</div> : ''}
|
{error ? <div>error</div> : ''}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
</Fragment>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ const OrganizationDetail = ({
|
|||||||
switch (currentTab) {
|
switch (currentTab) {
|
||||||
case 'notifications':
|
case 'notifications':
|
||||||
relatedTemplate = (
|
relatedTemplate = (
|
||||||
<Fragment>
|
|
||||||
<NotificationsList
|
<NotificationsList
|
||||||
getNotifications={(id, reqParams) => api.getOrganizationNotifications(id, reqParams)}
|
getNotifications={(id, reqParams) => api.getOrganizationNotifications(id, reqParams)}
|
||||||
getSuccess={(id, reqParams) => api.getOrganizationNotificationSuccess(id, reqParams)}
|
getSuccess={(id, reqParams) => api.getOrganizationNotificationSuccess(id, reqParams)}
|
||||||
@@ -65,7 +64,6 @@ const OrganizationDetail = ({
|
|||||||
location={location}
|
location={location}
|
||||||
history={history}
|
history={history}
|
||||||
/>
|
/>
|
||||||
</Fragment>
|
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user