Skip to content

Commit 6fb83a3

Browse files
Merge branch 'master' into remove-injected-vars-from-maps-legacy
2 parents 0e38362 + 14f975c commit 6fb83a3

File tree

43 files changed

+980
-136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+980
-136
lines changed

x-pack/plugins/index_management/public/application/components/shared/components/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@
66

77
export { TabAliases, TabMappings, TabSettings } from './details_panel';
88

9-
export { StepAliases, StepMappings, StepSettings } from './wizard_steps';
9+
export {
10+
StepAliasesContainer,
11+
StepMappingsContainer,
12+
StepSettingsContainer,
13+
CommonWizardSteps,
14+
} from './wizard_steps';

x-pack/plugins/index_management/public/application/components/shared/components/wizard_steps/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
export { StepAliases } from './step_aliases';
8-
export { StepMappings } from './step_mappings';
9-
export { StepSettings } from './step_settings';
7+
export { StepAliasesContainer } from './step_aliases_container';
8+
export { StepMappingsContainer } from './step_mappings_container';
9+
export { StepSettingsContainer } from './step_settings_container';
10+
11+
export { CommonWizardSteps } from './types';
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
import React from 'react';
7+
8+
import { Forms } from '../../../../../shared_imports';
9+
import { CommonWizardSteps } from './types';
10+
import { StepAliases } from './step_aliases';
11+
12+
interface Props {
13+
esDocsBase: string;
14+
}
15+
16+
export const StepAliasesContainer: React.FunctionComponent<Props> = ({ esDocsBase }) => {
17+
const { defaultValue, updateContent } = Forms.useContent<CommonWizardSteps>('aliases');
18+
19+
return (
20+
<StepAliases defaultValue={defaultValue} onChange={updateContent} esDocsBase={esDocsBase} />
21+
);
22+
};
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,23 @@
55
*/
66
import React from 'react';
77

8-
import { Forms } from '../../../../shared_imports';
9-
import { documentationService } from '../../../services/documentation';
10-
import { StepMappings } from '../../shared';
11-
import { WizardContent } from '../template_form';
8+
import { Forms } from '../../../../../shared_imports';
9+
import { CommonWizardSteps } from './types';
10+
import { StepMappings } from './step_mappings';
1211

13-
export const StepMappingsContainer = () => {
14-
const { defaultValue, updateContent, getData } = Forms.useContent<WizardContent>('mappings');
12+
interface Props {
13+
esDocsBase: string;
14+
}
15+
16+
export const StepMappingsContainer: React.FunctionComponent<Props> = ({ esDocsBase }) => {
17+
const { defaultValue, updateContent, getData } = Forms.useContent<CommonWizardSteps>('mappings');
1518

1619
return (
1720
<StepMappings
1821
defaultValue={defaultValue}
1922
onChange={updateContent}
2023
indexSettings={getData().settings}
21-
esDocsBase={documentationService.getEsDocsBase()}
24+
esDocsBase={esDocsBase}
2225
/>
2326
);
2427
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
import React from 'react';
7+
8+
import { Forms } from '../../../../../shared_imports';
9+
import { CommonWizardSteps } from './types';
10+
import { StepSettings } from './step_settings';
11+
12+
interface Props {
13+
esDocsBase: string;
14+
}
15+
16+
export const StepSettingsContainer = React.memo(({ esDocsBase }: Props) => {
17+
const { defaultValue, updateContent } = Forms.useContent<CommonWizardSteps>('settings');
18+
19+
return (
20+
<StepSettings defaultValue={defaultValue} onChange={updateContent} esDocsBase={esDocsBase} />
21+
);
22+
});
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
import { Mappings, IndexSettings, Aliases } from '../../../../../../common';
8+
9+
export interface CommonWizardSteps {
10+
settings?: IndexSettings;
11+
mappings?: Mappings;
12+
aliases?: Aliases;
13+
}

x-pack/plugins/index_management/public/application/components/shared/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ export {
88
TabAliases,
99
TabMappings,
1010
TabSettings,
11-
StepAliases,
12-
StepMappings,
13-
StepSettings,
11+
StepAliasesContainer,
12+
StepMappingsContainer,
13+
StepSettingsContainer,
14+
CommonWizardSteps,
1415
} from './components';

x-pack/plugins/index_management/public/application/components/template_form/steps/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,4 @@
55
*/
66

77
export { StepLogisticsContainer } from './step_logistics_container';
8-
export { StepAliasesContainer } from './step_aliases_container';
9-
export { StepMappingsContainer } from './step_mappings_container';
10-
export { StepSettingsContainer } from './step_settings_container';
118
export { StepReviewContainer } from './step_review_container';

x-pack/plugins/index_management/public/application/components/template_form/steps/step_aliases_container.tsx

Lines changed: 0 additions & 23 deletions
This file was deleted.

x-pack/plugins/index_management/public/application/components/template_form/steps/step_settings_container.tsx

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)