mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
ux app, remove deprecated api usage (#130952)
* ux app, remove deprecated api usage * update
This commit is contained in:
parent
b013b9695e
commit
f8d0a2f0e0
4 changed files with 9 additions and 7 deletions
|
@ -5,6 +5,7 @@
|
|||
"requiredPlugins": [
|
||||
"features",
|
||||
"data",
|
||||
"dataViews",
|
||||
"licensing",
|
||||
"triggersActionsUi",
|
||||
"embeddable",
|
||||
|
|
|
@ -106,7 +106,7 @@ export function UXAppRoot({
|
|||
appMountParameters,
|
||||
core,
|
||||
deps,
|
||||
corePlugins: { embeddable, inspector, maps, observability, data },
|
||||
corePlugins: { embeddable, inspector, maps, observability, data, dataViews },
|
||||
}: {
|
||||
appMountParameters: AppMountParameters;
|
||||
core: CoreStart;
|
||||
|
@ -130,6 +130,7 @@ export function UXAppRoot({
|
|||
observability,
|
||||
embeddable,
|
||||
data,
|
||||
dataViews,
|
||||
}}
|
||||
>
|
||||
<i18nCore.Context>
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { DataView } from '@kbn/data-plugin/common';
|
||||
import { DataView } from '@kbn/data-views-plugin/common';
|
||||
import { useKibana } from '@kbn/kibana-react-plugin/public';
|
||||
import { DataPublicPluginStart } from '@kbn/data-plugin/public';
|
||||
import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
|
||||
import { useFetcher } from '../../../../hooks/use_fetcher';
|
||||
import { useDynamicDataViewFetcher } from '../../../../hooks/use_dynamic_data_view';
|
||||
|
||||
|
@ -15,10 +15,8 @@ export function useDataView() {
|
|||
const { dataView } = useDynamicDataViewFetcher();
|
||||
|
||||
const {
|
||||
services: {
|
||||
data: { dataViews },
|
||||
},
|
||||
} = useKibana<{ data: DataPublicPluginStart }>();
|
||||
services: { dataViews },
|
||||
} = useKibana<{ dataViews: DataViewsPublicPluginStart }>();
|
||||
|
||||
const { data } = useFetcher<Promise<DataView | undefined>>(async () => {
|
||||
if (dataView?.title) {
|
||||
|
|
|
@ -32,6 +32,7 @@ import { LicensingPluginSetup } from '@kbn/licensing-plugin/public';
|
|||
import { EmbeddableStart } from '@kbn/embeddable-plugin/public';
|
||||
import { MapsStartApi } from '@kbn/maps-plugin/public';
|
||||
import { Start as InspectorPluginStart } from '@kbn/inspector-plugin/public';
|
||||
import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
|
||||
|
||||
export type UxPluginSetup = void;
|
||||
export type UxPluginStart = void;
|
||||
|
@ -52,6 +53,7 @@ export interface ApmPluginStartDeps {
|
|||
maps?: MapsStartApi;
|
||||
inspector: InspectorPluginStart;
|
||||
observability: ObservabilityPublicStart;
|
||||
dataViews: DataViewsPublicPluginStart;
|
||||
}
|
||||
|
||||
export class UxPlugin implements Plugin<UxPluginSetup, UxPluginStart> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue