Clean up redundant common imports.

This commit is contained in:
Justin Kambic 2020-04-24 19:35:01 -04:00
parent 484c3ed667
commit 8794013fbe
111 changed files with 123 additions and 132 deletions

View file

@ -7,7 +7,7 @@
import React from 'react';
import DateMath from '@elastic/datemath';
import { DurationChartComponent } from '../duration_chart';
import { MonitorDurationResult } from '../../../../../common/types';
import { MonitorDurationResult } from '../../../../../common';
import { shallowWithRouter } from '../../../../lib';
describe('MonitorCharts component', () => {

View file

@ -7,7 +7,7 @@
import React from 'react';
import { MonitorBarSeries, MonitorBarSeriesProps } from '../monitor_bar_series';
import { renderWithRouter, shallowWithRouter } from '../../../../lib';
import { HistogramPoint } from '../../../../../common/runtime_types';
import { HistogramPoint } from '../../../../../common';
describe('MonitorBarSeries component', () => {
let props: MonitorBarSeriesProps;

View file

@ -10,7 +10,7 @@ import moment from 'moment';
import { FormattedMessage } from '@kbn/i18n/react';
import { Axis, Chart, Position, timeFormatter, Settings, SeriesIdentifier } from '@elastic/charts';
import { getChartDateLabel } from '../../../lib/helper';
import { LocationDurationLine } from '../../../../common/types';
import { LocationDurationLine } from '../../../../common';
import { DurationLineSeriesList } from './duration_line_series_list';
import { ChartWrapper } from './chart_wrapper';
import { useUrlParams } from '../../../hooks';

View file

@ -6,7 +6,7 @@
import React from 'react';
import { LineSeries, CurveType } from '@elastic/charts';
import { LocationDurationLine } from '../../../../common/types';
import { LocationDurationLine } from '../../../../common';
import { convertMicrosecondsToMilliseconds as microsToMillis } from '../../../lib/helper';
interface Props {

View file

@ -18,7 +18,7 @@ import React, { useContext } from 'react';
import moment from 'moment';
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiText, EuiToolTip } from '@elastic/eui';
import { HistogramPoint } from '../../../../common/runtime_types';
import { HistogramPoint } from '../../../../common';
import { getChartDateLabel, seriesHasDownValues } from '../../../lib/helper';
import { useUrlParams } from '../../../hooks';
import { UptimeThemeContext } from '../../../contexts';

View file

@ -13,7 +13,7 @@ import moment from 'moment';
import { getChartDateLabel } from '../../../lib/helper';
import { ChartWrapper } from './chart_wrapper';
import { UptimeThemeContext } from '../../../contexts';
import { HistogramResult } from '../../../../common/runtime_types';
import { HistogramResult } from '../../../../common';
import { useUrlParams } from '../../../hooks';
import { ChartEmptyState } from './chart_empty_state';

View file

@ -7,7 +7,7 @@
import React, { useContext } from 'react';
import { EuiSuperDatePicker } from '@elastic/eui';
import { useUrlParams } from '../../hooks';
import { CLIENT_DEFAULTS } from '../../../common/constants';
import { CLIENT_DEFAULTS } from '../../../common';
import { UptimeRefreshContext, UptimeSettingsContext } from '../../contexts';
// TODO: when EUI exports types for this, this should be replaced

View file

@ -7,7 +7,7 @@
import React from 'react';
import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import { LocationMap } from '../location_map';
import { MonitorLocations } from '../../../../../common/runtime_types';
import { MonitorLocations } from '../../../../../common';
import { LocationMissingWarning } from '../location_missing';
// Note For shallow test, we need absolute time strings

View file

@ -7,7 +7,7 @@
import React from 'react';
import moment from 'moment';
import { renderWithIntl, shallowWithIntl } from 'test_utils/enzyme_helpers';
import { MonitorLocation } from '../../../../../common/runtime_types/monitor';
import { MonitorLocation } from '../../../../../common';
import { LocationStatusTags } from '../index';
describe('LocationStatusTags component', () => {

View file

@ -9,7 +9,7 @@ import uuid from 'uuid';
import styled from 'styled-components';
import { MapEmbeddable, MapEmbeddableInput } from '../../../../../../../legacy/plugins/maps/public';
import * as i18n from './translations';
import { Location } from '../../../../../common/runtime_types';
import { Location } from '../../../../../common';
import { getLayerList } from './map_config';
import { UptimeThemeContext, UptimeStartupPluginsContext } from '../../../../contexts';
import {

View file

@ -9,8 +9,7 @@ import styled from 'styled-components';
import { EuiFlexGroup, EuiFlexItem, EuiErrorBoundary, EuiHideFor } from '@elastic/eui';
import { LocationStatusTags } from './location_status_tags';
import { EmbeddedMap, LocationPoint } from './embeddables/embedded_map';
import { MonitorLocations, MonitorLocation } from '../../../../common/runtime_types';
import { UNNAMED_LOCATION } from '../../../../common/constants';
import { UNNAMED_LOCATION, MonitorLocations, MonitorLocation } from '../../../../common';
import { LocationMissingWarning } from './location_missing';
// These height/width values are used to make sure map is in center of panel

View file

@ -10,8 +10,7 @@ import styled from 'styled-components';
import { EuiBadge, EuiText } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { UptimeThemeContext } from '../../../contexts';
import { MonitorLocation } from '../../../../common/runtime_types';
import { SHORT_TIMESPAN_LOCALE, SHORT_TS_LOCALE } from '../../../../common/constants';
import { SHORT_TIMESPAN_LOCALE, SHORT_TS_LOCALE, MonitorLocation } from '../../../../common';
const TimeStampSpan = styled.span`
display: inline-block;

View file

@ -8,7 +8,7 @@ import React from 'react';
import { renderWithIntl, shallowWithIntl } from 'test_utils/enzyme_helpers';
import { MLFlyoutView } from '../ml_flyout';
import { UptimeSettingsContext } from '../../../../contexts';
import { CLIENT_DEFAULTS } from '../../../../../common/constants';
import { CLIENT_DEFAULTS } from '../../../../../common';
import { License } from '../../../../../../../plugins/licensing/common/license';
const expiredLicense = new License({

View file

@ -21,7 +21,7 @@ import {
KibanaReactNotifications,
} from '../../../../../../../src/plugins/kibana_react/public';
import { MLFlyoutView } from './ml_flyout';
import { ML_JOB_ID } from '../../../../common/constants';
import { ML_JOB_ID } from '../../../../common';
import { UptimeRefreshContext, UptimeSettingsContext } from '../../../contexts';
import { useGetUrlParams } from '../../../hooks';
import { getDynamicSettings } from '../../../state/actions/dynamic_settings';

View file

@ -7,7 +7,7 @@
import React from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiTitle } from '@elastic/eui';
import { LocationDurationLine } from '../../../../common/types';
import { LocationDurationLine } from '../../../../common';
import { MLIntegrationComponent } from '../ml/ml_integeration';
import { AnomalyRecords } from '../../../state/actions';
import { DurationChartComponent } from '../../common/charts';

View file

@ -22,7 +22,7 @@ import { UptimeRefreshContext } from '../../../contexts';
import { getMLJobId } from '../../../state/api/ml_anomaly';
import { JobStat } from '../../../../../ml/common/types/data_recognizer';
import { MonitorDurationComponent } from './monitor_duration';
import { MonitorIdParam } from '../../../../common/types';
import { MonitorIdParam } from '../../../../common';
export const MonitorDuration: React.FC<MonitorIdParam> = ({ monitorId }) => {
const {

View file

@ -9,7 +9,7 @@ import moment from 'moment';
import { mountWithIntl } from 'test_utils/enzyme_helpers';
import { EuiBadge } from '@elastic/eui';
import { renderWithIntl } from 'test_utils/enzyme_helpers';
import { Tls } from '../../../../../common/runtime_types';
import { Tls } from '../../../../../common';
import { MonitorSSLCertificate } from '../monitor_status_bar';
describe('MonitorStatusBar component', () => {

View file

@ -8,7 +8,7 @@ import moment from 'moment';
import React from 'react';
import { renderWithIntl } from 'test_utils/enzyme_helpers';
import { MonitorStatusBarComponent } from '../monitor_status_bar';
import { Ping } from '../../../../../common/runtime_types';
import { Ping } from '../../../../../common';
describe('MonitorStatusBar component', () => {
let monitorStatus: Ping;

View file

@ -6,7 +6,7 @@
import React from 'react';
import { renderWithIntl, shallowWithIntl } from 'test_utils/enzyme_helpers';
import { MonitorLocation } from '../../../../../common/runtime_types';
import { MonitorLocation } from '../../../../../common';
import { StatusByLocations } from '../index';
describe('StatusByLocation component', () => {

View file

@ -9,7 +9,7 @@ import moment from 'moment';
import { EuiSpacer, EuiText, EuiBadge } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { Tls } from '../../../../../common/runtime_types';
import { Tls } from '../../../../../common';
interface Props {
/**

View file

@ -17,8 +17,7 @@ import {
import { MonitorSSLCertificate } from './ssl_certificate';
import * as labels from './translations';
import { StatusByLocations } from './status_by_location';
import { Ping } from '../../../../../common/runtime_types';
import { MonitorLocations } from '../../../../../common/runtime_types';
import { MonitorLocations, Ping } from '../../../../../common';
interface MonitorStatusBarProps {
monitorId: string;

View file

@ -11,7 +11,7 @@ import { MonitorStatusBarComponent } from './index';
import { getMonitorStatusAction } from '../../../../state/actions';
import { useGetUrlParams } from '../../../../hooks';
import { UptimeRefreshContext } from '../../../../contexts';
import { MonitorIdParam } from '../../../../../common/types';
import { MonitorIdParam } from '../../../../../common';
import { AppState } from '../../../../state';
export const MonitorStatusBar: React.FC<MonitorIdParam> = ({ monitorId }) => {

View file

@ -7,7 +7,7 @@
import React from 'react';
import { EuiText } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { MonitorLocation } from '../../../../../common/runtime_types';
import { MonitorLocation } from '../../../../../common';
interface StatusByLocationsProps {
locations: MonitorLocation[];

View file

@ -9,7 +9,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui';
import styled from 'styled-components';
import { LocationMap } from '../location_map';
import { UptimeRefreshContext } from '../../../contexts';
import { MonitorLocations } from '../../../../common/runtime_types';
import { MonitorLocations } from '../../../../common';
import { MonitorStatusBar } from './monitor_status_bar';
interface MonitorStatusDetailsProps {

View file

@ -12,7 +12,7 @@ import { getMonitorLocationsAction } from '../../../state/actions/monitor';
import { MonitorStatusDetailsComponent } from './index';
import { UptimeRefreshContext } from '../../../contexts';
import { AppState } from '../../../state';
import { MonitorIdParam } from '../../../../common/types';
import { MonitorIdParam } from '../../../../common';
export const MonitorStatusDetails: React.FC<MonitorIdParam> = ({ monitorId }) => {
const { lastRefresh } = useContext(UptimeRefreshContext);

View file

@ -7,7 +7,7 @@
import { mountWithIntl, renderWithIntl, shallowWithIntl } from 'test_utils/enzyme_helpers';
import React from 'react';
import { PingListExpandedRowComponent } from '../expanded_row';
import { Ping } from '../../../../../common/runtime_types';
import { Ping } from '../../../../../common';
import { DocLinkForBody } from '../doc_link_body';
describe('PingListExpandedRow', () => {

View file

@ -7,7 +7,7 @@
import React from 'react';
import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import { PingListComponent, toggleDetails } from '../ping_list';
import { Ping, PingsResponse } from '../../../../../common/runtime_types';
import { Ping, PingsResponse } from '../../../../../common';
import { ExpandedRowMap } from '../../../overview/monitor_list/types';
describe('PingList component', () => {

View file

@ -16,7 +16,7 @@ import {
} from '@elastic/eui';
import React from 'react';
import { i18n } from '@kbn/i18n';
import { Ping, HttpResponseBody } from '../../../../common/runtime_types';
import { Ping, HttpResponseBody } from '../../../../common';
import { DocLinkForBody } from './doc_link_body';
interface Props {

View file

@ -23,7 +23,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
import moment from 'moment';
import React, { useState, useEffect } from 'react';
import styled from 'styled-components';
import { Ping, GetPingsParams, DateRange } from '../../../../common/runtime_types';
import { Ping, GetPingsParams, DateRange } from '../../../../common';
import { convertMicrosecondsToMilliseconds as microsToMillis } from '../../../lib/helper';
import { LocationName } from './location_name';
import { Pagination } from '../../overview/monitor_list';

View file

@ -8,7 +8,7 @@ import { useSelector, useDispatch } from 'react-redux';
import React, { useContext, useCallback } from 'react';
import { selectPingList } from '../../../state/selectors';
import { getPings } from '../../../state/actions';
import { GetPingsParams } from '../../../../common/runtime_types';
import { GetPingsParams } from '../../../../common';
import { UptimeSettingsContext } from '../../../contexts';
import { PingListComponent } from './index';

View file

@ -6,7 +6,7 @@
import React from 'react';
import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import { Snapshot } from '../../../../common/runtime_types';
import { Snapshot } from '../../../../common';
import { SnapshotComponent } from '../snapshot/snapshot';
describe('Snapshot component', () => {

View file

@ -6,7 +6,7 @@
import React from 'react';
import { EmptyStateComponent } from '../empty_state';
import { StatesIndexStatus } from '../../../../../common/runtime_types';
import { StatesIndexStatus } from '../../../../../common';
import { HttpFetchError, IHttpFetchError } from 'src/core/public';
import { mountWithRouter, shallowWithRouter } from '../../../../lib';

View file

@ -16,7 +16,7 @@ import {
import { FormattedMessage } from '@kbn/i18n/react';
import React, { useContext } from 'react';
import { UptimeSettingsContext } from '../../../contexts';
import { DynamicSettings } from '../../../../common/runtime_types';
import { DynamicSettings } from '../../../../common';
interface DataMissingProps {
headingMessage: JSX.Element;

View file

@ -9,7 +9,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
import { EmptyStateError } from './empty_state_error';
import { EmptyStateLoading } from './empty_state_loading';
import { DataOrIndexMissing } from './data_or_index_missing';
import { DynamicSettings, StatesIndexStatus } from '../../../../common/runtime_types';
import { DynamicSettings, StatesIndexStatus } from '../../../../common';
import { IHttpFetchError } from '../../../../../../../target/types/core/public/http';
interface EmptyStateProps {

View file

@ -9,7 +9,7 @@ import { EuiFilterGroup } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FilterPopoverProps, FilterPopover } from './filter_popover';
import { FilterStatusButton } from './filter_status_button';
import { OverviewFilters } from '../../../../common/runtime_types/overview_filters';
import { OverviewFilters } from '../../../../common';
interface PresentationalComponentProps {
loading: boolean;

View file

@ -11,7 +11,7 @@ import { parseFiltersMap } from './parse_filter_map';
import { AppState } from '../../../state';
import { fetchOverviewFilters, GetOverviewFiltersPayload } from '../../../state/actions';
import { FilterGroupComponent } from './index';
import { OverviewFilters } from '../../../../common/runtime_types/overview_filters';
import { OverviewFilters } from '../../../../common';
import { UptimeRefreshContext } from '../../../contexts';
interface OwnProps {

View file

@ -5,11 +5,7 @@
*/
import React from 'react';
import {
MonitorSummaryResult,
CursorDirection,
SortOrder,
} from '../../../../../common/runtime_types';
import { MonitorSummaryResult, CursorDirection, SortOrder } from '../../../../../common';
import { MonitorListComponent } from '../monitor_list';
import { renderWithRouter, shallowWithRouter } from '../../../../lib';

View file

@ -8,8 +8,7 @@ import React from 'react';
import moment from 'moment';
import { renderWithIntl, shallowWithIntl } from 'test_utils/enzyme_helpers';
import { getLocationStatus, MonitorListStatusColumn } from '../monitor_list_status_column';
import { Check } from '../../../../../common/runtime_types';
import { STATUS } from '../../../../../common/constants';
import { STATUS, Check } from '../../../../../common';
describe('MonitorListStatusColumn', () => {
beforeAll(() => {

View file

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

View file

@ -7,7 +7,7 @@
import React, { useCallback } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { getMonitorList } from '../../../state/actions';
import { FetchMonitorStatesQueryArgs } from '../../../../common/runtime_types';
import { FetchMonitorStatesQueryArgs } from '../../../../common';
import { monitorListSelector } from '../../../state/selectors';
import { MonitorListComponent } from './monitor_list';

View file

@ -5,7 +5,7 @@
*/
import React from 'react';
import { MonitorSummary } from '../../../../../../common/runtime_types';
import { MonitorSummary } from '../../../../../../common';
import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import { IntegrationGroup } from '../actions_popover/integration_group';

View file

@ -6,7 +6,7 @@
import 'jest';
import React from 'react';
import { MonitorListDrawerComponent } from '../monitor_list_drawer';
import { Check, MonitorDetails, MonitorSummary } from '../../../../../../common/runtime_types';
import { Check, MonitorDetails, MonitorSummary } from '../../../../../../common';
import { shallowWithRouter } from '../../../../../lib';
describe('MonitorListDrawer component', () => {

View file

@ -8,7 +8,7 @@ import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import React from 'react';
import moment from 'moment';
import { MonitorStatusList } from '../monitor_status_list';
import { Check } from '../../../../../../common/runtime_types';
import { Check } from '../../../../../../common';
describe('MonitorStatusList component', () => {
let checks: Check[];

View file

@ -9,7 +9,7 @@ import React from 'react';
import moment from 'moment';
import { BrowserRouter as Router } from 'react-router-dom';
import { MostRecentError } from '../most_recent_error';
import { MonitorDetails, MonitorError } from '../../../../../../common/runtime_types';
import { MonitorDetails, MonitorError } from '../../../../../../common';
describe('MostRecentError component', () => {
let monitorDetails: MonitorDetails;

View file

@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n';
import React from 'react';
import { EuiPopover, EuiButton } from '@elastic/eui';
import { IntegrationGroup } from './integration_group';
import { MonitorSummary } from '../../../../../../common/runtime_types';
import { MonitorSummary } from '../../../../../../common';
import { toggleIntegrationsPopover, PopoverState } from '../../../../../state/actions';
interface ActionsPopoverProps {

View file

@ -19,7 +19,7 @@ import {
getLoggingIpHref,
getLoggingKubernetesHref,
} from '../../../../../lib/helper';
import { MonitorSummary } from '../../../../../../common/runtime_types';
import { MonitorSummary } from '../../../../../../common';
import { UptimeSettingsContext } from '../../../../../contexts';
interface IntegrationGroupProps {

View file

@ -12,7 +12,7 @@ import { MonitorDetailsActionPayload } from '../../../../state/actions/types';
import { getMonitorDetailsAction } from '../../../../state/actions/monitor';
import { MonitorListDrawerComponent } from './monitor_list_drawer';
import { useGetUrlParams } from '../../../../hooks';
import { MonitorDetails, MonitorSummary } from '../../../../../common/runtime_types';
import { MonitorDetails, MonitorSummary } from '../../../../../common';
interface ContainerProps {
summary: MonitorSummary;

View file

@ -9,7 +9,7 @@ import styled from 'styled-components';
import { EuiLink, EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText } from '@elastic/eui';
import { MostRecentError } from './most_recent_error';
import { MonitorStatusList } from './monitor_status_list';
import { MonitorDetails, MonitorSummary } from '../../../../../common/runtime_types';
import { MonitorDetails, MonitorSummary } from '../../../../../common';
import { ActionsPopover } from './actions_popover/actions_popover_container';
const ContainerDiv = styled.div`

View file

@ -10,8 +10,7 @@ import { EuiCallOut, EuiSpacer } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { LocationLink } from '../../../common/location_link';
import { MonitorStatusRow } from './monitor_status_row';
import { Check } from '../../../../../common/runtime_types';
import { STATUS, UNNAMED_LOCATION } from '../../../../../common/constants';
import { STATUS, UNNAMED_LOCATION, Check } from '../../../../../common';
interface MonitorStatusListProps {
/**

View file

@ -8,7 +8,7 @@ import React, { useContext } from 'react';
import { EuiHealth, EuiSpacer } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { UptimeThemeContext } from '../../../../contexts';
import { UNNAMED_LOCATION, STATUS } from '../../../../../common/constants';
import { UNNAMED_LOCATION, STATUS } from '../../../../../common';
interface MonitorStatusRowProps {
/**

View file

@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n';
import { MonitorPageLink } from '../monitor_page_link';
import { useGetUrlParams } from '../../../../hooks';
import { stringifyUrlParams } from '../../../../lib/helper/stringify_url_params';
import { MonitorError } from '../../../../../common/runtime_types';
import { MonitorError } from '../../../../../common';
interface MostRecentErrorProps {
/**

View file

@ -11,13 +11,13 @@ import { capitalize } from 'lodash';
import styled from 'styled-components';
import { EuiHealth, EuiFlexGroup, EuiFlexItem, EuiText, EuiToolTip } from '@elastic/eui';
import { parseTimestamp } from './parse_timestamp';
import { Check } from '../../../../common/runtime_types';
import {
STATUS,
SHORT_TIMESPAN_LOCALE,
UNNAMED_LOCATION,
SHORT_TS_LOCALE,
} from '../../../../common/constants';
Check,
} from '../../../../common';
import * as labels from './translations';

View file

@ -9,7 +9,7 @@ import React from 'react';
import { DonutChart } from '../../common/charts';
import { ChartWrapper } from '../../common/charts/chart_wrapper';
import { SnapshotHeading } from './snapshot_heading';
import { Snapshot as SnapshotType } from '../../../../common/runtime_types';
import { Snapshot as SnapshotType } from '../../../../common';
const SNAPSHOT_CHART_WIDTH = 144;
const SNAPSHOT_CHART_HEIGHT = 144;

View file

@ -17,8 +17,8 @@ import {
EuiFlexGroup,
EuiFlexItem,
} from '@elastic/eui';
import { CertStateThresholds } from '../../../common/runtime_types';
import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../common/constants';
import { CertStateThresholds } from '../../../common';
import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../common';
import { SettingsFormProps } from '../../pages/settings';
interface ChangedValues {

View file

@ -14,7 +14,7 @@ import {
EuiTitle,
EuiSpacer,
} from '@elastic/eui';
import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../common/constants';
import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../common';
import { SettingsFormProps } from '../../pages/settings';
export const IndicesForm: React.FC<SettingsFormProps> = ({

View file

@ -6,7 +6,7 @@
import React, { createContext, useMemo } from 'react';
import { UptimeAppProps } from '../uptime_app';
import { CLIENT_DEFAULTS, CONTEXT_DEFAULTS } from '../../common/constants';
import { CLIENT_DEFAULTS, CONTEXT_DEFAULTS } from '../../common';
import { CommonlyUsedRange } from '../components/common/uptime_date_picker';
import { useGetUrlParams } from '../hooks';
import { ILicense } from '../../../../plugins/licensing/common/types';

View file

@ -8,7 +8,7 @@ import { ChromeBreadcrumb } from 'kibana/public';
import React from 'react';
import { Route } from 'react-router-dom';
import { mountWithRouter } from '../../lib';
import { OVERVIEW_ROUTE } from '../../../common/constants';
import { OVERVIEW_ROUTE } from '../../../common';
import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public';
import { UptimeUrlParams, getSupportedUrlParams } from '../../lib/helper';
import { makeBaseBreadcrumb, useBreadcrumbs } from '../use_breadcrumbs';

View file

@ -7,7 +7,7 @@
import { useEffect } from 'react';
import { useGetUrlParams } from './use_url_params';
import { apiService } from '../state/api/utils';
import { API_URLS } from '../../common/constants';
import { API_URLS } from '../../common';
export enum UptimePage {
Overview = 'Overview',

View file

@ -17,7 +17,7 @@ import {
PLUGIN,
DEFAULT_DARK_MODE,
DEFAULT_TIMEPICKER_QUICK_RANGES,
} from '../../../../common/constants';
} from '../../../../common';
import { UMFrameworkAdapter } from '../../lib';
import { ClientPluginsStart, ClientPluginsSetup } from '../../../apps/plugin';

View file

@ -6,7 +6,7 @@
import { isWithinCurrentDate } from './is_within_current_date';
import { getLabelFormat } from './get_label_format';
import { CHART_FORMAT_LIMITS } from '../../../../common/constants';
import { CHART_FORMAT_LIMITS } from '../../../../common';
/**
* Generates an appropriate date formatting string intended for the y-axis

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { CHART_FORMAT_LIMITS } from '../../../../common/constants';
import { CHART_FORMAT_LIMITS } from '../../../../common';
const {
EIGHT_MINUTES,

View file

@ -5,7 +5,7 @@
*/
import { getApmHref } from '../get_apm_href';
import { MonitorSummary } from '../../../../../common/runtime_types';
import { MonitorSummary } from '../../../../../common';
describe('getApmHref', () => {
let summary: MonitorSummary;

View file

@ -5,7 +5,7 @@
*/
import { getInfraContainerHref, getInfraKubernetesHref, getInfraIpHref } from '../get_infra_href';
import { MonitorSummary } from '../../../../../common/runtime_types';
import { MonitorSummary } from '../../../../../common';
describe('getInfraHref', () => {
let summary: MonitorSummary;

View file

@ -9,7 +9,7 @@ import {
getLoggingKubernetesHref,
getLoggingIpHref,
} from '../get_logging_href';
import { MonitorSummary } from '../../../../../common/runtime_types';
import { MonitorSummary } from '../../../../../common';
describe('getLoggingHref', () => {
let summary: MonitorSummary;

View file

@ -5,7 +5,7 @@
*/
import { get } from 'lodash';
import { Check } from '../../../../common/runtime_types';
import { Check } from '../../../../common';
/**
* Builds URLs to the designated features by extracting values from the provided

View file

@ -6,7 +6,7 @@
import { get } from 'lodash';
import { addBasePath } from './add_base_path';
import { MonitorSummary } from '../../../../common/runtime_types';
import { MonitorSummary } from '../../../../common';
export const getApmHref = (
summary: MonitorSummary,

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { MonitorSummary } from '../../../../common/runtime_types';
import { MonitorSummary } from '../../../../common';
import { addBasePath } from './add_base_path';
import { buildHref } from './build_href';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { MonitorSummary } from '../../../../common/runtime_types';
import { MonitorSummary } from '../../../../common';
import { addBasePath } from './add_base_path';
import { buildHref } from './build_href';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { HistogramPoint } from '../../../common/runtime_types';
import { HistogramPoint } from '../../../common';
export const seriesHasDownValues = (series: HistogramPoint[] | null): boolean => {
return series ? series.some(point => !!point.down) : false;

View file

@ -6,7 +6,7 @@
import { stringify } from 'query-string';
import { UptimeUrlParams } from './url_params';
import { CLIENT_DEFAULTS } from '../../../common/constants';
import { CLIENT_DEFAULTS } from '../../../common';
const {
AUTOREFRESH_INTERVAL,

View file

@ -6,7 +6,7 @@
import DateMath from '@elastic/datemath';
import { getSupportedUrlParams } from '../get_supported_url_params';
import { CLIENT_DEFAULTS } from '../../../../../common/constants';
import { CLIENT_DEFAULTS } from '../../../../../common';
describe('getSupportedUrlParams', () => {
let dateMathSpy: any;

View file

@ -6,7 +6,7 @@
import { parseIsPaused } from './parse_is_paused';
import { parseUrlInt } from './parse_url_int';
import { CLIENT_DEFAULTS } from '../../../../common/constants';
import { CLIENT_DEFAULTS } from '../../../../common';
import { parseAbsoluteDate } from './parse_absolute_date';
export interface UptimeUrlParams {

View file

@ -9,7 +9,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiTitle, EuiSpacer, EuiButtonEmpty } from '
import { i18n } from '@kbn/i18n';
import { Link } from 'react-router-dom';
import { UptimeDatePicker } from '../components/common/uptime_date_picker';
import { SETTINGS_ROUTE } from '../../common/constants';
import { SETTINGS_ROUTE } from '../../common';
import { ToggleAlertFlyoutButton } from '../components/overview/alerts/alerts_containers';
interface PageHeaderProps {

View file

@ -21,9 +21,9 @@ import { isEqual } from 'lodash';
import { Link } from 'react-router-dom';
import { selectDynamicSettings } from '../state/selectors';
import { getDynamicSettings, setDynamicSettings } from '../state/actions/dynamic_settings';
import { DynamicSettings } from '../../common/runtime_types';
import { DynamicSettings } from '../../common';
import { useBreadcrumbs } from '../hooks/use_breadcrumbs';
import { OVERVIEW_ROUTE } from '../../common/constants';
import { OVERVIEW_ROUTE } from '../../common';
import { useKibana } from '../../../../../src/plugins/kibana_react/public';
import { UptimePage, useUptimeTelemetry } from '../hooks';
import { IndicesForm } from '../components/settings/indices_form';

View file

@ -8,7 +8,7 @@ import React, { FC } from 'react';
import { Route, Switch } from 'react-router-dom';
import { DataPublicPluginSetup } from '../../../../src/plugins/data/public';
import { OverviewPage } from './components/overview/overview_container';
import { MONITOR_ROUTE, OVERVIEW_ROUTE, SETTINGS_ROUTE } from '../common/constants';
import { MONITOR_ROUTE, OVERVIEW_ROUTE, SETTINGS_ROUTE } from '../common';
import { MonitorPage, NotFoundPage, SettingsPage } from './pages';
interface RouterProps {

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { createAction } from 'redux-actions';
import { DynamicSettings } from '../../../common/runtime_types';
import { DynamicSettings } from '../../../common';
export const getDynamicSettings = createAction('GET_DYNAMIC_SETTINGS');
export const getDynamicSettingsSuccess = createAction<DynamicSettings>(

View file

@ -5,6 +5,6 @@
*/
import { createAsyncAction } from './utils';
import { StatesIndexStatus } from '../../../common/runtime_types';
import { StatesIndexStatus } from '../../../common';
export const indexStatusAction = createAsyncAction<any, StatesIndexStatus>('GET INDEX STATUS');

View file

@ -6,8 +6,8 @@
import { createAction } from 'redux-actions';
import { MonitorDetailsActionPayload } from './types';
import { MonitorError } from '../../../common/runtime_types';
import { MonitorLocations } from '../../../common/runtime_types';
import { MonitorError } from '../../../common';
import { MonitorLocations } from '../../../common';
import { QueryParams } from './types';
export interface MonitorLocationsPayload extends QueryParams {

View file

@ -5,7 +5,7 @@
*/
import { createAction } from 'redux-actions';
import { FetchMonitorStatesQueryArgs, MonitorSummaryResult } from '../../../common/runtime_types';
import { FetchMonitorStatesQueryArgs, MonitorSummaryResult } from '../../../common';
export const getMonitorList = createAction<FetchMonitorStatesQueryArgs>('GET_MONITOR_LIST');
export const getMonitorListSuccess = createAction<MonitorSummaryResult>('GET_MONITOR_LIST_SUCCESS');

View file

@ -6,7 +6,7 @@
import { createAction } from 'redux-actions';
import { QueryParams } from './types';
import { Ping } from '../../../common/runtime_types';
import { Ping } from '../../../common';
export const getMonitorStatusAction = createAction<QueryParams>('GET_MONITOR_STATUS');
export const getMonitorStatusActionSuccess = createAction<Ping>('GET_MONITOR_STATUS_SUCCESS');

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { OverviewFilters } from '../../../common/runtime_types';
import { OverviewFilters } from '../../../common';
export const FETCH_OVERVIEW_FILTERS = 'FETCH_OVERVIEW_FILTERS';
export const FETCH_OVERVIEW_FILTERS_FAIL = 'FETCH_OVERVIEW_FILTERS_FAIL';

View file

@ -10,7 +10,7 @@ import {
HistogramResult,
PingsResponse,
GetPingsParams,
} from '../../../common/runtime_types';
} from '../../../common';
export const getPingHistogram = createAction<GetPingHistogramParams>('GET_PING_HISTOGRAM');
export const getPingHistogramSuccess = createAction<HistogramResult>('GET_PING_HISTOGRAM_SUCCESS');

View file

@ -5,7 +5,7 @@
*/
import { createAction } from 'redux-actions';
import { Snapshot } from '../../../common/runtime_types';
import { Snapshot } from '../../../common';
export interface GetSnapshotPayload {
dateRangeStart: string;

View file

@ -9,7 +9,7 @@ import {
DynamicSettings,
DynamicSettingsSaveResponse,
DynamicSettingsSaveType,
} from '../../../common/runtime_types';
} from '../../../common';
import { apiService } from './utils';
const apiPath = '/api/uptime/dynamic_settings';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { API_URLS } from '../../../common/constants';
import { API_URLS } from '../../../common';
import { apiService } from './utils';
export const fetchIndexPattern = async () => {

View file

@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { API_URLS } from '../../../common/constants';
import { StatesIndexStatus, StatesIndexStatusType } from '../../../common/runtime_types';
import { API_URLS } from '../../../common';
import { StatesIndexStatus, StatesIndexStatusType } from '../../../common';
import { apiService } from './utils';
export const fetchIndexStatus = async (): Promise<StatesIndexStatus> => {

View file

@ -7,7 +7,7 @@
import moment from 'moment';
import { apiService } from './utils';
import { AnomalyRecords, AnomalyRecordsParams } from '../actions';
import { API_URLS, ML_JOB_ID, ML_MODULE_ID } from '../../../common/constants';
import { API_URLS, ML_JOB_ID, ML_MODULE_ID } from '../../../common';
import { MlCapabilitiesResponse } from '../../../../../plugins/ml/common/types/capabilities';
import {
CreateMLJobSuccess,

View file

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

View file

@ -6,7 +6,7 @@
import { BaseParams } from './types';
import { apiService } from './utils';
import { API_URLS } from '../../../common/constants';
import { API_URLS } from '../../../common';
export const fetchMonitorDuration = async ({ monitorId, dateStart, dateEnd }: BaseParams) => {
const queryParams = {

View file

@ -4,13 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { API_URLS } from '../../../common/constants';
import { API_URLS } from '../../../common';
import { apiService } from './utils';
import {
FetchMonitorStatesQueryArgs,
MonitorSummaryResult,
MonitorSummaryResultType,
} from '../../../common/runtime_types';
} from '../../../common';
export const fetchMonitorList = async (
params: FetchMonitorStatesQueryArgs

View file

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

View file

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

View file

@ -11,9 +11,9 @@ import {
GetPingsParams,
GetPingHistogramParams,
HistogramResult,
} from '../../../common/runtime_types';
} from '../../../common';
import { apiService } from './utils';
import { API_URLS } from '../../../common/constants';
import { API_URLS } from '../../../common';
export const fetchPings: APIFn<GetPingsParams, PingsResponse> = async ({
dateRange: { from, to },

View file

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

View file

@ -8,7 +8,7 @@ import { call, put } from 'redux-saga/effects';
import { fetchEffectFactory } from '../fetch_effect';
import { indexStatusAction } from '../../actions';
import { HttpFetchError } from 'src/core/public';
import { StatesIndexStatus } from '../../../../common/runtime_types';
import { StatesIndexStatus } from '../../../../common';
import { fetchIndexStatus } from '../../api';
describe('fetch saga effect factory', () => {

View file

@ -20,7 +20,7 @@ import {
getDynamicSettings as getDynamicSettingsAPI,
setDynamicSettings as setDynamicSettingsAPI,
} from '../api';
import { DynamicSettings } from '../../../common/runtime_types';
import { DynamicSettings } from '../../../common';
import { kibanaService } from '../kibana_service';
export function* fetchDynamicSettingsEffect() {

View file

@ -12,7 +12,7 @@ import {
setDynamicSettingsSuccess,
setDynamicSettingsFail,
} from '../actions/dynamic_settings';
import { DynamicSettings } from '../../../common/runtime_types';
import { DynamicSettings } from '../../../common';
export interface DynamicSettingsState {
settings?: DynamicSettings;

View file

@ -8,7 +8,7 @@ import { handleActions } from 'redux-actions';
import { indexStatusAction } from '../actions';
import { getAsyncInitialState, handleAsyncAction } from './utils';
import { AsyncInitialState } from './types';
import { StatesIndexStatus } from '../../../common/runtime_types';
import { StatesIndexStatus } from '../../../common';
export interface IndexStatusState {
indexStatus: AsyncInitialState<StatesIndexStatus | null>;

View file

@ -14,7 +14,7 @@ import {
getMonitorLocationsActionSuccess,
getMonitorLocationsActionFail,
} from '../actions/monitor';
import { MonitorLocations } from '../../../common/runtime_types';
import { MonitorLocations } from '../../../common';
type MonitorLocationsList = Map<string, MonitorLocations>;

View file

@ -6,7 +6,7 @@
import { handleActions, Action } from 'redux-actions';
import { getMonitorList, getMonitorListSuccess, getMonitorListFailure } from '../actions';
import { MonitorSummaryResult } from '../../../common/runtime_types';
import { MonitorSummaryResult } from '../../../common';
export interface MonitorList {
list: MonitorSummaryResult;

Some files were not shown because too many files have changed in this diff Show more