From 62054bbfc8fef0323659bf7f3ad60448eb710b77 Mon Sep 17 00:00:00 2001 From: mabashian Date: Thu, 18 Jun 2020 14:43:07 -0400 Subject: [PATCH] Pulls CredentialPlugins out of CredentialFormFields and into the root of the shared dir --- .../CredentialFormFields/CredentialField.jsx | 2 +- .../CredentialPlugins/CredentialPluginField.jsx | 4 ++-- .../CredentialPluginField.test.jsx | 2 +- .../CredentialPluginPrompt.jsx | 0 .../CredentialPluginPrompt.test.jsx | 14 +++++++------- .../CredentialPluginPrompt/CredentialsStep.jsx | 14 +++++++------- .../CredentialPluginPrompt/MetadataStep.jsx | 16 ++++++++-------- .../CredentialPluginPrompt/index.js | 0 .../CredentialPluginSelected.jsx | 4 ++-- .../CredentialPluginSelected.test.jsx | 4 ++-- .../CredentialPluginTestAlert.jsx | 0 .../CredentialPluginTestAlert.test.jsx | 0 .../CredentialPlugins/index.js | 0 13 files changed, 30 insertions(+), 30 deletions(-) rename awx/ui_next/src/screens/Credential/shared/{CredentialFormFields => }/CredentialPlugins/CredentialPluginField.jsx (96%) rename awx/ui_next/src/screens/Credential/shared/{CredentialFormFields => }/CredentialPlugins/CredentialPluginField.test.jsx (97%) rename awx/ui_next/src/screens/Credential/shared/{CredentialFormFields => }/CredentialPlugins/CredentialPluginPrompt/CredentialPluginPrompt.jsx (100%) rename awx/ui_next/src/screens/Credential/shared/{CredentialFormFields => }/CredentialPlugins/CredentialPluginPrompt/CredentialPluginPrompt.test.jsx (94%) rename awx/ui_next/src/screens/Credential/shared/{CredentialFormFields => }/CredentialPlugins/CredentialPluginPrompt/CredentialsStep.jsx (86%) rename awx/ui_next/src/screens/Credential/shared/{CredentialFormFields => }/CredentialPlugins/CredentialPluginPrompt/MetadataStep.jsx (91%) rename awx/ui_next/src/screens/Credential/shared/{CredentialFormFields => }/CredentialPlugins/CredentialPluginPrompt/index.js (100%) rename awx/ui_next/src/screens/Credential/shared/{CredentialFormFields => }/CredentialPlugins/CredentialPluginSelected.jsx (93%) rename awx/ui_next/src/screens/Credential/shared/{CredentialFormFields => }/CredentialPlugins/CredentialPluginSelected.test.jsx (87%) rename awx/ui_next/src/screens/Credential/shared/{CredentialFormFields => }/CredentialPlugins/CredentialPluginTestAlert.jsx (100%) rename awx/ui_next/src/screens/Credential/shared/{CredentialFormFields => }/CredentialPlugins/CredentialPluginTestAlert.test.jsx (100%) rename awx/ui_next/src/screens/Credential/shared/{CredentialFormFields => }/CredentialPlugins/index.js (100%) diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialField.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialField.jsx index b5203bc72a..000aebe2f0 100644 --- a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialField.jsx +++ b/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialField.jsx @@ -14,7 +14,7 @@ import { FieldTooltip, PasswordInput } from '../../../../components/FormField'; import AnsibleSelect from '../../../../components/AnsibleSelect'; import { CredentialType } from '../../../../types'; import { required } from '../../../../util/validators'; -import { CredentialPluginField } from './CredentialPlugins'; +import { CredentialPluginField } from '../CredentialPlugins'; import BecomeMethodField from './BecomeMethodField'; const FileUpload = styled(PFFileUpload)` diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginField.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginField.jsx similarity index 96% rename from awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginField.jsx rename to awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginField.jsx index 3a90676982..b3c541ed7f 100644 --- a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginField.jsx +++ b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginField.jsx @@ -11,8 +11,8 @@ import { Tooltip, } from '@patternfly/react-core'; import { KeyIcon } from '@patternfly/react-icons'; -import { FieldTooltip } from '../../../../../components/FormField'; -import FieldWithPrompt from '../../../../../components/FieldWithPrompt'; +import { FieldTooltip } from '../../../../components/FormField'; +import FieldWithPrompt from '../../../../components/FieldWithPrompt'; import { CredentialPluginPrompt } from './CredentialPluginPrompt'; import CredentialPluginSelected from './CredentialPluginSelected'; diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginField.test.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginField.test.jsx similarity index 97% rename from awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginField.test.jsx rename to awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginField.test.jsx index a4bbc4fb74..88e2bf52d2 100644 --- a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginField.test.jsx +++ b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginField.test.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { Formik } from 'formik'; import { TextInput } from '@patternfly/react-core'; -import { mountWithContexts } from '../../../../../../testUtils/enzymeHelpers'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; import CredentialPluginField from './CredentialPluginField'; const fieldOptions = { diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginPrompt/CredentialPluginPrompt.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginPrompt/CredentialPluginPrompt.jsx similarity index 100% rename from awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginPrompt/CredentialPluginPrompt.jsx rename to awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginPrompt/CredentialPluginPrompt.jsx diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginPrompt/CredentialPluginPrompt.test.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginPrompt/CredentialPluginPrompt.test.jsx similarity index 94% rename from awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginPrompt/CredentialPluginPrompt.test.jsx rename to awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginPrompt/CredentialPluginPrompt.test.jsx index 550c5caf6c..df33091452 100644 --- a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginPrompt/CredentialPluginPrompt.test.jsx +++ b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginPrompt/CredentialPluginPrompt.test.jsx @@ -3,15 +3,15 @@ import { act } from 'react-dom/test-utils'; import { mountWithContexts, waitForElement, -} from '../../../../../../../testUtils/enzymeHelpers'; -import { CredentialsAPI, CredentialTypesAPI } from '../../../../../../api'; -import selectedCredential from '../../../data.cyberArkCredential.json'; -import azureVaultCredential from '../../../data.azureVaultCredential.json'; -import hashiCorpCredential from '../../../data.hashiCorpCredential.json'; +} from '../../../../../../testUtils/enzymeHelpers'; +import { CredentialsAPI, CredentialTypesAPI } from '../../../../../api'; +import selectedCredential from '../../data.cyberArkCredential.json'; +import azureVaultCredential from '../../data.azureVaultCredential.json'; +import hashiCorpCredential from '../../data.hashiCorpCredential.json'; import CredentialPluginPrompt from './CredentialPluginPrompt'; -jest.mock('../../../../../../api/models/Credentials'); -jest.mock('../../../../../../api/models/CredentialTypes'); +jest.mock('../../../../../api/models/Credentials'); +jest.mock('../../../../../api/models/CredentialTypes'); CredentialsAPI.test.mockResolvedValue({}); diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginPrompt/CredentialsStep.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginPrompt/CredentialsStep.jsx similarity index 86% rename from awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginPrompt/CredentialsStep.jsx rename to awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginPrompt/CredentialsStep.jsx index bc91a98894..328d17c8a9 100644 --- a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginPrompt/CredentialsStep.jsx +++ b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginPrompt/CredentialsStep.jsx @@ -3,13 +3,13 @@ import { useHistory } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { useField } from 'formik'; -import { CredentialsAPI } from '../../../../../../api'; -import CheckboxListItem from '../../../../../../components/CheckboxListItem'; -import ContentError from '../../../../../../components/ContentError'; -import DataListToolbar from '../../../../../../components/DataListToolbar'; -import PaginatedDataList from '../../../../../../components/PaginatedDataList'; -import { getQSConfig, parseQueryString } from '../../../../../../util/qs'; -import useRequest from '../../../../../../util/useRequest'; +import { CredentialsAPI } from '../../../../../api'; +import CheckboxListItem from '../../../../../components/CheckboxListItem'; +import ContentError from '../../../../../components/ContentError'; +import DataListToolbar from '../../../../../components/DataListToolbar'; +import PaginatedDataList from '../../../../../components/PaginatedDataList'; +import { getQSConfig, parseQueryString } from '../../../../../util/qs'; +import useRequest from '../../../../../util/useRequest'; const QS_CONFIG = getQSConfig('credential', { page: 1, diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginPrompt/MetadataStep.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginPrompt/MetadataStep.jsx similarity index 91% rename from awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginPrompt/MetadataStep.jsx rename to awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginPrompt/MetadataStep.jsx index b9537fe456..29dac08080 100644 --- a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginPrompt/MetadataStep.jsx +++ b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginPrompt/MetadataStep.jsx @@ -5,14 +5,14 @@ import { useField, useFormikContext } from 'formik'; import styled from 'styled-components'; import { Button, Form, FormGroup, Tooltip } from '@patternfly/react-core'; import { QuestionCircleIcon as PFQuestionCircleIcon } from '@patternfly/react-icons'; -import { CredentialsAPI, CredentialTypesAPI } from '../../../../../../api'; -import AnsibleSelect from '../../../../../../components/AnsibleSelect'; -import ContentError from '../../../../../../components/ContentError'; -import ContentLoading from '../../../../../../components/ContentLoading'; -import FormField from '../../../../../../components/FormField'; -import { FormFullWidthLayout } from '../../../../../../components/FormLayout'; -import useRequest from '../../../../../../util/useRequest'; -import { required } from '../../../../../../util/validators'; +import { CredentialsAPI, CredentialTypesAPI } from '../../../../../api'; +import AnsibleSelect from '../../../../../components/AnsibleSelect'; +import ContentError from '../../../../../components/ContentError'; +import ContentLoading from '../../../../../components/ContentLoading'; +import FormField from '../../../../../components/FormField'; +import { FormFullWidthLayout } from '../../../../../components/FormLayout'; +import useRequest from '../../../../../util/useRequest'; +import { required } from '../../../../../util/validators'; import { CredentialPluginTestAlert } from '..'; const QuestionCircleIcon = styled(PFQuestionCircleIcon)` diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginPrompt/index.js b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginPrompt/index.js similarity index 100% rename from awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginPrompt/index.js rename to awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginPrompt/index.js diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginSelected.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginSelected.jsx similarity index 93% rename from awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginSelected.jsx rename to awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginSelected.jsx index af5b228cf2..d97a7a39df 100644 --- a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginSelected.jsx +++ b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginSelected.jsx @@ -5,8 +5,8 @@ import { t, Trans } from '@lingui/macro'; import styled from 'styled-components'; import { Button, ButtonVariant, Tooltip } from '@patternfly/react-core'; import { KeyIcon } from '@patternfly/react-icons'; -import CredentialChip from '../../../../../components/CredentialChip'; -import { Credential } from '../../../../../types'; +import CredentialChip from '../../../../components/CredentialChip'; +import { Credential } from '../../../../types'; const SelectedCredential = styled.div` display: flex; diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginSelected.test.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginSelected.test.jsx similarity index 87% rename from awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginSelected.test.jsx rename to awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginSelected.test.jsx index de17450c6d..ce69724904 100644 --- a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginSelected.test.jsx +++ b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginSelected.test.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { mountWithContexts } from '../../../../../../testUtils/enzymeHelpers'; -import selectedCredential from '../../data.cyberArkCredential.json'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import selectedCredential from '../data.cyberArkCredential.json'; import CredentialPluginSelected from './CredentialPluginSelected'; describe('', () => { diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginTestAlert.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginTestAlert.jsx similarity index 100% rename from awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginTestAlert.jsx rename to awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginTestAlert.jsx diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginTestAlert.test.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginTestAlert.test.jsx similarity index 100% rename from awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/CredentialPluginTestAlert.test.jsx rename to awx/ui_next/src/screens/Credential/shared/CredentialPlugins/CredentialPluginTestAlert.test.jsx diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/index.js b/awx/ui_next/src/screens/Credential/shared/CredentialPlugins/index.js similarity index 100% rename from awx/ui_next/src/screens/Credential/shared/CredentialFormFields/CredentialPlugins/index.js rename to awx/ui_next/src/screens/Credential/shared/CredentialPlugins/index.js