updating paths

This commit is contained in:
James Gowdy 2019-11-22 14:57:08 +00:00 committed by Walter Rafelsberger
parent bce53ab2b3
commit 9191d334c0
240 changed files with 428 additions and 415 deletions

View file

@ -167,7 +167,6 @@ export const TEMPORARILY_IGNORED_PATHS = [
'x-pack/legacy/plugins/index_management/public/lib/editSettings.js',
'x-pack/legacy/plugins/license_management/public/store/reducers/licenseManagement.js',
'x-pack/legacy/plugins/monitoring/public/components/sparkline/__mocks__/plugins/xpack_main/jquery_flot.js',
'x-pack/legacy/plugins/ml/public/jobs/new_job/simple/components/watcher/email-influencers.html',
'x-pack/legacy/plugins/monitoring/public/icons/alert-blue.svg',
'x-pack/legacy/plugins/monitoring/public/icons/health-gray.svg',
'x-pack/legacy/plugins/monitoring/public/icons/health-green.svg',

View file

@ -23,7 +23,7 @@ By default, this will also set the password for native realm accounts to the pas
Examples:
- Run the jest test case whose description matches 'filtering should skip values of null':
`cd x-pack && yarn test:jest -t 'filtering should skip values of null' plugins/ml/public/explorer/explorer_charts/explorer_charts_container_service.test.js`
`cd x-pack && yarn test:jest -t 'filtering should skip values of null' plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.test.js`
- Run the x-pack api integration test case whose description matches the given string:
`node scripts/functional_tests_server --config x-pack/test/api_integration/config.js`
`node scripts/functional_test_runner --config x-pack/test/api_integration/config.js --grep='apis Monitoring Beats list with restarted beat instance should load multiple clusters'`

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { SavedObjectAttributes } from 'src/core/server/types';
import { Datafeed, Job } from '../../public/jobs/new_job/common/job_creator/configs';
import { Datafeed, Job } from '../../public/application/jobs/new_job/common/job_creator/configs';
export interface ModuleJob {
id: string;

View file

@ -12,7 +12,7 @@ import numeral from '@elastic/numeral';
import { ALLOWED_DATA_UNITS, JOB_ID_MAX_LENGTH } from '../constants/validation';
import { parseInterval } from './parse_interval';
import { maxLengthValidator } from './validators';
import { CREATED_BY_LABEL } from '../../public/jobs/new_job/common/job_creator/util/constants';
import { CREATED_BY_LABEL } from '../../public/application/jobs/new_job/common/job_creator/util/constants';
// work out the default frequency based on the bucket_span in seconds
export function calculateDatafeedFrequencyDefaultSeconds(bucketSpanSeconds) {

View file

@ -28,7 +28,7 @@ export const ml = (kibana: any) => {
publicDir: resolve(__dirname, 'public'),
uiExports: {
managementSections: ['plugins/ml/management'],
managementSections: ['plugins/ml/application/management'],
app: {
title: i18n.translate('xpack.ml.mlNavTitle', {
defaultMessage: 'Machine Learning',
@ -36,12 +36,12 @@ export const ml = (kibana: any) => {
description: i18n.translate('xpack.ml.mlNavDescription', {
defaultMessage: 'Machine Learning for the Elastic Stack',
}),
icon: 'plugins/ml/ml.svg',
icon: 'plugins/ml/application/ml.svg',
euiIconType: 'machineLearningApp',
main: 'plugins/ml/app',
main: 'plugins/ml/application/app',
},
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
hacks: ['plugins/ml/hacks/toggle_app_link_in_nav'],
hacks: ['plugins/ml/application/hacks/toggle_app_link_in_nav'],
savedObjectSchemas: {
'ml-telemetry': {
isNamespaceAgnostic: true,

View file

@ -12,17 +12,17 @@ import 'ui/autoload/all';
// needed to make syntax highlighting work in ace editors
import 'ace';
import 'plugins/ml/access_denied';
import 'plugins/ml/jobs';
import 'plugins/ml/overview';
import 'plugins/ml/services/calendar_service';
import 'plugins/ml/data_frame_analytics';
import 'plugins/ml/datavisualizer';
import 'plugins/ml/explorer';
import 'plugins/ml/timeseriesexplorer';
import 'plugins/ml/components/navigation_menu';
import 'plugins/ml/components/loading_indicator';
import 'plugins/ml/settings';
import './access_denied';
import './jobs';
import './overview';
import './services/calendar_service';
import './data_frame_analytics';
import './datavisualizer';
import './explorer';
import './timeseriesexplorer';
import './components/navigation_menu';
import './components/loading_indicator';
import './settings';
import uiRoutes from 'ui/routes';

View file

@ -14,7 +14,7 @@ import React from 'react';
import { EuiDescriptionList } from '@elastic/eui';
import { InjectedIntl, injectI18n } from '@kbn/i18n/react';
import { Annotation } from '../../../../common/types/annotations';
import { Annotation } from '../../../../../common/types/annotations';
import { formatHumanReadableDateTimeSeconds } from '../../../util/date_utils';
interface Props {

View file

@ -10,7 +10,7 @@ import mockAnnotations from '../annotations_table/__mocks__/mock_annotations.jso
import React, { ComponentType } from 'react';
import { mountWithIntl, shallowWithIntl } from 'test_utils/enzyme_helpers';
import { Annotation } from '../../../../common/types/annotations';
import { Annotation } from '../../../../../common/types/annotations';
import { annotation$ } from '../../../services/annotations_service';
import { AnnotationFlyout } from './index';

View file

@ -26,7 +26,7 @@ import { CommonProps } from '@elastic/eui';
import { FormattedMessage, injectI18n } from '@kbn/i18n/react';
import { InjectedIntlProps } from 'react-intl';
import { toastNotifications } from 'ui/notify';
import { ANNOTATION_MAX_LENGTH_CHARS } from '../../../../common/constants/annotations';
import { ANNOTATION_MAX_LENGTH_CHARS } from '../../../../../common/constants/annotations';
import {
annotation$,
annotationsRefresh$,

View file

@ -41,8 +41,8 @@ import { addItemToRecentlyAccessed } from '../../../util/recently_accessed';
import { ml } from '../../../services/ml_api_service';
import { mlJobService } from '../../../services/job_service';
import { mlTableService } from '../../../services/table_service';
import { ANNOTATIONS_TABLE_DEFAULT_QUERY_SIZE } from '../../../../common/constants/search';
import { getLatestDataOrBucketTimestamp, isTimeSeriesViewJob } from '../../../../common/util/job_utils';
import { ANNOTATIONS_TABLE_DEFAULT_QUERY_SIZE } from '../../../../../common/constants/search';
import { getLatestDataOrBucketTimestamp, isTimeSeriesViewJob } from '../../../../../common/util/job_utils';
import { annotation$, annotationsRefresh$ } from '../../../services/annotations_service';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import jobConfig from '../../../../common/types/__mocks__/job_config_farequote';
import jobConfig from '../../../../../common/types/__mocks__/job_config_farequote';
import mockAnnotations from './__mocks__/mock_annotations.json';
import './annotations_table.test.mocks';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { chromeServiceMock } from '../../../../../../../../src/core/public/mocks';
import { chromeServiceMock } from '../../../../../../../../../src/core/public/mocks';
jest.doMock('ui/new_platform', () => ({
npStart: {

View file

@ -30,7 +30,7 @@ import { getColumns } from './anomalies_table_columns';
import { AnomalyDetails } from './anomaly_details';
import { mlTableService } from '../../services/table_service';
import { RuleEditorFlyout } from '../../components/rule_editor';
import { RuleEditorFlyout } from '../rule_editor';
import { ml } from '../../services/ml_api_service';
import {
INFLUENCERS_LIMIT,

View file

@ -30,7 +30,7 @@ import { InfluencersCell } from './influencers_cell';
import { LinksMenu } from './links_menu';
import { checkPermission } from '../../privilege/check_privilege';
import { mlFieldFormatService } from '../../services/field_format_service';
import { isRuleSupported } from '../../../common/util/anomaly_utils';
import { isRuleSupported } from '../../../../common/util/anomaly_utils';
import { formatValue } from '../../formatters/format_value';
import {
INFLUENCERS_LIMIT,

View file

@ -35,8 +35,8 @@ import {
getSeverity,
showActualForFunction,
showTypicalForFunction,
} from '../../../common/util/anomaly_utils';
import { MULTI_BUCKET_IMPACT } from '../../../common/constants/multi_bucket_impact';
} from '../../../../common/util/anomaly_utils';
import { MULTI_BUCKET_IMPACT } from '../../../../common/constants/multi_bucket_impact';
import { formatValue } from '../../formatters/format_value';
import { MAX_CHARS } from './anomalies_table_constants';

View file

@ -22,11 +22,11 @@ import { injectI18n, FormattedMessage } from '@kbn/i18n/react';
import chrome from 'ui/chrome';
import { toastNotifications } from 'ui/notify';
import { ES_FIELD_TYPES } from '../../../../../../../src/plugins/data/public';
import { ES_FIELD_TYPES } from '../../../../../../../../src/plugins/data/public';
import { checkPermission } from '../../privilege/check_privilege';
import { SEARCH_QUERY_LANGUAGE } from '../../../common/constants/search';
import { isRuleSupported } from '../../../common/util/anomaly_utils';
import { parseInterval } from '../../../common/util/parse_interval';
import { SEARCH_QUERY_LANGUAGE } from '../../../../common/constants/search';
import { isRuleSupported } from '../../../../common/util/anomaly_utils';
import { parseInterval } from '../../../../common/util/parse_interval';
import { escapeDoubleQuotes } from '../kql_filter_bar/utils';
import { getFieldTypeFromMapping } from '../../services/mapping_service';
import { ml } from '../../services/ml_api_service';

View file

@ -6,8 +6,8 @@
import React, { FC, memo } from 'react';
import { EuiHealth, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { MULTI_BUCKET_IMPACT } from '../../../../common/constants/multi_bucket_impact';
import { getSeverityColor } from '../../../../common/util/anomaly_utils';
import { MULTI_BUCKET_IMPACT } from '../../../../../common/constants/multi_bucket_impact';
import { getSeverityColor } from '../../../../../common/util/anomaly_utils';
interface SeverityCellProps {
/**

View file

@ -10,7 +10,7 @@ import { TooltipValueFormatter } from '@elastic/charts';
// TODO: Below import is temporary, use `react-use` lib instead.
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { useObservable } from '../../../../../../../src/plugins/kibana_react/public/util/use_observable';
import { useObservable } from '../../../../../../../../src/plugins/kibana_react/public/util/use_observable';
import { chartTooltip$, ChartTooltipValue } from './chart_tooltip_service';

View file

@ -22,7 +22,7 @@ import {
EuiText,
} from '@elastic/eui';
import { getSeverityColor } from '../../../../common/util/anomaly_utils';
import { getSeverityColor } from '../../../../../common/util/anomaly_utils';
import { injectObservablesAsProps } from '../../../util/observable_utils';
const warningLabel = i18n.translate('xpack.ml.controls.selectSeverity.warningLabel', { defaultMessage: 'warning' });

View file

@ -11,7 +11,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { RecognizedResult } from './recognized_result';
import { ml } from 'plugins/ml/services/ml_api_service';
import { ml } from '../../services/ml_api_service';
export class DataRecognizer extends Component {
constructor(props) {

View file

@ -12,7 +12,7 @@ import { EuiToolTip } from '@elastic/eui';
// don't use something like plugins/ml/../common
// because it won't work with the jest tests
import { getMLJobTypeAriaLabel } from '../../util/field_types_utils';
import { ML_JOB_FIELD_TYPES } from '../../../common/constants/field_types';
import { ML_JOB_FIELD_TYPES } from '../../../../common/constants/field_types';
import { i18n } from '@kbn/i18n';
export const FieldTypeIcon = ({ tooltipEnabled = false, type, needsAria = true }) => {

View file

@ -8,7 +8,7 @@ import React from 'react';
import { mount, shallow } from 'enzyme';
import { FieldTypeIcon } from './field_type_icon';
import { ML_JOB_FIELD_TYPES } from '../../../common/constants/field_types';
import { ML_JOB_FIELD_TYPES } from '../../../../common/constants/field_types';
describe('FieldTypeIcon', () => {

View file

@ -22,8 +22,8 @@ import {
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { abbreviateWholeNumber } from 'plugins/ml/formatters/abbreviate_whole_number';
import { getSeverity } from 'plugins/ml/../common/util/anomaly_utils';
import { abbreviateWholeNumber } from '../../formatters/abbreviate_whole_number';
import { getSeverity } from '../../../../common/util/anomaly_utils';
import { EntityCell } from '../entity_cell';

View file

@ -7,7 +7,7 @@
import React, { FC } from 'react';
import { EuiIcon, EuiToolTip } from '@elastic/eui';
import { AuditMessageBase } from '../../../common/types/audit_message';
import { AuditMessageBase } from '../../../../common/types/audit_message';
interface Props {
message: AuditMessageBase;

View file

@ -12,7 +12,7 @@ import { formatDate } from '@elastic/eui/lib/services/format';
import { i18n } from '@kbn/i18n';
import theme from '@elastic/eui/dist/eui_theme_light.json';
import { JobMessage } from '../../../common/types/audit_message';
import { JobMessage } from '../../../../common/types/audit_message';
import { JobIcon } from '../job_message_icon';
const TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss';

View file

@ -10,7 +10,7 @@ import { PropTypes } from 'prop-types';
import moment from 'moment';
import { ml } from '../../services/ml_api_service';
import { JobSelectorTable } from './job_selector_table/';
import { JobSelectorTable } from './job_selector_table';
import { IdBadges } from './id_badges';
import { NewSelectionIdBadges } from './new_selection_id_badges';
import { timefilter } from 'ui/timefilter';

View file

@ -9,7 +9,7 @@
import React from 'react';
import { PropTypes } from 'prop-types';
import { EuiBadge } from '@elastic/eui';
import { tabColor } from '../../../../common/util/group_color_utils';
import { tabColor } from '../../../../../common/util/group_color_utils';
import { i18n } from '@kbn/i18n';
export function JobSelectorBadge({

View file

@ -10,7 +10,7 @@ import React, { Fragment, useState, useEffect } from 'react';
import { PropTypes } from 'prop-types';
import { CustomSelectionTable } from '../custom_selection_table';
import { JobSelectorBadge } from '../job_selector_badge';
import { TimeRangeBar } from '../timerange_bar/';
import { TimeRangeBar } from '../timerange_bar';
import {
EuiFlexGroup,

View file

@ -16,7 +16,7 @@ import { EuiCallOut } from '@elastic/eui';
// don't use something like plugins/ml/../common
// because it won't work with the jest tests
import { MESSAGE_LEVEL } from '../../../common/constants/message_levels';
import { MESSAGE_LEVEL } from '../../../../common/constants/message_levels';
function getCallOutAttributes(message, status) {

View file

@ -16,7 +16,7 @@ import {
APPLIES_TO,
OPERATOR,
FILTER_TYPE,
} from '../../../../common/constants/detector_rule';
} from '../../../../../common/constants/detector_rule';
describe('ML - rule editor utils', () => {

View file

@ -21,7 +21,7 @@ import {
EuiText,
} from '@elastic/eui';
import { ACTION } from '../../../common/constants/detector_rule';
import { ACTION } from '../../../../common/constants/detector_rule';
import { FormattedMessage } from '@kbn/i18n/react';
export function ActionsSection({

View file

@ -9,7 +9,7 @@ import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import React from 'react';
import { ActionsSection } from './actions_section';
import { ACTION } from '../../../common/constants/detector_rule';
import { ACTION } from '../../../../common/constants/detector_rule';
describe('ActionsSection', () => {

View file

@ -25,7 +25,7 @@ import {
EuiFieldNumber,
} from '@elastic/eui';
import { APPLIES_TO, OPERATOR } from '../../../common/constants/detector_rule';
import { APPLIES_TO, OPERATOR } from '../../../../common/constants/detector_rule';
import { appliesToText, operatorToText } from './utils';
import { FormattedMessage, injectI18n } from '@kbn/i18n/react';

View file

@ -11,7 +11,7 @@ import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import React from 'react';
import { ConditionExpression } from './condition_expression';
import { APPLIES_TO, OPERATOR } from '../../../common/constants/detector_rule';
import { APPLIES_TO, OPERATOR } from '../../../../common/constants/detector_rule';
describe('ConditionExpression', () => {

View file

@ -12,7 +12,7 @@ import React from 'react';
import { ConditionsSection } from './conditions_section';
import { getNewConditionDefaults } from './utils';
import { APPLIES_TO, OPERATOR } from '../../../common/constants/detector_rule';
import { APPLIES_TO, OPERATOR } from '../../../../common/constants/detector_rule';
describe('ConditionsSectionExpression', () => {

View file

@ -47,8 +47,8 @@ import {
addItemToFilter,
} from './utils';
import { ACTION, CONDITIONS_NOT_SUPPORTED_FUNCTIONS } from '../../../common/constants/detector_rule';
import { getPartitioningFieldNames } from '../../../common/util/job_utils';
import { ACTION, CONDITIONS_NOT_SUPPORTED_FUNCTIONS } from '../../../../common/constants/detector_rule';
import { getPartitioningFieldNames } from '../../../../common/util/job_utils';
import { mlJobService } from '../../services/job_service';
import { ml } from '../../services/ml_api_service';
import { metadata } from 'ui/metadata';

View file

@ -24,7 +24,7 @@ import {
EuiSelect,
} from '@elastic/eui';
import { FILTER_TYPE } from '../../../common/constants/detector_rule';
import { FILTER_TYPE } from '../../../../common/constants/detector_rule';
import { filterTypeToText } from './utils';
import { FormattedMessage } from '@kbn/i18n/react';

View file

@ -12,7 +12,7 @@ import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import React from 'react';
import { ScopeExpression } from './scope_expression';
import { FILTER_TYPE } from '../../../common/constants/detector_rule';
import { FILTER_TYPE } from '../../../../common/constants/detector_rule';
describe('ScopeExpression', () => {

View file

@ -20,7 +20,7 @@ import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import React from 'react';
import { ScopeSection } from './scope_section';
import { FILTER_TYPE } from '../../../common/constants/detector_rule';
import { FILTER_TYPE } from '../../../../common/constants/detector_rule';
describe('ScopeSection', () => {

View file

@ -23,7 +23,7 @@ import {
EuiText,
} from '@elastic/eui';
import { APPLIES_TO } from '../../../../common/constants/detector_rule';
import { APPLIES_TO } from '../../../../../common/constants/detector_rule';
import { formatValue } from '../../../formatters/format_value';
import {
getAppliesToValueFromAnomaly,

View file

@ -10,7 +10,7 @@ import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import React from 'react';
import { EditConditionLink } from './edit_condition_link';
import { APPLIES_TO } from '../../../../common/constants/detector_rule';
import { APPLIES_TO } from '../../../../../common/constants/detector_rule';
function prepareTest(updateConditionValueFn, appliesTo) {

View file

@ -32,7 +32,7 @@ import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import React from 'react';
import { RuleActionPanel } from './rule_action_panel';
import { ACTION } from '../../../../common/constants/detector_rule';
import { ACTION } from '../../../../../common/constants/detector_rule';
describe('RuleActionPanel', () => {

View file

@ -4,13 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { ACTION, APPLIES_TO, FILTER_TYPE, OPERATOR } from '../../../common/constants/detector_rule';
import { ACTION, APPLIES_TO, FILTER_TYPE, OPERATOR } from '../../../../common/constants/detector_rule';
import { cloneDeep } from 'lodash';
import { ml } from '../../services/ml_api_service';
import { mlJobService } from '../../services/job_service';
import { i18n } from '@kbn/i18n';
import { processCreatedBy } from '../../../common/util/job_utils';
import { processCreatedBy } from '../../../../common/util/job_utils';
export function getNewConditionDefaults() {
return {

View file

@ -37,8 +37,8 @@ const jobTipsUrl = `https://www.elastic.co/guide/en/kibana/${metadata.branch}/jo
// don't use something like plugins/ml/../common
// because it won't work with the jest tests
import { VALIDATION_STATUS } from '../../../common/constants/validation';
import { getMostSevereMessageStatus } from '../../../common/util/validation_utils';
import { VALIDATION_STATUS } from '../../../../common/constants/validation';
import { getMostSevereMessageStatus } from '../../../../common/util/validation_utils';
const defaultIconType = 'questionInCircle';
const getDefaultState = () => ({

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { searchSourceMock } from '../../../../../../../../src/legacy/ui/public/courier/search_source/mocks';
import { searchSourceMock } from '../../../../../../../../../src/legacy/ui/public/courier/search_source/mocks';
export const savedSearchMock = {
id: 'the-saved-search-id',

View file

@ -6,7 +6,7 @@
import { i18n } from '@kbn/i18n';
import { ML_BREADCRUMB } from '../breadcrumbs';
import { ML_BREADCRUMB } from '../../breadcrumbs';
export function getDataFrameAnalyticsBreadcrumbs() {
return [

View file

@ -11,7 +11,7 @@ import { Subscription } from 'rxjs';
import { idx } from '@kbn/elastic-idx';
import { cloneDeep } from 'lodash';
import { ml } from '../../services/ml_api_service';
import { Dictionary } from '../../../common/types/common';
import { Dictionary } from '../../../../common/types/common';
import { getErrorMessage } from '../pages/analytics_management/hooks/use_create_analytics_form';
import { SavedSearchQuery } from '../../contexts/kibana';

View file

@ -14,7 +14,7 @@ const module = uiModules.get('apps/ml', ['react']);
import { IndexPatterns } from 'ui/index_patterns';
import { I18nContext } from 'ui/i18n';
import { InjectorService } from '../../../../common/types/angular';
import { InjectorService } from '../../../../../common/types/angular';
import { createSearchItems } from '../../../jobs/new_job/utils/new_job_utils';
import { KibanaConfigTypeFix, KibanaContext } from '../../../contexts/kibana';

View file

@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n';
import { ml } from '../../../../../services/ml_api_service';
import { useRefreshAnalyticsList } from '../../../../common';
import { JobMessages } from '../../../../../components/job_messages';
import { JobMessage } from '../../../../../../common/types/audit_message';
import { JobMessage } from '../../../../../../../common/types/audit_message';
interface Props {
analyticsId: string;

View file

@ -11,7 +11,7 @@ import { timefilter } from 'ui/timefilter';
import {
DEFAULT_REFRESH_INTERVAL_MS,
MINIMUM_REFRESH_INTERVAL_MS,
} from '../../../../../../common/constants/jobs_list';
} from '../../../../../../../common/constants/jobs_list';
import { useRefreshAnalyticsList } from '../../../../common';

View file

@ -6,7 +6,7 @@
import { mount } from 'enzyme';
import React from 'react';
import { mountHook } from '../../../../../../../../../test_utils/enzyme_helpers';
import { mountHook } from '../../../../../../../../../../test_utils/enzyme_helpers';
import { CreateAnalyticsButton } from './create_analytics_button';

View file

@ -6,7 +6,7 @@
import { mount } from 'enzyme';
import React from 'react';
import { mountHook } from '../../../../../../../../../test_utils/enzyme_helpers';
import { mountHook } from '../../../../../../../../../../test_utils/enzyme_helpers';
import { CreateAnalyticsFlyout } from './create_analytics_flyout';

View file

@ -6,7 +6,7 @@
import { mount } from 'enzyme';
import React from 'react';
import { mountHook } from '../../../../../../../../../test_utils/enzyme_helpers';
import { mountHook } from '../../../../../../../../../../test_utils/enzyme_helpers';
import { CreateAnalyticsForm } from './create_analytics_form';

View file

@ -22,7 +22,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
import { metadata } from 'ui/metadata';
import { IndexPattern, INDEX_PATTERN_ILLEGAL_CHARACTERS } from 'ui/index_patterns';
import { ml } from '../../../../../services/ml_api_service';
import { Field, EVENT_RATE_FIELD_ID } from '../../../../../../common/types/fields';
import { Field, EVENT_RATE_FIELD_ID } from '../../../../../../../common/types/fields';
import { newJobCapsService } from '../../../../../services/new_job_capabilities_service';
import { useKibanaContext } from '../../../../../contexts/kibana';
@ -32,7 +32,7 @@ import {
DEFAULT_MODEL_MEMORY_LIMIT,
getJobConfigFromFormState,
} from '../../hooks/use_create_analytics_form/state';
import { JOB_ID_MAX_LENGTH } from '../../../../../../common/constants/validation';
import { JOB_ID_MAX_LENGTH } from '../../../../../../../common/constants/validation';
import { Messages } from './messages';
import { JobType } from './job_type';
import { mmlUnitInvalidErrorMessage } from '../../hooks/use_create_analytics_form/reducer';

View file

@ -13,7 +13,7 @@ const module = uiModules.get('apps/ml', ['react']);
import { IndexPatterns } from 'ui/index_patterns';
import { I18nContext } from 'ui/i18n';
import { InjectorService } from '../../../../common/types/angular';
import { InjectorService } from '../../../../../common/types/angular';
import { createSearchItems } from '../../../jobs/new_job/utils/new_job_utils';
import { KibanaConfigTypeFix, KibanaContext } from '../../../contexts/kibana';

View file

@ -9,19 +9,19 @@ import { i18n } from '@kbn/i18n';
import { validateIndexPattern } from 'ui/index_patterns';
import { isValidIndexName } from '../../../../../../common/util/es_utils';
import { isValidIndexName } from '../../../../../../../common/util/es_utils';
import { Action, ACTION } from './actions';
import { getInitialState, getJobConfigFromFormState, State, JOB_TYPES } from './state';
import {
isJobIdValid,
validateModelMemoryLimitUnits,
} from '../../../../../../common/util/job_utils';
import { maxLengthValidator } from '../../../../../../common/util/validators';
} from '../../../../../../../common/util/job_utils';
import { maxLengthValidator } from '../../../../../../../common/util/validators';
import {
JOB_ID_MAX_LENGTH,
ALLOWED_DATA_UNITS,
} from '../../../../../../common/constants/validation';
} from '../../../../../../../common/constants/validation';
import { getDependentVar, isRegressionAnalysis } from '../../../../common/analytics';
const mmlAllowedUnitsStr = `${ALLOWED_DATA_UNITS.slice(0, ALLOWED_DATA_UNITS.length - 1).join(

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { DeepPartial } from '../../../../../../common/types/common';
import { DeepPartial } from '../../../../../../../common/types/common';
import { checkPermission } from '../../../../../privilege/check_privilege';
import { mlNodesAvailable } from '../../../../../ml_nodes_check/check_ml_nodes';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { ML_BREADCRUMB, DATA_VISUALIZER_BREADCRUMB } from '../breadcrumbs';
import { ML_BREADCRUMB, DATA_VISUALIZER_BREADCRUMB } from '../../breadcrumbs';
export function getDataVisualizerBreadcrumbs() {
// Whilst top level nav menu with tabs remains,

View file

@ -5,7 +5,7 @@
*/
import { i18n } from '@kbn/i18n';
import { ML_BREADCRUMB, DATA_VISUALIZER_BREADCRUMB } from '../../breadcrumbs';
import { ML_BREADCRUMB, DATA_VISUALIZER_BREADCRUMB } from '../../../breadcrumbs';
export function getFileDataVisualizerBreadcrumbs() {
// Whilst top level nav menu with tabs remains,

View file

@ -11,7 +11,7 @@ import React, {
import { FieldStatsCard } from './field_stats_card';
import { getFieldNames } from './get_field_names';
import { ML_JOB_FIELD_TYPES } from '../../../../../common/constants/field_types';
import { ML_JOB_FIELD_TYPES } from '../../../../../../common/constants/field_types';
import { roundToDecimalPlace } from '../../../../formatters/round_to_decimal_place';
export class FieldsStats extends Component {

View file

@ -23,7 +23,7 @@ import { ResultsView } from '../results_view';
import { FileCouldNotBeRead, FileTooLarge } from './file_error_callouts';
import { EditFlyout } from '../edit_flyout';
import { ImportView } from '../import_view';
import { MAX_BYTES } from '../../../../../common/constants/file_datavisualizer';
import { MAX_BYTES } from '../../../../../../common/constants/file_datavisualizer';
import {
readFile,
createUrlOverrides,

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { ES_FIELD_TYPES } from '../../../../../../../../../../src/plugins/data/public';
import { ES_FIELD_TYPES } from '../../../../../../../../../../../src/plugins/data/public';
import { Importer } from './importer';
import Papa from 'papaparse';

View file

@ -12,7 +12,7 @@ import { KibanaConfigTypeFix } from '../../contexts/kibana';
import { NavigationMenu } from '../../components/navigation_menu';
// @ts-ignore
import { FileDataVisualizerView } from './components/file_datavisualizer_view';
import { FileDataVisualizerView } from './components/file_datavisualizer_view/index';
export interface FileDataVisualizerPageProps {
indexPatterns: IndexPatterns;

View file

@ -17,7 +17,7 @@ import uiRoutes from 'ui/routes';
import { IndexPatterns } from 'ui/index_patterns';
import { KibanaConfigTypeFix } from '../../contexts/kibana';
import { getFileDataVisualizerBreadcrumbs } from './breadcrumbs';
import { InjectorService } from '../../../common/types/angular';
import { InjectorService } from '../../../../common/types/angular';
import { checkBasicLicense } from '../../license/check_license';
import { checkFindFileStructurePrivilege } from '../../privilege/check_privilege';
import { getMlNodeCount } from '../../ml_nodes_check/check_ml_nodes';

View file

@ -9,7 +9,7 @@ import {
ML_BREADCRUMB,
DATA_VISUALIZER_BREADCRUMB,
// @ts-ignore
} from '../../breadcrumbs';
} from '../../../breadcrumbs';
export function getDataVisualizerBreadcrumbs() {
// Whilst top level nav menu with tabs remains,

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { ML_JOB_FIELD_TYPES } from '../../../../common/constants/field_types';
import { ML_JOB_FIELD_TYPES } from '../../../../../common/constants/field_types';
// The internal representation of the configuration used to build the visuals
// which display the field information.

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { ML_JOB_FIELD_TYPES } from '../../../../common/constants/field_types';
import { ML_JOB_FIELD_TYPES } from '../../../../../common/constants/field_types';
export interface FieldRequestConfig {
fieldName?: string;

View file

@ -6,11 +6,11 @@
import React, { FC } from 'react';
import { ML_JOB_FIELD_TYPES } from '../../../../../common/constants/field_types';
import { ML_JOB_FIELD_TYPES } from '../../../../../../common/constants/field_types';
import { FieldVisConfig } from '../../common';
// @ts-ignore
import { FieldTitleBar } from '../../../../components/field_title_bar';
import { FieldTitleBar } from '../../../../components/field_title_bar/index';
import {
BooleanContent,
DateContent,

View file

@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n';
import { EuiSelect } from '@elastic/eui';
import { ML_JOB_FIELD_TYPES } from '../../../../../common/constants/field_types';
import { ML_JOB_FIELD_TYPES } from '../../../../../../common/constants/field_types';
interface Props {
fieldTypes: ML_JOB_FIELD_TYPES[];

View file

@ -23,7 +23,7 @@ import { i18n } from '@kbn/i18n';
import { toastNotifications } from 'ui/notify';
import { ML_JOB_FIELD_TYPES } from '../../../../../common/constants/field_types';
import { ML_JOB_FIELD_TYPES } from '../../../../../../common/constants/field_types';
import { FieldDataCard } from '../field_data_card';
import { FieldTypesSelect } from '../field_types_select';
import { FieldVisConfig } from '../../common';

View file

@ -23,11 +23,11 @@ import { i18n } from '@kbn/i18n';
import { IndexPattern } from 'ui/index_patterns';
import { SEARCH_QUERY_LANGUAGE } from '../../../../../common/constants/search';
import { SEARCH_QUERY_LANGUAGE } from '../../../../../../common/constants/search';
import { SavedSearchQuery } from '../../../../contexts/kibana';
// @ts-ignore
import { KqlFilterBar } from '../../../../components/kql_filter_bar';
import { KqlFilterBar } from '../../../../components/kql_filter_bar/index';
interface Props {
indexPattern: IndexPattern;

View file

@ -10,7 +10,7 @@ import { toastNotifications } from 'ui/notify';
import { IndexPattern } from 'ui/index_patterns';
import { SavedSearchQuery } from '../../../contexts/kibana';
import { IndexPatternTitle } from '../../../../common/types/kibana';
import { IndexPatternTitle } from '../../../../../common/types/kibana';
import { ml } from '../../../services/ml_api_service';
import { FieldRequestConfig } from '../common';

View file

@ -13,7 +13,7 @@ const module = uiModules.get('apps/ml', ['react']);
import { I18nContext } from 'ui/i18n';
import { IndexPatterns } from 'ui/index_patterns';
import { InjectorService } from '../../../common/types/angular';
import { InjectorService } from '../../../../common/types/angular';
import { KibanaConfigTypeFix, KibanaContext } from '../../contexts/kibana/kibana_context';
import { createSearchItems } from '../../jobs/new_job/utils/new_job_utils';

View file

@ -22,10 +22,10 @@ import {
EuiSpacer,
EuiTitle,
} from '@elastic/eui';
import { KBN_FIELD_TYPES, esQuery } from '../../../../../../../src/plugins/data/public';
import { KBN_FIELD_TYPES, esQuery } from '../../../../../../../../src/plugins/data/public';
import { NavigationMenu } from '../../components/navigation_menu';
import { ML_JOB_FIELD_TYPES } from '../../../common/constants/field_types';
import { SEARCH_QUERY_LANGUAGE } from '../../../common/constants/search';
import { ML_JOB_FIELD_TYPES } from '../../../../common/constants/field_types';
import { SEARCH_QUERY_LANGUAGE } from '../../../../common/constants/search';
import { isFullLicense } from '../../license/check_license';
import { FullTimeRangeSelector } from '../../components/full_time_range_selector';
import { mlTimefilterRefresh$ } from '../../services/timefilter_refresh_service';

View file

@ -5,7 +5,7 @@
*/
import { ML_BREADCRUMB, ANOMALY_DETECTION_BREADCRUMB } from '../breadcrumbs';
import { ML_BREADCRUMB, ANOMALY_DETECTION_BREADCRUMB } from '../../breadcrumbs';
import { i18n } from '@kbn/i18n';

View file

@ -41,7 +41,7 @@ import { getBoundsRoundedToInterval } from '../util/time_buckets';
import { getSelectedJobIds } from '../components/job_selector/job_select_service_utils';
import { InfluencersList } from '../components/influencers_list';
import { ALLOW_CELL_RANGE_SELECTION, dragSelect$, explorer$ } from './explorer_dashboard_service';
import { mlResultsService } from 'plugins/ml/services/results_service';
import { mlResultsService } from '../services/results_service';
import { LoadingIndicator } from '../components/loading_indicator/loading_indicator';
import { NavigationMenu } from '../components/navigation_menu';
import { CheckboxShowCharts, showCharts$ } from '../components/controls/checkbox_showcharts';
@ -89,7 +89,7 @@ import {
SWIMLANE_TYPE,
VIEW_BY_JOB_LABEL,
} from './explorer_constants';
import { ML_RESULTS_INDEX_PATTERN } from '../../common/constants/index_patterns';
import { ML_RESULTS_INDEX_PATTERN } from '../../../common/constants/index_patterns';
// Explorer Charts
import { ExplorerChartsContainer } from './explorer_charts/explorer_charts_container';

View file

@ -13,8 +13,8 @@
import _ from 'lodash';
import { parseInterval } from '../../../common/util/parse_interval';
import { getEntityFieldList } from '../../../common/util/anomaly_utils';
import { parseInterval } from '../../../../common/util/parse_interval';
import { getEntityFieldList } from '../../../../common/util/anomaly_utils';
import { buildConfigFromDetector } from '../../util/chart_config_builder';
import { mlJobService } from '../../services/job_service';

View file

@ -21,7 +21,7 @@ import moment from 'moment';
// because it won't work with the jest tests
import { formatHumanReadableDateTime } from '../../util/date_utils';
import { formatValue } from '../../formatters/format_value';
import { getSeverityColor, getSeverityWithLow } from '../../../common/util/anomaly_utils';
import { getSeverityColor, getSeverityWithLow } from '../../../../common/util/anomaly_utils';
import {
getChartType,
getTickValues,

View file

@ -25,7 +25,7 @@ import {
getSeverityColor,
getSeverityWithLow,
getMultiBucketImpactLabel,
} from '../../../common/util/anomaly_utils';
} from '../../../../common/util/anomaly_utils';
import {
LINE_CHART_ANOMALY_RADIUS,
MULTI_BUCKET_SYMBOL_SIZE,

View file

@ -19,8 +19,8 @@ import {
getChartType
} from '../../util/chart_utils';
import { getEntityFieldList } from '../../../common/util/anomaly_utils';
import { isSourceDataChartableForDetector, isModelPlotEnabled } from '../../../common/util/job_utils';
import { getEntityFieldList } from '../../../../common/util/anomaly_utils';
import { isSourceDataChartableForDetector, isModelPlotEnabled } from '../../../../common/util/job_utils';
import { mlResultsService } from '../../services/results_service';
import { mlJobService } from '../../services/job_service';
import { severity$ } from '../../components/controls/select_severity/select_severity';

View file

@ -4,4 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/
import 'plugins/ml/components/chart_tooltip';
import '../../components/chart_tooltip';

View file

@ -24,10 +24,10 @@ import { getAnomalyExplorerBreadcrumbs } from './breadcrumbs';
import { checkFullLicense } from '../license/check_license';
import { checkGetJobsPrivilege } from '../privilege/check_privilege';
import { loadIndexPatterns } from '../util/index_utils';
import { TimeBuckets } from 'plugins/ml/util/time_buckets';
import { TimeBuckets } from '../util/time_buckets';
import { explorer$ } from './explorer_dashboard_service';
import { mlTimefilterRefresh$ } from '../services/timefilter_refresh_service';
import { mlFieldFormatService } from 'plugins/ml/services/field_format_service';
import { mlFieldFormatService } from '../services/field_format_service';
import { mlJobService } from '../services/job_service';
import { getSelectedJobIds, jobSelectServiceFactory } from '../components/job_selector/job_select_service_utils';
import { timefilter } from 'ui/timefilter';

View file

@ -21,7 +21,7 @@ import moment from 'moment';
// because it won't work with the jest tests
import { formatHumanReadableDateTime } from '../util/date_utils';
import { numTicksForDateFormat } from '../util/chart_utils';
import { getSeverityColor } from '../../common/util/anomaly_utils';
import { getSeverityColor } from '../../../common/util/anomaly_utils';
import { mlEscape } from '../util/string_utils';
import { mlChartTooltipService } from '../components/chart_tooltip/chart_tooltip_service';
import { ALLOW_CELL_RANGE_SELECTION, dragSelect$ } from './explorer_dashboard_service';

View file

@ -10,12 +10,12 @@
import { chain, each, get, union, uniq } from 'lodash';
import { getEntityFieldList } from '../../common/util/anomaly_utils';
import { isSourceDataChartableForDetector, isModelPlotEnabled } from '../../common/util/job_utils';
import { parseInterval } from '../../common/util/parse_interval';
import { getEntityFieldList } from '../../../common/util/anomaly_utils';
import { isSourceDataChartableForDetector, isModelPlotEnabled } from '../../../common/util/job_utils';
import { parseInterval } from '../../../common/util/parse_interval';
import { ml } from '../services/ml_api_service';
import { mlJobService } from '../services/job_service';
import { mlResultsService } from 'plugins/ml/services/results_service';
import { mlResultsService } from '../services/results_service';
import {
MAX_CATEGORY_EXAMPLES,
@ -26,7 +26,7 @@ import {
import {
ANNOTATIONS_TABLE_DEFAULT_QUERY_SIZE,
ANOMALIES_TABLE_DEFAULT_QUERY_SIZE
} from '../../common/constants/search';
} from '../../../common/constants/search';
import { i18n } from '@kbn/i18n';
import chrome from 'ui/chrome';

View file

@ -6,9 +6,9 @@
import 'plugins/ml/explorer/explorer_controller';
import 'plugins/ml/explorer/explorer_dashboard_service';
import 'plugins/ml/explorer/explorer_react_wrapper_directive';
import 'plugins/ml/explorer/explorer_charts';
import 'plugins/ml/explorer/select_limit';
import 'plugins/ml/components/job_selector';
import '../explorer/explorer_controller';
import '../explorer/explorer_dashboard_service';
import '../explorer/explorer_react_wrapper_directive';
import '../explorer/explorer_charts';
import '../explorer/select_limit';
import '../components/job_selector';

View file

@ -5,7 +5,7 @@
*/
import moment from 'moment-timezone';
import { AnomalyRecordDoc } from '../../common/types/anomalies';
import { AnomalyRecordDoc } from '../../../common/types/anomalies';
import { formatValue } from './format_value';
describe('ML - formatValue formatter', () => {

View file

@ -12,7 +12,7 @@
*/
import moment from 'moment';
import { AnomalyRecordDoc } from '../../common/types/anomalies';
import { AnomalyRecordDoc } from '../../../common/types/anomalies';
const SIGFIGS_IF_ROUNDING = 3; // Number of sigfigs to use for values < 10
// Formats the value of an actual or typical field from a machine learning anomaly record.

View file

@ -4,9 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { xpackInfo } from 'plugins/xpack_main/services/xpack_info';
import { xpackInfo } from '../../../../xpack_main/public/services/xpack_info';
import { uiModules } from 'ui/modules';
import { npStart } from 'ui/new_platform';

View file

@ -10,7 +10,7 @@ import {
ANOMALY_DETECTION_BREADCRUMB,
DATA_VISUALIZER_BREADCRUMB,
ML_BREADCRUMB,
} from '../breadcrumbs';
} from '../../breadcrumbs';
export function getJobManagementBreadcrumbs(): Breadcrumb[] {
// Whilst top level nav menu with tabs remains,

View file

@ -28,7 +28,7 @@ import {
EuiTitle,
} from '@elastic/eui';
import { isValidCustomUrlSettingsTimeRange } from '../../../jobs/components/custom_url_editor/utils';
import { isValidCustomUrlSettingsTimeRange } from './utils';
import { isValidLabel } from '../../../util/custom_url_utils';
import { i18n } from '@kbn/i18n';
import { FormattedMessage, injectI18n } from '@kbn/i18n/react';

View file

@ -23,9 +23,9 @@ import { FormattedMessage } from '@kbn/i18n/react';
import { isValidLabel, openCustomUrlWindow } from '../../../util/custom_url_utils';
import { getTestUrl } from './utils';
import { parseInterval } from '../../../../common/util/parse_interval';
import { parseInterval } from '../../../../../common/util/parse_interval';
import { TIME_RANGE_TYPE } from './constants';
import { KibanaUrlConfig } from '../../../../common/types/custom_urls';
import { KibanaUrlConfig } from '../../../../../common/types/custom_urls';
import { Job } from '../../new_job/common/job_creator/configs';
function isValidTimeRange(timeRange: KibanaUrlConfig['time_range']): boolean {

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { KibanaUrlConfig } from '../../../../common/types/custom_urls';
import { KibanaUrlConfig } from '../../../../../common/types/custom_urls';
import { Job } from '../../new_job/common/job_creator/configs';
export function getTestUrl(job: Job, customUrl: KibanaUrlConfig): Promise<string>;

View file

@ -12,9 +12,9 @@ import {
import chrome from 'ui/chrome';
import rison from 'rison-node';
import { ML_RESULTS_INDEX_PATTERN } from '../../../../common/constants/index_patterns';
import { getPartitioningFieldNames } from '../../../../common/util/job_utils';
import { parseInterval } from '../../../../common/util/parse_interval';
import { ML_RESULTS_INDEX_PATTERN } from '../../../../../common/constants/index_patterns';
import { getPartitioningFieldNames } from '../../../../../common/util/job_utils';
import { parseInterval } from '../../../../../common/util/parse_interval';
import { replaceTokensInUrlValue, isValidLabel } from '../../../util/custom_url_utils';
import { ml } from '../../../services/ml_api_service';
import { mlJobService } from '../../../services/job_service';

View file

@ -27,7 +27,7 @@ import { has } from 'lodash';
import { FormattedMessage, injectI18n } from '@kbn/i18n/react';
import { parseInterval } from '../../../../../common/util/parse_interval';
import { parseInterval } from '../../../../../../common/util/parse_interval';
import { ml } from '../../../../services/ml_api_service';
import { SelectSeverity } from '../../../../components/controls/select_severity/select_severity';
import { mlCreateWatchService } from './create_watch_service';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { ML_RESULTS_INDEX_PATTERN } from '../../../../../common/constants/index_patterns';
import { ML_RESULTS_INDEX_PATTERN } from '../../../../../../common/constants/index_patterns';
export const watch = {
trigger: {

View file

@ -19,7 +19,7 @@ import {
} from '@elastic/eui';
import { deleteJobs } from '../utils';
import { DELETING_JOBS_REFRESH_INTERVAL_MS } from '../../../../../common/constants/jobs_list';
import { DELETING_JOBS_REFRESH_INTERVAL_MS } from '../../../../../../common/constants/jobs_list';
import { injectI18n, FormattedMessage } from '@kbn/i18n/react';
export const DeleteJobModal = injectI18n(class extends Component {

View file

@ -8,8 +8,8 @@
import { difference } from 'lodash';
import chrome from 'ui/chrome';
import { getNewJobLimits } from '../../../../services/ml_server_info';
import { mlJobService } from 'plugins/ml/services/job_service';
import { processCreatedBy } from '../../../../../common/util/job_utils';
import { mlJobService } from '../../../../services/job_service';
import { processCreatedBy } from '../../../../../../common/util/job_utils';
export function saveJob(job, newJobData, finish) {

View file

@ -18,9 +18,9 @@ import {
EuiFieldNumber,
} from '@elastic/eui';
import { calculateDatafeedFrequencyDefaultSeconds } from 'plugins/ml/../common/util/job_utils';
import { calculateDatafeedFrequencyDefaultSeconds } from '../../../../../../../common/util/job_utils';
import { getNewJobDefaults } from '../../../../../services/ml_server_info';
import { parseInterval } from 'plugins/ml/../common/util/parse_interval';
import { parseInterval } from '../../../../../../../common/util/parse_interval';
import { MLJobEditor } from '../../ml_job_editor';
import { FormattedMessage } from '@kbn/i18n/react';

View file

@ -17,8 +17,8 @@ import {
EuiSpacer,
} from '@elastic/eui';
import { mlJobService } from 'plugins/ml/services/job_service';
import { detectorToString } from 'plugins/ml/util/string_utils';
import { mlJobService } from '../../../../../services/job_service';
import { detectorToString } from '../../../../../util/string_utils';
export class Detectors extends Component {
constructor(props) {

View file

@ -18,7 +18,7 @@ import {
EuiComboBox,
} from '@elastic/eui';
import { ml } from 'plugins/ml/services/ml_api_service';
import { ml } from '../../../../../services/ml_api_service';
import { FormattedMessage, injectI18n } from '@kbn/i18n/react';
class JobDetailsUI extends Component {

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