mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* Add feature flag to display a blank overview page when enabled * Add tests for overview page feature flag * Fix types * Fix more types * Remove duplicated BucketSize type * fix linter Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
27 lines
882 B
TypeScript
27 lines
882 B
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
* 2.0.
|
|
*/
|
|
import React from 'react';
|
|
import { RouteParams } from '../../routes';
|
|
import { usePluginContext } from '../../hooks/use_plugin_context';
|
|
import { OverviewPage as OldOverviewPage } from './old_overview_page';
|
|
import { OverviewPage as NewOverviewPage } from './overview_page';
|
|
|
|
export type { BucketSize } from './old_overview_page';
|
|
|
|
interface Props {
|
|
routeParams: RouteParams<'/overview'>;
|
|
}
|
|
|
|
export function OverviewPage(props: Props) {
|
|
const { config } = usePluginContext();
|
|
|
|
if (config.unsafe.overviewNext.enabled) {
|
|
return <NewOverviewPage {...props} />;
|
|
} else {
|
|
return <OldOverviewPage {...props} />;
|
|
}
|
|
}
|