diff --git a/x-pack/legacy/plugins/fleet/public/hooks/index.ts b/x-pack/legacy/plugins/fleet/public/hooks/index.ts index 9cce439194371..d495102396a48 100644 --- a/x-pack/legacy/plugins/fleet/public/hooks/index.ts +++ b/x-pack/legacy/plugins/fleet/public/hooks/index.ts @@ -6,6 +6,6 @@ export { useDebounce } from './use_debounce'; export { useInput } from './use_input'; export { useLibs, LibsContext } from './use_libs'; -export { usePagination } from './use_pagination'; +export { usePagination, Pagination } from './use_pagination'; export { useRequest, sendRequest } from './use_request'; export { WithUrlState, URLStateProps } from './with_url_state'; diff --git a/x-pack/legacy/plugins/fleet/public/hooks/use_request.tsx b/x-pack/legacy/plugins/fleet/public/hooks/use_request.tsx index 15c0104de85ce..a86a3fdfe01c5 100644 --- a/x-pack/legacy/plugins/fleet/public/hooks/use_request.tsx +++ b/x-pack/legacy/plugins/fleet/public/hooks/use_request.tsx @@ -20,7 +20,7 @@ export const useRequest = (config: UseRequestConfig) => { }; export const sendRequest = ( - httpClient, + httpClient: any, config: SendRequestConfig ): Promise => { return _sendRequest(httpClient, config); diff --git a/x-pack/legacy/plugins/fleet/public/lib/enrollment_api_key.ts b/x-pack/legacy/plugins/fleet/public/lib/enrollment_api_key.ts index 3bd6604f9433a..da668fa224094 100644 --- a/x-pack/legacy/plugins/fleet/public/lib/enrollment_api_key.ts +++ b/x-pack/legacy/plugins/fleet/public/lib/enrollment_api_key.ts @@ -11,8 +11,8 @@ import { ReturnTypeDelete, } from '../../common/return_types'; import { RestAPIAdapter } from './adapters/rest_api/adapter_types'; -import { Pagination } from '../hooks/use_pagination'; import { EnrollmentApiKey } from '../../common/types/domain_data'; +import { Pagination } from '../hooks'; export class EnrollmentApiKeyLib { constructor(private readonly rest: RestAPIAdapter) {} diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/agent_events_table.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/agent_events_table.tsx index d68c767e15af4..e2196bf8407b9 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/agent_events_table.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/agent_events_table.tsx @@ -15,7 +15,6 @@ import { EuiFlexItem, EuiTitle, } from '@elastic/eui'; - import { i18n } from '@kbn/i18n'; import { FormattedMessage, FormattedTime } from '@kbn/i18n/react'; import { AgentEvent, Agent } from '../../../../common/types/domain_data'; diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/details_section.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/details_section.tsx index 4bebb033e0066..be26af5c993bd 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/details_section.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/details_section.tsx @@ -20,8 +20,8 @@ import { import { i18n } from '@kbn/i18n'; import { Agent } from '../../../../common/types/domain_data'; import { ConnectedLink, AgentHealth, AgentUnenrollProvider } from '../../../components'; -import { AgentMetadataFlyout } from './metadata_flyout'; import { useAgentRefresh } from '../hooks'; +import { AgentMetadataFlyout } from './metadata_flyout'; const Item: React.FC<{ label: string }> = ({ label, children }) => { return ( diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/metadata_form.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/metadata_form.tsx index 05dd882c31003..ca4eeef558ad7 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/metadata_form.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_details/components/metadata_form.tsx @@ -19,7 +19,8 @@ import { import { i18n } from '@kbn/i18n'; import { AxiosError } from 'axios'; import { Agent } from '../../../../common/types/domain_data'; -import { useLibs, useAgentRefresh, useInput } from '../../../hooks/use_libs'; +import { useLibs, useInput } from '../../../hooks'; +import { useAgentRefresh } from '../hooks'; function useAddMetadataForm(agent: Agent, done: () => void) { const libs = useLibs(); diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/create_api_key_form.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/create_api_key_form.tsx index 92ce7ac1cf96e..a3173d84be6bd 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/create_api_key_form.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/create_api_key_form.tsx @@ -15,8 +15,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { useInput } from '../../../../hooks/use_input'; -import { useLibs } from '../../../../hooks/use_libs'; +import { useInput, useLibs } from '../../../../hooks'; import { usePolicies } from './hooks'; export const CreateApiKeyForm: React.FC<{ onChange: () => void }> = ({ onChange }) => { diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/hooks.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/hooks.tsx index 42db6536340e2..03ce627ef62bc 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/hooks.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/hooks.tsx @@ -5,8 +5,7 @@ */ import { useEffect, useState } from 'react'; -import { useLibs } from '../../../../hooks/use_libs'; -import { Pagination } from '../../../../hooks/use_pagination'; +import { useLibs, Pagination } from '../../../../hooks'; import { ReturnTypeList, ReturnTypeGet } from '../../../../../common/return_types'; import { EnrollmentApiKey } from '../../../../../common/types/domain_data'; import { Policy } from '../../../../../common/types/domain_data'; diff --git a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/index.tsx b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/index.tsx index 912bb770ab007..066b44597fa34 100644 --- a/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/index.tsx +++ b/x-pack/legacy/plugins/fleet/public/pages/agent_list/components/enrollment_api_keys/index.tsx @@ -7,9 +7,9 @@ import React, { useState } from 'react'; import { EuiBasicTable, EuiButtonEmpty, EuiSpacer, EuiPopover } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; -import { useEnrollmentApiKeys, useEnrollmentApiKey } from './hooks'; import { EnrollmentApiKey } from '../../../../../common/types/domain_data'; import { useLibs, usePagination } from '../../../../hooks'; +import { useEnrollmentApiKeys, useEnrollmentApiKey } from './hooks'; import { ConfirmDeleteModal } from './confirm_delete_modal'; import { CreateApiKeyForm } from './create_api_key_form';