mirror of
https://github.com/ansible/awx.git
synced 2026-04-04 17:55:06 -02:30
Changed displayed type name of plain jobs
updated and added i18n removed import prettier
This commit is contained in:
@@ -15,7 +15,6 @@ import DataListCell from '@components/DataListCell';
|
|||||||
import { RocketIcon } from '@patternfly/react-icons';
|
import { RocketIcon } from '@patternfly/react-icons';
|
||||||
import LaunchButton from '@components/LaunchButton';
|
import LaunchButton from '@components/LaunchButton';
|
||||||
import StatusIcon from '@components/StatusIcon';
|
import StatusIcon from '@components/StatusIcon';
|
||||||
import { toTitleCase } from '@util/strings';
|
|
||||||
import { formatDateString } from '@util/dates';
|
import { formatDateString } from '@util/dates';
|
||||||
import { JOB_TYPE_URL_SEGMENTS } from '@constants';
|
import { JOB_TYPE_URL_SEGMENTS } from '@constants';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
@@ -36,6 +35,15 @@ function JobListItem({
|
|||||||
}) {
|
}) {
|
||||||
const labelId = `check-action-${job.id}`;
|
const labelId = `check-action-${job.id}`;
|
||||||
|
|
||||||
|
const jobTypes = {
|
||||||
|
project_update: i18n._(t`SCM Update`),
|
||||||
|
inventory_update: i18n._(t`Inventory Sync`),
|
||||||
|
job: i18n._(t`Playbook Run`),
|
||||||
|
command: i18n._(t`Command`),
|
||||||
|
management_job: i18n._(t`Management Job`),
|
||||||
|
workflow_job: i18n._(t`Workflow Job`),
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DataListItem aria-labelledby={labelId} id={`${job.id}`}>
|
<DataListItem aria-labelledby={labelId} id={`${job.id}`}>
|
||||||
<DataListItemRow>
|
<DataListItemRow>
|
||||||
@@ -62,7 +70,7 @@ function JobListItem({
|
|||||||
...(showTypeColumn
|
...(showTypeColumn
|
||||||
? [
|
? [
|
||||||
<DataListCell key="type" aria-label="type">
|
<DataListCell key="type" aria-label="type">
|
||||||
{toTitleCase(job.type)}
|
{jobTypes[job.type]}
|
||||||
</DataListCell>,
|
</DataListCell>,
|
||||||
]
|
]
|
||||||
: []),
|
: []),
|
||||||
|
|||||||
Reference in New Issue
Block a user