Skip to content

Commit

Permalink
[Logs UI] Replace custom useInterval with react-use version (#90966)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
Alejandro Fernández Gómez and kibanamachine authored Feb 15, 2021
1 parent a8e1e47 commit 7fab0e6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 30 deletions.
27 changes: 0 additions & 27 deletions x-pack/plugins/infra/public/hooks/use_interval.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import { EuiFlexGroup, EuiFlexItem, EuiPage, EuiPanel, EuiSuperDatePicker } from
import { i18n } from '@kbn/i18n';
import moment from 'moment';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import useInterval from 'react-use/lib/useInterval';
import { useKibana } from '../../../../../../../src/plugins/kibana_react/public';
import { euiStyled } from '../../../../../../../src/plugins/kibana_react/common';
import { useTrackPageview } from '../../../../../observability/public';
import { TimeRange } from '../../../../common/time/time_range';
import { CategoryJobNoticesSection } from '../../../components/logging/log_analysis_job_status';
import { useLogEntryCategoriesModuleContext } from '../../../containers/logs/log_analysis/modules/log_entry_categories';
import { ViewLogInContext } from '../../../containers/logs/view_log_in_context';
import { useInterval } from '../../../hooks/use_interval';
import { PageViewLogInContext } from '../stream/page_view_log_in_context';
import { TopCategoriesSection } from './sections/top_categories';
import { useLogEntryCategoriesResults } from './use_log_entry_categories_results';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import { i18n } from '@kbn/i18n';
import React, { memo, useEffect, useCallback } from 'react';
import useInterval from 'react-use/lib/useInterval';
import { SubscriptionSplashContent } from '../../../components/subscription_splash_content';
import { isJobStatusWithResults } from '../../../../common/log_analysis';
import { LoadingPage } from '../../../components/loading_page';
Expand All @@ -27,7 +28,6 @@ import { useLogEntryRateModuleContext } from '../../../containers/logs/log_analy
import { useLogSourceContext } from '../../../containers/logs/log_source';
import { LogEntryRateResultsContent } from './page_results_content';
import { LogEntryRateSetupContent } from './page_setup_content';
import { useInterval } from '../../../hooks/use_interval';

const JOB_STATUS_POLLING_INTERVAL = 30000;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
*/

import { useCallback, useMemo, useState } from 'react';
import useInterval from 'react-use/lib/useInterval';
import datemath from '@elastic/datemath';
import moment from 'moment';
import * as rt from 'io-ts';
import { TimeRange as KibanaTimeRange } from '../../../../../../../src/plugins/data/public';
import { TimeRange } from '../../../../common/time/time_range';
import { useUrlState } from '../../../utils/use_url_state';
import { useInterval } from '../../../hooks/use_interval';
import {
useKibanaTimefilterTime,
useSyncKibanaTimeFilterTime,
Expand Down

0 comments on commit 7fab0e6

Please sign in to comment.