mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 11:25:08 -02:30
make prettier adjustments to things the pf v4 codemod tool broke
This commit is contained in:
@@ -63,7 +63,9 @@ function AlertModal({
|
|||||||
const customHeader = (
|
const customHeader = (
|
||||||
<Header>
|
<Header>
|
||||||
{variant ? variantIcons[variant] : null}
|
{variant ? variantIcons[variant] : null}
|
||||||
<Title id="alert-modal-header-label" size="2xl" headingLevel="h2">{title}</Title>
|
<Title id="alert-modal-header-label" size="2xl" headingLevel="h2">
|
||||||
|
{title}
|
||||||
|
</Title>
|
||||||
</Header>
|
</Header>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class AnsibleSelect extends React.Component {
|
|||||||
onChange={this.onSelectChange}
|
onChange={this.onSelectChange}
|
||||||
onBlur={onBlur}
|
onBlur={onBlur}
|
||||||
aria-label={i18n._(t`Select Input`)}
|
aria-label={i18n._(t`Select Input`)}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
className={className}
|
className={className}
|
||||||
isDisabled={isDisabled}
|
isDisabled={isDisabled}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ function AssociateModal({
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Modal
|
<Modal
|
||||||
|
|
||||||
variant="large"
|
variant="large"
|
||||||
title={title}
|
title={title}
|
||||||
isOpen={isModalOpen}
|
isOpen={isModalOpen}
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ import { CubesIcon } from '@patternfly/react-icons';
|
|||||||
const ContentEmpty = ({ i18n, title = '', message = '' }) => (
|
const ContentEmpty = ({ i18n, title = '', message = '' }) => (
|
||||||
<EmptyState variant="full">
|
<EmptyState variant="full">
|
||||||
<EmptyStateIcon icon={CubesIcon} />
|
<EmptyStateIcon icon={CubesIcon} />
|
||||||
<Title size="lg" headingLevel="h3">{title || i18n._(t`No items found.`)}</Title>
|
<Title size="lg" headingLevel="h3">
|
||||||
|
{title || i18n._(t`No items found.`)}
|
||||||
|
</Title>
|
||||||
<EmptyStateBody>{message}</EmptyStateBody>
|
<EmptyStateBody>{message}</EmptyStateBody>
|
||||||
</EmptyState>
|
</EmptyState>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
ToolbarGroup as _ToolbarGroup,
|
ToolbarGroup as _ToolbarGroup,
|
||||||
ToolbarItem,
|
ToolbarItem,
|
||||||
ToolbarToggleGroup,
|
ToolbarToggleGroup,
|
||||||
} from '@patternfly/react-core';
|
} from '@patternfly/react-core';
|
||||||
import { SearchIcon } from '@patternfly/react-icons';
|
import { SearchIcon } from '@patternfly/react-icons';
|
||||||
import ExpandCollapse from '../ExpandCollapse';
|
import ExpandCollapse from '../ExpandCollapse';
|
||||||
import Search from '../Search';
|
import Search from '../Search';
|
||||||
|
|||||||
@@ -29,14 +29,14 @@ function FormField(props) {
|
|||||||
helperText={helperText}
|
helperText={helperText}
|
||||||
helperTextInvalid={meta.error}
|
helperTextInvalid={meta.error}
|
||||||
isRequired={isRequired}
|
isRequired={isRequired}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
label={label}
|
label={label}
|
||||||
>
|
>
|
||||||
<FieldTooltip content={tooltip} maxWidth={tooltipMaxWidth} />
|
<FieldTooltip content={tooltip} maxWidth={tooltipMaxWidth} />
|
||||||
<TextArea
|
<TextArea
|
||||||
id={id}
|
id={id}
|
||||||
isRequired={isRequired}
|
isRequired={isRequired}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
resizeOrientation="vertical"
|
resizeOrientation="vertical"
|
||||||
{...rest}
|
{...rest}
|
||||||
{...field}
|
{...field}
|
||||||
@@ -51,14 +51,14 @@ function FormField(props) {
|
|||||||
helperText={helperText}
|
helperText={helperText}
|
||||||
helperTextInvalid={meta.error}
|
helperTextInvalid={meta.error}
|
||||||
isRequired={isRequired}
|
isRequired={isRequired}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
label={label}
|
label={label}
|
||||||
>
|
>
|
||||||
<FieldTooltip content={tooltip} maxWidth={tooltipMaxWidth} />
|
<FieldTooltip content={tooltip} maxWidth={tooltipMaxWidth} />
|
||||||
<TextInput
|
<TextInput
|
||||||
id={id}
|
id={id}
|
||||||
isRequired={isRequired}
|
isRequired={isRequired}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
{...rest}
|
{...rest}
|
||||||
{...field}
|
{...field}
|
||||||
type={type}
|
type={type}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ function PasswordField(props) {
|
|||||||
fieldId={id}
|
fieldId={id}
|
||||||
helperTextInvalid={meta.error}
|
helperTextInvalid={meta.error}
|
||||||
isRequired={isRequired}
|
isRequired={isRequired}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
label={label}
|
label={label}
|
||||||
>
|
>
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ function PasswordInput(props) {
|
|||||||
value={field.value === '$encrypted$' ? '' : field.value}
|
value={field.value === '$encrypted$' ? '' : field.value}
|
||||||
isDisabled={isDisabled}
|
isDisabled={isDisabled}
|
||||||
isRequired={isRequired}
|
isRequired={isRequired}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
type={inputType}
|
type={inputType}
|
||||||
onChange={(_, event) => {
|
onChange={(_, event) => {
|
||||||
field.onChange(event);
|
field.onChange(event);
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ const InventoryLookupField = withI18n()(({ i18n, host }) => {
|
|||||||
label={i18n._(t`Inventory`)}
|
label={i18n._(t`Inventory`)}
|
||||||
isRequired
|
isRequired
|
||||||
fieldId="inventory-lookup"
|
fieldId="inventory-lookup"
|
||||||
validated={(!inventoryMeta.touched || !inventoryMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!inventoryMeta.touched || !inventoryMeta.error ? 'default' : 'error'
|
||||||
|
}
|
||||||
helperTextInvalid={inventoryMeta.error}
|
helperTextInvalid={inventoryMeta.error}
|
||||||
>
|
>
|
||||||
<FieldTooltip
|
<FieldTooltip
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ function JobTypeField({ i18n }) {
|
|||||||
<FormGroup
|
<FormGroup
|
||||||
fieldId="propmt-job-type"
|
fieldId="propmt-job-type"
|
||||||
label={i18n._(t`Job Type`)}
|
label={i18n._(t`Job Type`)}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
>
|
>
|
||||||
<FieldTooltip
|
<FieldTooltip
|
||||||
content={i18n._(t`For job templates, select run to execute the playbook.
|
content={i18n._(t`For job templates, select run to execute the playbook.
|
||||||
@@ -132,7 +132,7 @@ function VerbosityField({ i18n }) {
|
|||||||
return (
|
return (
|
||||||
<FormGroup
|
<FormGroup
|
||||||
fieldId="prompt-verbosity"
|
fieldId="prompt-verbosity"
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
label={i18n._(t`Verbosity`)}
|
label={i18n._(t`Verbosity`)}
|
||||||
>
|
>
|
||||||
<FieldTooltip
|
<FieldTooltip
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ function MultipleChoiceField({ question }) {
|
|||||||
fieldId={id}
|
fieldId={id}
|
||||||
helperTextInvalid={meta.error}
|
helperTextInvalid={meta.error}
|
||||||
isRequired={question.required}
|
isRequired={question.required}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
label={question.question_name}
|
label={question.question_name}
|
||||||
>
|
>
|
||||||
<FieldTooltip content={question.question_description} />
|
<FieldTooltip content={question.question_description} />
|
||||||
@@ -124,7 +124,7 @@ function MultiSelectField({ question }) {
|
|||||||
fieldId={id}
|
fieldId={id}
|
||||||
helperTextInvalid={meta.error}
|
helperTextInvalid={meta.error}
|
||||||
isRequired={question.required}
|
isRequired={question.required}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
label={question.question_name}
|
label={question.question_name}
|
||||||
>
|
>
|
||||||
<FieldTooltip content={question.question_description} />
|
<FieldTooltip content={question.question_description} />
|
||||||
|
|||||||
@@ -2,10 +2,7 @@ import React, { Fragment } from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import {
|
import { Toolbar, ToolbarContent } from '@patternfly/react-core';
|
||||||
Toolbar,
|
|
||||||
ToolbarContent,
|
|
||||||
} from '@patternfly/react-core';
|
|
||||||
import DataListToolbar from '../DataListToolbar';
|
import DataListToolbar from '../DataListToolbar';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ function CredentialLookup({
|
|||||||
<FormGroup
|
<FormGroup
|
||||||
fieldId="credential"
|
fieldId="credential"
|
||||||
isRequired={required}
|
isRequired={required}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
label={label}
|
label={label}
|
||||||
helperTextInvalid={helperTextInvalid}
|
helperTextInvalid={helperTextInvalid}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -142,7 +142,6 @@ function Lookup(props) {
|
|||||||
</ChipHolder>
|
</ChipHolder>
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
<Modal
|
<Modal
|
||||||
|
|
||||||
variant="large"
|
variant="large"
|
||||||
title={i18n._(t`Select ${header || i18n._(t`Items`)}`)}
|
title={i18n._(t`Select ${header || i18n._(t`Items`)}`)}
|
||||||
isOpen={isModalOpen}
|
isOpen={isModalOpen}
|
||||||
@@ -196,11 +195,7 @@ Lookup.defaultProps = {
|
|||||||
required: false,
|
required: false,
|
||||||
onBlur: () => {},
|
onBlur: () => {},
|
||||||
renderItemChip: ({ item, removeItem, canDelete }) => (
|
renderItemChip: ({ item, removeItem, canDelete }) => (
|
||||||
<Chip
|
<Chip key={item.id} onClick={() => removeItem(item)}>
|
||||||
key={item.id}
|
|
||||||
onClick={() => removeItem(item)}
|
|
||||||
|
|
||||||
>
|
|
||||||
{item.name}
|
{item.name}
|
||||||
</Chip>
|
</Chip>
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ function OrganizationLookup({
|
|||||||
fieldId="organization"
|
fieldId="organization"
|
||||||
helperTextInvalid={helperTextInvalid}
|
helperTextInvalid={helperTextInvalid}
|
||||||
isRequired={required}
|
isRequired={required}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
label={i18n._(t`Organization`)}
|
label={i18n._(t`Organization`)}
|
||||||
>
|
>
|
||||||
<Lookup
|
<Lookup
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ function ProjectLookup({
|
|||||||
fieldId="project"
|
fieldId="project"
|
||||||
helperTextInvalid={helperTextInvalid}
|
helperTextInvalid={helperTextInvalid}
|
||||||
isRequired={required}
|
isRequired={required}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
label={i18n._(t`Project`)}
|
label={i18n._(t`Project`)}
|
||||||
>
|
>
|
||||||
{tooltip && <FieldTooltip content={tooltip} />}
|
{tooltip && <FieldTooltip content={tooltip} />}
|
||||||
|
|||||||
@@ -194,9 +194,7 @@ function PromptDetail({ i18n, resource, launchConfig = {}, overrides = {} }) {
|
|||||||
totalChips={overrides.job_tags.split(',').length}
|
totalChips={overrides.job_tags.split(',').length}
|
||||||
>
|
>
|
||||||
{overrides.job_tags.split(',').map(jobTag => (
|
{overrides.job_tags.split(',').map(jobTag => (
|
||||||
<Chip key={jobTag} >
|
<Chip key={jobTag}>{jobTag}</Chip>
|
||||||
{jobTag}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
@@ -212,9 +210,7 @@ function PromptDetail({ i18n, resource, launchConfig = {}, overrides = {} }) {
|
|||||||
totalChips={overrides.skip_tags.split(',').length}
|
totalChips={overrides.skip_tags.split(',').length}
|
||||||
>
|
>
|
||||||
{overrides.skip_tags.split(',').map(skipTag => (
|
{overrides.skip_tags.split(',').map(skipTag => (
|
||||||
<Chip key={skipTag} >
|
<Chip key={skipTag}>{skipTag}</Chip>
|
||||||
{skipTag}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,9 +126,7 @@ function PromptInventorySourceDetail({ i18n, resource }) {
|
|||||||
totalChips={source_regions.split(',').length}
|
totalChips={source_regions.split(',').length}
|
||||||
>
|
>
|
||||||
{source_regions.split(',').map(region => (
|
{source_regions.split(',').map(region => (
|
||||||
<Chip key={region} >
|
<Chip key={region}>{region}</Chip>
|
||||||
{region}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
@@ -144,9 +142,7 @@ function PromptInventorySourceDetail({ i18n, resource }) {
|
|||||||
totalChips={instance_filters.split(',').length}
|
totalChips={instance_filters.split(',').length}
|
||||||
>
|
>
|
||||||
{instance_filters.split(',').map(filter => (
|
{instance_filters.split(',').map(filter => (
|
||||||
<Chip key={filter} >
|
<Chip key={filter}>{filter}</Chip>
|
||||||
{filter}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
@@ -159,9 +155,7 @@ function PromptInventorySourceDetail({ i18n, resource }) {
|
|||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5} totalChips={group_by.split(',').length}>
|
<ChipGroup numChips={5} totalChips={group_by.split(',').length}>
|
||||||
{group_by.split(',').map(group => (
|
{group_by.split(',').map(group => (
|
||||||
<Chip key={group} >
|
<Chip key={group}>{group}</Chip>
|
||||||
{group}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,9 +196,7 @@ function PromptJobTemplateDetail({ i18n, resource }) {
|
|||||||
totalChips={summary_fields.labels.results.length}
|
totalChips={summary_fields.labels.results.length}
|
||||||
>
|
>
|
||||||
{summary_fields.labels.results.map(label => (
|
{summary_fields.labels.results.map(label => (
|
||||||
<Chip key={label.id} >
|
<Chip key={label.id}>{label.name}</Chip>
|
||||||
{label.name}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
@@ -211,9 +209,7 @@ function PromptJobTemplateDetail({ i18n, resource }) {
|
|||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5} totalChips={instance_groups.length}>
|
<ChipGroup numChips={5} totalChips={instance_groups.length}>
|
||||||
{instance_groups.map(ig => (
|
{instance_groups.map(ig => (
|
||||||
<Chip key={ig.id} >
|
<Chip key={ig.id}>{ig.name}</Chip>
|
||||||
{ig.name}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
@@ -226,9 +222,7 @@ function PromptJobTemplateDetail({ i18n, resource }) {
|
|||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5} totalChips={job_tags.split(',').length}>
|
<ChipGroup numChips={5} totalChips={job_tags.split(',').length}>
|
||||||
{job_tags.split(',').map(jobTag => (
|
{job_tags.split(',').map(jobTag => (
|
||||||
<Chip key={jobTag} >
|
<Chip key={jobTag}>{jobTag}</Chip>
|
||||||
{jobTag}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
@@ -241,9 +235,7 @@ function PromptJobTemplateDetail({ i18n, resource }) {
|
|||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5} totalChips={skip_tags.split(',').length}>
|
<ChipGroup numChips={5} totalChips={skip_tags.split(',').length}>
|
||||||
{skip_tags.split(',').map(skipTag => (
|
{skip_tags.split(',').map(skipTag => (
|
||||||
<Chip key={skipTag} >
|
<Chip key={skipTag}>{skipTag}</Chip>
|
||||||
{skipTag}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,9 +114,7 @@ function PromptWFJobTemplateDetail({ i18n, resource }) {
|
|||||||
totalChips={summary_fields.labels.results.length}
|
totalChips={summary_fields.labels.results.length}
|
||||||
>
|
>
|
||||||
{summary_fields.labels.results.map(label => (
|
{summary_fields.labels.results.map(label => (
|
||||||
<Chip key={label.id} >
|
<Chip key={label.id}>{label.name}</Chip>
|
||||||
{label.name}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ class ResourceAccessListItem extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<Chip
|
<Chip
|
||||||
key={role.id}
|
key={role.id}
|
||||||
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onRoleDelete(role, accessRecord);
|
onRoleDelete(role, accessRecord);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -194,9 +194,7 @@ function ScheduleDetail({ schedule, i18n }) {
|
|||||||
totalChips={job_tags.split(',').length}
|
totalChips={job_tags.split(',').length}
|
||||||
>
|
>
|
||||||
{job_tags.split(',').map(jobTag => (
|
{job_tags.split(',').map(jobTag => (
|
||||||
<Chip key={jobTag} >
|
<Chip key={jobTag}>{jobTag}</Chip>
|
||||||
{jobTag}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
@@ -212,9 +210,7 @@ function ScheduleDetail({ schedule, i18n }) {
|
|||||||
totalChips={skip_tags.split(',').length}
|
totalChips={skip_tags.split(',').length}
|
||||||
>
|
>
|
||||||
{skip_tags.split(',').map(skipTag => (
|
{skip_tags.split(',').map(skipTag => (
|
||||||
<Chip key={skipTag} >
|
<Chip key={skipTag}>{skipTag}</Chip>
|
||||||
{skipTag}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -231,7 +231,9 @@ const FrequencyDetailSubform = ({ i18n }) => {
|
|||||||
fieldId="schedule-run-every"
|
fieldId="schedule-run-every"
|
||||||
helperTextInvalid={intervalMeta.error}
|
helperTextInvalid={intervalMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
validated={(!intervalMeta.touched || !intervalMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!intervalMeta.touched || !intervalMeta.error ? 'default' : 'error'
|
||||||
|
}
|
||||||
label={i18n._(t`Run every`)}
|
label={i18n._(t`Run every`)}
|
||||||
>
|
>
|
||||||
<div css="display: flex">
|
<div css="display: flex">
|
||||||
@@ -255,7 +257,11 @@ const FrequencyDetailSubform = ({ i18n }) => {
|
|||||||
fieldId="schedule-days-of-week"
|
fieldId="schedule-days-of-week"
|
||||||
helperTextInvalid={daysOfWeekMeta.error}
|
helperTextInvalid={daysOfWeekMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
validated={(!daysOfWeekMeta.touched || !daysOfWeekMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!daysOfWeekMeta.touched || !daysOfWeekMeta.error
|
||||||
|
? 'default'
|
||||||
|
: 'error'
|
||||||
|
}
|
||||||
label={i18n._(t`On days`)}
|
label={i18n._(t`On days`)}
|
||||||
>
|
>
|
||||||
<div css="display: flex">
|
<div css="display: flex">
|
||||||
@@ -339,7 +345,9 @@ const FrequencyDetailSubform = ({ i18n }) => {
|
|||||||
fieldId="schedule-run-on"
|
fieldId="schedule-run-on"
|
||||||
helperTextInvalid={runOnMeta.error}
|
helperTextInvalid={runOnMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
validated={(!runOnMeta.touched || !runOnMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!runOnMeta.touched || !runOnMeta.error ? 'default' : 'error'
|
||||||
|
}
|
||||||
label={i18n._(t`Run on`)}
|
label={i18n._(t`Run on`)}
|
||||||
>
|
>
|
||||||
<RunOnRadio
|
<RunOnRadio
|
||||||
@@ -502,7 +510,7 @@ const FrequencyDetailSubform = ({ i18n }) => {
|
|||||||
fieldId="schedule-end"
|
fieldId="schedule-end"
|
||||||
helperTextInvalid={endMeta.error}
|
helperTextInvalid={endMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
validated={(!endMeta.touched || !endMeta.error) ? 'default' : 'error'}
|
validated={!endMeta.touched || !endMeta.error ? 'default' : 'error'}
|
||||||
label={i18n._(t`End`)}
|
label={i18n._(t`End`)}
|
||||||
>
|
>
|
||||||
<Radio
|
<Radio
|
||||||
@@ -556,7 +564,11 @@ const FrequencyDetailSubform = ({ i18n }) => {
|
|||||||
fieldId="schedule-end-datetime"
|
fieldId="schedule-end-datetime"
|
||||||
helperTextInvalid={endDateTimeMeta.error}
|
helperTextInvalid={endDateTimeMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
validated={(!endDateTimeMeta.touched || !endDateTimeMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!endDateTimeMeta.touched || !endDateTimeMeta.error
|
||||||
|
? 'default'
|
||||||
|
: 'error'
|
||||||
|
}
|
||||||
label={i18n._(t`End date/time`)}
|
label={i18n._(t`End date/time`)}
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -104,7 +104,11 @@ function ScheduleFormFields({ i18n, zoneOptions }) {
|
|||||||
fieldId="schedule-start-datetime"
|
fieldId="schedule-start-datetime"
|
||||||
helperTextInvalid={startDateTimeMeta.error}
|
helperTextInvalid={startDateTimeMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
validated={(!startDateTimeMeta.touched || !startDateTimeMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!startDateTimeMeta.touched || !startDateTimeMeta.error
|
||||||
|
? 'default'
|
||||||
|
: 'error'
|
||||||
|
}
|
||||||
label={i18n._(t`Start date/time`)}
|
label={i18n._(t`Start date/time`)}
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
@@ -120,7 +124,9 @@ function ScheduleFormFields({ i18n, zoneOptions }) {
|
|||||||
fieldId="schedule-timezone"
|
fieldId="schedule-timezone"
|
||||||
helperTextInvalid={timezoneMeta.error}
|
helperTextInvalid={timezoneMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
validated={(!timezoneMeta.touched || !timezoneMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!timezoneMeta.touched || !timezoneMeta.error ? 'default' : 'error'
|
||||||
|
}
|
||||||
label={i18n._(t`Local time zone`)}
|
label={i18n._(t`Local time zone`)}
|
||||||
>
|
>
|
||||||
<AnsibleSelect
|
<AnsibleSelect
|
||||||
@@ -134,7 +140,9 @@ function ScheduleFormFields({ i18n, zoneOptions }) {
|
|||||||
fieldId="schedule-requency"
|
fieldId="schedule-requency"
|
||||||
helperTextInvalid={frequencyMeta.error}
|
helperTextInvalid={frequencyMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
validated={(!frequencyMeta.touched || !frequencyMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!frequencyMeta.touched || !frequencyMeta.error ? 'default' : 'error'
|
||||||
|
}
|
||||||
label={i18n._(t`Run frequency`)}
|
label={i18n._(t`Run frequency`)}
|
||||||
>
|
>
|
||||||
<AnsibleSelect
|
<AnsibleSelect
|
||||||
@@ -153,7 +161,9 @@ function ScheduleFormFields({ i18n, zoneOptions }) {
|
|||||||
</FormGroup>
|
</FormGroup>
|
||||||
{frequency.value !== 'none' && (
|
{frequency.value !== 'none' && (
|
||||||
<SubFormLayout>
|
<SubFormLayout>
|
||||||
<Title size="md" headingLevel="h4">{i18n._(t`Frequency Details`)}</Title>
|
<Title size="md" headingLevel="h4">
|
||||||
|
{i18n._(t`Frequency Details`)}
|
||||||
|
</Title>
|
||||||
<FormColumnLayout>
|
<FormColumnLayout>
|
||||||
<FrequencyDetailSubform />
|
<FrequencyDetailSubform />
|
||||||
</FormColumnLayout>
|
</FormColumnLayout>
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {
|
import { Toolbar, ToolbarContent } from '@patternfly/react-core';
|
||||||
Toolbar,
|
|
||||||
ToolbarContent,
|
|
||||||
} from '@patternfly/react-core';
|
|
||||||
import { createMemoryHistory } from 'history';
|
import { createMemoryHistory } from 'history';
|
||||||
import { act } from 'react-dom/test-utils';
|
import { act } from 'react-dom/test-utils';
|
||||||
import { mountWithContexts } from '../../../testUtils/enzymeHelpers';
|
import { mountWithContexts } from '../../../testUtils/enzymeHelpers';
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class SelectedList extends Component {
|
|||||||
const renderChip =
|
const renderChip =
|
||||||
renderItemChip ||
|
renderItemChip ||
|
||||||
(({ item, removeItem }) => (
|
(({ item, removeItem }) => (
|
||||||
<Chip key={item.id} onClick={removeItem} >
|
<Chip key={item.id} onClick={removeItem}>
|
||||||
{item[displayKey]}
|
{item[displayKey]}
|
||||||
</Chip>
|
</Chip>
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ class AuthSettings extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl" headingLevel="h2">{i18n._(t`Authentication Settings`)}</Title>
|
<Title size="2xl" headingLevel="h2">
|
||||||
|
{i18n._(t`Authentication Settings`)}
|
||||||
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection />
|
<PageSection />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
@@ -104,7 +104,9 @@ function CredentialFormFields({
|
|||||||
fieldId="credential-credentialType"
|
fieldId="credential-credentialType"
|
||||||
helperTextInvalid={credTypeMeta.error}
|
helperTextInvalid={credTypeMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
validated={(!credTypeMeta.touched || !credTypeMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!credTypeMeta.touched || !credTypeMeta.error ? 'default' : 'error'
|
||||||
|
}
|
||||||
label={i18n._(t`Credential Type`)}
|
label={i18n._(t`Credential Type`)}
|
||||||
>
|
>
|
||||||
<AnsibleSelect
|
<AnsibleSelect
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ function CredentialPluginField(props) {
|
|||||||
fieldId={id}
|
fieldId={id}
|
||||||
helperTextInvalid={meta.error}
|
helperTextInvalid={meta.error}
|
||||||
isRequired={isRequired}
|
isRequired={isRequired}
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
label={label}
|
label={label}
|
||||||
>
|
>
|
||||||
{field?.value?.credential ? (
|
{field?.value?.credential ? (
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const GoogleComputeEngineSubForm = ({ i18n }) => {
|
|||||||
<FormColumnLayout>
|
<FormColumnLayout>
|
||||||
<FormGroup
|
<FormGroup
|
||||||
fieldId="credential-gce-file"
|
fieldId="credential-gce-file"
|
||||||
validated={(!fileError) ? 'default' : 'error'}
|
validated={!fileError ? 'default' : 'error'}
|
||||||
label={i18n._(t`Service account JSON file`)}
|
label={i18n._(t`Service account JSON file`)}
|
||||||
helperText={i18n._(
|
helperText={i18n._(
|
||||||
t`Select a JSON formatted service account key to autopopulate the following fields.`
|
t`Select a JSON formatted service account key to autopopulate the following fields.`
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ class Dashboard extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl" headingLevel="h2">{i18n._(t`Dashboard`)}</Title>
|
<Title size="2xl" headingLevel="h2">
|
||||||
|
{i18n._(t`Dashboard`)}
|
||||||
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection />
|
<PageSection />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ class InstanceGroups extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl" headingLevel="h2">{i18n._(t`Instance Groups`)}</Title>
|
<Title size="2xl" headingLevel="h2">
|
||||||
|
{i18n._(t`Instance Groups`)}
|
||||||
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection />
|
<PageSection />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
@@ -81,9 +81,7 @@ function InventoryDetail({ inventory, i18n }) {
|
|||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5} totalChips={instanceGroups.length}>
|
<ChipGroup numChips={5} totalChips={instanceGroups.length}>
|
||||||
{instanceGroups.map(ig => (
|
{instanceGroups.map(ig => (
|
||||||
<Chip key={ig.id} >
|
<Chip key={ig.id}>{ig.name}</Chip>
|
||||||
{ig.name}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,9 +163,7 @@ describe('<InventoryGroupsList />', () => {
|
|||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper
|
wrapper.find('Toolbar Button[aria-label="Delete"]').invoke('onClick')();
|
||||||
.find('Toolbar Button[aria-label="Delete"]')
|
|
||||||
.invoke('onClick')();
|
|
||||||
});
|
});
|
||||||
await waitForElement(
|
await waitForElement(
|
||||||
wrapper,
|
wrapper,
|
||||||
@@ -197,9 +195,7 @@ describe('<InventoryGroupsList />', () => {
|
|||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper
|
wrapper.find('Toolbar Button[aria-label="Delete"]').invoke('onClick')();
|
||||||
.find('Toolbar Button[aria-label="Delete"]')
|
|
||||||
.invoke('onClick')();
|
|
||||||
});
|
});
|
||||||
await waitForElement(
|
await waitForElement(
|
||||||
wrapper,
|
wrapper,
|
||||||
|
|||||||
@@ -248,9 +248,7 @@ function InventorySourceDetail({ inventorySource, i18n }) {
|
|||||||
totalChips={source_regions.split(',').length}
|
totalChips={source_regions.split(',').length}
|
||||||
>
|
>
|
||||||
{source_regions.split(',').map(region => (
|
{source_regions.split(',').map(region => (
|
||||||
<Chip key={region} >
|
<Chip key={region}>{region}</Chip>
|
||||||
{region}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
@@ -266,9 +264,7 @@ function InventorySourceDetail({ inventorySource, i18n }) {
|
|||||||
totalChips={instance_filters.split(',').length}
|
totalChips={instance_filters.split(',').length}
|
||||||
>
|
>
|
||||||
{instance_filters.split(',').map(filter => (
|
{instance_filters.split(',').map(filter => (
|
||||||
<Chip key={filter} >
|
<Chip key={filter}>{filter}</Chip>
|
||||||
{filter}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
@@ -281,9 +277,7 @@ function InventorySourceDetail({ inventorySource, i18n }) {
|
|||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5} totalChips={group_by.split(',').length}>
|
<ChipGroup numChips={5} totalChips={group_by.split(',').length}>
|
||||||
{group_by.split(',').map(group => (
|
{group_by.split(',').map(group => (
|
||||||
<Chip key={group} >
|
<Chip key={group}>{group}</Chip>
|
||||||
{group}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,9 @@ const InventorySourceFormFields = ({ sourceOptions, i18n }) => {
|
|||||||
fieldId="source"
|
fieldId="source"
|
||||||
helperTextInvalid={sourceMeta.error}
|
helperTextInvalid={sourceMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
validated={(!sourceMeta.touched || !sourceMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!sourceMeta.touched || !sourceMeta.error ? 'default' : 'error'
|
||||||
|
}
|
||||||
label={i18n._(t`Source`)}
|
label={i18n._(t`Source`)}
|
||||||
>
|
>
|
||||||
<AnsibleSelect
|
<AnsibleSelect
|
||||||
@@ -161,7 +163,9 @@ const InventorySourceFormFields = ({ sourceOptions, i18n }) => {
|
|||||||
)}
|
)}
|
||||||
{sourceField.value !== '' && (
|
{sourceField.value !== '' && (
|
||||||
<SubFormLayout>
|
<SubFormLayout>
|
||||||
<Title size="md" headingLevel="h4">{i18n._(t`Source details`)}</Title>
|
<Title size="md" headingLevel="h4">
|
||||||
|
{i18n._(t`Source details`)}
|
||||||
|
</Title>
|
||||||
<FormColumnLayout>
|
<FormColumnLayout>
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -83,8 +83,12 @@ const SCMSubForm = ({ i18n }) => {
|
|||||||
<FormGroup
|
<FormGroup
|
||||||
fieldId="source_path"
|
fieldId="source_path"
|
||||||
helperTextInvalid={sourcePathError?.message || sourcePathMeta.error}
|
helperTextInvalid={sourcePathError?.message || sourcePathMeta.error}
|
||||||
validated={((!sourcePathMeta.error || !sourcePathMeta.touched) &&
|
validated={
|
||||||
!sourcePathError?.message) ? 'default' : 'error'}
|
(!sourcePathMeta.error || !sourcePathMeta.touched) &&
|
||||||
|
!sourcePathError?.message
|
||||||
|
? 'default'
|
||||||
|
: 'error'
|
||||||
|
}
|
||||||
isRequired
|
isRequired
|
||||||
label={i18n._(t`Inventory file`)}
|
label={i18n._(t`Inventory file`)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ export const VerbosityField = withI18n()(({ i18n }) => {
|
|||||||
return (
|
return (
|
||||||
<FormGroup
|
<FormGroup
|
||||||
fieldId="verbosity"
|
fieldId="verbosity"
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
label={i18n._(t`Verbosity`)}
|
label={i18n._(t`Verbosity`)}
|
||||||
>
|
>
|
||||||
<FieldTooltip
|
<FieldTooltip
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ class InventoryScripts extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl" headingLevel="h2">{i18n._(t`Inventory Scripts`)}</Title>
|
<Title size="2xl" headingLevel="h2">
|
||||||
|
{i18n._(t`Inventory Scripts`)}
|
||||||
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection />
|
<PageSection />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
@@ -232,9 +232,7 @@ function JobDetail({ job, i18n }) {
|
|||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5} totalChips={labels.results.length}>
|
<ChipGroup numChips={5} totalChips={labels.results.length}>
|
||||||
{labels.results.map(l => (
|
{labels.results.map(l => (
|
||||||
<Chip key={l.id} >
|
<Chip key={l.id}>{l.name}</Chip>
|
||||||
{l.name}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { Modal as PFModal, Tab, Tabs as PFTabs, TabTitleText } from '@patternfly/react-core';
|
import {
|
||||||
|
Modal as PFModal,
|
||||||
|
Tab,
|
||||||
|
Tabs as PFTabs,
|
||||||
|
TabTitleText,
|
||||||
|
} from '@patternfly/react-core';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { withI18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
@@ -175,7 +180,7 @@ function HostEventModal({ onClose, hostEvent = {}, isOpen = false, i18n }) {
|
|||||||
</Tab>
|
</Tab>
|
||||||
<Tab
|
<Tab
|
||||||
eventKey={1}
|
eventKey={1}
|
||||||
title={<TabTitleText>{i18n._(t`JSON`)}</TabTitleText>}
|
title={<TabTitleText>{i18n._(t`JSON`)}</TabTitleText>}
|
||||||
aria-label={i18n._(t`JSON tab`)}
|
aria-label={i18n._(t`JSON tab`)}
|
||||||
>
|
>
|
||||||
{activeTabKey === 1 && jsonObj ? (
|
{activeTabKey === 1 && jsonObj ? (
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ class JobsSettings extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl" headingLevel="h2">{i18n._(t`Jobs Settings`)}</Title>
|
<Title size="2xl" headingLevel="h2">
|
||||||
|
{i18n._(t`Jobs Settings`)}
|
||||||
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection />
|
<PageSection />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ class License extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl" headingLevel="h2">{i18n._(t`License`)}</Title>
|
<Title size="2xl" headingLevel="h2">
|
||||||
|
{i18n._(t`License`)}
|
||||||
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection />
|
<PageSection />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ class ManagementJobs extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl" headingLevel="h2">{i18n._(t`Management Jobs`)}</Title>
|
<Title size="2xl" headingLevel="h2">
|
||||||
|
{i18n._(t`Management Jobs`)}
|
||||||
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection />
|
<PageSection />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ class NotificationTemplates extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl" headingLevel="h2">{i18n._(t`Notification Templates`)}</Title>
|
<Title size="2xl" headingLevel="h2">
|
||||||
|
{i18n._(t`Notification Templates`)}
|
||||||
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection />
|
<PageSection />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
@@ -105,9 +105,7 @@ function OrganizationDetail({ i18n, organization }) {
|
|||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5} totalChips={instanceGroups.length}>
|
<ChipGroup numChips={5} totalChips={instanceGroups.length}>
|
||||||
{instanceGroups.map(ig => (
|
{instanceGroups.map(ig => (
|
||||||
<Chip key={ig.id} >
|
<Chip key={ig.id}>{ig.name}</Chip>
|
||||||
{ig.name}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ class Portal extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl" headingLevel="h2">{i18n._(t`My View`)}</Title>
|
<Title size="2xl" headingLevel="h2">
|
||||||
|
{i18n._(t`My View`)}
|
||||||
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection />
|
<PageSection />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
@@ -172,7 +172,9 @@ function ProjectFormFields({
|
|||||||
fieldId="project-scm-type"
|
fieldId="project-scm-type"
|
||||||
helperTextInvalid={scmTypeMeta.error}
|
helperTextInvalid={scmTypeMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
validated={(!scmTypeMeta.touched || !scmTypeMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!scmTypeMeta.touched || !scmTypeMeta.error ? 'default' : 'error'
|
||||||
|
}
|
||||||
label={i18n._(t`Source Control Credential Type`)}
|
label={i18n._(t`Source Control Credential Type`)}
|
||||||
>
|
>
|
||||||
<AnsibleSelect
|
<AnsibleSelect
|
||||||
@@ -204,7 +206,9 @@ function ProjectFormFields({
|
|||||||
</FormGroup>
|
</FormGroup>
|
||||||
{formik.values.scm_type !== '' && (
|
{formik.values.scm_type !== '' && (
|
||||||
<SubFormLayout>
|
<SubFormLayout>
|
||||||
<Title size="md" headingLevel="h4">{i18n._(t`Type Details`)}</Title>
|
<Title size="md" headingLevel="h4">
|
||||||
|
{i18n._(t`Type Details`)}
|
||||||
|
</Title>
|
||||||
<FormColumnLayout>
|
<FormColumnLayout>
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ const ManualSubForm = ({
|
|||||||
fieldId="project-local-path"
|
fieldId="project-local-path"
|
||||||
helperTextInvalid={pathMeta.error}
|
helperTextInvalid={pathMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
validated={(!pathMeta.touched || !pathMeta.error) ? 'default' : 'error'}
|
validated={!pathMeta.touched || !pathMeta.error ? 'default' : 'error'}
|
||||||
label={i18n._(t`Playbook Directory`)}
|
label={i18n._(t`Playbook Directory`)}
|
||||||
>
|
>
|
||||||
<FieldTooltip
|
<FieldTooltip
|
||||||
|
|||||||
@@ -104,7 +104,9 @@ export const ScmTypeOptions = withI18n()(
|
|||||||
|
|
||||||
{scmUpdateOnLaunch && (
|
{scmUpdateOnLaunch && (
|
||||||
<>
|
<>
|
||||||
<Title size="md" headingLevel="h4">{i18n._(t`Option Details`)}</Title>
|
<Title size="md" headingLevel="h4">
|
||||||
|
{i18n._(t`Option Details`)}
|
||||||
|
</Title>
|
||||||
<FormField
|
<FormField
|
||||||
id="project-cache-timeout"
|
id="project-cache-timeout"
|
||||||
name="scm_update_cache_timeout"
|
name="scm_update_cache_timeout"
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ class SystemSettings extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl" headingLevel="h2">{i18n._(t`System Settings`)}</Title>
|
<Title size="2xl" headingLevel="h2">
|
||||||
|
{i18n._(t`System Settings`)}
|
||||||
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection />
|
<PageSection />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ function TeamAccessListItem({ role, i18n, detailUrl, onSelect }) {
|
|||||||
label={i18n._(t`Role`)}
|
label={i18n._(t`Role`)}
|
||||||
value={
|
value={
|
||||||
<Chip
|
<Chip
|
||||||
|
|
||||||
key={role.name}
|
key={role.name}
|
||||||
aria-label={role.name}
|
aria-label={role.name}
|
||||||
onClick={() => onSelect(role)}
|
onClick={() => onSelect(role)}
|
||||||
|
|||||||
@@ -304,9 +304,7 @@ function JobTemplateDetail({ i18n, template }) {
|
|||||||
totalChips={summary_fields.labels.results.length}
|
totalChips={summary_fields.labels.results.length}
|
||||||
>
|
>
|
||||||
{summary_fields.labels.results.map(l => (
|
{summary_fields.labels.results.map(l => (
|
||||||
<Chip key={l.id} >
|
<Chip key={l.id}>{l.name}</Chip>
|
||||||
{l.name}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
@@ -319,9 +317,7 @@ function JobTemplateDetail({ i18n, template }) {
|
|||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5} totalChips={instanceGroups.length}>
|
<ChipGroup numChips={5} totalChips={instanceGroups.length}>
|
||||||
{instanceGroups.map(ig => (
|
{instanceGroups.map(ig => (
|
||||||
<Chip key={ig.id} >
|
<Chip key={ig.id}>{ig.name}</Chip>
|
||||||
{ig.name}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
@@ -334,9 +330,7 @@ function JobTemplateDetail({ i18n, template }) {
|
|||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5} totalChips={job_tags.split(',').length}>
|
<ChipGroup numChips={5} totalChips={job_tags.split(',').length}>
|
||||||
{job_tags.split(',').map(jobTag => (
|
{job_tags.split(',').map(jobTag => (
|
||||||
<Chip key={jobTag} >
|
<Chip key={jobTag}>{jobTag}</Chip>
|
||||||
{jobTag}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
@@ -349,9 +343,7 @@ function JobTemplateDetail({ i18n, template }) {
|
|||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5} totalChips={skip_tags.split(',').length}>
|
<ChipGroup numChips={5} totalChips={skip_tags.split(',').length}>
|
||||||
{skip_tags.split(',').map(skipTag => (
|
{skip_tags.split(',').map(skipTag => (
|
||||||
<Chip key={skipTag} >
|
<Chip key={skipTag}>{skipTag}</Chip>
|
||||||
{skipTag}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,9 +125,7 @@ function SurveyListItem({
|
|||||||
totalChips={question.default.split('\n').length}
|
totalChips={question.default.split('\n').length}
|
||||||
>
|
>
|
||||||
{question.default.split('\n').map(chip => (
|
{question.default.split('\n').map(chip => (
|
||||||
<Chip key={chip} >
|
<Chip key={chip}>{chip}</Chip>
|
||||||
{chip}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -172,9 +172,7 @@ function WorkflowJobTemplateDetail({ template, i18n }) {
|
|||||||
totalChips={summary_fields.labels.results.length}
|
totalChips={summary_fields.labels.results.length}
|
||||||
>
|
>
|
||||||
{summary_fields.labels.results.map(l => (
|
{summary_fields.labels.results.map(l => (
|
||||||
<Chip key={l.id} >
|
<Chip key={l.id}>{l.name}</Chip>
|
||||||
{l.name}
|
|
||||||
</Chip>
|
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ function LinkModal({ header, i18n, onConfirm }) {
|
|||||||
width={600}
|
width={600}
|
||||||
header={header}
|
header={header}
|
||||||
isOpen
|
isOpen
|
||||||
|
|
||||||
title={i18n._(t`Workflow Link`)}
|
title={i18n._(t`Workflow Link`)}
|
||||||
onClose={() => dispatch({ type: 'CANCEL_LINK_MODAL' })}
|
onClose={() => dispatch({ type: 'CANCEL_LINK_MODAL' })}
|
||||||
actions={[
|
actions={[
|
||||||
|
|||||||
@@ -131,14 +131,14 @@ function NodeTypeStep({
|
|||||||
<FormGroup
|
<FormGroup
|
||||||
fieldId="approval-name"
|
fieldId="approval-name"
|
||||||
isRequired
|
isRequired
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
label={i18n._(t`Name`)}
|
label={i18n._(t`Name`)}
|
||||||
>
|
>
|
||||||
<TextInput
|
<TextInput
|
||||||
autoFocus
|
autoFocus
|
||||||
id="approval-name"
|
id="approval-name"
|
||||||
isRequired
|
isRequired
|
||||||
validated={(isValid) ? 'default' : 'error'}
|
validated={isValid ? 'default' : 'error'}
|
||||||
type="text"
|
type="text"
|
||||||
{...field}
|
{...field}
|
||||||
onChange={(value, evt) => {
|
onChange={(value, evt) => {
|
||||||
|
|||||||
@@ -133,7 +133,6 @@ function NodeViewModal({ i18n }) {
|
|||||||
<Modal
|
<Modal
|
||||||
variant="large"
|
variant="large"
|
||||||
isOpen
|
isOpen
|
||||||
|
|
||||||
title={unifiedJobTemplate.name}
|
title={unifiedJobTemplate.name}
|
||||||
onClose={() => dispatch({ type: 'SET_NODE_TO_VIEW', value: null })}
|
onClose={() => dispatch({ type: 'SET_NODE_TO_VIEW', value: null })}
|
||||||
actions={[
|
actions={[
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ function UnsavedChangesModal({ i18n, onSaveAndExit, onExit }) {
|
|||||||
<Modal
|
<Modal
|
||||||
width={600}
|
width={600}
|
||||||
isOpen
|
isOpen
|
||||||
|
|
||||||
title={i18n._(t`Warning: Unsaved Changes`)}
|
title={i18n._(t`Warning: Unsaved Changes`)}
|
||||||
onClose={() => dispatch({ type: 'TOGGLE_UNSAVED_CHANGES_MODAL' })}
|
onClose={() => dispatch({ type: 'TOGGLE_UNSAVED_CHANGES_MODAL' })}
|
||||||
actions={[
|
actions={[
|
||||||
|
|||||||
@@ -68,7 +68,11 @@ function VisualizerToolbar({
|
|||||||
return (
|
return (
|
||||||
<div id="visualizer-toolbar">
|
<div id="visualizer-toolbar">
|
||||||
<div css="align-items: center; border-bottom: 1px solid grey; display: flex; height: 56px; padding: 0px 20px;">
|
<div css="align-items: center; border-bottom: 1px solid grey; display: flex; height: 56px; padding: 0px 20px;">
|
||||||
<Title headingLevel="h2" size="xl" id="visualizer-toolbar-template-name">
|
<Title
|
||||||
|
headingLevel="h2"
|
||||||
|
size="xl"
|
||||||
|
id="visualizer-toolbar-template-name"
|
||||||
|
>
|
||||||
{template.name}
|
{template.name}
|
||||||
</Title>
|
</Title>
|
||||||
<div css="align-items: center; display: flex; flex: 1; justify-content: flex-end">
|
<div css="align-items: center; display: flex; flex: 1; justify-content: flex-end">
|
||||||
|
|||||||
@@ -291,7 +291,9 @@ function JobTemplateForm({
|
|||||||
<FormGroup
|
<FormGroup
|
||||||
fieldId="template-playbook"
|
fieldId="template-playbook"
|
||||||
helperTextInvalid={playbookMeta.error}
|
helperTextInvalid={playbookMeta.error}
|
||||||
validated={(!playbookMeta.touched || !playbookMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!playbookMeta.touched || !playbookMeta.error ? 'default' : 'error'
|
||||||
|
}
|
||||||
isRequired
|
isRequired
|
||||||
label={i18n._(t`Playbook`)}
|
label={i18n._(t`Playbook`)}
|
||||||
>
|
>
|
||||||
@@ -381,7 +383,9 @@ function JobTemplateForm({
|
|||||||
<TextInput
|
<TextInput
|
||||||
id="template-limit"
|
id="template-limit"
|
||||||
{...limitField}
|
{...limitField}
|
||||||
validated={(!limitMeta.touched || !limitMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!limitMeta.touched || !limitMeta.error ? 'default' : 'error'
|
||||||
|
}
|
||||||
onChange={value => {
|
onChange={value => {
|
||||||
limitHelpers.setValue(value);
|
limitHelpers.setValue(value);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ class UISettings extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageSection variant={light} className="pf-m-condensed">
|
<PageSection variant={light} className="pf-m-condensed">
|
||||||
<Title size="2xl" headingLevel="h2">{i18n._(t`User Interface Settings`)}</Title>
|
<Title size="2xl" headingLevel="h2">
|
||||||
|
{i18n._(t`User Interface Settings`)}
|
||||||
|
</Title>
|
||||||
</PageSection>
|
</PageSection>
|
||||||
<PageSection />
|
<PageSection />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ function UserAccessListItem({ role, i18n, detailUrl, onSelect }) {
|
|||||||
label={i18n._(t`Role`)}
|
label={i18n._(t`Role`)}
|
||||||
value={
|
value={
|
||||||
<Chip
|
<Chip
|
||||||
|
|
||||||
key={role.name}
|
key={role.name}
|
||||||
aria-label={role.name}
|
aria-label={role.name}
|
||||||
onClick={() => onSelect(role)}
|
onClick={() => onSelect(role)}
|
||||||
|
|||||||
@@ -117,7 +117,9 @@ function UserFormFields({ user, i18n }) {
|
|||||||
fieldId="user-type"
|
fieldId="user-type"
|
||||||
helperTextInvalid={userTypeMeta.error}
|
helperTextInvalid={userTypeMeta.error}
|
||||||
isRequired
|
isRequired
|
||||||
validated={(!userTypeMeta.touched || !userTypeMeta.error) ? 'default' : 'error'}
|
validated={
|
||||||
|
!userTypeMeta.touched || !userTypeMeta.error ? 'default' : 'error'
|
||||||
|
}
|
||||||
label={i18n._(t`User Type`)}
|
label={i18n._(t`User Type`)}
|
||||||
>
|
>
|
||||||
<AnsibleSelect
|
<AnsibleSelect
|
||||||
|
|||||||
Reference in New Issue
Block a user