[linting] Enforce relative paths for X-Pack modules (#34349) (#34370)

* Add module-migration support for toRelative

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
Tyler Smalley 2019-04-02 11:23:44 -07:00 committed by GitHub
parent e90c3cc328
commit c4bd17ff05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
149 changed files with 290 additions and 321 deletions

View file

@ -17,21 +17,37 @@
* under the License.
*/
const path = require('path');
const Lint = require('tslint');
const KIBANA_ROOT = path.resolve(__dirname, '../../../..');
class ModuleMigrationWalker extends Lint.RuleWalker {
visitImportDeclaration(node) {
const moduleId = node.moduleSpecifier.text;
const mapping = this.options.find(
mapping => mapping.from === moduleId || mapping.from.startsWith(moduleId + '/')
mapping => mapping.from === moduleId || moduleId.startsWith(`${mapping.from}/`)
);
if (!mapping) {
return;
}
const newSource = moduleId.replace(mapping.from, mapping.to);
let newSource;
// support for toRelative added to migrate away from X-Pack being bundled
// within node modules. after that migration, this can be removed.
if (mapping.toRelative) {
const sourceDirectory = path.dirname(this.getSourceFile().originalFileName);
const localModulePath = moduleId.replace(new RegExp(`^${mapping.from}\/`), '');
const modulePath = path.resolve(KIBANA_ROOT, mapping.toRelative, localModulePath);
const relativePath = path.relative(sourceDirectory, modulePath);
newSource = relativePath.startsWith('.') ? relativePath : `./${relativePath}`;
} else {
newSource = moduleId.replace(mapping.from, mapping.to);
}
const start = node.moduleSpecifier.getStart();
const width = node.moduleSpecifier.getWidth();

View file

@ -71,3 +71,5 @@ rules:
- true
- from: expect.js
to: '@kbn/expect'
- from: 'x-pack'
toRelative: 'x-pack'

View file

@ -6,8 +6,8 @@
import { i18n } from '@kbn/i18n';
import { isEmpty } from 'lodash';
import { idx } from 'x-pack/plugins/apm/common/idx';
import { APMError } from 'x-pack/plugins/apm/typings/es_schemas/ui/APMError';
import { idx } from '../../../../../common/idx';
import { APMError } from '../../../../../typings/es_schemas/ui/APMError';
import {
getTabsFromObject,
PropertyTab

View file

@ -6,8 +6,8 @@
import { shallow } from 'enzyme';
import React from 'react';
import { APMError } from 'x-pack/plugins/apm/typings/es_schemas/ui/APMError';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import { APMError } from '../../../../../typings/es_schemas/ui/APMError';
import { Transaction } from '../../../../../typings/es_schemas/ui/Transaction';
import { StickyErrorProperties } from './StickyErrorProperties';
describe('StickyErrorProperties', () => {

View file

@ -12,11 +12,11 @@ import {
TRANSACTION_ID,
URL_FULL,
USER_ID
} from 'x-pack/plugins/apm/common/elasticsearch_fieldnames';
import { NOT_AVAILABLE_LABEL } from 'x-pack/plugins/apm/common/i18n';
import { idx } from 'x-pack/plugins/apm/common/idx';
import { APMError } from 'x-pack/plugins/apm/typings/es_schemas/ui/APMError';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
} from '../../../../../common/elasticsearch_fieldnames';
import { NOT_AVAILABLE_LABEL } from '../../../../../common/i18n';
import { idx } from '../../../../../common/idx';
import { APMError } from '../../../../../typings/es_schemas/ui/APMError';
import { Transaction } from '../../../../../typings/es_schemas/ui/Transaction';
import { KibanaLink } from '../../../shared/Links/KibanaLink';
import { legacyEncodeURIComponent } from '../../../shared/Links/url_helpers';
import { StickyProperties } from '../../../shared/StickyProperties';

View file

@ -7,7 +7,7 @@
import { shallow } from 'enzyme';
import { Location } from 'history';
import React from 'react';
import { APMError } from 'x-pack/plugins/apm/typings/es_schemas/ui/APMError';
import { APMError } from '../../../../../typings/es_schemas/ui/APMError';
import { mockMoment } from '../../../../utils/testHelpers';
import { DetailView } from './index';

View file

@ -17,17 +17,13 @@ import { Location } from 'history';
import { get } from 'lodash';
import React from 'react';
import styled from 'styled-components';
import { idx } from 'x-pack/plugins/apm/common/idx';
import {
fromQuery,
history,
toQuery
} from 'x-pack/plugins/apm/public/components/shared/Links/url_helpers';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { ErrorGroupAPIResponse } from 'x-pack/plugins/apm/server/lib/errors/get_error_group';
import { APMError } from 'x-pack/plugins/apm/typings/es_schemas/ui/APMError';
import { idx } from '../../../../../common/idx';
import { ErrorGroupAPIResponse } from '../../../../../server/lib/errors/get_error_group';
import { APMError } from '../../../../../typings/es_schemas/ui/APMError';
import { IUrlParams } from '../../../../store/urlParams';
import { px, unit } from '../../../../style/variables';
import { DiscoverErrorLink } from '../../../shared/Links/DiscoverLinks/DiscoverErrorLink';
import { fromQuery, history, toQuery } from '../../../shared/Links/url_helpers';
import { PropertiesTable } from '../../../shared/PropertiesTable';
import { getCurrentTab } from '../../../shared/PropertiesTable/tabConfig';
import { Stacktrace } from '../../../shared/Stacktrace';

View file

@ -18,8 +18,8 @@ import { i18n } from '@kbn/i18n';
import { Location } from 'history';
import React, { Fragment } from 'react';
import styled from 'styled-components';
import { NOT_AVAILABLE_LABEL } from 'x-pack/plugins/apm/common/i18n';
import { idx } from 'x-pack/plugins/apm/common/idx';
import { NOT_AVAILABLE_LABEL } from '../../../../common/i18n';
import { idx } from '../../../../common/idx';
import { useFetcher } from '../../../hooks/useFetcher';
import {
loadErrorDistribution,

View file

@ -11,9 +11,9 @@ import { Location } from 'history';
import moment from 'moment';
import React, { Component } from 'react';
import styled from 'styled-components';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { ErrorGroupListAPIResponse } from 'x-pack/plugins/apm/server/lib/errors/get_error_groups';
import { NOT_AVAILABLE_LABEL } from '../../../../../common/i18n';
import { ErrorGroupListAPIResponse } from '../../../../../server/lib/errors/get_error_groups';
import { IUrlParams } from '../../../../store/urlParams';
import {
fontFamilyCode,
fontSizes,

View file

@ -14,13 +14,13 @@ import {
import { i18n } from '@kbn/i18n';
import { Location } from 'history';
import React from 'react';
import { ErrorDistribution } from 'x-pack/plugins/apm/public/components/app/ErrorGroupDetails/Distribution';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { useFetcher } from '../../../hooks/useFetcher';
import {
loadErrorDistribution,
loadErrorGroupList
} from '../../../services/rest/apm/error_groups';
import { IUrlParams } from '../../../store/urlParams';
import { ErrorDistribution } from '../ErrorGroupDetails/Distribution';
import { ErrorGroupList } from './List';
interface ErrorGroupOverviewProps {

View file

@ -7,12 +7,9 @@
import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiTitle } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import {
HistoryTabs,
IHistoryTab
} from 'x-pack/plugins/apm/public/components/shared/HistoryTabs';
// @ts-ignore
import { FilterBar } from '../../shared/FilterBar';
import { HistoryTabs, IHistoryTab } from '../../shared/HistoryTabs';
import { SetupInstructionsLink } from '../../shared/Links/SetupInstructionsLink';
import { ServiceOverview } from '../ServiceOverview';
import { TraceOverview } from '../TraceOverview';

View file

@ -4,11 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import React from 'react';
import {
FETCH_STATUS,
useFetcher
} from 'x-pack/plugins/apm/public/hooks/useFetcher';
import { loadLicense } from 'x-pack/plugins/apm/public/services/rest/xpack';
import { FETCH_STATUS, useFetcher } from '../../../../hooks/useFetcher';
import { loadLicense } from '../../../../services/rest/xpack';
import { InvalidLicenseNotification } from './InvalidLicenseNotification';
const initialLicense = {

View file

@ -12,7 +12,7 @@ import {
RouteProps,
withRouter
} from 'react-router-dom';
import { StringMap } from 'x-pack/plugins/apm/typings/common';
import { StringMap } from '../../../../typings/common';
type LocationMatch = Pick<
RouteComponentProps<StringMap<string>>,

View file

@ -7,7 +7,7 @@
import { i18n } from '@kbn/i18n';
import React from 'react';
import { Redirect, RouteComponentProps } from 'react-router-dom';
import { legacyDecodeURIComponent } from 'x-pack/plugins/apm/public/components/shared/Links/url_helpers';
import { legacyDecodeURIComponent } from '../../shared/Links/url_helpers';
import { ErrorGroupDetails } from '../ErrorGroupDetails';
import { ServiceDetails } from '../ServiceDetails';
import { TransactionDetails } from '../TransactionDetails';

View file

@ -7,12 +7,12 @@
import { EuiTitle } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
// @ts-ignore
import CustomPlot from 'x-pack/plugins/apm/public/components/shared/charts/CustomPlot';
import { HoverXHandlers } from 'x-pack/plugins/apm/public/components/shared/charts/SyncChartGroup';
import { asPercent } from 'x-pack/plugins/apm/public/utils/formatters';
import { Coordinate } from 'x-pack/plugins/apm/typings/timeseries';
import { Coordinate } from '../../../../typings/timeseries';
import { CPUMetricSeries } from '../../../store/selectors/chartSelectors';
import { asPercent } from '../../../utils/formatters';
// @ts-ignore
import CustomPlot from '../../shared/charts/CustomPlot';
import { HoverXHandlers } from '../../shared/charts/SyncChartGroup';
interface Props {
data: CPUMetricSeries;

View file

@ -7,12 +7,12 @@
import { EuiTitle } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
// @ts-ignore
import CustomPlot from 'x-pack/plugins/apm/public/components/shared/charts/CustomPlot';
import { HoverXHandlers } from 'x-pack/plugins/apm/public/components/shared/charts/SyncChartGroup';
import { asPercent } from 'x-pack/plugins/apm/public/utils/formatters';
import { Coordinate } from 'x-pack/plugins/apm/typings/timeseries';
import { Coordinate } from '../../../../typings/timeseries';
import { MemoryMetricSeries } from '../../../store/selectors/chartSelectors';
import { asPercent } from '../../../utils/formatters';
// @ts-ignore
import CustomPlot from '../../shared/charts/CustomPlot';
import { HoverXHandlers } from '../../shared/charts/SyncChartGroup';
interface Props {
data: MemoryMetricSeries;

View file

@ -7,8 +7,8 @@
import { i18n } from '@kbn/i18n';
import { Location } from 'history';
import React from 'react';
import { HistoryTabs } from 'x-pack/plugins/apm/public/components/shared/HistoryTabs';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { IUrlParams } from '../../../store/urlParams';
import { HistoryTabs } from '../../shared/HistoryTabs';
import { ErrorGroupOverview } from '../ErrorGroupOverview';
import { TransactionOverview } from '../TransactionOverview';
import { ServiceMetrics } from './ServiceMetrics';

View file

@ -16,8 +16,8 @@ import {
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import { getMlJobId } from 'x-pack/plugins/apm/common/ml_job_constants';
import { MLJobApiResponse } from 'x-pack/plugins/apm/public/services/rest/ml';
import { getMlJobId } from '../../../../../../common/ml_job_constants';
import { MLJobApiResponse } from '../../../../../services/rest/ml';
interface TransactionSelectProps {
serviceName: string;

View file

@ -8,10 +8,10 @@ import { i18n } from '@kbn/i18n';
import { Location } from 'history';
import React, { Component } from 'react';
import { toastNotifications } from 'ui/notify';
import { MLJobLink } from 'x-pack/plugins/apm/public/components/shared/Links/MLJobLink';
import { startMLJob } from 'x-pack/plugins/apm/public/services/rest/ml';
import { getAPMIndexPattern } from 'x-pack/plugins/apm/public/services/rest/savedObjects';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { startMLJob } from '../../../../../services/rest/ml';
import { getAPMIndexPattern } from '../../../../../services/rest/savedObjects';
import { IUrlParams } from '../../../../../store/urlParams';
import { MLJobLink } from '../../../../shared/Links/MLJobLink';
import { MachineLearningFlyoutView } from './view';
interface Props {

View file

@ -22,14 +22,11 @@ import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';
import { Location } from 'history';
import React from 'react';
import { getMlJobId } from 'x-pack/plugins/apm/common/ml_job_constants';
import { KibanaLink } from 'x-pack/plugins/apm/public/components/shared/Links/KibanaLink';
import { MLJobLink } from 'x-pack/plugins/apm/public/components/shared/Links/MLJobLink';
import {
FETCH_STATUS,
useFetcher
} from 'x-pack/plugins/apm/public/hooks/useFetcher';
import { getMLJob } from 'x-pack/plugins/apm/public/services/rest/ml';
import { getMlJobId } from '../../../../../../common/ml_job_constants';
import { FETCH_STATUS, useFetcher } from '../../../../../hooks/useFetcher';
import { getMLJob } from '../../../../../services/rest/ml';
import { KibanaLink } from '../../../../shared/Links/KibanaLink';
import { MLJobLink } from '../../../../shared/Links/MLJobLink';
import { TransactionSelect } from './TransactionSelect';
interface Props {

View file

@ -33,9 +33,9 @@ import React, { Component } from 'react';
import styled from 'styled-components';
import chrome from 'ui/chrome';
import { toastNotifications } from 'ui/notify';
import { UnconnectedKibanaLink } from 'x-pack/plugins/apm/public/components/shared/Links/KibanaLink';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { IUrlParams } from '../../../../store/urlParams';
import { XPACK_DOCS } from '../../../../utils/documentation/xpack';
import { UnconnectedKibanaLink } from '../../../shared/Links/KibanaLink';
import { createErrorGroupWatch, Schedule } from './createErrorGroupWatch';
type ScheduleKey = keyof Schedule;

View file

@ -8,7 +8,7 @@ import { isArray, isObject, isString } from 'lodash';
import mustache from 'mustache';
import chrome from 'ui/chrome';
import uuid from 'uuid';
import { StringMap } from 'x-pack/plugins/apm/typings/common';
import { StringMap } from '../../../../../../typings/common';
// @ts-ignore
import * as rest from '../../../../../services/rest/watcher';
import { createErrorGroupWatch } from '../createErrorGroupWatch';

View file

@ -9,7 +9,6 @@ import { isEmpty } from 'lodash';
import chrome from 'ui/chrome';
import url from 'url';
import uuid from 'uuid';
import { StringMap } from 'x-pack/plugins/apm/typings/common';
import {
ERROR_CULPRIT,
ERROR_EXC_HANDLED,
@ -19,6 +18,7 @@ import {
PROCESSOR_EVENT,
SERVICE_NAME
} from '../../../../../common/elasticsearch_fieldnames';
import { StringMap } from '../../../../../typings/common';
// @ts-ignore
import { createWatch } from '../../../../services/rest/watcher';

View file

@ -15,7 +15,7 @@ import { Location } from 'history';
import { memoize } from 'lodash';
import React, { Fragment } from 'react';
import chrome from 'ui/chrome';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { IUrlParams } from '../../../../store/urlParams';
import { LicenseContext } from '../../Main/LicenseCheck';
import { MachineLearningFlyout } from './MachineLearningFlyout';
import { WatcherFlyout } from './WatcherFlyout';

View file

@ -14,14 +14,14 @@ import {
import { i18n } from '@kbn/i18n';
import { Location } from 'history';
import React from 'react';
import { ErrorDistribution } from 'x-pack/plugins/apm/public/components/app/ErrorGroupDetails/Distribution';
import { SyncChartGroup } from 'x-pack/plugins/apm/public/components/shared/charts/SyncChartGroup';
import { TransactionCharts } from 'x-pack/plugins/apm/public/components/shared/charts/TransactionCharts';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { useFetcher } from '../../../hooks/useFetcher';
import { useServiceMetricCharts } from '../../../hooks/useServiceMetricCharts';
import { useTransactionOverviewCharts } from '../../../hooks/useTransactionOverviewCharts';
import { loadErrorDistribution } from '../../../services/rest/apm/error_groups';
import { IUrlParams } from '../../../store/urlParams';
import { SyncChartGroup } from '../../shared/charts/SyncChartGroup';
import { TransactionCharts } from '../../shared/charts/TransactionCharts';
import { ErrorDistribution } from '../ErrorGroupDetails/Distribution';
import { CPUUsageChart } from './CPUUsageChart';
import { MemoryUsageChart } from './MemoryUsageChart';

View file

@ -5,8 +5,8 @@
*/
import { connect } from 'react-redux';
import { IReduxState } from 'x-pack/plugins/apm/public/store/rootReducer';
import { getUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { IReduxState } from '../../../store/rootReducer';
import { getUrlParams } from '../../../store/urlParams';
import { ServiceDetailsView } from './view';
function mapStateToProps(state = {} as IReduxState) {

View file

@ -7,9 +7,9 @@
import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiTitle } from '@elastic/eui';
import { Location } from 'history';
import React from 'react';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { useFetcher } from '../../../hooks/useFetcher';
import { loadServiceDetails } from '../../../services/rest/apm/services';
import { IUrlParams } from '../../../store/urlParams';
// @ts-ignore
import { FilterBar } from '../../shared/FilterBar';
import { ServiceDetailTabs } from './ServiceDetailTabs';

View file

@ -8,11 +8,11 @@ import { EuiToolTip } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import styled from 'styled-components';
import { NOT_AVAILABLE_LABEL } from 'x-pack/plugins/apm/common/i18n';
import { KibanaLink } from 'x-pack/plugins/apm/public/components/shared/Links/KibanaLink';
import { ServiceListAPIResponse } from 'x-pack/plugins/apm/server/lib/services/get_services';
import { NOT_AVAILABLE_LABEL } from '../../../../../common/i18n';
import { ServiceListAPIResponse } from '../../../../../server/lib/services/get_services';
import { fontSizes, truncate } from '../../../../style/variables';
import { asDecimal, asMillis } from '../../../../utils/formatters';
import { KibanaLink } from '../../../shared/Links/KibanaLink';
import { ITableColumn, ManagedTable } from '../../../shared/ManagedTable';
interface Props {

View file

@ -9,9 +9,9 @@ import { Provider } from 'react-redux';
import { render, wait, waitForElement } from 'react-testing-library';
import 'react-testing-library/cleanup-after-each';
import { toastNotifications } from 'ui/notify';
import * as apmRestServices from 'x-pack/plugins/apm/public/services/rest/apm/services';
import * as apmRestServices from '../../../../services/rest/apm/services';
// @ts-ignore
import configureStore from 'x-pack/plugins/apm/public/store/config/configureStore';
import configureStore from '../../../../store/config/configureStore';
import { ServiceOverview } from '../view';
function renderServiceOverview() {

View file

@ -5,8 +5,8 @@
*/
import { connect } from 'react-redux';
import { IReduxState } from 'x-pack/plugins/apm/public/store/rootReducer';
import { getUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { IReduxState } from '../../../store/rootReducer';
import { getUrlParams } from '../../../store/urlParams';
import { ServiceOverview as View } from './view';
function mapStateToProps(state = {} as IReduxState) {

View file

@ -11,9 +11,9 @@ import React, { useEffect } from 'react';
import chrome from 'ui/chrome';
import { toastNotifications } from 'ui/notify';
import url from 'url';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { useFetcher } from '../../../hooks/useFetcher';
import { loadServiceList } from '../../../services/rest/apm/services';
import { IUrlParams } from '../../../store/urlParams';
import { NoServicesMessage } from './NoServicesMessage';
import { ServiceList } from './ServiceList';

View file

@ -8,7 +8,7 @@ import { EuiToolTip } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import styled from 'styled-components';
import { ITransactionGroup } from 'x-pack/plugins/apm/server/lib/transaction_groups/transform';
import { ITransactionGroup } from '../../../../server/lib/transaction_groups/transform';
import { fontSizes, truncate } from '../../../style/variables';
import { asMillis } from '../../../utils/formatters';
import { EmptyMessage } from '../../shared/EmptyMessage';

View file

@ -9,18 +9,14 @@ import { i18n } from '@kbn/i18n';
import d3 from 'd3';
import { Location } from 'history';
import React, { Component } from 'react';
import {
fromQuery,
history,
toQuery
} from 'x-pack/plugins/apm/public/components/shared/Links/url_helpers';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { ITransactionDistributionAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/distribution';
import { IBucket } from 'x-pack/plugins/apm/server/lib/transactions/distribution/get_buckets/transform';
import { ITransactionDistributionAPIResponse } from '../../../../../server/lib/transactions/distribution';
import { IBucket } from '../../../../../server/lib/transactions/distribution/get_buckets/transform';
import { IUrlParams } from '../../../../store/urlParams';
import { getTimeFormatter, timeUnit } from '../../../../utils/formatters';
// @ts-ignore
import Histogram from '../../../shared/charts/Histogram';
import { EmptyMessage } from '../../../shared/EmptyMessage';
import { fromQuery, history, toQuery } from '../../../shared/Links/url_helpers';
interface IChartPoint {
sample?: IBucket['sample'];

View file

@ -9,11 +9,11 @@ import euiThemeLight from '@elastic/eui/dist/eui_theme_light.json';
import { i18n } from '@kbn/i18n';
import React, { Fragment } from 'react';
import styled from 'styled-components';
import { idx } from 'x-pack/plugins/apm/common/idx';
import { KibanaLink } from 'x-pack/plugins/apm/public/components/shared/Links/KibanaLink';
import { legacyEncodeURIComponent } from 'x-pack/plugins/apm/public/components/shared/Links/url_helpers';
import { idx } from '../../../../../common/idx';
import { Transaction } from '../../../../../typings/es_schemas/ui/Transaction';
import { fontSize } from '../../../../style/variables';
import { KibanaLink } from '../../../shared/Links/KibanaLink';
import { legacyEncodeURIComponent } from '../../../shared/Links/url_helpers';
const LinkLabel = styled.span`
font-size: ${fontSize};

View file

@ -6,14 +6,14 @@
import { i18n } from '@kbn/i18n';
import React from 'react';
import { NOT_AVAILABLE_LABEL } from 'x-pack/plugins/apm/common/i18n';
import { idx } from 'x-pack/plugins/apm/common/idx';
import {
TRANSACTION_DURATION,
TRANSACTION_RESULT,
URL_FULL,
USER_ID
} from '../../../../../common/elasticsearch_fieldnames';
import { NOT_AVAILABLE_LABEL } from '../../../../../common/i18n';
import { idx } from '../../../../../common/idx';
import { Transaction } from '../../../../../typings/es_schemas/ui/Transaction';
import { asPercent, asTime } from '../../../../utils/formatters';
import {

View file

@ -8,13 +8,9 @@ import { EuiSpacer, EuiTab, EuiTabs } from '@elastic/eui';
import { Location } from 'history';
import { get } from 'lodash';
import React from 'react';
import {
fromQuery,
history,
toQuery
} from 'x-pack/plugins/apm/public/components/shared/Links/url_helpers';
import { Transaction } from '../../../../../typings/es_schemas/ui/Transaction';
import { IUrlParams } from '../../../../store/urlParams';
import { fromQuery, history, toQuery } from '../../../shared/Links/url_helpers';
import { PropertiesTable } from '../../../shared/PropertiesTable';
import {
getCurrentTab,

View file

@ -10,15 +10,11 @@ import { Location } from 'history';
import { get } from 'lodash';
import React from 'react';
import styled from 'styled-components';
import {
fromQuery,
history,
toQuery
} from 'x-pack/plugins/apm/public/components/shared/Links/url_helpers';
import { Transaction } from '../../../../../typings/es_schemas/ui/Transaction';
import { IUrlParams } from '../../../../store/urlParams';
import { px, units } from '../../../../style/variables';
import { HeightRetainer } from '../../../shared/HeightRetainer';
import { fromQuery, history, toQuery } from '../../../shared/Links/url_helpers';
import { PropertiesTable } from '../../../shared/PropertiesTable';
import {
getCurrentTab,

View file

@ -9,11 +9,11 @@ import React from 'react';
import {
SERVICE_NAME,
TRANSACTION_NAME
} from 'x-pack/plugins/apm/common/elasticsearch_fieldnames';
import { KibanaLink } from 'x-pack/plugins/apm/public/components/shared/Links/KibanaLink';
import { TransactionLink } from 'x-pack/plugins/apm/public/components/shared/Links/TransactionLink';
import { StickyProperties } from 'x-pack/plugins/apm/public/components/shared/StickyProperties';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
} from '../../../../../../../common/elasticsearch_fieldnames';
import { Transaction } from '../../../../../../../typings/es_schemas/ui/Transaction';
import { KibanaLink } from '../../../../../shared/Links/KibanaLink';
import { TransactionLink } from '../../../../../shared/Links/TransactionLink';
import { StickyProperties } from '../../../../../shared/StickyProperties';
interface Props {
transaction?: Transaction;

View file

@ -18,7 +18,7 @@ import SyntaxHighlighter, {
// @ts-ignore
import { xcode } from 'react-syntax-highlighter/dist/styles';
import styled from 'styled-components';
import { Span } from 'x-pack/plugins/apm/typings/es_schemas/ui/Span';
import { Span } from '../../../../../../../../typings/es_schemas/ui/Span';
import {
borderRadius,
fontFamilyCode,

View file

@ -17,8 +17,8 @@ import {
import { EuiSpacer, EuiTitle } from '@elastic/eui';
import theme from '@elastic/eui/dist/eui_theme_light.json';
import { idx } from 'x-pack/plugins/apm/common/idx';
import { Span } from 'x-pack/plugins/apm/typings/es_schemas/ui/Span';
import { idx } from '../../../../../../../../common/idx';
import { Span } from '../../../../../../../../typings/es_schemas/ui/Span';
const ContextUrl = styled.div`
padding: ${px(units.half)} ${px(unit)};

View file

@ -12,8 +12,8 @@ import {
SPAN_NAME,
SPAN_SUBTYPE,
SPAN_TYPE
} from 'x-pack/plugins/apm/common/elasticsearch_fieldnames';
import { NOT_AVAILABLE_LABEL } from 'x-pack/plugins/apm/common/i18n';
} from '../../../../../../../../common/elasticsearch_fieldnames';
import { NOT_AVAILABLE_LABEL } from '../../../../../../../../common/i18n';
import { Span } from '../../../../../../../../typings/es_schemas/ui/Span';
import { asMillis, asPercent } from '../../../../../../../utils/formatters';
import { StickyProperties } from '../../../../../../shared/StickyProperties';

View file

@ -21,11 +21,11 @@ import { i18n } from '@kbn/i18n';
import { get, keys } from 'lodash';
import React, { Fragment } from 'react';
import styled from 'styled-components';
import { idx } from 'x-pack/plugins/apm/common/idx';
import { DiscoverSpanLink } from 'x-pack/plugins/apm/public/components/shared/Links/DiscoverLinks/DiscoverSpanLink';
import { Stacktrace } from 'x-pack/plugins/apm/public/components/shared/Stacktrace';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import { idx } from '../../../../../../../../common/idx';
import { Span } from '../../../../../../../../typings/es_schemas/ui/Span';
import { Transaction } from '../../../../../../../../typings/es_schemas/ui/Transaction';
import { DiscoverSpanLink } from '../../../../../../shared/Links/DiscoverLinks/DiscoverSpanLink';
import { Stacktrace } from '../../../../../../shared/Stacktrace';
import { FlyoutTopLevelProperties } from '../FlyoutTopLevelProperties';
import { ResponsiveFlyout } from '../ResponsiveFlyout';
import { DatabaseContext } from './DatabaseContext';

View file

@ -18,11 +18,11 @@ import {
import { i18n } from '@kbn/i18n';
import { Location } from 'history';
import React from 'react';
import { idx } from 'x-pack/plugins/apm/common/idx';
import { TransactionActionMenu } from 'x-pack/plugins/apm/public/components/shared/TransactionActionMenu/TransactionActionMenu';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { DROPPED_SPANS_DOCS } from 'x-pack/plugins/apm/public/utils/documentation/apm-get-started';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import { idx } from '../../../../../../../../common/idx';
import { Transaction } from '../../../../../../../../typings/es_schemas/ui/Transaction';
import { IUrlParams } from '../../../../../../../store/urlParams';
import { DROPPED_SPANS_DOCS } from '../../../../../../../utils/documentation/apm-get-started';
import { TransactionActionMenu } from '../../../../../../shared/TransactionActionMenu/TransactionActionMenu';
import { StickyTransactionProperties } from '../../../StickyTransactionProperties';
import { TransactionPropertiesTableForFlyout } from '../../../TransactionPropertiesTableForFlyout';
import { FlyoutTopLevelProperties } from '../FlyoutTopLevelProperties';

View file

@ -9,9 +9,9 @@ import styled from 'styled-components';
import { EuiIcon, EuiText, EuiTitle } from '@elastic/eui';
import theme from '@elastic/eui/dist/eui_theme_light.json';
import { asTime } from 'x-pack/plugins/apm/public/utils/formatters';
import { isRumAgentName } from '../../../../../../../common/agent_name';
import { px, unit, units } from '../../../../../../style/variables';
import { asTime } from '../../../../../../utils/formatters';
import { ErrorCountBadge } from '../../ErrorCountBadge';
import { IWaterfallItem } from './waterfall_helpers/waterfall_helpers';

View file

@ -9,15 +9,15 @@ import React, { Component } from 'react';
// @ts-ignore
import { StickyContainer } from 'react-sticky';
import styled from 'styled-components';
import { IUrlParams } from '../../../../../../store/urlParams';
// @ts-ignore
import Timeline from '../../../../../shared/charts/Timeline';
import {
APMQueryParams,
fromQuery,
history,
toQuery
} from 'x-pack/plugins/apm/public/components/shared/Links/url_helpers';
import { IUrlParams } from '../../../../../../store/urlParams';
// @ts-ignore
import Timeline from '../../../../../shared/charts/Timeline';
} from '../../../../../shared/Links/url_helpers';
import { AgentMark } from '../get_agent_marks';
import { SpanFlyout } from './SpanFlyout';
import { TransactionFlyout } from './TransactionFlyout';

View file

@ -5,8 +5,8 @@
*/
import { groupBy } from 'lodash';
import { Span } from 'x-pack/plugins/apm/typings/es_schemas/ui/Span';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import { Span } from '../../../../../../../../typings/es_schemas/ui/Span';
import { Transaction } from '../../../../../../../../typings/es_schemas/ui/Transaction';
import {
getClockSkew,
getOrderedWaterfallItems,

View file

@ -15,9 +15,9 @@ import {
uniq,
zipObject
} from 'lodash';
import { idx } from 'x-pack/plugins/apm/common/idx';
import { TraceAPIResponse } from 'x-pack/plugins/apm/server/lib/traces/get_trace';
import { StringMap } from 'x-pack/plugins/apm/typings/common';
import { idx } from '../../../../../../../../common/idx';
import { TraceAPIResponse } from '../../../../../../../../server/lib/traces/get_trace';
import { StringMap } from '../../../../../../../../typings/common';
import { Span } from '../../../../../../../../typings/es_schemas/ui/Span';
import { Transaction } from '../../../../../../../../typings/es_schemas/ui/Transaction';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import { Transaction } from '../../../../../../typings/es_schemas/ui/Transaction';
import { getAgentMarks } from './get_agent_marks';
describe('getAgentMarks', () => {

View file

@ -5,7 +5,7 @@
*/
import { sortBy } from 'lodash';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import { Transaction } from '../../../../../../typings/es_schemas/ui/Transaction';
export interface AgentMark {
name: string;

View file

@ -6,8 +6,8 @@
import { Location } from 'history';
import React from 'react';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import { Transaction } from '../../../../../../typings/es_schemas/ui/Transaction';
import { IUrlParams } from '../../../../../store/urlParams';
import { getAgentMarks } from './get_agent_marks';
import { ServiceLegends } from './ServiceLegends';
import { Waterfall } from './Waterfall';

View file

@ -5,9 +5,9 @@
*/
import { connect } from 'react-redux';
import { TransactionDetailsView } from 'x-pack/plugins/apm/public/components/app/TransactionDetails/view';
import { getUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { IReduxState } from '../../../store/rootReducer';
import { getUrlParams } from '../../../store/urlParams';
import { TransactionDetailsView } from './view';
function mapStateToProps(state = {} as IReduxState) {
return {

View file

@ -8,8 +8,8 @@ import { EuiToolTip } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import styled from 'styled-components';
import { NOT_AVAILABLE_LABEL } from 'x-pack/plugins/apm/common/i18n';
import { ITransactionGroup } from 'x-pack/plugins/apm/server/lib/transaction_groups/transform';
import { NOT_AVAILABLE_LABEL } from '../../../../../common/i18n';
import { ITransactionGroup } from '../../../../../server/lib/transaction_groups/transform';
import { fontFamilyCode, truncate } from '../../../../style/variables';
import { asDecimal, asMillis } from '../../../../utils/formatters';
import { ImpactBar } from '../../../shared/ImpactBar';

View file

@ -9,10 +9,10 @@ import React from 'react';
import { Provider } from 'react-redux';
import { Router } from 'react-router-dom';
import { queryByLabelText, render } from 'react-testing-library';
// @ts-ignore
import configureStore from 'x-pack/plugins/apm/public/store/config/configureStore';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { TransactionOverview } from '..';
// @ts-ignore
import configureStore from '../../../../store/config/configureStore';
import { IUrlParams } from '../../../../store/urlParams';
function setup(props: {
urlParams: IUrlParams;

View file

@ -16,11 +16,11 @@ import { Location } from 'history';
import { first } from 'lodash';
import React from 'react';
import { RouteComponentProps, withRouter } from 'react-router-dom';
import { TransactionCharts } from 'x-pack/plugins/apm/public/components/shared/charts/TransactionCharts';
import { legacyEncodeURIComponent } from 'x-pack/plugins/apm/public/components/shared/Links/url_helpers';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { useTransactionList } from '../../../hooks/useTransactionList';
import { useTransactionOverviewCharts } from '../../../hooks/useTransactionOverviewCharts';
import { IUrlParams } from '../../../store/urlParams';
import { TransactionCharts } from '../../shared/charts/TransactionCharts';
import { legacyEncodeURIComponent } from '../../shared/Links/url_helpers';
import { TransactionList } from './List';
import { useRedirect } from './useRedirect';

View file

@ -10,8 +10,8 @@ import { Provider } from 'react-redux';
import { MemoryRouter } from 'react-router-dom';
import { Store } from 'redux';
// @ts-ignore
import configureStore from 'x-pack/plugins/apm/public/store/config/configureStore';
import { mockNow, tick } from 'x-pack/plugins/apm/public/utils/testHelpers';
import configureStore from '../../../../store/config/configureStore';
import { mockNow, tick } from '../../../../utils/testHelpers';
import { DatePicker, DatePickerComponent } from '../DatePicker';
function mountPicker(initialState = {}) {

View file

@ -8,8 +8,8 @@ import React from 'react';
import {
ERROR_GROUP_ID,
SERVICE_NAME
} from 'x-pack/plugins/apm/common/elasticsearch_fieldnames';
import { APMError } from 'x-pack/plugins/apm/typings/es_schemas/ui/APMError';
} from '../../../../../common/elasticsearch_fieldnames';
import { APMError } from '../../../../../typings/es_schemas/ui/APMError';
import { DiscoverLink } from './DiscoverLink';
function getDiscoverQuery(error: APMError, kuery?: string) {

View file

@ -5,8 +5,8 @@
*/
import React from 'react';
import { SPAN_ID } from 'x-pack/plugins/apm/common/elasticsearch_fieldnames';
import { Span } from 'x-pack/plugins/apm/typings/es_schemas/ui/Span';
import { SPAN_ID } from '../../../../../common/elasticsearch_fieldnames';
import { Span } from '../../../../../typings/es_schemas/ui/Span';
import { DiscoverLink } from './DiscoverLink';
function getDiscoverQuery(span: Span) {

View file

@ -9,8 +9,8 @@ import {
PROCESSOR_EVENT,
TRACE_ID,
TRANSACTION_ID
} from 'x-pack/plugins/apm/common/elasticsearch_fieldnames';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
} from '../../../../../common/elasticsearch_fieldnames';
import { Transaction } from '../../../../../typings/es_schemas/ui/Transaction';
import { DiscoverLink } from './DiscoverLink';
export function getDiscoverQuery(transaction: Transaction) {

View file

@ -8,7 +8,7 @@ import React, { ReactElement } from 'react';
import {
getAPMIndexPattern,
ISavedObject
} from 'x-pack/plugins/apm/public/services/rest/savedObjects';
} from '../../../../services/rest/savedObjects';
import { RisonAPMQueryParams } from '../rison_helpers';
export function getQueryWithIndexPattern(

View file

@ -7,7 +7,7 @@
import { shallow, ShallowWrapper } from 'enzyme';
import 'jest-styled-components';
import React from 'react';
import { APMError } from 'x-pack/plugins/apm/typings/es_schemas/ui/APMError';
import { APMError } from '../../../../../../typings/es_schemas/ui/APMError';
import { DiscoverErrorLink } from '../DiscoverErrorLink';
describe('DiscoverErrorLink without kuery', () => {

View file

@ -7,7 +7,7 @@
import { shallow, ShallowWrapper } from 'enzyme';
import 'jest-styled-components';
import React from 'react';
import { APMError } from 'x-pack/plugins/apm/typings/es_schemas/ui/APMError';
import { APMError } from '../../../../../../typings/es_schemas/ui/APMError';
import { DiscoverErrorLink } from '../DiscoverErrorLink';
describe('DiscoverErrorLink without kuery', () => {

View file

@ -6,11 +6,11 @@
import { Location } from 'history';
import React from 'react';
import * as savedObjects from 'x-pack/plugins/apm/public/services/rest/savedObjects';
import { getRenderedHref } from 'x-pack/plugins/apm/public/utils/testHelpers';
import { APMError } from 'x-pack/plugins/apm/typings/es_schemas/ui/APMError';
import { Span } from 'x-pack/plugins/apm/typings/es_schemas/ui/Span';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import { APMError } from '../../../../../../typings/es_schemas/ui/APMError';
import { Span } from '../../../../../../typings/es_schemas/ui/Span';
import { Transaction } from '../../../../../../typings/es_schemas/ui/Transaction';
import * as savedObjects from '../../../../../services/rest/savedObjects';
import { getRenderedHref } from '../../../../../utils/testHelpers';
import { DiscoverErrorLink } from '../DiscoverErrorLink';
import { DiscoverSpanLink } from '../DiscoverSpanLink';
import { DiscoverTransactionLink } from '../DiscoverTransactionLink';

View file

@ -7,7 +7,7 @@
import { shallow } from 'enzyme';
import 'jest-styled-components';
import React from 'react';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import { Transaction } from '../../../../../../typings/es_schemas/ui/Transaction';
import {
DiscoverTransactionLink,
getDiscoverQuery

View file

@ -5,9 +5,9 @@
*/
import 'jest-styled-components';
import { Transaction } from '../../../../../../typings/es_schemas/ui/Transaction';
// @ts-ignore
import configureStore from 'x-pack/plugins/apm/public/store/config/configureStore';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import configureStore from '../../../../../store/config/configureStore';
import { getDiscoverQuery } from '../DiscoverTransactionLink';
function getMockTransaction() {

View file

@ -8,7 +8,7 @@ import { EuiLink } from '@elastic/eui';
import { Location } from 'history';
import React from 'react';
import { connect } from 'react-redux';
import { StringMap } from 'x-pack/plugins/apm/typings/common';
import { StringMap } from '../../../../typings/common';
import { getKibanaHref, KibanaHrefArgs } from './url_helpers';
interface Props extends KibanaHrefArgs {

View file

@ -8,7 +8,7 @@ import { EuiLink } from '@elastic/eui';
import { Location } from 'history';
import React from 'react';
import { connect } from 'react-redux';
import { StringMap } from 'x-pack/plugins/apm/typings/common';
import { StringMap } from '../../../../typings/common';
import { getRisonHref, RisonHrefArgs } from './rison_helpers';
interface Props extends RisonHrefArgs {

View file

@ -7,7 +7,7 @@
import { shallow } from 'enzyme';
import { Location } from 'history';
import React from 'react';
import { getRenderedHref } from 'x-pack/plugins/apm/public/utils/testHelpers';
import { getRenderedHref } from '../../../utils/testHelpers';
import { MLJobLink } from './MLJobLink';
describe('MLJobLink', () => {

View file

@ -7,7 +7,7 @@
import { EuiLink } from '@elastic/eui';
import { Location } from 'history';
import React from 'react';
import { getMlJobId } from 'x-pack/plugins/apm/common/ml_job_constants';
import { getMlJobId } from '../../../../common/ml_job_constants';
import { getRisonHref } from './rison_helpers';
interface Props {

View file

@ -9,8 +9,8 @@ import qs from 'querystring';
import rison from 'rison-node';
import chrome from 'ui/chrome';
import url from 'url';
import { TIMEPICKER_DEFAULTS } from 'x-pack/plugins/apm/public/store/urlParams';
import { StringMap } from 'x-pack/plugins/apm/typings/common';
import { StringMap } from '../../../../typings/common';
import { TIMEPICKER_DEFAULTS } from '../../../store/urlParams';
import {
APMQueryParams,
KibanaHrefArgs,

View file

@ -10,7 +10,7 @@ import { pick } from 'lodash';
import qs from 'querystring';
import chrome from 'ui/chrome';
import url from 'url';
import { TIMEPICKER_DEFAULTS } from 'x-pack/plugins/apm/public/store/urlParams';
import { TIMEPICKER_DEFAULTS } from '../../../store/urlParams';
export function toQuery(search?: string): APMQueryParamsRaw {
return search ? qs.parse(search.slice(1)) : {};

View file

@ -7,7 +7,7 @@
import { EuiBasicTable } from '@elastic/eui';
import { sortByOrder } from 'lodash';
import React, { Component } from 'react';
import { idx } from 'x-pack/plugins/apm/common/idx';
import { idx } from '../../../../common/idx';
// TODO: this should really be imported from EUI
export interface ITableColumn<T> {

View file

@ -8,7 +8,7 @@ import theme from '@elastic/eui/dist/eui_theme_light.json';
import { isBoolean, isNumber, isObject } from 'lodash';
import React from 'react';
import styled from 'styled-components';
import { NOT_AVAILABLE_LABEL } from 'x-pack/plugins/apm/common/i18n';
import { NOT_AVAILABLE_LABEL } from '../../../../common/i18n';
import { StringMap } from '../../../../typings/common';
import { fontFamilyCode, fontSize, px, units } from '../../../style/variables';
import { sortKeysByConfig } from './tabConfig';

View file

@ -10,8 +10,8 @@ import theme from '@elastic/eui/dist/eui_theme_light.json';
import { i18n } from '@kbn/i18n';
import React from 'react';
import styled from 'styled-components';
import { AgentName } from 'x-pack/plugins/apm/typings/es_schemas/ui/fields/Agent';
import { StringMap } from '../../../../typings/common';
import { AgentName } from '../../../../typings/es_schemas/ui/fields/Agent';
import { fontSize, fontSizes, px, unit, units } from '../../../style/variables';
import { getAgentDocUrlForTab } from '../../../utils/documentation/agents';
import { NestedKeyValueTable } from './NestedKeyValueTable';

View file

@ -6,9 +6,9 @@
import { get, indexBy, uniq } from 'lodash';
import { first, has } from 'lodash';
import { StringMap } from 'x-pack/plugins/apm/typings/common';
import { APMError } from 'x-pack/plugins/apm/typings/es_schemas/ui/APMError';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import { StringMap } from '../../../../typings/common';
import { APMError } from '../../../../typings/es_schemas/ui/APMError';
import { Transaction } from '../../../../typings/es_schemas/ui/Transaction';
import {
PropertyTab,
PropertyTabKey,

View file

@ -5,8 +5,8 @@
*/
import { i18n } from '@kbn/i18n';
import { APMError } from 'x-pack/plugins/apm/typings/es_schemas/ui/APMError';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import { APMError } from '../../../../typings/es_schemas/ui/APMError';
import { Transaction } from '../../../../typings/es_schemas/ui/Transaction';
export type PropertyTabKey =
| keyof Transaction

View file

@ -22,8 +22,8 @@ import { registerLanguage } from 'react-syntax-highlighter/dist/light';
// @ts-ignore
import { xcode } from 'react-syntax-highlighter/dist/styles';
import styled from 'styled-components';
import { idx } from 'x-pack/plugins/apm/common/idx';
import { IStackframeWithLineContext } from 'x-pack/plugins/apm/typings/es_schemas/raw/fields/Stackframe';
import { idx } from '../../../../common/idx';
import { IStackframeWithLineContext } from '../../../../typings/es_schemas/raw/fields/Stackframe';
import { borderRadius, px, unit, units } from '../../../style/variables';
registerLanguage('javascript', javascript);

View file

@ -7,8 +7,8 @@
import theme from '@elastic/eui/dist/eui_theme_light.json';
import React, { Fragment } from 'react';
import styled from 'styled-components';
import { idx } from 'x-pack/plugins/apm/common/idx';
import { IStackframe } from 'x-pack/plugins/apm/typings/es_schemas/raw/fields/Stackframe';
import { idx } from '../../../../common/idx';
import { IStackframe } from '../../../../typings/es_schemas/raw/fields/Stackframe';
import { fontFamilyCode, fontSize, px, units } from '../../../style/variables';
const FileDetails = styled.div`

View file

@ -8,7 +8,7 @@ import { EuiLink, EuiSpacer } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React, { Fragment } from 'react';
import styled from 'styled-components';
import { IStackframe } from 'x-pack/plugins/apm/typings/es_schemas/raw/fields/Stackframe';
import { IStackframe } from '../../../../typings/es_schemas/raw/fields/Stackframe';
import { Ellipsis } from '../../shared/Icons';
import { Stackframe } from './Stackframe';

View file

@ -10,7 +10,7 @@ import styled from 'styled-components';
import {
IStackframe,
IStackframeWithLineContext
} from 'x-pack/plugins/apm/typings/es_schemas/raw/fields/Stackframe';
} from '../../../../typings/es_schemas/raw/fields/Stackframe';
import {
borderRadius,
fontFamilyCode,

View file

@ -8,7 +8,7 @@ import theme from '@elastic/eui/dist/eui_theme_light.json';
import { i18n } from '@kbn/i18n';
import React from 'react';
import styled from 'styled-components';
import { IStackframe } from 'x-pack/plugins/apm/typings/es_schemas/raw/fields/Stackframe';
import { IStackframe } from '../../../../typings/es_schemas/raw/fields/Stackframe';
import {
borderRadius,
fontFamily,

View file

@ -7,7 +7,7 @@
import { mount, ReactWrapper, shallow } from 'enzyme';
import 'jest-styled-components';
import React from 'react';
import { IStackframe } from 'x-pack/plugins/apm/typings/es_schemas/raw/fields/Stackframe';
import { IStackframe } from '../../../../../typings/es_schemas/raw/fields/Stackframe';
import { Stackframe } from '../Stackframe';
import stacktracesMock from './stacktraces.json';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { IStackframe } from 'x-pack/plugins/apm/typings/es_schemas/raw/fields/Stackframe';
import { IStackframe } from '../../../../../typings/es_schemas/raw/fields/Stackframe';
import { getGroupedStackframes } from '../index';
import stacktracesMock from './stacktraces.json';

View file

@ -8,7 +8,7 @@ import { EuiSpacer } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { isEmpty, last } from 'lodash';
import React, { Fragment } from 'react';
import { IStackframe } from 'x-pack/plugins/apm/typings/es_schemas/raw/fields/Stackframe';
import { IStackframe } from '../../../../typings/es_schemas/raw/fields/Stackframe';
import { EmptyMessage } from '../../shared/EmptyMessage';
import { LibraryStackFrames } from './LibraryStackFrames';
import { Stackframe } from './Stackframe';

View file

@ -10,7 +10,7 @@ import theme from '@elastic/eui/dist/eui_theme_light.json';
import moment from 'moment';
import React from 'react';
import styled from 'styled-components';
import { NOT_AVAILABLE_LABEL } from 'x-pack/plugins/apm/common/i18n';
import { NOT_AVAILABLE_LABEL } from '../../../../common/i18n';
import {
fontFamilyCode,
fontSizes,

View file

@ -17,12 +17,12 @@ import {
import { i18n } from '@kbn/i18n';
import { Location } from 'history';
import React from 'react';
import { idx } from 'x-pack/plugins/apm/common/idx';
import { getRisonHref } from 'x-pack/plugins/apm/public/components/shared/Links/rison_helpers';
import { StringMap } from 'x-pack/plugins/apm/typings/common';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import { idx } from '../../../../common/idx';
import { StringMap } from '../../../../typings/common';
import { Transaction } from '../../../../typings/es_schemas/ui/Transaction';
import { getDiscoverQuery } from '../Links/DiscoverLinks/DiscoverTransactionLink';
import { QueryWithIndexPattern } from '../Links/DiscoverLinks/QueryWithIndexPattern';
import { getRisonHref } from '../Links/rison_helpers';
function getInfraMetricsQuery(transaction: Transaction) {
const plus5 = new Date(transaction['@timestamp']);

View file

@ -5,7 +5,7 @@
*/
import { Location } from 'history';
import { Transaction } from 'x-pack/plugins/apm/typings/es_schemas/ui/Transaction';
import { Transaction } from '../../../../../typings/es_schemas/ui/Transaction';
export const transaction: Transaction = {
'@metadata': 'whatever',

View file

@ -6,10 +6,7 @@
import React from 'react';
import { RouteComponentProps, withRouter } from 'react-router-dom';
import {
fromQuery,
toQuery
} from 'x-pack/plugins/apm/public/components/shared/Links/url_helpers';
import { fromQuery, toQuery } from '../../Links/url_helpers';
export interface RangeSelection {
start: number;

View file

@ -17,12 +17,12 @@ import { i18n } from '@kbn/i18n';
import { Location } from 'history';
import React, { Component } from 'react';
import styled from 'styled-components';
import { MLJobLink } from 'x-pack/plugins/apm/public/components/shared/Links/MLJobLink';
import { ITransactionChartData } from 'x-pack/plugins/apm/public/store/selectors/chartSelectors';
import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams';
import { Coordinate } from 'x-pack/plugins/apm/typings/timeseries';
import { Coordinate } from '../../../../../typings/timeseries';
import { ITransactionChartData } from '../../../../store/selectors/chartSelectors';
import { IUrlParams } from '../../../../store/urlParams';
import { asInteger, asMillis, tpmUnit } from '../../../../utils/formatters';
import { LicenseContext } from '../../../app/Main/LicenseCheck';
import { MLJobLink } from '../../Links/MLJobLink';
// @ts-ignore
import CustomPlot from '../CustomPlot';
import { SyncChartGroup } from '../SyncChartGroup';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { StringMap } from 'x-pack/plugins/apm/typings/common';
import { StringMap } from '../../../typings/common';
export class SessionStorageMock {
private store: StringMap = {};

View file

@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { ErrorDistributionAPIResponse } from 'x-pack/plugins/apm/server/lib/errors/distribution/get_distribution';
import { ErrorGroupAPIResponse } from 'x-pack/plugins/apm/server/lib/errors/get_error_group';
import { ErrorGroupListAPIResponse } from 'x-pack/plugins/apm/server/lib/errors/get_error_groups';
import { ErrorDistributionAPIResponse } from '../../../../server/lib/errors/distribution/get_distribution';
import { ErrorGroupAPIResponse } from '../../../../server/lib/errors/get_error_group';
import { ErrorGroupListAPIResponse } from '../../../../server/lib/errors/get_error_groups';
import { MissingArgumentsError } from '../../../hooks/useFetcher';
import { IUrlParams } from '../../../store/urlParams';
import { callApi } from '../callApi';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { MetricsChartAPIResponse } from 'x-pack/plugins/apm/server/lib/metrics/get_all_metrics_chart_data';
import { MetricsChartAPIResponse } from '../../../../server/lib/metrics/get_all_metrics_chart_data';
import { IUrlParams } from '../../../store/urlParams';
import { callApi } from '../callApi';
import { getEncodedEsQuery } from './apm';

View file

@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { ServiceAPIResponse } from 'x-pack/plugins/apm/server/lib/services/get_service';
import { ServiceListAPIResponse } from 'x-pack/plugins/apm/server/lib/services/get_services';
import { ServiceAPIResponse } from '../../../../server/lib/services/get_service';
import { ServiceListAPIResponse } from '../../../../server/lib/services/get_services';
import { MissingArgumentsError } from '../../../hooks/useFetcher';
import { IUrlParams } from '../../../store/urlParams';
import { callApi } from '../callApi';

View file

@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { TraceListAPIResponse } from 'x-pack/plugins/apm/server/lib/traces/get_top_traces';
import { TraceAPIResponse } from 'x-pack/plugins/apm/server/lib/traces/get_trace';
import { TraceListAPIResponse } from '../../../../server/lib/traces/get_top_traces';
import { TraceAPIResponse } from '../../../../server/lib/traces/get_trace';
import { MissingArgumentsError } from '../../../hooks/useFetcher';
import { IUrlParams } from '../../../store/urlParams';
import { callApi } from '../callApi';

View file

@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { TimeSeriesAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/charts';
import { ITransactionDistributionAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/distribution';
import { TransactionListAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/get_top_transactions';
import { TimeSeriesAPIResponse } from '../../../../server/lib/transactions/charts';
import { ITransactionDistributionAPIResponse } from '../../../../server/lib/transactions/distribution';
import { TransactionListAPIResponse } from '../../../../server/lib/transactions/get_top_transactions';
import { MissingArgumentsError } from '../../../hooks/useFetcher';
import { IUrlParams } from '../../../store/urlParams';
import { callApi } from '../callApi';

View file

@ -6,15 +6,12 @@
import { ESFilter } from 'elasticsearch';
import chrome from 'ui/chrome';
import {
getMlJobId,
getMlPrefix
} from 'x-pack/plugins/apm/common/ml_job_constants';
import {
PROCESSOR_EVENT,
SERVICE_NAME,
TRANSACTION_TYPE
} from '../../../common/elasticsearch_fieldnames';
import { getMlJobId, getMlPrefix } from '../../../common/ml_job_constants';
import { callApi } from './callApi';
interface MlResponseItem {

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { StringMap } from 'x-pack/plugins/apm/typings/common';
import { StringMap } from '../../../typings/common';
import { callApi } from './callApi';
export interface LicenseApiResponse {

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { ApmTimeSeriesResponse } from 'x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform';
import { ApmTimeSeriesResponse } from '../../../../server/lib/transactions/charts/get_timeseries_data/transform';
import {
getAnomalyScoreSeries,
getResponseTimeSeries,

View file

@ -10,15 +10,12 @@ import d3 from 'd3';
import { difference, memoize, zipObject } from 'lodash';
import mean from 'lodash.mean';
import { rgba } from 'polished';
import { MetricsChartAPIResponse } from 'x-pack/plugins/apm/server/lib/metrics/get_all_metrics_chart_data';
import { TimeSeriesAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/charts';
import { AnomalyTimeSeriesResponse } from 'x-pack/plugins/apm/server/lib/transactions/charts/get_anomaly_data/transform';
import { ApmTimeSeriesResponse } from 'x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform';
import { StringMap } from 'x-pack/plugins/apm/typings/common';
import {
Coordinate,
RectCoordinate
} from 'x-pack/plugins/apm/typings/timeseries';
import { MetricsChartAPIResponse } from '../../../server/lib/metrics/get_all_metrics_chart_data';
import { TimeSeriesAPIResponse } from '../../../server/lib/transactions/charts';
import { AnomalyTimeSeriesResponse } from '../../../server/lib/transactions/charts/get_anomaly_data/transform';
import { ApmTimeSeriesResponse } from '../../../server/lib/transactions/charts/get_timeseries_data/transform';
import { StringMap } from '../../../typings/common';
import { Coordinate, RectCoordinate } from '../../../typings/timeseries';
import {
asDecimal,
asMillis,

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { AgentName } from 'x-pack/plugins/apm/typings/es_schemas/ui/fields/Agent';
import { AgentName } from '../../../typings/es_schemas/ui/fields/Agent';
import { PropertyTabKey } from '../../components/shared/PropertiesTable/tabConfig';
const AGENT_URL_ROOT = 'https://www.elastic.co/guide/en/apm/agent';

View file

@ -7,7 +7,7 @@
import numeral from '@elastic/numeral';
import { i18n } from '@kbn/i18n';
import { memoize } from 'lodash';
import { NOT_AVAILABLE_LABEL } from 'x-pack/plugins/apm/common/i18n';
import { NOT_AVAILABLE_LABEL } from '../../common/i18n';
const SECONDS_CUT_OFF = 10 * 1000000; // 10 seconds (in microseconds)
const MILLISECONDS_CUT_OFF = 10 * 1000; // 10 milliseconds (in microseconds)

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