From 10668d0a224df129910f473dce3daa5c2169f0ff Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Mon, 20 Sep 2021 16:12:20 +0300 Subject: [PATCH] Restores the kibana.yml settings for timelion and vis_type_table (#112430) * Restores the kibana.yml settings for timelion and vis_type_table * Remove silent flag * Define unused Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- src/plugins/vis_type_timeseries/server/index.ts | 2 +- src/plugins/vis_types/table/config.ts | 2 ++ src/plugins/vis_types/table/server/index.ts | 4 +++- src/plugins/vis_types/timelion/config.ts | 5 +++++ src/plugins/vis_types/timelion/server/index.ts | 8 ++++++++ 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/plugins/vis_type_timeseries/server/index.ts b/src/plugins/vis_type_timeseries/server/index.ts index a78ddade309655..0890b37e779269 100644 --- a/src/plugins/vis_type_timeseries/server/index.ts +++ b/src/plugins/vis_type_timeseries/server/index.ts @@ -15,7 +15,7 @@ export { VisTypeTimeseriesSetup } from './plugin'; export const config: PluginConfigDescriptor = { deprecations: ({ unused, renameFromRoot }) => [ // In Kibana v7.8 plugin id was renamed from 'metrics' to 'vis_type_timeseries': - renameFromRoot('metrics.enabled', 'vis_type_timeseries.enabled', { silent: true }), + renameFromRoot('metrics.enabled', 'vis_type_timeseries.enabled'), renameFromRoot('metrics.chartResolution', 'vis_type_timeseries.chartResolution', { silent: true, }), diff --git a/src/plugins/vis_types/table/config.ts b/src/plugins/vis_types/table/config.ts index b831d26854c304..c47a14395c3b4d 100644 --- a/src/plugins/vis_types/table/config.ts +++ b/src/plugins/vis_types/table/config.ts @@ -10,6 +10,8 @@ import { schema, TypeOf } from '@kbn/config-schema'; export const configSchema = schema.object({ enabled: schema.boolean({ defaultValue: true }), + /** @deprecated **/ + legacyVisEnabled: schema.boolean({ defaultValue: false }), }); export type ConfigSchema = TypeOf; diff --git a/src/plugins/vis_types/table/server/index.ts b/src/plugins/vis_types/table/server/index.ts index b98fdd9c445dbc..eed1134f3ff483 100644 --- a/src/plugins/vis_types/table/server/index.ts +++ b/src/plugins/vis_types/table/server/index.ts @@ -14,8 +14,10 @@ import { registerVisTypeTableUsageCollector } from './usage_collector'; export const config: PluginConfigDescriptor = { schema: configSchema, - deprecations: ({ renameFromRoot }) => [ + deprecations: ({ renameFromRoot, unused }) => [ renameFromRoot('table_vis.enabled', 'vis_type_table.enabled'), + // Unused property which should be removed after releasing Kibana v8.0: + unused('legacyVisEnabled'), ], }; diff --git a/src/plugins/vis_types/timelion/config.ts b/src/plugins/vis_types/timelion/config.ts index cfd3d13c277e98..629b11cc95b001 100644 --- a/src/plugins/vis_types/timelion/config.ts +++ b/src/plugins/vis_types/timelion/config.ts @@ -11,6 +11,11 @@ import { schema, TypeOf } from '@kbn/config-schema'; export const configSchema = schema.object({ graphiteUrls: schema.maybe(schema.arrayOf(schema.string())), enabled: schema.boolean({ defaultValue: true }), + // should be removed in v8.0 + /** @deprecated **/ + ui: schema.object({ + enabled: schema.boolean({ defaultValue: true }), + }), }); export type ConfigSchema = TypeOf; diff --git a/src/plugins/vis_types/timelion/server/index.ts b/src/plugins/vis_types/timelion/server/index.ts index 396ef8b61c7bc7..ef7baf981de1af 100644 --- a/src/plugins/vis_types/timelion/server/index.ts +++ b/src/plugins/vis_types/timelion/server/index.ts @@ -12,6 +12,14 @@ import { TimelionPlugin } from './plugin'; export const config: PluginConfigDescriptor = { schema: configSchema, + deprecations: ({ renameFromRoot, unused }) => [ + renameFromRoot('timelion_vis.enabled', 'vis_type_timelion.enabled'), + renameFromRoot('timelion.enabled', 'vis_type_timelion.enabled'), + renameFromRoot('timelion.graphiteUrls', 'vis_type_timelion.graphiteUrls'), + // Unused properties which should be removed after releasing Kibana v8.0: + renameFromRoot('timelion.ui.enabled', 'vis_type_timelion.ui.enabled', { silent: true }), + unused('ui.enabled'), + ], }; export const plugin = (initializerContext: PluginInitializerContext) =>