mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 20:07:37 -02:30
updates tooltip component, fixes formik configuration on ad hoc qizard
This commit is contained in:
@@ -32,10 +32,7 @@ function CredentialStep({ i18n, verbosityOptions, moduleOptions }) {
|
|||||||
name: 'module_name',
|
name: 'module_name',
|
||||||
validate: required(null, i18n),
|
validate: required(null, i18n),
|
||||||
});
|
});
|
||||||
const [module_argsField] = useField({
|
|
||||||
name: 'module_args',
|
|
||||||
validate: required(null, i18n),
|
|
||||||
});
|
|
||||||
const [variablesField] = useField('extra_vars');
|
const [variablesField] = useField('extra_vars');
|
||||||
const [diff_modeField, , diff_modeHelpers] = useField('diff_mode');
|
const [diff_modeField, , diff_modeHelpers] = useField('diff_mode');
|
||||||
const [become_enabledField, , become_enabledHelpers] = useField(
|
const [become_enabledField, , become_enabledHelpers] = useField(
|
||||||
@@ -82,6 +79,7 @@ function CredentialStep({ i18n, verbosityOptions, moduleOptions }) {
|
|||||||
name="module_args"
|
name="module_args"
|
||||||
type="text"
|
type="text"
|
||||||
label={i18n._(t`Arguments`)}
|
label={i18n._(t`Arguments`)}
|
||||||
|
validate={required(null, i18n)}
|
||||||
isRequired={
|
isRequired={
|
||||||
module_nameField.value === 'command' ||
|
module_nameField.value === 'command' ||
|
||||||
module_nameField.value === 'shell'
|
module_nameField.value === 'shell'
|
||||||
@@ -90,10 +88,10 @@ function CredentialStep({ i18n, verbosityOptions, moduleOptions }) {
|
|||||||
module_nameField.value ? (
|
module_nameField.value ? (
|
||||||
<>
|
<>
|
||||||
{i18n._(
|
{i18n._(
|
||||||
t`These arguments are used with the specified module. You can find information about the ${module_argsField.value} by clicking `
|
t`These arguments are used with the specified module. You can find information about the ${module_nameField.value} by clicking `
|
||||||
)}
|
)}
|
||||||
<a
|
<a
|
||||||
href={`https://docs.ansible.com/ansible/latest/modules/${module_argsField.value}_module.html`}
|
href={`https://docs.ansible.com/ansible/latest/modules/${module_nameField.value}_module.html`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'styled-components/macro';
|
import 'styled-components/macro';
|
||||||
import React, { useEffect, useRef } from 'react';
|
import React, { useEffect, useRef } from 'react';
|
||||||
import { withI18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t, Trans } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { useField, useFormikContext } from 'formik';
|
import { useField, useFormikContext } from 'formik';
|
||||||
import { Switch, Text } from '@patternfly/react-core';
|
import { Switch, Text } from '@patternfly/react-core';
|
||||||
import {
|
import {
|
||||||
@@ -69,30 +69,30 @@ function CustomMessagesSubForm({ defaultMessages, type, i18n }) {
|
|||||||
css="margin-bottom: var(--pf-c-content--MarginBottom)"
|
css="margin-bottom: var(--pf-c-content--MarginBottom)"
|
||||||
>
|
>
|
||||||
<small>
|
<small>
|
||||||
Use custom messages to change the content of notifications sent
|
Use custom messages to change the content of notifications sent
|
||||||
when a job starts, succeeds, or fails. Use curly braces to
|
when a job starts, succeeds, or fails. Use curly braces to access
|
||||||
access information about the job:{' '}
|
information about the job:{' '}
|
||||||
<code>
|
<code>
|
||||||
{'{{'} job_friendly_name {'}}'}
|
{'{{'} job_friendly_name {'}}'}
|
||||||
</code>
|
</code>
|
||||||
,{' '}
|
,{' '}
|
||||||
<code>
|
<code>
|
||||||
{'{{'} url {'}}'}
|
{'{{'} url {'}}'}
|
||||||
</code>
|
</code>
|
||||||
, or attributes of the job such as{' '}
|
, or attributes of the job such as{' '}
|
||||||
<code>
|
<code>
|
||||||
{'{{'} job.status {'}}'}
|
{'{{'} job.status {'}}'}
|
||||||
</code>
|
</code>
|
||||||
. You may apply a number of possible variables in the message.
|
. You may apply a number of possible variables in the message.
|
||||||
Refer to the{' '}
|
Refer to the{' '}
|
||||||
<a
|
<a
|
||||||
href="https://docs.ansible.com/ansible-tower/latest/html/userguide/notifications.html#create-custom-notifications"
|
href="https://docs.ansible.com/ansible-tower/latest/html/userguide/notifications.html#create-custom-notifications"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
Ansible Tower documentation
|
Ansible Tower documentation
|
||||||
</a>{' '}
|
</a>{' '}
|
||||||
for more details.
|
for more details.
|
||||||
</small>
|
</small>
|
||||||
</Text>
|
</Text>
|
||||||
<FormFullWidthLayout>
|
<FormFullWidthLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user