mirror of
https://github.com/ansible/awx.git
synced 2026-02-15 18:20:00 -03:30
Add close button to job detail and test
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
import React, { Component } from 'react';
|
||||
import { CardBody } from '@patternfly/react-core';
|
||||
|
||||
import { Link, withRouter } from 'react-router-dom';
|
||||
import { withI18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
import { CardBody, Button } from '@patternfly/react-core';
|
||||
import styled from 'styled-components';
|
||||
|
||||
const ActionButtonWrapper = styled.div`
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
`;
|
||||
class JobDetail extends Component {
|
||||
constructor (props) {
|
||||
super(props);
|
||||
@@ -9,15 +16,28 @@ class JobDetail extends Component {
|
||||
|
||||
render () {
|
||||
const {
|
||||
job
|
||||
job,
|
||||
i18n
|
||||
} = this.props;
|
||||
|
||||
|
||||
return (
|
||||
<CardBody>
|
||||
<b>{job.name}</b>
|
||||
|
||||
<ActionButtonWrapper>
|
||||
<Button
|
||||
variant='secondary'
|
||||
aria-label="close"
|
||||
component={Link}
|
||||
to={`/jobs`}
|
||||
>
|
||||
{i18n._(t`Close`)}
|
||||
</Button>
|
||||
</ActionButtonWrapper>
|
||||
</CardBody>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default JobDetail;
|
||||
export default withI18n()(withRouter(JobDetail));
|
||||
|
||||
Reference in New Issue
Block a user