Skip to content

Commit

Permalink
Combine redundant common imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed Apr 27, 2020
1 parent 93e421c commit 159e66c
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 1 addition & 2 deletions x-pack/plugins/uptime/public/state/api/monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/uptime/public/state/api/monitor_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions x-pack/plugins/uptime/public/state/api/monitor_status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ({
Expand Down
3 changes: 1 addition & 2 deletions x-pack/plugins/uptime/public/state/api/overview_filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/uptime/public/state/api/ping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

import { APIFn } from './types';
import {
API_URLS,
PingsResponseType,
PingsResponse,
GetPingsParams,
GetPingHistogramParams,
HistogramResult,
} from '../../../common';
import { apiService } from './utils';
import { API_URLS } from '../../../common';

export const fetchPings: APIFn<GetPingsParams, PingsResponse> = async ({
dateRange: { from, to },
Expand Down
3 changes: 1 addition & 2 deletions x-pack/plugins/uptime/public/state/api/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 159e66c

Please sign in to comment.