mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
Switch tooltips to FieldTooltips
This commit is contained in:
@@ -2,10 +2,8 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|||||||
import { Link, useHistory } from 'react-router-dom';
|
import { Link, useHistory } from 'react-router-dom';
|
||||||
import { withI18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import styled from 'styled-components';
|
|
||||||
import { QuestionCircleIcon as PFQuestionCircleIcon } from '@patternfly/react-icons';
|
|
||||||
|
|
||||||
import { Button, Chip, List, ListItem, Tooltip } from '@patternfly/react-core';
|
import { Button, Chip, List, ListItem } from '@patternfly/react-core';
|
||||||
import AlertModal from '../../../components/AlertModal';
|
import AlertModal from '../../../components/AlertModal';
|
||||||
import { CardBody, CardActionsRow } from '../../../components/Card';
|
import { CardBody, CardActionsRow } from '../../../components/Card';
|
||||||
import ChipGroup from '../../../components/ChipGroup';
|
import ChipGroup from '../../../components/ChipGroup';
|
||||||
@@ -14,6 +12,7 @@ import ContentError from '../../../components/ContentError';
|
|||||||
import ContentLoading from '../../../components/ContentLoading';
|
import ContentLoading from '../../../components/ContentLoading';
|
||||||
import CredentialChip from '../../../components/CredentialChip';
|
import CredentialChip from '../../../components/CredentialChip';
|
||||||
import DeleteButton from '../../../components/DeleteButton';
|
import DeleteButton from '../../../components/DeleteButton';
|
||||||
|
import { FieldTooltip } from '../../../components/FormField';
|
||||||
import InventorySourceSyncButton from '../shared/InventorySourceSyncButton';
|
import InventorySourceSyncButton from '../shared/InventorySourceSyncButton';
|
||||||
import {
|
import {
|
||||||
DetailList,
|
DetailList,
|
||||||
@@ -24,10 +23,6 @@ import ErrorDetail from '../../../components/ErrorDetail';
|
|||||||
import useRequest from '../../../util/useRequest';
|
import useRequest from '../../../util/useRequest';
|
||||||
import { InventorySourcesAPI } from '../../../api';
|
import { InventorySourcesAPI } from '../../../api';
|
||||||
|
|
||||||
const QuestionCircleIcon = styled(PFQuestionCircleIcon)`
|
|
||||||
margin-left: 10px;
|
|
||||||
`;
|
|
||||||
|
|
||||||
function InventorySourceDetail({ inventorySource, i18n }) {
|
function InventorySourceDetail({ inventorySource, i18n }) {
|
||||||
const {
|
const {
|
||||||
created,
|
created,
|
||||||
@@ -119,7 +114,7 @@ function InventorySourceDetail({ inventorySource, i18n }) {
|
|||||||
{overwrite && (
|
{overwrite && (
|
||||||
<ListItem>
|
<ListItem>
|
||||||
{i18n._(t`Overwrite`)}
|
{i18n._(t`Overwrite`)}
|
||||||
<Tooltip
|
<FieldTooltip
|
||||||
content={
|
content={
|
||||||
<>
|
<>
|
||||||
{i18n._(t`If checked, any hosts and groups that were
|
{i18n._(t`If checked, any hosts and groups that were
|
||||||
@@ -136,16 +131,13 @@ function InventorySourceDetail({ inventorySource, i18n }) {
|
|||||||
untouched by the inventory update process.`)}
|
untouched by the inventory update process.`)}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
position="top"
|
/>
|
||||||
>
|
|
||||||
<QuestionCircleIcon />
|
|
||||||
</Tooltip>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
)}
|
)}
|
||||||
{overwrite_vars && (
|
{overwrite_vars && (
|
||||||
<ListItem>
|
<ListItem>
|
||||||
{i18n._(t`Overwrite variables`)}
|
{i18n._(t`Overwrite variables`)}
|
||||||
<Tooltip
|
<FieldTooltip
|
||||||
content={
|
content={
|
||||||
<>
|
<>
|
||||||
{i18n._(t`If checked, all variables for child groups
|
{i18n._(t`If checked, all variables for child groups
|
||||||
@@ -158,37 +150,28 @@ function InventorySourceDetail({ inventorySource, i18n }) {
|
|||||||
external source.`)}
|
external source.`)}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
position="top"
|
/>
|
||||||
>
|
|
||||||
<QuestionCircleIcon />
|
|
||||||
</Tooltip>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
)}
|
)}
|
||||||
{update_on_launch && (
|
{update_on_launch && (
|
||||||
<ListItem>
|
<ListItem>
|
||||||
{i18n._(t`Update on launch`)}
|
{i18n._(t`Update on launch`)}
|
||||||
<Tooltip
|
<FieldTooltip
|
||||||
content={i18n._(t`Each time a job runs using this inventory,
|
content={i18n._(t`Each time a job runs using this inventory,
|
||||||
refresh the inventory from the selected source before
|
refresh the inventory from the selected source before
|
||||||
executing job tasks.`)}
|
executing job tasks.`)}
|
||||||
position="top"
|
/>
|
||||||
>
|
|
||||||
<QuestionCircleIcon />
|
|
||||||
</Tooltip>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
)}
|
)}
|
||||||
{update_on_project_update && (
|
{update_on_project_update && (
|
||||||
<ListItem>
|
<ListItem>
|
||||||
{i18n._(t`Update on project update`)}
|
{i18n._(t`Update on project update`)}
|
||||||
<Tooltip
|
<FieldTooltip
|
||||||
content={i18n._(t`After every project update where the SCM revision
|
content={i18n._(t`After every project update where the SCM revision
|
||||||
changes, refresh the inventory from the selected source
|
changes, refresh the inventory from the selected source
|
||||||
before executing job tasks. This is intended for static content,
|
before executing job tasks. This is intended for static content,
|
||||||
like the Ansible inventory .ini file format.`)}
|
like the Ansible inventory .ini file format.`)}
|
||||||
position="top"
|
/>
|
||||||
>
|
|
||||||
<QuestionCircleIcon />
|
|
||||||
</Tooltip>
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
)}
|
)}
|
||||||
</List>
|
</List>
|
||||||
|
|||||||
Reference in New Issue
Block a user