@@ -11,7 +11,6 @@ import {
1111 MANAGEMENT_STORE_ENDPOINTS_NAMESPACE ,
1212 MANAGEMENT_STORE_GLOBAL_NAMESPACE ,
1313} from '../../../common/constants' ;
14- import { useKibana } from '../../../../common/lib/kibana' ;
1514import { State } from '../../../../common/store' ;
1615
1716export function useHostSelector < TSelected > ( selector : ( state : HostState ) => TSelected ) {
@@ -26,34 +25,30 @@ export function useHostSelector<TSelected>(selector: (state: HostState) => TSele
2625 * Returns an object that contains Kibana Logs app and URL information for a given host id
2726 * @param hostId
2827 */
29- export const useHostLogsUrl = ( hostId : string ) : { url : string ; appId : string ; appPath : string } => {
30- const { services } = useKibana ( ) ;
28+ export const useHostLogsUrl = ( hostId : string ) : { appId : string ; appPath : string } => {
3129 return useMemo ( ( ) => {
3230 const appPath = `/stream?logFilter=(expression:'host.id:${ hostId } ',kind:kuery)` ;
3331 return {
34- url : `${ services . application . getUrlForApp ( 'logs' ) } ${ appPath } ` ,
3532 appId : 'logs' ,
3633 appPath,
3734 } ;
38- } , [ hostId , services . application ] ) ;
35+ } , [ hostId ] ) ;
3936} ;
4037
4138/**
4239 * Returns an object that contains Ingest app and URL information
4340 */
4441export const useHostIngestUrl = (
4542 latestEndpointVersion : string | undefined
46- ) : { url : string ; appId : string ; appPath : string } => {
47- const { services } = useKibana ( ) ;
43+ ) : { appId : string ; appPath : string } => {
4844 return useMemo ( ( ) => {
4945 let appPath = `#/integrations` ;
5046 if ( latestEndpointVersion !== undefined ) {
5147 appPath = `#/integrations/endpoint-${ latestEndpointVersion } /add-datasource` ;
5248 }
5349 return {
54- url : `${ services . application . getUrlForApp ( 'ingestManager' ) } ${ appPath } ` ,
5550 appId : 'ingestManager' ,
5651 appPath,
5752 } ;
58- } , [ latestEndpointVersion , services . application ] ) ;
53+ } , [ latestEndpointVersion ] ) ;
5954} ;
0 commit comments