mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Cleanup OSS code from visualizations wizard (#89092)
* Cleanup OSS code from visualizations wizard * Remove unecessary translations * Remove unused translation * Fix functional test * Disable the functional test for OSS * Remove from oss correctly :D * Fix ci
This commit is contained in:
parent
053628cae8
commit
64e9cf0440
41 changed files with 10 additions and 570 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -13,7 +13,6 @@
|
|||
/src/plugins/advanced_settings/ @elastic/kibana-app
|
||||
/src/plugins/charts/ @elastic/kibana-app
|
||||
/src/plugins/discover/ @elastic/kibana-app
|
||||
/src/plugins/lens_oss/ @elastic/kibana-app
|
||||
/src/plugins/management/ @elastic/kibana-app
|
||||
/src/plugins/kibana_legacy/ @elastic/kibana-app
|
||||
/src/plugins/timelion/ @elastic/kibana-app
|
||||
|
@ -127,7 +126,6 @@
|
|||
/x-pack/test/functional/es_archives/maps/ @elastic/kibana-gis
|
||||
/x-pack/test/visual_regression/tests/maps/index.js @elastic/kibana-gis
|
||||
#CC# /src/plugins/maps_legacy/ @elastic/kibana-gis
|
||||
#CC# /src/plugins/maps_oss/ @elastic/kibana-gis
|
||||
#CC# /x-pack/plugins/file_upload @elastic/kibana-gis
|
||||
#CC# /x-pack/plugins/maps_legacy_licensing @elastic/kibana-gis
|
||||
/src/plugins/tile_map/ @elastic/kibana-gis
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
"visTypeVislib": "src/plugins/vis_type_vislib",
|
||||
"visTypeXy": "src/plugins/vis_type_xy",
|
||||
"visualizations": "src/plugins/visualizations",
|
||||
"lensOss": "src/plugins/lens_oss",
|
||||
"mapsOss": "src/plugins/maps_oss",
|
||||
"visualize": "src/plugins/visualize",
|
||||
"apmOss": "src/plugins/apm_oss",
|
||||
"usageCollection": "src/plugins/usage_collection"
|
||||
|
|
|
@ -130,11 +130,6 @@ in Kibana, e.g. visualizations. It has the form of a flyout panel.
|
|||
|The legacyExport plugin adds support for the legacy saved objects export format.
|
||||
|
||||
|
||||
|{kib-repo}blob/{branch}/src/plugins/lens_oss/README.md[lensOss]
|
||||
|The lens_oss plugin registers the lens visualization on OSS.
|
||||
It is registered as disabled. The x-pack plugin should unregister this.
|
||||
|
||||
|
||||
|{kib-repo}blob/{branch}/src/plugins/management/README.md[management]
|
||||
|This plugins contains the "Stack Management" page framework. It offers navigation and an API
|
||||
to link individual managment section into it. This plugin does not contain any individual
|
||||
|
@ -145,11 +140,6 @@ management section itself.
|
|||
|Internal objects used by the Coordinate, Region, and Vega visualizations.
|
||||
|
||||
|
||||
|{kib-repo}blob/{branch}/src/plugins/maps_oss/README.md[mapsOss]
|
||||
|The maps_oss plugin registers the maps visualization on OSS.
|
||||
It is registered as disabled. The x-pack plugin should unregister this.
|
||||
|
||||
|
||||
|{kib-repo}blob/{branch}/src/plugins/navigation/README.md[navigation]
|
||||
|The navigation plugins exports the TopNavMenu component.
|
||||
It also provides a stateful version of it on the start contract.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import { ConfigDeprecationLogger } from './types';
|
||||
import { configDeprecationFactory, copyFromRoot } from './deprecation_factory';
|
||||
import { configDeprecationFactory } from './deprecation_factory';
|
||||
|
||||
describe('DeprecationFactory', () => {
|
||||
const { rename, unused, renameFromRoot, unusedFromRoot } = configDeprecationFactory;
|
||||
|
@ -239,89 +239,6 @@ describe('DeprecationFactory', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('copyFromRoot', () => {
|
||||
it('copies a property to a different namespace', () => {
|
||||
const rawConfig = {
|
||||
originplugin: {
|
||||
deprecated: 'toberenamed',
|
||||
valid: 'valid',
|
||||
},
|
||||
destinationplugin: {
|
||||
property: 'value',
|
||||
},
|
||||
};
|
||||
const processed = copyFromRoot('originplugin.deprecated', 'destinationplugin.renamed')(
|
||||
rawConfig,
|
||||
'does-not-matter',
|
||||
logger
|
||||
);
|
||||
expect(processed).toEqual({
|
||||
originplugin: {
|
||||
deprecated: 'toberenamed',
|
||||
valid: 'valid',
|
||||
},
|
||||
destinationplugin: {
|
||||
renamed: 'toberenamed',
|
||||
property: 'value',
|
||||
},
|
||||
});
|
||||
expect(deprecationMessages.length).toEqual(0);
|
||||
});
|
||||
|
||||
it('does not alter config if origin property is not present', () => {
|
||||
const rawConfig = {
|
||||
myplugin: {
|
||||
new: 'new',
|
||||
valid: 'valid',
|
||||
},
|
||||
someOtherPlugin: {
|
||||
property: 'value',
|
||||
},
|
||||
};
|
||||
const processed = copyFromRoot('myplugin.deprecated', 'myplugin.new')(
|
||||
rawConfig,
|
||||
'does-not-matter',
|
||||
logger
|
||||
);
|
||||
expect(processed).toEqual({
|
||||
myplugin: {
|
||||
new: 'new',
|
||||
valid: 'valid',
|
||||
},
|
||||
someOtherPlugin: {
|
||||
property: 'value',
|
||||
},
|
||||
});
|
||||
expect(deprecationMessages.length).toEqual(0);
|
||||
});
|
||||
|
||||
it('does not alter config if they both exist', () => {
|
||||
const rawConfig = {
|
||||
myplugin: {
|
||||
deprecated: 'deprecated',
|
||||
renamed: 'renamed',
|
||||
},
|
||||
someOtherPlugin: {
|
||||
property: 'value',
|
||||
},
|
||||
};
|
||||
const processed = copyFromRoot('myplugin.deprecated', 'someOtherPlugin.property')(
|
||||
rawConfig,
|
||||
'does-not-matter',
|
||||
logger
|
||||
);
|
||||
expect(processed).toEqual({
|
||||
myplugin: {
|
||||
deprecated: 'deprecated',
|
||||
renamed: 'renamed',
|
||||
},
|
||||
someOtherPlugin: {
|
||||
property: 'value',
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('unused', () => {
|
||||
it('removes the unused property from the config and logs a warning is present', () => {
|
||||
const rawConfig = {
|
||||
|
|
|
@ -45,26 +45,6 @@ const _rename = (
|
|||
return config;
|
||||
};
|
||||
|
||||
const _copy = (
|
||||
config: Record<string, any>,
|
||||
rootPath: string,
|
||||
originKey: string,
|
||||
destinationKey: string
|
||||
) => {
|
||||
const originPath = getPath(rootPath, originKey);
|
||||
const originValue = get(config, originPath);
|
||||
if (originValue === undefined) {
|
||||
return config;
|
||||
}
|
||||
|
||||
const destinationPath = getPath(rootPath, destinationKey);
|
||||
const destinationValue = get(config, destinationPath);
|
||||
if (destinationValue === undefined) {
|
||||
set(config, destinationPath, originValue);
|
||||
}
|
||||
return config;
|
||||
};
|
||||
|
||||
const _unused = (
|
||||
config: Record<string, any>,
|
||||
rootPath: string,
|
||||
|
@ -89,12 +69,6 @@ const renameFromRoot = (oldKey: string, newKey: string, silent?: boolean): Confi
|
|||
log
|
||||
) => _rename(config, '', log, oldKey, newKey, silent);
|
||||
|
||||
export const copyFromRoot = (originKey: string, destinationKey: string): ConfigDeprecation => (
|
||||
config,
|
||||
rootPath,
|
||||
log
|
||||
) => _copy(config, '', originKey, destinationKey);
|
||||
|
||||
const unused = (unusedKey: string): ConfigDeprecation => (config, rootPath, log) =>
|
||||
_unused(config, rootPath, log, unusedKey);
|
||||
|
||||
|
|
|
@ -13,5 +13,5 @@ export {
|
|||
ConfigDeprecationFactory,
|
||||
ConfigDeprecationProvider,
|
||||
} from './types';
|
||||
export { configDeprecationFactory, copyFromRoot } from './deprecation_factory';
|
||||
export { configDeprecationFactory } from './deprecation_factory';
|
||||
export { applyDeprecations } from './apply_deprecations';
|
||||
|
|
|
@ -14,7 +14,6 @@ export {
|
|||
ConfigDeprecationLogger,
|
||||
ConfigDeprecationProvider,
|
||||
ConfigDeprecationWithContext,
|
||||
copyFromRoot,
|
||||
} from './deprecation';
|
||||
|
||||
export { RawConfigurationProvider, RawConfigService, getConfigFromFiles } from './raw';
|
||||
|
|
|
@ -44,7 +44,6 @@ pageLoadAssetSize:
|
|||
kibanaReact: 161921
|
||||
kibanaUtils: 198829
|
||||
lens: 96624
|
||||
lensOss: 19341
|
||||
licenseManagement: 41817
|
||||
licensing: 39008
|
||||
lists: 202261
|
||||
|
@ -53,7 +52,6 @@ pageLoadAssetSize:
|
|||
maps: 183610
|
||||
mapsLegacy: 116817
|
||||
mapsLegacyLicensing: 20214
|
||||
mapsOss: 19284
|
||||
ml: 82187
|
||||
monitoring: 50000
|
||||
navigation: 37269
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
# lens_oss
|
||||
|
||||
The lens_oss plugin registers the lens visualization on OSS.
|
||||
It is registered as disabled. The x-pack plugin should unregister this.
|
||||
|
||||
`visualizations.unregisterAlias('lensOss')`
|
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
export const APP_NAME = 'lens';
|
||||
export const PLUGIN_ID_OSS = 'lensOss';
|
||||
export const APP_PATH = '#/';
|
||||
export const APP_ICON = 'lensApp';
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
export * from './constants';
|
|
@ -1,15 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
import { schema, TypeOf } from '@kbn/config-schema';
|
||||
|
||||
export const configSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
});
|
||||
|
||||
export type ConfigSchema = TypeOf<typeof configSchema>;
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"id": "lensOss",
|
||||
"version": "kibana",
|
||||
"ui": true,
|
||||
"server": true,
|
||||
"requiredPlugins": [
|
||||
"visualizations"
|
||||
],
|
||||
"extraPublicDirs": ["common/constants"]
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
import { LensOSSPlugin } from './plugin';
|
||||
|
||||
export const plugin = () => new LensOSSPlugin();
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
import { DocLinksStart, CoreSetup } from 'src/core/public';
|
||||
import { VisualizationsSetup } from '../../visualizations/public';
|
||||
import { getLensAliasConfig } from './vis_type_alias';
|
||||
|
||||
export interface LensPluginSetupDependencies {
|
||||
visualizations: VisualizationsSetup;
|
||||
}
|
||||
|
||||
export interface LensPluginStartDependencies {
|
||||
docLinks: DocLinksStart;
|
||||
}
|
||||
|
||||
export class LensOSSPlugin {
|
||||
setup(
|
||||
core: CoreSetup<LensPluginStartDependencies>,
|
||||
{ visualizations }: LensPluginSetupDependencies
|
||||
) {
|
||||
core.getStartServices().then(([coreStart]) => {
|
||||
visualizations.registerAlias(getLensAliasConfig(coreStart.docLinks));
|
||||
});
|
||||
}
|
||||
|
||||
start() {}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { VisTypeAlias } from 'src/plugins/visualizations/public';
|
||||
import { DocLinksStart } from 'src/core/public';
|
||||
import { APP_NAME, PLUGIN_ID_OSS, APP_PATH, APP_ICON } from '../common';
|
||||
|
||||
export const getLensAliasConfig = ({ links }: DocLinksStart): VisTypeAlias => ({
|
||||
aliasPath: APP_PATH,
|
||||
aliasApp: APP_NAME,
|
||||
name: PLUGIN_ID_OSS,
|
||||
title: i18n.translate('lensOss.visTypeAlias.title', {
|
||||
defaultMessage: 'Lens',
|
||||
}),
|
||||
description: i18n.translate('lensOss.visTypeAlias.description', {
|
||||
defaultMessage:
|
||||
'Create visualizations with our drag-and-drop editor. Switch between visualization types at any time. Best for most visualizations.',
|
||||
}),
|
||||
icon: APP_ICON,
|
||||
stage: 'production',
|
||||
disabled: true,
|
||||
note: i18n.translate('lensOss.visTypeAlias.note', {
|
||||
defaultMessage: 'Recommended for most users.',
|
||||
}),
|
||||
promoTooltip: {
|
||||
description: i18n.translate('lensOss.visTypeAlias.promoTooltip.description', {
|
||||
defaultMessage: 'Try Lens for free with Elastic. Learn more.',
|
||||
}),
|
||||
link: `${links.visualize.lens}?blade=kibanaossvizwizard`,
|
||||
},
|
||||
});
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
import { PluginConfigDescriptor } from 'kibana/server';
|
||||
import { copyFromRoot } from '@kbn/config';
|
||||
import { configSchema, ConfigSchema } from '../config';
|
||||
|
||||
export const config: PluginConfigDescriptor<ConfigSchema> = {
|
||||
schema: configSchema,
|
||||
deprecations: () => [copyFromRoot('xpack.lens.enabled', 'lens_oss.enabled')],
|
||||
};
|
||||
|
||||
export const plugin = () => ({
|
||||
setup() {},
|
||||
start() {},
|
||||
});
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
"emitDeclarationOnly": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true
|
||||
},
|
||||
"include": [
|
||||
"common/**/*",
|
||||
"public/**/*",
|
||||
"server/**/*",
|
||||
"*.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../../core/tsconfig.json" },
|
||||
{ "path": "../visualizations/tsconfig.json" }
|
||||
]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
# maps_oss
|
||||
|
||||
The maps_oss plugin registers the maps visualization on OSS.
|
||||
It is registered as disabled. The x-pack plugin should unregister this.
|
||||
|
||||
`visualizations.unregisterAlias('mapsOss')`
|
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
export const APP_NAME = 'maps';
|
||||
export const PLUGIN_ID_OSS = 'mapsOss';
|
||||
export const APP_PATH = '/map';
|
||||
export const APP_ICON = 'gisApp';
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
export * from './constants';
|
|
@ -1,15 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
import { schema, TypeOf } from '@kbn/config-schema';
|
||||
|
||||
export const configSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
});
|
||||
|
||||
export type ConfigSchema = TypeOf<typeof configSchema>;
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"id": "mapsOss",
|
||||
"version": "kibana",
|
||||
"ui": true,
|
||||
"server": true,
|
||||
"requiredPlugins": [
|
||||
"visualizations"
|
||||
],
|
||||
"extraPublicDirs": ["common/constants"]
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
import { MapsOSSPlugin } from './plugin';
|
||||
|
||||
export const plugin = () => new MapsOSSPlugin();
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
import { DocLinksStart, CoreSetup } from 'src/core/public';
|
||||
import { VisualizationsSetup } from '../../visualizations/public';
|
||||
import { getMapsAliasConfig } from './vis_type_alias';
|
||||
|
||||
export interface MapsPluginSetupDependencies {
|
||||
visualizations: VisualizationsSetup;
|
||||
}
|
||||
|
||||
export interface MapsPluginStartDependencies {
|
||||
docLinks: DocLinksStart;
|
||||
}
|
||||
|
||||
export class MapsOSSPlugin {
|
||||
setup(
|
||||
core: CoreSetup<MapsPluginStartDependencies>,
|
||||
{ visualizations }: MapsPluginSetupDependencies
|
||||
) {
|
||||
core.getStartServices().then(([coreStart]) => {
|
||||
visualizations.registerAlias(getMapsAliasConfig(coreStart.docLinks));
|
||||
});
|
||||
}
|
||||
|
||||
start() {}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { VisTypeAlias } from 'src/plugins/visualizations/public';
|
||||
import { DocLinksStart } from 'src/core/public';
|
||||
import { APP_NAME, PLUGIN_ID_OSS, APP_PATH, APP_ICON } from '../common';
|
||||
|
||||
export const getMapsAliasConfig = ({ links }: DocLinksStart): VisTypeAlias => ({
|
||||
aliasPath: APP_PATH,
|
||||
aliasApp: APP_NAME,
|
||||
name: PLUGIN_ID_OSS,
|
||||
title: i18n.translate('mapsOss.visTypeAlias.title', {
|
||||
defaultMessage: 'Maps',
|
||||
}),
|
||||
description: i18n.translate('mapsOss.visTypeAlias.description', {
|
||||
defaultMessage: 'Plot and style your geo data in a multi layer map.',
|
||||
}),
|
||||
icon: APP_ICON,
|
||||
stage: 'production',
|
||||
disabled: true,
|
||||
promoTooltip: {
|
||||
description: i18n.translate('mapsOss.visTypeAlias.promoTooltip.description', {
|
||||
defaultMessage: 'Try maps for free with Elastic. Learn more.',
|
||||
}),
|
||||
link: `${links.visualize.maps}?blade=kibanaossvizwizard`,
|
||||
},
|
||||
});
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* and the Server Side Public License, v 1; you may not use this file except in
|
||||
* compliance with, at your election, the Elastic License or the Server Side
|
||||
* Public License, v 1.
|
||||
*/
|
||||
|
||||
import { PluginConfigDescriptor } from 'kibana/server';
|
||||
import { copyFromRoot } from '@kbn/config';
|
||||
import { configSchema, ConfigSchema } from '../config';
|
||||
|
||||
export const config: PluginConfigDescriptor<ConfigSchema> = {
|
||||
schema: configSchema,
|
||||
deprecations: () => [copyFromRoot('xpack.maps.enabled', 'maps_oss.enabled')],
|
||||
};
|
||||
|
||||
export const plugin = () => ({
|
||||
setup() {},
|
||||
start() {},
|
||||
});
|
|
@ -31,11 +31,6 @@ export interface VisualizationsAppExtension {
|
|||
toListItem: (savedObject: SavedObject) => VisualizationListItem;
|
||||
}
|
||||
|
||||
export interface VisTypeAliasPromoTooltip {
|
||||
description: string;
|
||||
link: string;
|
||||
}
|
||||
|
||||
export interface VisTypeAlias {
|
||||
aliasPath: string;
|
||||
aliasApp: string;
|
||||
|
@ -43,10 +38,8 @@ export interface VisTypeAlias {
|
|||
title: string;
|
||||
icon: string;
|
||||
promotion?: boolean;
|
||||
promoTooltip?: VisTypeAliasPromoTooltip;
|
||||
description: string;
|
||||
note?: string;
|
||||
disabled?: boolean;
|
||||
getSupportedTriggers?: () => string[];
|
||||
stage: VisualizationStage;
|
||||
|
||||
|
|
|
@ -39,11 +39,6 @@ describe('GroupSelection', () => {
|
|||
title: 'Vis with alias Url',
|
||||
aliasApp: 'aliasApp',
|
||||
aliasPath: '#/aliasApp',
|
||||
disabled: true,
|
||||
promoTooltip: {
|
||||
description: 'Learn More',
|
||||
link: '#/anotherUrl',
|
||||
},
|
||||
description: 'Vis with alias Url',
|
||||
stage: 'production',
|
||||
group: VisGroups.PROMOTED,
|
||||
|
@ -227,41 +222,6 @@ describe('GroupSelection', () => {
|
|||
]);
|
||||
});
|
||||
|
||||
it('should render disabled aliases with a disabled class', () => {
|
||||
const wrapper = mountWithIntl(
|
||||
<GroupSelection
|
||||
visTypesRegistry={visTypesRegistry(_visTypes as BaseVisType[])}
|
||||
docLinks={docLinks as DocLinksStart}
|
||||
toggleGroups={jest.fn()}
|
||||
onVisTypeSelected={jest.fn()}
|
||||
showExperimental={true}
|
||||
/>
|
||||
);
|
||||
expect(wrapper.find('[data-test-subj="visType-visWithAliasUrl"]').exists()).toBe(true);
|
||||
expect(
|
||||
wrapper
|
||||
.find('[data-test-subj="visType-visWithAliasUrl"]')
|
||||
.at(1)
|
||||
.hasClass('euiCard-isDisabled')
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it('should render a basic badge with link for disabled aliases with promoTooltip', () => {
|
||||
const wrapper = mountWithIntl(
|
||||
<GroupSelection
|
||||
visTypesRegistry={visTypesRegistry(_visTypes as BaseVisType[])}
|
||||
docLinks={docLinks as DocLinksStart}
|
||||
toggleGroups={jest.fn()}
|
||||
onVisTypeSelected={jest.fn()}
|
||||
showExperimental={true}
|
||||
/>
|
||||
);
|
||||
expect(wrapper.find('[data-test-subj="visTypeBadge"]').exists()).toBe(true);
|
||||
expect(wrapper.find('[data-test-subj="visTypeBadge"]').at(0).prop('tooltipContent')).toBe(
|
||||
'Learn More'
|
||||
);
|
||||
});
|
||||
|
||||
it('should not show tools experimental visualizations if showExperimentalis false', () => {
|
||||
const expVis = {
|
||||
name: 'visExp',
|
||||
|
|
|
@ -48,10 +48,6 @@ interface VisCardProps {
|
|||
showExperimental?: boolean | undefined;
|
||||
}
|
||||
|
||||
function isVisTypeAlias(type: BaseVisType | VisTypeAlias): type is VisTypeAlias {
|
||||
return 'aliasPath' in type;
|
||||
}
|
||||
|
||||
function GroupSelection(props: GroupSelectionProps) {
|
||||
const visualizeGuideLink = props.docLinks.links.dashboard.guide;
|
||||
const promotedVisGroups = useMemo(
|
||||
|
@ -185,29 +181,8 @@ const VisGroup = ({ visType, onVisTypeSelected }: VisCardProps) => {
|
|||
const onClick = useCallback(() => {
|
||||
onVisTypeSelected(visType);
|
||||
}, [onVisTypeSelected, visType]);
|
||||
const shouldDisableCard = isVisTypeAlias(visType) && visType.disabled;
|
||||
const betaBadgeContent =
|
||||
shouldDisableCard && 'promoTooltip' in visType ? (
|
||||
<EuiLink
|
||||
href={visType?.promoTooltip?.link}
|
||||
target="_blank"
|
||||
color="text"
|
||||
className="visNewVisDialog__groupsCardLink"
|
||||
external={false}
|
||||
>
|
||||
<EuiBetaBadge
|
||||
data-test-subj="visTypeBadge"
|
||||
className="visNewVisDialog__groupsCardBetaBadge"
|
||||
label={i18n.translate('visualizations.newVisWizard.basicTitle', {
|
||||
defaultMessage: 'Basic',
|
||||
})}
|
||||
tooltipContent={visType?.promoTooltip?.description}
|
||||
/>
|
||||
</EuiLink>
|
||||
) : undefined;
|
||||
return (
|
||||
<EuiFlexItem className="visNewVisDialog__groupsCardWrapper">
|
||||
{betaBadgeContent}
|
||||
<EuiCard
|
||||
titleSize="xs"
|
||||
title={
|
||||
|
@ -218,7 +193,6 @@ const VisGroup = ({ visType, onVisTypeSelected }: VisCardProps) => {
|
|||
</span>
|
||||
}
|
||||
onClick={onClick}
|
||||
isDisabled={shouldDisableCard}
|
||||
data-test-subj={`visType-${visType.name}`}
|
||||
data-vis-stage={!('aliasPath' in visType) ? visType.stage : 'alias'}
|
||||
aria-label={`visType-${visType.name}`}
|
||||
|
|
|
@ -12,21 +12,17 @@ import expect from '@kbn/expect';
|
|||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const deployment = getService('deployment');
|
||||
const log = getService('log');
|
||||
const PageObjects = getPageObjects(['visualize']);
|
||||
let isOss = true;
|
||||
|
||||
describe('chart types', function () {
|
||||
before(async function () {
|
||||
log.debug('navigateToApp visualize');
|
||||
isOss = await deployment.isOss();
|
||||
await PageObjects.visualize.navigateToNewVisualization();
|
||||
});
|
||||
|
||||
it('should show the promoted vis types for the first step', async function () {
|
||||
const expectedChartTypes = ['Custom visualization', 'Lens', 'Maps', 'TSVB'];
|
||||
log.debug('oss= ' + isOss);
|
||||
|
||||
// find all the chart types and make sure there all there
|
||||
const chartTypes = (await PageObjects.visualize.getPromotedVisTypes()).sort();
|
||||
|
@ -37,9 +33,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
it('should show the correct agg based chart types', async function () {
|
||||
await PageObjects.visualize.clickAggBasedVisualizations();
|
||||
let expectedChartTypes = [
|
||||
const expectedChartTypes = [
|
||||
'Area',
|
||||
'Coordinate Map',
|
||||
'Data table',
|
||||
'Gauge',
|
||||
'Goal',
|
||||
|
@ -48,21 +43,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
'Line',
|
||||
'Metric',
|
||||
'Pie',
|
||||
'Region Map',
|
||||
'Tag cloud',
|
||||
'Timelion',
|
||||
'Vertical bar',
|
||||
];
|
||||
if (!isOss) {
|
||||
expectedChartTypes = _.remove(expectedChartTypes, function (n) {
|
||||
return n !== 'Coordinate Map';
|
||||
});
|
||||
expectedChartTypes = _.remove(expectedChartTypes, function (n) {
|
||||
return n !== 'Region Map';
|
||||
});
|
||||
expectedChartTypes.sort();
|
||||
}
|
||||
log.debug('oss= ' + isOss);
|
||||
|
||||
// find all the chart types and make sure there all there
|
||||
const chartTypes = (await PageObjects.visualize.getChartTypes()).sort();
|
||||
|
|
|
@ -67,11 +67,15 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
|
|||
this.tags('ciGroup9');
|
||||
|
||||
loadTestFile(require.resolve('./_embedding_chart'));
|
||||
loadTestFile(require.resolve('./_chart_types'));
|
||||
loadTestFile(require.resolve('./_area_chart'));
|
||||
loadTestFile(require.resolve('./_data_table'));
|
||||
loadTestFile(require.resolve('./_data_table_nontimeindex'));
|
||||
loadTestFile(require.resolve('./_data_table_notimeindex_filters'));
|
||||
|
||||
// this check is not needed when the CI doesn't run anymore for the OSS
|
||||
if (!isOss) {
|
||||
loadTestFile(require.resolve('./_chart_types'));
|
||||
}
|
||||
});
|
||||
|
||||
describe('', function () {
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
"src/plugins/kibana_react/**/*",
|
||||
"src/plugins/kibana_usage_collection/**/*",
|
||||
"src/plugins/kibana_utils/**/*",
|
||||
"src/plugins/lens_oss/**/*",
|
||||
"src/plugins/management/**/*",
|
||||
"src/plugins/navigation/**/*",
|
||||
"src/plugins/newsfeed/**/*",
|
||||
|
@ -81,7 +80,6 @@
|
|||
{ "path": "./src/plugins/kibana_react/tsconfig.json" },
|
||||
{ "path": "./src/plugins/kibana_usage_collection/tsconfig.json" },
|
||||
{ "path": "./src/plugins/kibana_utils/tsconfig.json" },
|
||||
{ "path": "./src/plugins/lens_oss/tsconfig.json" },
|
||||
{ "path": "./src/plugins/management/tsconfig.json" },
|
||||
{ "path": "./src/plugins/navigation/tsconfig.json" },
|
||||
{ "path": "./src/plugins/newsfeed/tsconfig.json" },
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
{ "path": "./src/plugins/kibana_react/tsconfig.json" },
|
||||
{ "path": "./src/plugins/kibana_usage_collection/tsconfig.json" },
|
||||
{ "path": "./src/plugins/kibana_utils/tsconfig.json" },
|
||||
{ "path": "./src/plugins/lens_oss/tsconfig.json" },
|
||||
{ "path": "./src/plugins/management/tsconfig.json" },
|
||||
{ "path": "./src/plugins/navigation/tsconfig.json" },
|
||||
{ "path": "./src/plugins/newsfeed/tsconfig.json" },
|
||||
|
|
|
@ -19,5 +19,5 @@
|
|||
"optionalPlugins": ["usageCollection", "taskManager", "globalSearch", "savedObjectsTagging"],
|
||||
"configPath": ["xpack", "lens"],
|
||||
"extraPublicDirs": ["common/constants"],
|
||||
"requiredBundles": ["savedObjects", "kibanaUtils", "kibanaReact", "embeddable", "lensOss", "presentationUtil"]
|
||||
"requiredBundles": ["savedObjects", "kibanaUtils", "kibanaReact", "embeddable", "presentationUtil"]
|
||||
}
|
||||
|
|
|
@ -39,7 +39,6 @@ import {
|
|||
VISUALIZE_FIELD_TRIGGER,
|
||||
} from '../../../../src/plugins/ui_actions/public';
|
||||
import { getEditPath, NOT_INTERNATIONALIZED_PRODUCT_NAME } from '../common';
|
||||
import { PLUGIN_ID_OSS } from '../../../../src/plugins/lens_oss/common/constants';
|
||||
import { EditorFrameStart } from './types';
|
||||
import { getLensAliasConfig } from './vis_type_alias';
|
||||
import { visualizeFieldAction } from './trigger_actions/visualize_field_actions';
|
||||
|
@ -208,8 +207,6 @@ export class LensPlugin {
|
|||
start(core: CoreStart, startDependencies: LensPluginStartDependencies): LensPublicStart {
|
||||
const frameStart = this.editorFrameService.start(core, startDependencies);
|
||||
this.createEditorFrame = frameStart.createInstance;
|
||||
// unregisters the OSS alias
|
||||
startDependencies.visualizations.unRegisterAlias(PLUGIN_ID_OSS);
|
||||
// unregisters the Visualize action and registers the lens one
|
||||
if (startDependencies.uiActions.hasAction(ACTION_VISUALIZE_FIELD)) {
|
||||
startDependencies.uiActions.unregisterAction(ACTION_VISUALIZE_FIELD);
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
{ "path": "../../../src/plugins/kibana_utils/tsconfig.json" },
|
||||
{ "path": "../../../src/plugins/kibana_react/tsconfig.json" },
|
||||
{ "path": "../../../src/plugins/embeddable/tsconfig.json"},
|
||||
{ "path": "../../../src/plugins/lens_oss/tsconfig.json"},
|
||||
{ "path": "../../../src/plugins/presentation_util/tsconfig.json"},
|
||||
]
|
||||
}
|
|
@ -23,5 +23,5 @@
|
|||
"ui": true,
|
||||
"server": true,
|
||||
"extraPublicDirs": ["common/constants"],
|
||||
"requiredBundles": ["kibanaReact", "kibanaUtils", "home", "mapsOss", "presentationUtil"]
|
||||
"requiredBundles": ["kibanaReact", "kibanaUtils", "home", "presentationUtil"]
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ import {
|
|||
VisualizationsStart,
|
||||
} from '../../../../src/plugins/visualizations/public';
|
||||
import { APP_ICON_SOLUTION, APP_ID, MAP_SAVED_OBJECT_TYPE } from '../common/constants';
|
||||
import { PLUGIN_ID_OSS } from '../../../../src/plugins/maps_oss/common/constants';
|
||||
import { VISUALIZE_GEO_FIELD_TRIGGER } from '../../../../src/plugins/ui_actions/public';
|
||||
import {
|
||||
createMapsUrlGenerator,
|
||||
|
@ -162,9 +161,6 @@ export class MapsPlugin
|
|||
setLicensingPluginStart(plugins.licensing);
|
||||
setStartServices(core, plugins);
|
||||
|
||||
// unregisters the OSS alias
|
||||
plugins.visualizations.unRegisterAlias(PLUGIN_ID_OSS);
|
||||
|
||||
if (core.application.capabilities.maps.show) {
|
||||
plugins.uiActions.addTriggerAction(VISUALIZE_GEO_FIELD_TRIGGER, visualizeGeoFieldAction);
|
||||
}
|
||||
|
|
|
@ -3032,10 +3032,6 @@
|
|||
"kibanaOverview.manageData.sectionTitle": "データを管理",
|
||||
"kibanaOverview.more.title": "Elasticではさまざまなことが可能です",
|
||||
"kibanaOverview.news.title": "新機能",
|
||||
"lensOss.visTypeAlias.description": "ドラッグアンドドロップエディターでビジュアライゼーションを作成します。いつでもビジュアライゼーションタイプを切り替えることができます。ほとんどのビジュアライゼーションに最適です。",
|
||||
"lensOss.visTypeAlias.note": "ほとんどのユーザーに推奨されます。",
|
||||
"lensOss.visTypeAlias.promoTooltip.description": "Elastic では Lens を無料でお試しいただけます。詳細情報",
|
||||
"lensOss.visTypeAlias.title": "レンズ",
|
||||
"management.breadcrumb": "スタック管理",
|
||||
"management.landing.header": "Stack Management {version}へようこそ",
|
||||
"management.landing.subhead": "インデックス、インデックスパターン、保存されたオブジェクト、Kibanaの設定、その他を管理します。",
|
||||
|
@ -3089,9 +3085,6 @@
|
|||
"maps_legacy.wmsOptions.wmsStylesLabel": "WMSスタイル",
|
||||
"maps_legacy.wmsOptions.wmsUrlLabel": "WMS URL",
|
||||
"maps_legacy.wmsOptions.wmsVersionLabel": "WMS バージョン",
|
||||
"mapsOss.visTypeAlias.description": "マルチレイヤーマップで地理データをプロットしてスタイル設定できます。",
|
||||
"mapsOss.visTypeAlias.promoTooltip.description": "Elastic では Maps を無料でお試しいただけます。詳細情報",
|
||||
"mapsOss.visTypeAlias.title": "マップ",
|
||||
"monaco.painlessLanguage.autocomplete.docKeywordDescription": "doc['field_name'] 構文を使用して、スクリプトからフィールド値にアクセスします",
|
||||
"monaco.painlessLanguage.autocomplete.emitKeywordDescription": "戻らずに値を発行します。",
|
||||
"monaco.painlessLanguage.autocomplete.fieldValueDescription": "フィールド「{fieldName}」の値を取得します",
|
||||
|
@ -4692,7 +4685,6 @@
|
|||
"visualizations.initializeWithoutIndexPatternErrorMessage": "インデックスパターンなしで集約を初期化しようとしています",
|
||||
"visualizations.newVisWizard.aggBasedGroupDescription": "クラシック Visualize ライブラリを使用して、アグリゲーションに基づいてグラフを作成します。",
|
||||
"visualizations.newVisWizard.aggBasedGroupTitle": "アグリゲーションに基づく",
|
||||
"visualizations.newVisWizard.basicTitle": "基本",
|
||||
"visualizations.newVisWizard.chooseSourceTitle": "ソースの選択",
|
||||
"visualizations.newVisWizard.experimentalTitle": "実験的",
|
||||
"visualizations.newVisWizard.experimentalTooltip": "このビジュアライゼーションは今後のリリースで変更または削除される可能性があり、SLA のサポート対象になりません。",
|
||||
|
|
|
@ -3036,10 +3036,6 @@
|
|||
"kibanaOverview.manageData.sectionTitle": "管理您的数据",
|
||||
"kibanaOverview.more.title": "Elastic 让您事半功倍",
|
||||
"kibanaOverview.news.title": "最新动态",
|
||||
"lensOss.visTypeAlias.description": "使用我们支持拖放的编辑器来创建可视化。随时在可视化类型之间切换。绝大多数可视化的最佳选择。",
|
||||
"lensOss.visTypeAlias.note": "适合绝大多数用户。",
|
||||
"lensOss.visTypeAlias.promoTooltip.description": "免费试用 Elastic 的 Lens。了解详情。",
|
||||
"lensOss.visTypeAlias.title": "Lens",
|
||||
"management.breadcrumb": "Stack Management",
|
||||
"management.landing.header": "欢迎使用 Stack Management {version}",
|
||||
"management.landing.subhead": "管理您的索引、索引模式、已保存对象、Kibana 设置等等。",
|
||||
|
@ -3093,9 +3089,6 @@
|
|||
"maps_legacy.wmsOptions.wmsStylesLabel": "WMS 样式",
|
||||
"maps_legacy.wmsOptions.wmsUrlLabel": "WMS url",
|
||||
"maps_legacy.wmsOptions.wmsVersionLabel": "WMS 版本",
|
||||
"mapsOss.visTypeAlias.description": "在多层地图中绘制地理数据并设置其样式。",
|
||||
"mapsOss.visTypeAlias.promoTooltip.description": "免费试用 Elastic 的地图。了解详情。",
|
||||
"mapsOss.visTypeAlias.title": "地图",
|
||||
"monaco.painlessLanguage.autocomplete.docKeywordDescription": "使用 doc['field_name'] 语法,从脚本中访问字段值",
|
||||
"monaco.painlessLanguage.autocomplete.emitKeywordDescription": "发出值,而不返回值。",
|
||||
"monaco.painlessLanguage.autocomplete.fieldValueDescription": "检索字段“{fieldName}”的值",
|
||||
|
@ -4697,7 +4690,6 @@
|
|||
"visualizations.initializeWithoutIndexPatternErrorMessage": "正在尝试在不使用索引模式的情况下初始化聚合",
|
||||
"visualizations.newVisWizard.aggBasedGroupDescription": "使用我们的经典可视化库,基于聚合创建图表。",
|
||||
"visualizations.newVisWizard.aggBasedGroupTitle": "基于聚合",
|
||||
"visualizations.newVisWizard.basicTitle": "基本级",
|
||||
"visualizations.newVisWizard.chooseSourceTitle": "选择源",
|
||||
"visualizations.newVisWizard.experimentalTitle": "实验性",
|
||||
"visualizations.newVisWizard.experimentalTooltip": "未来版本可能会更改或删除此可视化,其不受支持 SLA 的约束。",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue