Skip to content

Commit e0a5194

Browse files
authored
Index pattern management plugin - src/legacy/core_plugins/management => new platform plugin (#62594)
* implement index pattern management plugin in new platform
1 parent f84773f commit e0a5194

File tree

44 files changed

+183
-296
lines changed

Some content is hidden

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

44 files changed

+183
-296
lines changed

.i18nrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"src/legacy/core_plugins/management",
2525
"src/plugins/management"
2626
],
27+
"indexPatternManagement": "src/plugins/index_pattern_management",
2728
"advancedSettings": "src/plugins/advanced_settings",
2829
"kibana_legacy": "src/plugins/kibana_legacy",
2930
"kibana_react": "src/legacy/core_plugins/kibana_react",
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
export * from './index_pattern_management';
20+
export {
21+
ProcessedImportResponse,
22+
processImportResponse,
23+
} from './management/sections/objects/lib/process_import_response';

src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import React from 'react';
2121
import { StepIndexPattern } from '../step_index_pattern';
2222
import { shallowWithI18nProvider } from 'test_utils/enzyme_helpers';
2323
import { Header } from './components/header';
24-
import { IndexPatternCreationConfig } from '../../../../../../../../management/public';
24+
import { IndexPatternCreationConfig } from '../../../../../../../../../../plugins/index_pattern_management/public';
2525
import { coreMock } from '../../../../../../../../../../core/public/mocks';
2626
import { dataPluginMock } from '../../../../../../../../../../plugins/data/public/mocks';
2727
import { SavedObjectsFindResponsePublic } from '../../../../../../../../../../core/public';

src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import { LoadingIndices } from './components/loading_indices';
3939
import { StatusMessage } from './components/status_message';
4040
import { IndicesList } from './components/indices_list';
4141
import { Header } from './components/header';
42-
import { IndexPatternCreationConfig } from '../../../../../../../../management/public';
42+
import { IndexPatternCreationConfig } from '../../../../../../../../../../plugins/index_pattern_management/public';
4343
import { MatchedIndex } from '../../types';
4444

4545
interface StepIndexPatternProps {

src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import React from 'react';
2121
import { shallowWithI18nProvider } from 'test_utils/enzyme_helpers';
22-
import { IndexPatternCreationConfig } from '../../../../../../../../management/public';
22+
import { IndexPatternCreationConfig } from '../../../../../../../../../../plugins/index_pattern_management/public';
2323
import { IFieldType } from '../../../../../../../../../../plugins/data/public';
2424

2525
import { StepTimeField } from '../step_time_field';

src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { Header } from './components/header';
3434
import { TimeField } from './components/time_field';
3535
import { AdvancedOptions } from './components/advanced_options';
3636
import { ActionButtons } from './components/action_buttons';
37-
import { IndexPatternCreationConfig } from '../../../../../../../../management/public';
37+
import { IndexPatternCreationConfig } from '../../../../../../../../../../plugins/index_pattern_management/public';
3838
import { DataPublicPluginStart } from '../../../../../../../../../../plugins/data/public';
3939

4040
interface StepTimeFieldProps {

src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import uiRoutes from 'ui/routes';
2121
import angularTemplate from './angular_template.html';
2222
import { npStart } from 'ui/new_platform';
23-
import { setup as managementSetup } from '../../../../../../management/public/legacy';
2423
import { getCreateBreadcrumbs } from '../breadcrumbs';
2524

2625
import { renderCreateIndexPatternWizard, destroyCreateIndexPatternWizard } from './render';
@@ -33,7 +32,7 @@ uiRoutes.when('/management/kibana/index_pattern', {
3332
const kbnUrl = $injector.get('kbnUrl');
3433
$scope.$$postDigest(() => {
3534
const $routeParams = $injector.get('$routeParams');
36-
const indexPatternCreationType = managementSetup.indexPattern.creation.getType(
35+
const indexPatternCreationType = npStart.plugins.indexPatternManagement.creation.getType(
3736
$routeParams.type
3837
);
3938
const services = {

src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/get_indices.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { getIndices } from './get_indices';
21-
import { IndexPatternCreationConfig } from './../../../../../../../management/public';
21+
import { IndexPatternCreationConfig } from '../../../../../../../../../plugins/index_pattern_management/public';
2222
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
2323
import { LegacyApiCaller } from '../../../../../../../../../plugins/data/public/search';
2424

src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/get_indices.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { get, sortBy } from 'lodash';
21-
import { IndexPatternCreationConfig } from '../../../../../../../management/public';
21+
import { IndexPatternCreationConfig } from '../../../../../../../../../plugins/index_pattern_management/public';
2222
import { DataPublicPluginStart } from '../../../../../../../../../plugins/data/public';
2323
import { MatchedIndex } from '../types';
2424

src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/edit_index_pattern.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import { uiModules } from 'ui/modules';
2929
import template from './edit_index_pattern.html';
3030
import { fieldWildcardMatcher } from '../../../../../../../../plugins/kibana_utils/public';
3131
import { subscribeWithScope } from '../../../../../../../../plugins/kibana_legacy/public';
32-
import { setup as managementSetup } from '../../../../../../management/public/legacy';
3332
import React from 'react';
3433
import { render, unmountComponentAtNode } from 'react-dom';
3534
import { SourceFiltersTable } from './source_filters_table';
@@ -239,14 +238,12 @@ uiModules
239238
$scope.editSectionsProvider = Private(IndicesEditSectionsProvider);
240239
$scope.kbnUrl = Private(KbnUrlProvider);
241240
$scope.indexPattern = $route.current.locals.indexPattern;
242-
$scope.indexPatternListProvider = managementSetup.indexPattern.list;
243-
$scope.indexPattern.tags = managementSetup.indexPattern.list.getIndexPatternTags(
241+
$scope.indexPatternListProvider = npStart.plugins.indexPatternManagement.list;
242+
$scope.indexPattern.tags = npStart.plugins.indexPatternManagement.list.getIndexPatternTags(
244243
$scope.indexPattern,
245244
$scope.indexPattern.id === config.get('defaultIndex')
246245
);
247-
$scope.getFieldInfo = managementSetup.indexPattern.list.getFieldInfo.bind(
248-
managementSetup.indexPattern.list
249-
);
246+
$scope.getFieldInfo = npStart.plugins.indexPatternManagement.list.getFieldInfo;
250247
docTitle.change($scope.indexPattern.title);
251248

252249
const otherPatterns = _.filter($route.current.locals.indexPatterns, pattern => {
@@ -257,7 +254,7 @@ uiModules
257254
$scope.editSections = $scope.editSectionsProvider(
258255
$scope.indexPattern,
259256
$scope.fieldFilter,
260-
managementSetup.indexPattern.list
257+
npStart.plugins.indexPatternManagement.list
261258
);
262259
$scope.refreshFilters();
263260
$scope.fields = $scope.indexPattern.getNonScriptedFields();
@@ -363,7 +360,7 @@ uiModules
363360
$scope.editSections = $scope.editSectionsProvider(
364361
$scope.indexPattern,
365362
$scope.fieldFilter,
366-
managementSetup.indexPattern.list
363+
npStart.plugins.indexPatternManagement.list
367364
);
368365

369366
if ($scope.fieldFilter === undefined) {

0 commit comments

Comments
 (0)