Skip to content

Commit

Permalink
Move shared typings from public/utils into proper shared Observabilit…
Browse files Browse the repository at this point in the history
…y plugin
  • Loading branch information
Kerry350 committed Jan 30, 2020
1 parent cbb6c23 commit 3e1547e
Show file tree
Hide file tree
Showing 85 changed files with 92 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { LayoutContent } from '../../../public/pages/metrics/components/layout_c
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { ChartSectionVis } from '../../../public/pages/metrics/components/chart_section_vis';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { withTheme } from '../../../public/utils/eui_styled_components';
import { withTheme } from '../../../../observability/public';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { MetadataDetails } from '../../../public/pages/metrics/components/metadata_details';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { SubSection } from '../../../public/pages/metrics/components/sub_section
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { ChartSectionVis } from '../../../public/pages/metrics/components/chart_section_vis';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { withTheme } from '../../../public/utils/eui_styled_components';
import { withTheme } from '../../../../observability/public';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { LayoutContent } from '../../../public/pages/metrics/components/layout_content';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { SubSection } from '../../../public/pages/metrics/components/sub_section
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { ChartSectionVis } from '../../../public/pages/metrics/components/chart_section_vis';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { withTheme } from '../../../public/utils/eui_styled_components';
import { withTheme } from '../../../../observability/public';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { LayoutContent } from '../../../public/pages/metrics/components/layout_content';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { SubSection } from '../../../public/pages/metrics/components/sub_section
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { ChartSectionVis } from '../../../public/pages/metrics/components/chart_section_vis';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { withTheme } from '../../../public/utils/eui_styled_components';
import { withTheme } from '../../../../observability/public';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { LayoutContent } from '../../../public/pages/metrics/components/layout_content';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { GaugesSectionVis } from '../../../public/pages/metrics/components/gauge
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { ChartSectionVis } from '../../../public/pages/metrics/components/chart_section_vis';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { withTheme } from '../../../public/utils/eui_styled_components';
import { withTheme } from '../../../../observability/public';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { LayoutContent } from '../../../public/pages/metrics/components/layout_content';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import React from 'react';
import { i18n } from '@kbn/i18n';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { withTheme } from '../../../public/utils/eui_styled_components';
import { withTheme } from '../../../../observability/public';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { LayoutPropsWithTheme } from '../../../public/pages/metrics/types';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { GaugesSectionVis } from '../../../public/pages/metrics/components/gauge
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { ChartSectionVis } from '../../../public/pages/metrics/components/chart_section_vis';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { withTheme } from '../../../public/utils/eui_styled_components';
import { withTheme } from '../../../../observability/public';
import * as Nginx from '../shared/layouts/nginx';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { MetadataDetails } from '../../../public/pages/metrics/components/metadata_details';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { GaugesSectionVis } from '../../../../public/pages/metrics/components/ga
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { ChartSectionVis } from '../../../../public/pages/metrics/components/chart_section_vis';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { withTheme } from '../../../../public/utils/eui_styled_components';
import { withTheme } from '../../../../../observability/public';

