Skip to content

Commit

Permalink
Restores the kibana.yml settings for timelion and vis_type_table (#11…
Browse files Browse the repository at this point in the history
…2430)

* 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>
  • Loading branch information
stratoula and kibanamachine authored Sep 20, 2021
1 parent c16480e commit 10668d0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plugins/vis_type_timeseries/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export { VisTypeTimeseriesSetup } from './plugin';
export const config: PluginConfigDescriptor<VisTypeTimeseriesConfig> = {
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,
}),
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/vis_types/table/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof configSchema>;
4 changes: 3 additions & 1 deletion src/plugins/vis_types/table/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ import { registerVisTypeTableUsageCollector } from './usage_collector';

export const config: PluginConfigDescriptor<ConfigSchema> = {
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'),
],
};

Expand Down
5 changes: 5 additions & 0 deletions src/plugins/vis_types/timelion/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof configSchema>;
8 changes: 8 additions & 0 deletions src/plugins/vis_types/timelion/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ import { TimelionPlugin } from './plugin';

export const config: PluginConfigDescriptor<ConfigSchema> = {
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) =>
Expand Down

0 comments on commit 10668d0

Please sign in to comment.