mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 09:38:10 -03:30
Changed post to create in api.js. Removed capitalize text component in favor of css solution. Updates to empty list contents. Fixes padding on notifications list
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
import React from 'react';
|
||||
|
||||
class CapitalizeText extends React.Component {
|
||||
upperCaseFirstLetter = (string) => (typeof string === 'string' ? string.charAt(0).toUpperCase() + string.slice(1) : '');
|
||||
|
||||
render () {
|
||||
const { text } = this.props;
|
||||
return (
|
||||
this.upperCaseFirstLetter(text)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CapitalizeText;
|
||||
@@ -8,7 +8,6 @@ import {
|
||||
Badge,
|
||||
Switch
|
||||
} from '@patternfly/react-core';
|
||||
import CapitalizeText from '../CapitalizeText';
|
||||
|
||||
class NotificationListItem extends React.Component {
|
||||
constructor (props) {
|
||||
@@ -38,6 +37,10 @@ class NotificationListItem extends React.Component {
|
||||
errorTurnedOn
|
||||
} = this.props;
|
||||
|
||||
const capText = {
|
||||
textTransform: 'capitalize'
|
||||
};
|
||||
|
||||
return (
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
@@ -54,12 +57,11 @@ class NotificationListItem extends React.Component {
|
||||
</Link>
|
||||
</div>
|
||||
<Badge
|
||||
style={capText}
|
||||
className="pf-u-display-inline-flex"
|
||||
isRead
|
||||
>
|
||||
{' '}
|
||||
<CapitalizeText text={notificationType} />
|
||||
{' '}
|
||||
{notificationType}
|
||||
</Badge>
|
||||
</div>
|
||||
<div className="pf-c-data-list__cell" />
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, {
|
||||
Component,
|
||||
Fragment
|
||||
} from 'react';
|
||||
import { Title, EmptyState, EmptyStateIcon } from '@patternfly/react-core';
|
||||
import { Title, EmptyState, EmptyStateIcon, EmptyStateBody } from '@patternfly/react-core';
|
||||
import { CubesIcon } from '@patternfly/react-icons';
|
||||
import { I18n, i18nMark } from '@lingui/react';
|
||||
import { Trans, t } from '@lingui/macro';
|
||||
@@ -289,8 +289,11 @@ class Notifications extends Component {
|
||||
<EmptyState>
|
||||
<EmptyStateIcon icon={CubesIcon} />
|
||||
<Title size="lg">
|
||||
<Trans>NO NOTIFICATIONS HAVE BEEN CREATED</Trans>
|
||||
<Trans>No Notifictions Found</Trans>
|
||||
</Title>
|
||||
<EmptyStateBody>
|
||||
<Trans>Please add a notification template to populate this list</Trans>
|
||||
</EmptyStateBody>
|
||||
</EmptyState>
|
||||
)}
|
||||
<Fragment>
|
||||
|
||||
Reference in New Issue
Block a user