Combine redundant common imports.

This commit is contained in:
Justin Kambic 2020-04-27 10:49:34 -04:00
parent 93e421c29d
commit 159e66c349
9 changed files with 17 additions and 16 deletions

View file

@ -18,8 +18,7 @@ import {
import { FormattedMessage } from '@kbn/i18n/react';
import React, { useState, useEffect } from 'react';
import styled from 'styled-components';
import { HistogramPoint, FetchMonitorStatesQueryArgs } from '../../../../common';
import { MonitorSummary } from '../../../../common';
import { HistogramPoint, FetchMonitorStatesQueryArgs, MonitorSummary } from '../../../../common';
import { MonitorListStatusColumn } from './monitor_list_status_column';
import { ExpandedRowMap } from './types';
import { MonitorBarSeries } from '../../common/charts';

View file

@ -5,10 +5,9 @@
*/
import { BaseParams } from './types';
import { MonitorDetailsType, MonitorLocationsType } from '../../../common';
import { API_URLS, MonitorDetailsType, MonitorLocationsType } from '../../../common';
import { QueryParams } from '../actions/types';
import { apiService } from './utils';
import { API_URLS } from '../../../common';
interface ApiRequest {
monitorId: string;

View file

@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { API_URLS } from '../../../common';
import { apiService } from './utils';
import {
API_URLS,
FetchMonitorStatesQueryArgs,
MonitorSummaryResult,
MonitorSummaryResultType,

View file

@ -5,8 +5,7 @@
*/
import { QueryParams } from '../actions/types';
import { Ping } from '../../../common';
import { API_URLS } from '../../../common';
import { API_URLS, Ping } from '../../../common';
import { apiService } from './utils';
export const fetchMonitorStatus = async ({

View file

@ -5,9 +5,8 @@
*/
import { GetOverviewFiltersPayload } from '../actions';
import { OverviewFiltersType } from '../../../common';
import { API_URLS, OverviewFiltersType } from '../../../common';
import { apiService } from './utils';
import { API_URLS } from '../../../common';
export const fetchOverviewFilters = async ({
dateRangeStart,

View file

@ -6,6 +6,7 @@
import { APIFn } from './types';
import {
API_URLS,
PingsResponseType,
PingsResponse,
GetPingsParams,
@ -13,7 +14,6 @@ import {
HistogramResult,
} from '../../../common';
import { apiService } from './utils';
import { API_URLS } from '../../../common';
export const fetchPings: APIFn<GetPingsParams, PingsResponse> = async ({
dateRange: { from, to },

View file

@ -4,9 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { SnapshotType, Snapshot } from '../../../common';
import { API_URLS, SnapshotType, Snapshot } from '../../../common';
import { apiService } from './utils';
import { API_URLS } from '../../../common';
export interface SnapShotQueryParams {
dateRangeStart: string;

View file

@ -4,10 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { CONTEXT_DEFAULTS } from '../../../common';
import { fetchPage } from './search';
import { UMElasticsearchQueryFn } from '../adapters';
import { MonitorSummary, SortOrder, CursorDirection } from '../../../common';
import { CONTEXT_DEFAULTS, MonitorSummary, SortOrder, CursorDirection } from '../../../common';
import { QueryContext } from './search';
export interface CursorPagination {

View file

@ -6,8 +6,15 @@
import { get, sortBy } from 'lodash';
import { QueryContext } from './query_context';
import { QUERY, STATES } from '../../../../common';
import { Check, Histogram, MonitorSummary, CursorDirection, SortOrder } from '../../../../common';
import {
QUERY,
STATES,
Check,
Histogram,
MonitorSummary,
CursorDirection,
SortOrder,
} from '../../../../common';
import { MonitorEnricher } from './fetch_page';
export const enrichMonitorGroups: MonitorEnricher = async (