export const Layout = withTheme(({ metrics, theme }: LayoutPropsWithTheme) => (
<React.Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { SubSection } from '../../../../public/pages/metrics/components/sub_sect
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { ChartSectionVis } from '../../../../public/pages/metrics/components/chart_section_vis';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { withTheme } from '../../../../public/utils/eui_styled_components';
import { withTheme } from '../../../../../observability/public';

export const Layout = withTheme(({ metrics, theme }: LayoutPropsWithTheme) => (
<React.Fragment>
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/infra/public/apps/start_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { CoreStart, AppMountParameters } from 'kibana/public';

// TODO use theme provided from parentApp when kibana supports it
import { EuiErrorBoundary } from '@elastic/eui';
import { EuiThemeProvider } from '../utils/eui_styled_components';
import { EuiThemeProvider } from '../../../observability/public';
import { InfraFrontendLibs } from '../lib/lib';
import { PageRouter } from '../routes';
import { createStore } from '../store';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import React from 'react';

import { AutocompleteSuggestion } from '../../../../../../src/plugins/data/public';

import { euiStyled } from '../../utils/eui_styled_components';
import { euiStyled } from '../../../../observability/public';
import { composeStateUpdaters } from '../../utils/typed_react';
import { SuggestionItem } from './suggestion_item';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { transparentize } from 'polished';
import React from 'react';

import { AutocompleteSuggestion } from '../../../../../../src/plugins/data/public';
import { euiStyled } from '../../utils/eui_styled_components';
import { euiStyled } from '../../../../observability/public';

interface Props {
isSelected?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { EuiButton, EuiEmptyPrompt } from '@elastic/eui';
import React from 'react';

import { euiStyled } from '../../utils/eui_styled_components';
import { euiStyled } from '../../../../observability/public';

interface NoDataProps {
titleText: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { EuiEmptyPrompt } from '@elastic/eui';
import React from 'react';

import { euiStyled } from '../../utils/eui_styled_components';
import { euiStyled } from '../../../../observability/public';

interface NoIndicesProps {
message: string;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/infra/public/components/error_page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { FormattedMessage } from '@kbn/i18n/react';
import React from 'react';

import { euiStyled } from '../utils/eui_styled_components';
import { euiStyled } from '../../../observability/public';
import { FlexPage } from './page';

interface Props {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { EuiPanel } from '@elastic/eui';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';

export const Toolbar = euiStyled(EuiPanel).attrs(() => ({
grow: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import React from 'react';

import { EuiDatePicker, EuiDatePickerProps } from '@elastic/eui';
import { euiStyled } from '../utils/eui_styled_components';
import { euiStyled } from '../../../observability/public';

export const FixedDatePicker = euiStyled(
({
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/infra/public/components/loading/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { EuiLoadingChart, EuiPanel, EuiText } from '@elastic/eui';
import * as React from 'react';

import { euiStyled } from '../../utils/eui_styled_components';
import { euiStyled } from '../../../../observability/public';

interface InfraLoadingProps {
text: string | JSX.Element;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { EuiLoadingSpinner } from '@elastic/eui';
import { transparentize } from 'polished';
import React from 'react';

import { euiStyled } from '../utils/eui_styled_components';
import { euiStyled } from '../../../observability/public';

export const LoadingOverlayWrapper: React.FC<React.HTMLAttributes<HTMLDivElement> & {
isLoading: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';
import React from 'react';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';

export const MlUnavailablePrompt: React.FunctionComponent<{}> = () => (
<EmptyPrompt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from '@elastic/eui';
import React from 'react';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';

export const LogAnalysisSetupPage: React.FunctionComponent<CommonProps> = ({
children,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React from 'react';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiEmptyPrompt, EuiButton } from '@elastic/eui';
import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';

interface Props {
retry: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { EuiButtonEmpty, EuiPopover } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import * as React from 'react';

import { euiStyled } from '../../utils/eui_styled_components';
import { euiStyled } from '../../../../observability/public';

interface LogCustomizationMenuState {
isShown: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
import moment from 'moment';
import React, { useCallback, useMemo } from 'react';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';
import { TimeKey } from '../../../../common/time';
import { InfraLoadingPanel } from '../../loading';
import { LogEntryActionsMenu } from './log_entry_actions_menu';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
import { debounce } from 'lodash';
import React, { useCallback, useMemo, useState } from 'react';

import { euiStyled } from '../../utils/eui_styled_components';
import { euiStyled } from '../../../../observability/public';
import { useVisibilityState } from '../../utils/use_visibility_state';

interface LogHighlightsMenuProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { area, curveMonotoneY } from 'd3-shape';
import { max } from 'lodash';
import * as React from 'react';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';
import { SummaryBucket } from './types';

interface DensityChartProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import * as React from 'react';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';

interface HighlightedIntervalProps {
className?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { scaleLinear } from 'd3-scale';
import * as React from 'react';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';
import { LogEntryTime } from '../../../../common/log_entry';
import { DensityChart } from './density_chart';
import { HighlightedInterval } from './highlighted_interval';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { FormattedMessage } from '@kbn/i18n/react';
import * as React from 'react';

import { euiStyled, keyframes } from '../../../utils/eui_styled_components';
import { euiStyled, keyframes } from '../../../../../observability/public';
import { LogEntryTime } from '../../../../common/log_entry';
import { SearchMarkerTooltip } from './search_marker_tooltip';
import { SummaryHighlightBucket } from './types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { scaleTime } from 'd3-scale';
import * as React from 'react';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';

interface TimeRulerProps {
end: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n';
import classNames from 'classnames';
import * as React from 'react';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';

interface LogSearchInputProps {
className?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';

import { euiStyled } from '../../utils/eui_styled_components';
import { euiStyled } from '../../../../observability/public';

export const LogStatusbar = euiStyled(EuiFlexGroup).attrs(() => ({
alignItems: 'center',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import React, { useContext } from 'react';
import { transparentize } from 'polished';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';
import {
LogColumnConfiguration,
isTimestampLogColumnConfiguration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import React from 'react';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';
import { chooseLightOrDarkColor, tintOrShade } from '../../../utils/styles';

export const ActiveHighlightMarker = euiStyled.mark`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { EuiButtonEmpty, EuiText } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import * as React from 'react';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';

interface LogTextStreamJumpToTailProps {
onClickJump?: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { EuiButtonEmpty, EuiIcon, EuiProgress, EuiText } from '@elastic/eui';
import { FormattedMessage, FormattedRelative } from '@kbn/i18n/react';
import * as React from 'react';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';

interface LogTextStreamLoadingItemViewProps {
alignment: 'top' | 'bottom';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';
import {
LogColumnConfiguration,
isMessageLogColumnConfiguration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { mount } from 'enzyme';
import React from 'react';

import { EuiThemeProvider } from '../../../utils/eui_styled_components';
import { EuiThemeProvider } from '../../../../../observability/public';
import { LogEntryColumn } from '../../../utils/log_entry';
import { LogEntryFieldColumn } from './log_entry_field_column';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import stringify from 'json-stable-stringify';
import { darken, transparentize } from 'polished';
import React, { useMemo } from 'react';

import { euiStyled, css } from '../../../utils/eui_styled_components';
import { euiStyled, css } from '../../../../../observability/public';
import {
isFieldColumn,
isHighlightFieldColumn,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React from 'react';

import { LogEntryColumnContent } from './log_entry_column';
import { hoveredContentStyle } from './text_styles';
import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';

interface LogEntryIconColumnProps {
isHighlighted: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import React, { memo, useMemo } from 'react';

import { euiStyled, css } from '../../../utils/eui_styled_components';
import { euiStyled, css } from '../../../../../observability/public';
import {
isConstantSegment,
isFieldSegment,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// import { darken, transparentize } from 'polished';
import React, { useState, useCallback, useMemo } from 'react';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';
import {
LogEntry,
LogEntryHighlight,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { darken, transparentize } from 'polished';
import React, { memo } from 'react';

import { euiStyled, css } from '../../../utils/eui_styled_components';
import { euiStyled, css } from '../../../../../observability/public';
import { useFormattedTime } from '../../formatted_time';
import { LogEntryColumnContent } from './log_entry_column';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
import React, { Fragment, useMemo } from 'react';
import moment from 'moment';

import { euiStyled } from '../../../utils/eui_styled_components';
import { euiStyled } from '../../../../../observability/public';
import { TextScale } from '../../../../common/log_text_scale';
import { TimeKey, UniqueTimeKey } from '../../../../common/time';
import { callWithoutRepeats } from '../../../utils/handlers';
Expand Down
Loading

0 comments on commit 3e1547e

Please sign in to comment.