diff --git a/.i18nrc.json b/.i18nrc.json index ddde50b62a8f3..23f3d6ee33829 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -21,7 +21,7 @@ "kbn": "src/legacy/core_plugins/kibana", "kbnDocViews": "src/legacy/core_plugins/kbn_doc_views", "kbnVislibVisTypes": "src/legacy/core_plugins/kbn_vislib_vis_types", - "management": "src/legacy/core_plugins/management", + "management": ["src/legacy/core_plugins/management", "src/plugins/management"], "kibana_react": "src/legacy/core_plugins/kibana_react", "kibana-react": "src/plugins/kibana_react", "kibana_utils": "src/plugins/kibana_utils", diff --git a/src/legacy/core_plugins/telemetry/public/components/telemetry_form.js b/src/legacy/core_plugins/telemetry/public/components/telemetry_form.js index 94a387565f38d..aed8477057165 100644 --- a/src/legacy/core_plugins/telemetry/public/components/telemetry_form.js +++ b/src/legacy/core_plugins/telemetry/public/components/telemetry_form.js @@ -31,7 +31,7 @@ import { } from '@elastic/eui'; import { PRIVACY_STATEMENT_URL } from '../../common/constants'; import { OptInExampleFlyout } from './opt_in_details_component'; -import { Field } from 'ui/management'; +import { Field } from '../../../kibana/public/management/sections/settings/components/field/field'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; diff --git a/src/legacy/ui/public/management/index.js b/src/legacy/ui/public/management/index.js index a27ff493b317e..ed8ddb65315e2 100644 --- a/src/legacy/ui/public/management/index.js +++ b/src/legacy/ui/public/management/index.js @@ -23,7 +23,8 @@ export { PAGE_FOOTER_COMPONENT, } from '../../../core_plugins/kibana/public/management/sections/settings/components/default_component_registry'; export { registerSettingsComponent } from '../../../core_plugins/kibana/public/management/sections/settings/components/component_registry'; -export { Field } from '../../../core_plugins/kibana/public/management/sections/settings/components/field/field'; -export { management } from './sections_register'; export { SidebarNav } from './components'; export { MANAGEMENT_BREADCRUMB } from './breadcrumbs'; + +import { npStart } from 'ui/new_platform'; +export const management = npStart.plugins.management.legacy; diff --git a/src/legacy/ui/public/new_platform/__mocks__/helpers.ts b/src/legacy/ui/public/new_platform/__mocks__/helpers.ts index a0a917bc48049..d1d7603bd82ed 100644 --- a/src/legacy/ui/public/new_platform/__mocks__/helpers.ts +++ b/src/legacy/ui/public/new_platform/__mocks__/helpers.ts @@ -25,6 +25,7 @@ import { navigationPluginMock } from '../../../../../plugins/navigation/public/m import { expressionsPluginMock } from '../../../../../plugins/expressions/public/mocks'; import { inspectorPluginMock } from '../../../../../plugins/inspector/public/mocks'; import { uiActionsPluginMock } from '../../../../../plugins/ui_actions/public/mocks'; +import { managementPluginMock } from '../../../../../plugins/management/public/mocks'; import { usageCollectionPluginMock } from '../../../../../plugins/usage_collection/public/mocks'; /* eslint-enable @kbn/eslint/no-restricted-paths */ @@ -45,6 +46,7 @@ export const pluginsMock = { inspector: inspectorPluginMock.createStartContract(), expressions: expressionsPluginMock.createStartContract(), uiActions: uiActionsPluginMock.createStartContract(), + management: managementPluginMock.createStartContract(), }), }; diff --git a/src/legacy/ui/public/new_platform/new_platform.karma_mock.js b/src/legacy/ui/public/new_platform/new_platform.karma_mock.js index 20a7e0d5dde8d..3b2a77cefb730 100644 --- a/src/legacy/ui/public/new_platform/new_platform.karma_mock.js +++ b/src/legacy/ui/public/new_platform/new_platform.karma_mock.js @@ -137,6 +137,13 @@ export const npStart = { chrome: {}, }, plugins: { + management: { + legacy: { + getSection: () => ({ + register: sinon.fake(), + }), + }, + }, embeddable: { getEmbeddableFactory: sinon.fake(), getEmbeddableFactories: sinon.fake(), diff --git a/src/legacy/ui/public/new_platform/new_platform.ts b/src/legacy/ui/public/new_platform/new_platform.ts index 138bb4135c507..df3fa7c6ea466 100644 --- a/src/legacy/ui/public/new_platform/new_platform.ts +++ b/src/legacy/ui/public/new_platform/new_platform.ts @@ -32,6 +32,7 @@ import { DevToolsSetup, DevToolsStart } from '../../../../plugins/dev_tools/publ import { KibanaLegacySetup, KibanaLegacyStart } from '../../../../plugins/kibana_legacy/public'; import { HomePublicPluginSetup, HomePublicPluginStart } from '../../../../plugins/home/public'; import { SharePluginSetup, SharePluginStart } from '../../../../plugins/share/public'; +import { ManagementStart } from '../../../../plugins/management/public'; import { BfetchPublicSetup, BfetchPublicStart } from '../../../../plugins/bfetch/public'; import { UsageCollectionSetup } from '../../../../plugins/usage_collection/public'; import { @@ -67,6 +68,7 @@ export interface PluginsStart { dev_tools: DevToolsStart; kibana_legacy: KibanaLegacyStart; share: SharePluginStart; + management: ManagementStart; } export const npSetup = { diff --git a/src/plugins/management/kibana.json b/src/plugins/management/kibana.json new file mode 100644 index 0000000000000..755a387afbd05 --- /dev/null +++ b/src/plugins/management/kibana.json @@ -0,0 +1,7 @@ +{ + "id": "management", + "version": "kibana", + "server": false, + "ui": true, + "requiredPlugins": [] +} diff --git a/src/plugins/management/public/index.ts b/src/plugins/management/public/index.ts new file mode 100644 index 0000000000000..ee3866c734f19 --- /dev/null +++ b/src/plugins/management/public/index.ts @@ -0,0 +1,27 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { PluginInitializerContext } from 'kibana/public'; +import { ManagementPlugin } from './plugin'; + +export function plugin(initializerContext: PluginInitializerContext) { + return new ManagementPlugin(); +} + +export { ManagementStart } from './types'; diff --git a/src/legacy/ui/public/management/__tests__/index.js b/src/plugins/management/public/legacy/index.js similarity index 76% rename from src/legacy/ui/public/management/__tests__/index.js rename to src/plugins/management/public/legacy/index.js index 6c794b3c189f0..63b9d2c6b27d7 100644 --- a/src/legacy/ui/public/management/__tests__/index.js +++ b/src/plugins/management/public/legacy/index.js @@ -17,13 +17,4 @@ * under the License. */ -import expect from '@kbn/expect'; - -import { management } from '..'; -import { ManagementSection } from '../section'; - -describe('Management', () => { - it('provides ManagementSection', () => { - expect(management).to.be.a(ManagementSection); - }); -}); +export { management } from './sections_register'; diff --git a/src/legacy/ui/public/management/section.js b/src/plugins/management/public/legacy/section.js similarity index 92% rename from src/legacy/ui/public/management/section.js rename to src/plugins/management/public/legacy/section.js index b6952695cd910..f269e3fe295b7 100644 --- a/src/legacy/ui/public/management/section.js +++ b/src/plugins/management/public/legacy/section.js @@ -18,8 +18,7 @@ */ import { assign } from 'lodash'; -import { IndexedArray } from '../indexed_array'; -import { capabilities } from '../capabilities'; +import { IndexedArray } from '../../../../legacy/ui/public/indexed_array'; const listeners = []; @@ -37,7 +36,7 @@ export class ManagementSection { * @returns {ManagementSection} */ - constructor(id, options = {}) { + constructor(id, options = {}, capabilities) { this.display = id; this.id = id; this.items = new IndexedArray({ @@ -49,13 +48,14 @@ export class ManagementSection { this.tooltip = ''; this.icon = ''; this.url = ''; + this.capabilities = capabilities; assign(this, options); } get visibleItems() { return this.items.inOrder.filter(item => { - const capabilityManagementSection = capabilities.get().management[this.id]; + const capabilityManagementSection = this.capabilities.management[this.id]; const itemCapability = capabilityManagementSection ? capabilityManagementSection[item.id] : null; @@ -83,7 +83,7 @@ export class ManagementSection { */ register(id, options = {}) { - const item = new ManagementSection(id, assign(options, { parent: this })); + const item = new ManagementSection(id, assign(options, { parent: this }), this.capabilities); if (this.hasItem(id)) { throw new Error(`'${id}' is already registered`); diff --git a/src/legacy/ui/public/management/section.test.js b/src/plugins/management/public/legacy/section.test.js similarity index 83% rename from src/legacy/ui/public/management/section.test.js rename to src/plugins/management/public/legacy/section.test.js index e3e0dd3a427cb..61bafd298afb3 100644 --- a/src/legacy/ui/public/management/section.test.js +++ b/src/plugins/management/public/legacy/section.test.js @@ -16,62 +16,59 @@ * specific language governing permissions and limitations * under the License. */ -jest.mock('ui/capabilities', () => ({ - capabilities: { - get: () => ({ - navLinks: {}, - management: { - kibana: { - sampleFeature1: true, - sampleFeature2: false, - }, - }, - }), - }, -})); import { ManagementSection } from './section'; -import { IndexedArray } from '../indexed_array'; +import { IndexedArray } from '../../../../legacy/ui/public/indexed_array'; + +const capabilitiesMock = { + management: { + kibana: { sampleFeature2: false }, + }, +}; describe('ManagementSection', () => { describe('constructor', () => { it('defaults display to id', () => { - const section = new ManagementSection('kibana'); + const section = new ManagementSection('kibana', {}, capabilitiesMock); expect(section.display).toBe('kibana'); }); it('defaults visible to true', () => { - const section = new ManagementSection('kibana'); + const section = new ManagementSection('kibana', {}, capabilitiesMock); expect(section.visible).toBe(true); }); it('defaults disabled to false', () => { - const section = new ManagementSection('kibana'); + const section = new ManagementSection('kibana', {}, capabilitiesMock); expect(section.disabled).toBe(false); }); it('defaults tooltip to empty string', () => { - const section = new ManagementSection('kibana'); + const section = new ManagementSection('kibana', {}, capabilitiesMock); expect(section.tooltip).toBe(''); }); it('defaults url to empty string', () => { - const section = new ManagementSection('kibana'); + const section = new ManagementSection('kibana', {}, capabilitiesMock); expect(section.url).toBe(''); }); it('exposes items', () => { - const section = new ManagementSection('kibana'); + const section = new ManagementSection('kibana', {}, capabilitiesMock); expect(section.items).toHaveLength(0); }); it('exposes visibleItems', () => { - const section = new ManagementSection('kibana'); + const section = new ManagementSection('kibana', {}, capabilitiesMock); expect(section.visibleItems).toHaveLength(0); }); it('assigns all options', () => { - const section = new ManagementSection('kibana', { description: 'test', url: 'foobar' }); + const section = new ManagementSection( + 'kibana', + { description: 'test', url: 'foobar' }, + capabilitiesMock + ); expect(section.description).toBe('test'); expect(section.url).toBe('foobar'); }); @@ -81,7 +78,7 @@ describe('ManagementSection', () => { let section; beforeEach(() => { - section = new ManagementSection('kibana'); + section = new ManagementSection('kibana', {}, capabilitiesMock); }); it('returns a ManagementSection', () => { @@ -129,7 +126,7 @@ describe('ManagementSection', () => { let section; beforeEach(() => { - section = new ManagementSection('kibana'); + section = new ManagementSection('kibana', {}, capabilitiesMock); section.register('about'); }); @@ -160,7 +157,7 @@ describe('ManagementSection', () => { let section; beforeEach(() => { - section = new ManagementSection('kibana'); + section = new ManagementSection('kibana', {}, capabilitiesMock); section.register('about'); }); @@ -187,7 +184,7 @@ describe('ManagementSection', () => { let section; beforeEach(() => { - section = new ManagementSection('kibana'); + section = new ManagementSection('kibana', {}, capabilitiesMock); section.register('three', { order: 3 }); section.register('one', { order: 1 }); @@ -217,7 +214,7 @@ describe('ManagementSection', () => { let section; beforeEach(() => { - section = new ManagementSection('kibana'); + section = new ManagementSection('kibana', {}, capabilitiesMock); }); it('hide sets visible to false', () => { @@ -236,7 +233,7 @@ describe('ManagementSection', () => { let section; beforeEach(() => { - section = new ManagementSection('kibana'); + section = new ManagementSection('kibana', {}, capabilitiesMock); }); it('disable sets disabled to true', () => { @@ -254,7 +251,7 @@ describe('ManagementSection', () => { let section; beforeEach(() => { - section = new ManagementSection('kibana'); + section = new ManagementSection('kibana', {}, capabilitiesMock); section.register('three', { order: 3 }); section.register('one', { order: 1 }); diff --git a/src/legacy/ui/public/management/sections_register.js b/src/plugins/management/public/legacy/sections_register.js similarity index 54% rename from src/legacy/ui/public/management/sections_register.js rename to src/plugins/management/public/legacy/sections_register.js index a63fd390ea3ca..888b2c5bc3aeb 100644 --- a/src/legacy/ui/public/management/sections_register.js +++ b/src/plugins/management/public/legacy/sections_register.js @@ -20,33 +20,41 @@ import { ManagementSection } from './section'; import { i18n } from '@kbn/i18n'; -export const management = new ManagementSection('management', { - display: i18n.translate('common.ui.management.displayName', { - defaultMessage: 'Management', - }), -}); +export const management = capabilities => { + const main = new ManagementSection( + 'management', + { + display: i18n.translate('management.displayName', { + defaultMessage: 'Management', + }), + }, + capabilities + ); -management.register('data', { - display: i18n.translate('common.ui.management.connectDataDisplayName', { - defaultMessage: 'Connect Data', - }), - order: 0, -}); + main.register('data', { + display: i18n.translate('management.connectDataDisplayName', { + defaultMessage: 'Connect Data', + }), + order: 0, + }); -management.register('elasticsearch', { - display: 'Elasticsearch', - order: 20, - icon: 'logoElasticsearch', -}); + main.register('elasticsearch', { + display: 'Elasticsearch', + order: 20, + icon: 'logoElasticsearch', + }); -management.register('kibana', { - display: 'Kibana', - order: 30, - icon: 'logoKibana', -}); + main.register('kibana', { + display: 'Kibana', + order: 30, + icon: 'logoKibana', + }); -management.register('logstash', { - display: 'Logstash', - order: 30, - icon: 'logoLogstash', -}); + main.register('logstash', { + display: 'Logstash', + order: 30, + icon: 'logoLogstash', + }); + + return main; +}; diff --git a/src/plugins/management/public/mocks/index.ts b/src/plugins/management/public/mocks/index.ts new file mode 100644 index 0000000000000..cc56928e8e529 --- /dev/null +++ b/src/plugins/management/public/mocks/index.ts @@ -0,0 +1,26 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +const createStartContract = () => ({ + legacy: {}, +}); + +export const managementPluginMock = { + createStartContract, +}; diff --git a/src/plugins/management/public/plugin.ts b/src/plugins/management/public/plugin.ts new file mode 100644 index 0000000000000..c65dfd1dc7bb4 --- /dev/null +++ b/src/plugins/management/public/plugin.ts @@ -0,0 +1,35 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { CoreSetup, CoreStart, Plugin } from 'kibana/public'; +import { ManagementStart } from './types'; +// @ts-ignore +import { management } from './legacy'; + +export class ManagementPlugin implements Plugin<{}, ManagementStart> { + public setup(core: CoreSetup) { + return {}; + } + + public start(core: CoreStart) { + return { + legacy: management(core.application.capabilities), + }; + } +} diff --git a/src/plugins/management/public/types.ts b/src/plugins/management/public/types.ts new file mode 100644 index 0000000000000..6ca1faf338c39 --- /dev/null +++ b/src/plugins/management/public/types.ts @@ -0,0 +1,22 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export interface ManagementStart { + legacy: any; +} diff --git a/x-pack/legacy/plugins/license_management/__jest__/start_trial.test.js b/x-pack/legacy/plugins/license_management/__jest__/start_trial.test.js index c37c56aa7a1ad..04f656776bf98 100644 --- a/x-pack/legacy/plugins/license_management/__jest__/start_trial.test.js +++ b/x-pack/legacy/plugins/license_management/__jest__/start_trial.test.js @@ -6,6 +6,7 @@ import { StartTrial } from '../public/np_ready/application/sections/license_dashboard/start_trial'; import { createMockLicense, getComponent } from './util'; +jest.mock('ui/new_platform'); jest.mock(`@elastic/eui/lib/components/form/form_row/make_id`, () => () => `generated-id`); describe('StartTrial component when trial is allowed', () => { diff --git a/x-pack/legacy/plugins/license_management/__jest__/telemetry_opt_in.test.js b/x-pack/legacy/plugins/license_management/__jest__/telemetry_opt_in.test.js index 8df35b797bf45..1b03ce869e52b 100644 --- a/x-pack/legacy/plugins/license_management/__jest__/telemetry_opt_in.test.js +++ b/x-pack/legacy/plugins/license_management/__jest__/telemetry_opt_in.test.js @@ -11,9 +11,7 @@ import { import { TelemetryOptIn } from '../public/np_ready/application/components/telemetry_opt_in'; import { mountWithIntl } from '../../../../test_utils/enzyme_helpers'; -jest.mock('ui/capabilities', () => ({ - get: jest.fn(), -})); +jest.mock('ui/new_platform'); setTelemetryEnabled(true); diff --git a/x-pack/legacy/plugins/license_management/__jest__/upload_license.test.tsx b/x-pack/legacy/plugins/license_management/__jest__/upload_license.test.tsx index b852daf78ca15..ca9b5b0db9ca1 100644 --- a/x-pack/legacy/plugins/license_management/__jest__/upload_license.test.tsx +++ b/x-pack/legacy/plugins/license_management/__jest__/upload_license.test.tsx @@ -9,6 +9,8 @@ import { mountWithIntl } from '../../../../test_utils/enzyme_helpers'; import React from 'react'; import { Provider } from 'react-redux'; +jest.mock('ui/new_platform'); + // @ts-ignore import { uploadLicense } from '../public/np_ready/application/store/actions/upload_license'; diff --git a/x-pack/legacy/plugins/remote_clusters/__jest__/client_integration/remote_clusters_add.test.js b/x-pack/legacy/plugins/remote_clusters/__jest__/client_integration/remote_clusters_add.test.js index c1ef7db2efc5c..8f34e7d84a08b 100644 --- a/x-pack/legacy/plugins/remote_clusters/__jest__/client_integration/remote_clusters_add.test.js +++ b/x-pack/legacy/plugins/remote_clusters/__jest__/client_integration/remote_clusters_add.test.js @@ -7,6 +7,8 @@ import { pageHelpers, nextTick, setupEnvironment } from './helpers'; import { NON_ALPHA_NUMERIC_CHARS, ACCENTED_CHARS } from './helpers/constants'; +jest.mock('ui/new_platform'); + const { setup } = pageHelpers.remoteClustersAdd; describe('Create Remote cluster', () => { diff --git a/x-pack/legacy/plugins/remote_clusters/__jest__/client_integration/remote_clusters_edit.test.js b/x-pack/legacy/plugins/remote_clusters/__jest__/client_integration/remote_clusters_edit.test.js index c380eaadd8e64..95dc65a96e30a 100644 --- a/x-pack/legacy/plugins/remote_clusters/__jest__/client_integration/remote_clusters_edit.test.js +++ b/x-pack/legacy/plugins/remote_clusters/__jest__/client_integration/remote_clusters_edit.test.js @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ +jest.mock('ui/new_platform'); import { RemoteClusterForm } from '../../public/app/sections/components/remote_cluster_form'; import { pageHelpers, setupEnvironment, nextTick } from './helpers'; import { REMOTE_CLUSTER_EDIT, REMOTE_CLUSTER_EDIT_NAME } from './helpers/constants'; diff --git a/x-pack/legacy/plugins/remote_clusters/__jest__/client_integration/remote_clusters_list.test.js b/x-pack/legacy/plugins/remote_clusters/__jest__/client_integration/remote_clusters_list.test.js index 178dd341a75a7..699c00e450a1f 100644 --- a/x-pack/legacy/plugins/remote_clusters/__jest__/client_integration/remote_clusters_list.test.js +++ b/x-pack/legacy/plugins/remote_clusters/__jest__/client_integration/remote_clusters_list.test.js @@ -15,6 +15,8 @@ import { import { getRouter } from '../../public/app/services'; import { getRemoteClusterMock } from '../../fixtures/remote_cluster'; +jest.mock('ui/new_platform'); + const { setup } = pageHelpers.remoteClustersList; describe('', () => { diff --git a/x-pack/legacy/plugins/rollup/public/crud_app/sections/job_list/job_list.test.js b/x-pack/legacy/plugins/rollup/public/crud_app/sections/job_list/job_list.test.js index 627091e0cf749..5c7d53efbd62c 100644 --- a/x-pack/legacy/plugins/rollup/public/crud_app/sections/job_list/job_list.test.js +++ b/x-pack/legacy/plugins/rollup/public/crud_app/sections/job_list/job_list.test.js @@ -9,7 +9,6 @@ import { rollupJobsStore } from '../../store'; import { JobList } from './job_list'; jest.mock('ui/new_platform'); - jest.mock('ui/chrome', () => ({ addBasePath: () => {}, breadcrumbs: { set: () => {} }, diff --git a/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/home.test.ts b/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/home.test.ts index effab0fcadf4d..69b5ca9e2b68f 100644 --- a/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/home.test.ts +++ b/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/home.test.ts @@ -21,6 +21,7 @@ import moment from 'moment-timezone'; const { setup } = pageHelpers.home; +jest.mock('ui/new_platform'); jest.mock('ui/i18n', () => { const I18nContext = ({ children }: any) => children; return { I18nContext }; diff --git a/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/policy_edit.test.ts b/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/policy_edit.test.ts index e14a080137c60..1222697956ffb 100644 --- a/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/policy_edit.test.ts +++ b/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/policy_edit.test.ts @@ -11,6 +11,8 @@ import { PolicyForm } from '../../public/app/components/policy_form'; import { PolicyFormTestBed } from './helpers/policy_form.helpers'; import { POLICY_EDIT } from './helpers/constant'; +jest.mock('ui/new_platform'); + const { setup } = pageHelpers.policyEdit; const { setup: setupPolicyAdd } = pageHelpers.policyAdd; diff --git a/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/repository_add.test.ts b/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/repository_add.test.ts index df250159c7f69..1f70755d5fd85 100644 --- a/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/repository_add.test.ts +++ b/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/repository_add.test.ts @@ -11,6 +11,8 @@ import { RepositoryType } from '../../common/types'; import { setupEnvironment, pageHelpers, nextTick } from './helpers'; import { RepositoryAddTestBed } from './helpers/repository_add.helpers'; +jest.mock('ui/new_platform'); + const { setup } = pageHelpers.repositoryAdd; const repositoryTypes = ['fs', 'url', 'source', 'azure', 'gcs', 's3', 'hdfs']; diff --git a/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/repository_edit.test.ts b/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/repository_edit.test.ts index ef74482fc9de7..cca81c0e74285 100644 --- a/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/repository_edit.test.ts +++ b/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/repository_edit.test.ts @@ -12,6 +12,8 @@ import { RepositoryEditTestSubjects } from './helpers/repository_edit.helpers'; import { RepositoryAddTestSubjects } from './helpers/repository_add.helpers'; import { REPOSITORY_EDIT } from './helpers/constant'; +jest.mock('ui/new_platform'); + const { setup } = pageHelpers.repositoryEdit; const { setup: setupRepositoryAdd } = pageHelpers.repositoryAdd; diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index b7036399f3f71..413e0a9a4cc50 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -461,8 +461,8 @@ "common.ui.legacyBrowserMessage": "この Kibana インストレーションは、現在ご使用のブラウザが満たしていない厳格なセキュリティ要件が有効になっています。", "common.ui.legacyBrowserTitle": "ブラウザをアップグレードしてください", "common.ui.management.breadcrumb": "管理", - "common.ui.management.connectDataDisplayName": "データに接続", - "common.ui.management.displayName": "管理", + "management.connectDataDisplayName": "データに接続", + "management.displayName": "管理", "common.ui.management.nav.menu": "管理メニュー", "common.ui.modals.cancelButtonLabel": "キャンセル", "common.ui.notify.fatalError.errorStatusMessage": "エラー {errStatus} {errStatusText}: {errMessage}", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index af4aa1f0c7bbe..0f6d03e7fb68d 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -461,8 +461,8 @@ "common.ui.legacyBrowserMessage": "此 Kibana 安装启用了当前浏览器未满足的严格安全要求。", "common.ui.legacyBrowserTitle": "请升级您的浏览器", "common.ui.management.breadcrumb": "管理", - "common.ui.management.connectDataDisplayName": "连接数据", - "common.ui.management.displayName": "管理", + "management.connectDataDisplayName": "连接数据", + "management.displayName": "管理", "common.ui.management.nav.menu": "管理菜单", "common.ui.modals.cancelButtonLabel": "取消", "common.ui.notify.fatalError.errorStatusMessage": "错误 {errStatus} {errStatusText}:{errMessage}", @@ -12810,4 +12810,4 @@ "xpack.licensing.welcomeBanner.licenseIsExpiredDescription.updateYourLicenseLinkText": "更新您的许可", "xpack.licensing.welcomeBanner.licenseIsExpiredTitle": "您的{licenseType}许可已过期" } -} \ No newline at end of file +}