Skip to content

Commit

Permalink
[maps] deprecate xpack.maps.showMapVisualizationTypes (#105981) (#107560
Browse files Browse the repository at this point in the history
)

* [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>

Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
  • Loading branch information
kibanamachine and nreese authored Aug 3, 2021
1 parent 27ccab1 commit ffd5518
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions x-pack/plugins/maps/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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: [
Expand All @@ -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: [
Expand Down

0 comments on commit ffd5518

Please sign in to comment.