Skip to content

Commit

Permalink
restore deprecations
Browse files Browse the repository at this point in the history
Signed-off-by: ananzh <ananzh@amazon.com>
  • Loading branch information
ananzh committed May 26, 2023
1 parent 1e9825f commit 5ed90e3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/plugins/vis_type_timeline/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,34 @@ import { Plugin } from './plugin';

export const config: PluginConfigDescriptor<ConfigSchema> = {
schema: configSchema,
deprecations: ({ renameFromRoot, renameFromRootWithoutMap }) => [
// timelion.enabled and timelion_vis.enabled deprecation
renameFromRoot('timelion.enabled', 'vis_type_timeline.enabled'),
renameFromRoot('timelion_vis.enabled', 'vis_type_timeline.enabled'),
renameFromRoot('vis_type_timelion.enabled', 'vis_type_timeline.enabled'),
renameFromRoot('timeline.enabled', 'vis_type_timeline.enabled'),
renameFromRoot('timeline_vis.enabled', 'vis_type_timeline.enabled'),

// timelion.graphiteUrls deprecation
renameFromRoot('timelion.graphiteUrls', 'vis_type_timeline.graphiteAllowedUrls'),
renameFromRoot('vis_type_timelion.graphiteUrls', 'vis_type_timeline.graphiteAllowedUrls'),
renameFromRoot(
'vis_type_timelion.graphiteAllowedUrls',
'vis_type_timeline.graphiteAllowedUrls'
),
renameFromRoot('timeline.graphiteUrls', 'vis_type_timeline.graphiteAllowedUrls'),
renameFromRoot('vis_type_timeline.graphiteUrls', 'vis_type_timeline.graphiteAllowedUrls'),

// timelion.ui.enabled deprecation
renameFromRoot('timelion.ui.enabled', 'vis_type_timeline.ui.enabled', true),
renameFromRoot('vis_type_timelion.ui.enabled', 'vis_type_timeline.ui.enabled', true),
renameFromRoot('timeline.ui.enabled', 'vis_type_timeline.ui.enabled', true),

renameFromRootWithoutMap(
'vis_type_timeline.graphiteBlockedIPs',
'vis_type_timeline.graphiteDeniedIPs'
),
],
};
export const plugin = (initializerContext: PluginInitializerContext) =>
new Plugin(initializerContext);

0 comments on commit 5ed90e3

Please sign in to comment.