Skip to content

Commit

Permalink
[Remote Clusters] Modify folder structure (#205473)
Browse files Browse the repository at this point in the history
Part of #199664

## Summary

As part of the work of the `Remote clusters: UX improvements` project
I've changed a bit the folder structure and moved some files that are
going to be used by more than one step. Since the PR will be large, I
decided to create a PR only for the structure changes to avoid much
noise in the main PR. The new structure will be as follows:

```
|-- x-pack/platform/plugins/private/remote_clusters/public/application/sections/components/
        |-- remote_cluster_config_steps [new folder]
                |-- components [will be used for the common components for all the steps]
                      |-- request_flyout.tsx [existing but moved here]
                |-- remote_cluster_form
                |-- remote_cluster_setup_trust
   ```
  • Loading branch information
SoniaSanzV authored Jan 3, 2025
1 parent 52cebed commit d26ba8a
Show file tree
Hide file tree
Showing 33 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { act } from 'react-dom/test-utils';
import { TestBed } from '@kbn/test-jest-helpers';

import { RemoteClusterForm } from '../../../public/application/sections/components/remote_cluster_form';
import { RemoteClusterForm } from '../../../public/application/sections/components/remote_cluster_config_steps/remote_cluster_form';
import { RemoteClustersActions, setupEnvironment } from '../helpers';
import { setup as setupRemoteClustersAdd } from '../add/remote_clusters_add.helpers';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

export { RemoteClusterSetupTrust } from './remote_cluster_setup_trust';
export { RemoteClusterForm } from './remote_cluster_form';
export { RemoteClusterSetupTrust } from './remote_cluster_config_steps/remote_cluster_setup_trust';
export { RemoteClusterForm } from './remote_cluster_config_steps/remote_cluster_form';
export { RemoteClusterPageTitle } from './remote_cluster_page_title';
export { ConfiguredByNodeWarning } from './configured_by_node_warning';
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
EuiTitle,
} from '@elastic/eui';

import { ClusterPayload, serializeCluster } from '../../../../../common/lib';
import { ClusterPayload, serializeCluster } from '../../../../../../common/lib';

interface Props {
close: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { FormattedMessage } from '@kbn/i18n-react';

import { EuiDescribedFormGroup, EuiTitle, EuiFormRow, EuiSwitch } from '@elastic/eui';

import { SNIFF_MODE, PROXY_MODE } from '../../../../../../common/constants';
import { useAppContext } from '../../../../app_context';
import { SNIFF_MODE, PROXY_MODE } from '../../../../../../../common/constants';
import { useAppContext } from '../../../../../app_context';

import { ClusterErrors } from '../validators';
import { ConnectionModeCloud } from './connection_mode_cloud';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from '@elastic/eui';

import { i18n } from '@kbn/i18n';
import { proxySettingsUrl } from '../../../../services/documentation';
import { proxySettingsUrl } from '../../../../../services/documentation';

import { ClusterErrors } from '../validators';
import { FormFields } from '../remote_cluster_form';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import React, { FunctionComponent } from 'react';
import { FormattedMessage } from '@kbn/i18n-react';
import { i18n } from '@kbn/i18n';
import { EuiFieldNumber, EuiFieldText, EuiFormRow, EuiLink } from '@elastic/eui';
import { proxySettingsUrl } from '../../../../services/documentation';
import { proxySettingsUrl } from '../../../../../services/documentation';
import { Props } from './connection_mode';

export const ProxyConnection: FunctionComponent<Props> = (props) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
EuiLink,
} from '@elastic/eui';

import { transportPortUrl } from '../../../../services/documentation';
import { transportPortUrl } from '../../../../../services/documentation';
import { validateSeed } from '../validators';
import { Props } from './connection_mode';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ import {
EuiSwitchEvent,
} from '@elastic/eui';

import { Cluster, ClusterPayload } from '../../../../../common/lib';
import { SNIFF_MODE, PROXY_MODE } from '../../../../../common/constants';
import { Cluster, ClusterPayload } from '../../../../../../common/lib';
import { SNIFF_MODE, PROXY_MODE } from '../../../../../../common/constants';

import { AppContext, Context } from '../../../app_context';
import { AppContext, Context } from '../../../../app_context';

import { skippingDisconnectedClustersUrl } from '../../../services/documentation';
import { skippingDisconnectedClustersUrl } from '../../../../services/documentation';

import { RequestFlyout } from './request_flyout';
import { RequestFlyout } from '../components/request_flyout';
import { ConnectionMode } from './components';
import {
ClusterErrors,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React from 'react';
import { FormattedMessage } from '@kbn/i18n-react';
import { Cluster } from '../../../../../../common/lib';
import { Cluster } from '../../../../../../../common/lib';
import { isAddressValid } from './validate_address';

export const i18nTexts = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { validateName } from './validate_name';
import { PROXY_MODE, SNIFF_MODE } from '../../../../../../common/constants';
import { PROXY_MODE, SNIFF_MODE } from '../../../../../../../common/constants';
import { validateSeeds } from './validate_seeds';
import { validateProxy } from './validate_proxy';
import { validateCloudRemoteAddress } from './validate_cloud_url';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { MAX_NODE_CONNECTIONS } from '../../../../../../common/constants';
import { MAX_NODE_CONNECTIONS } from '../../../../../../../common/constants';
import { validateNodeConnections } from './validate_node_connections';

describe('validateNodeConnections', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React from 'react';
import { FormattedMessage } from '@kbn/i18n-react';
import { MAX_NODE_CONNECTIONS } from '../../../../../../common/constants';
import { MAX_NODE_CONNECTIONS } from '../../../../../../../common/constants';

export function validateNodeConnections(connections?: number | null): null | JSX.Element {
if (connections && connections > MAX_NODE_CONNECTIONS) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import {
EuiButtonEmpty,
} from '@elastic/eui';

import * as docs from '../../../services/documentation';
import { AppContext } from '../../../app_context';
import * as docs from '../../../../services/documentation';
import { AppContext } from '../../../../app_context';
import { ConfirmTrustSetupModal } from './confirm_modal';

const MIN_ALLOWED_VERSION_API_KEYS_METHOD = '8.10';
Expand Down

0 comments on commit d26ba8a

Please sign in to comment.