[maps] deprecate xpack.maps.showMapVisualizationTypes (#105981)

* [maps] deprecate xpack.maps.showMapVisualizationTypes in upgrade assistent

* use custom function instead of unusedFromRoot so config does not get removed

* fix i18n ids and align deprecation message

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Nathan Reese 2021-08-03 10:53:15 -06:00 committed by GitHub
parent 8f9086b4c2
commit 8df883ad49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,6 +24,30 @@ export const config: PluginConfigDescriptor<MapsXPackConfig> = {
},
schema: configSchema,
deprecations: () => [
(
completeConfig: Record<string, any>,
rootPath: string,
addDeprecation: AddConfigDeprecation
) => {
if (_.get(completeConfig, 'xpack.maps.showMapVisualizationTypes') === undefined) {
return completeConfig;
}
addDeprecation({
message: i18n.translate('xpack.maps.deprecation.showMapVisualizationTypes.message', {
defaultMessage:
'xpack.maps.showMapVisualizationTypes is deprecated and is no longer used',
}),
correctiveActions: {
manualSteps: [
i18n.translate('xpack.maps.deprecation.showMapVisualizationTypes.step1', {
defaultMessage:
'Remove "xpack.maps.showMapVisualizationTypes" in the Kibana config file, CLI flag, or environment variable (in Docker only).',
}),
],
},
});
return completeConfig;
},
(
completeConfig: Record<string, any>,
rootPath: string,
@ -36,8 +60,7 @@ export const config: PluginConfigDescriptor<MapsXPackConfig> = {
documentationUrl:
'https://www.elastic.co/guide/en/kibana/current/maps-connect-to-ems.html#elastic-maps-server',
message: i18n.translate('xpack.maps.deprecation.proxyEMS.message', {
defaultMessage:
'map.proxyElasticMapsServiceInMaps is deprecated and will be removed in 8.0.',
defaultMessage: 'map.proxyElasticMapsServiceInMaps is deprecated and is no longer used',
}),
correctiveActions: {
manualSteps: [
@ -63,7 +86,7 @@ export const config: PluginConfigDescriptor<MapsXPackConfig> = {
}
addDeprecation({
message: i18n.translate('xpack.maps.deprecation.regionmap.message', {
defaultMessage: 'map.regionmap is deprecated and will be removed in 8.0.',
defaultMessage: 'map.regionmap is deprecated and is no longer used',
}),
correctiveActions: {
manualSteps: [