mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
prettier
This commit is contained in:
parent
e3d67117e7
commit
761ed6dec0
@ -15,7 +15,7 @@ class Jobs extends Base {
|
||||
this.baseUrl = '/api/v2/jobs/';
|
||||
}
|
||||
|
||||
readDetail (id, type) {
|
||||
readDetail(id, type) {
|
||||
return this.http.get(`/api/v2${BASE_URLS[type]}${id}/`);
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import { t } from '@lingui/macro';
|
||||
import Chip from './Chip';
|
||||
import { Credential } from '../../types';
|
||||
|
||||
function CredentialChip ({ credential, i18n, ...props }) {
|
||||
function CredentialChip({ credential, i18n, ...props }) {
|
||||
let type;
|
||||
if (credential.cloud) {
|
||||
type = i18n._(t`Cloud`);
|
||||
@ -21,7 +21,7 @@ function CredentialChip ({ credential, i18n, ...props }) {
|
||||
<strong>{type}: </strong>
|
||||
{credential.name}
|
||||
</Chip>
|
||||
)
|
||||
);
|
||||
}
|
||||
CredentialChip.propTypes = {
|
||||
credential: Credential.isRequired,
|
||||
|
@ -26,7 +26,9 @@ const DetailValue = styled(({ fullWidth, ...props }) => (
|
||||
`;
|
||||
|
||||
const Detail = ({ label, value, fullWidth }) => {
|
||||
if (!value && typeof value !== 'number') { return null; }
|
||||
if (!value && typeof value !== 'number') {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<Fragment>
|
||||
<DetailName component={TextListItemVariants.dt} fullWidth={fullWidth}>
|
||||
|
@ -27,7 +27,8 @@ class JobListItem extends Component {
|
||||
onChange={onSelect}
|
||||
aria-labelledby={`check-action-${job.id}`}
|
||||
/>
|
||||
<DataListItemCells dataListCells={[
|
||||
<DataListItemCells
|
||||
dataListCells={[
|
||||
<DataListCell key="divider">
|
||||
<VerticalSeparator />
|
||||
<span>
|
||||
|
@ -27,7 +27,7 @@ class Jobs extends Component {
|
||||
return;
|
||||
}
|
||||
|
||||
const type =JOB_TYPE_URLS[job.type];
|
||||
const type = JOB_TYPE_URLS[job.type];
|
||||
const breadcrumbConfig = {
|
||||
'/jobs': i18n._(t`Jobs`),
|
||||
[`/jobs/${type}/${job.id}`]: `${job.name}`,
|
||||
|
@ -22,8 +22,10 @@ export function jsonToYaml(jsonString) {
|
||||
return yaml.safeDump(value);
|
||||
}
|
||||
|
||||
export function isJson (jsonString) {
|
||||
if (typeof jsonString !== 'string') { return false; }
|
||||
export function isJson(jsonString) {
|
||||
if (typeof jsonString !== 'string') {
|
||||
return false;
|
||||
}
|
||||
let value;
|
||||
try {
|
||||
value = JSON.parse(jsonString);
|
||||
|
Loading…
Reference in New Issue
Block a user